Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
webserver hostname/domainname on a private lan??
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
KernyKat
n00b
n00b


Joined: 27 Sep 2005
Posts: 5
Location: Sydney, Australia

PostPosted: Sun Oct 23, 2005 6:54 pm    Post subject: webserver hostname/domainname on a private lan?? Reply with quote

This is my setup:

I have a domain name whose A record points to my public IP address at home. (for argument's sake: example.com)
My router does NAT, and is set to forward port 80 requests to my gentoo box ("Virtual Server") on 10.0.0.11.

My question is: where should I enter 'example.com' and what should I set as hostnames and domain names on my LAN? Considering there is NAT going on...

The login prompt of gentoo quotes itself as "pelican.unknown_domain", I have HOSTNAME="pelican" in /etc/onf.d/hostname, and /etc/conf.d/domainname does not exist yet. Should this be set to 'example.com'?

and what is the diffference between /etc/conf.d/domainname and /etc/dnsdomainname ?

My router refuses to be given a hostname without a period in it, and has no setting for domain name, thus it's hostname is set as "jellyfish.example.com", is this correct? Maybe this is where I should put just "example.com" ?

I have apache's ServerName set to example.com too.

I might be getting confused between DNS and NIS domains... I havn't quite figured out what the use of NIS is yet, and where my computers even get their hostnames from... all machines are set to DHCP, and my router(dhcp server) is set to give the same MAC-to-IP every time(fixed hosts), and at the same time, somehow hostnames come into it? On my windows machines... is the domain name setting there NIS, DNS, or somehting else? Then come hosts files... Gah.

Very confusing...
Back to top
View user's profile Send private message
sloof3
Tux's lil' helper
Tux's lil' helper


Joined: 09 Sep 2004
Posts: 75

PostPosted: Sun Oct 23, 2005 8:18 pm    Post subject: Reply with quote

In theory you could set your hostnames and domainnames to whatever you want on your LAN. Won't effect anyone on the internet.

If you own 'example.com' then set that as your domain in /etc/conf.d/domainname
That is the preferred place to set it. /etc/dnsdomainname is deprecated.

Set your router to: hostname.example.com.
"hostname" being whatever you want to call it. That way if it takes example.com as the domain to hand out in DHCP. Then your clients will all be in the example.com domain.
You can override that in /etc/conf.d/domainname as you'll see when you edit it.

Forget about NIS, I have never needed to know what it does exactly or why I should use it. The people that need to know about it, know about it.

With Apache, best set your ServerName to whatever you set your DNS A record to.

With Windows: DHCP should set the domain. Again set the hostname to whatever you want.

As for hostfiles that's where you can setup hostname <--> IP maps if you don't already have a DNS server. By default your Linux/Windows looks there first to see if there is already a map between hostname and IP. In otherwords set up your hostname <--> IP maps in here if you don't run a DNS server and want: ping jellyfish.example.com to work.

-sloof3
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum