You are not logged in.

#1 2010-11-18 09:06:51

pie86
Member
Registered: 2009-09-06
Posts: 78

[SOLVED] multiple host names and domains configuration

Hi everybody,
probably this is a less than newbie questions but I can't figure out what is the right way to set my hosts files within this framework:

1) Two registred domains pointing to my ip address: www.bonfus.it, argo.mooo.com

2) nslookup of wan ip address:

nslookup 79.41.201.100
Server:        192.168.2.1
Address:    192.168.2.1#53

Non-authoritative answer:
100.201.41.79.in-addr.arpa    name = host100-201-dynamic.41-79-r.retail.telecomitalia.it.

3) DDWrt (192.168.2.1) natting traffic to local network and web server

4) Server PC with services (192.168.2.100)

My problem is: how should I set domain name within DDWRT router configuration and on the server PC? Is this configuration correct for the pc?

/etc/hosts/

#<ip-address>   <hostname.domain.org>   <hostname>
127.0.0.1          localhost.localdomain   localhost argo

192.168.2.100        argo.mooo.com         argo
192.168.2.100        www.bonfus.it         www

/etc/rc.conf

HOSTNAME="argo"

Thanks,
Pietro

Last edited by pie86 (2010-11-28 19:29:40)

Offline

#2 2010-11-18 22:39:47

TheCox
Member
From: Orlando, FL
Registered: 2010-02-23
Posts: 34

Re: [SOLVED] multiple host names and domains configuration

Any domains that are local should point to the local IP in /etc/hosts. You should just need one line.

Something like this:

127.0.0.1          localhost.localdomain   localhost argo argo.mooo.com www.bonfus.it

You don't have to put them all in there. For example, you'd only want to add 'www' if you want the www host to resolv to 127.0.0.1. I doubt you'd ever see the host www used by itself. Usually having just the short and long server hostname is enough (argo and argo.mooo.com).

I think you should have the long hostname in your /etc/rc.conf:

HOSTNAME="argo.mooo.com"

Offline

#3 2010-11-28 19:34:45

pie86
Member
Registered: 2009-09-06
Posts: 78

Re: [SOLVED] multiple host names and domains configuration

Thanks!

Offline

Board footer

Powered by FluxBB