PDA

View Full Version : Hostname and /etc/hosts file? not sure


GerardNijboer
25th August 2007, 13:03
Hi,

I am doing the Perfect Setup for Ubuntu 6.06 LTS that can be found on:
http://www.howtoforge.com/perfect_setup_ubuntu_6.06_p5
I already set the /etc/hosts file, and just filled in something hoping it would all come together later on.
But now, at step 11, I need to set up the mail systems, and for that, I need to be sure of the servername.
The writer of the HOWTO uses, server1.example.com.
Considering the fact that I am the owner of the domain www.monstagames.nl, I think I can use server.monstagames.nl?
But the server is at my home, and has no other .monstagames.nl devices in its network.
I set up my /etc/hosts file like this:

127.0.0.1 localhost.localdomain localhost
192.168.1.75 server.monstagames.nl webserver

# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

I hope this looks clear to you, any help is welcome.
Thanks in advance.

Cheers,
Gerard Nijboer

falko
26th August 2007, 17:08
Considering the fact that I am the owner of the domain www.monstagames.nl, I think I can use server.monstagames.nl?

Yes, you can use that hostname, but you should then also create an A record for server.monstagames.nl pointing to your public IP address.

If you have a dynamic IP address, it's better to get a hostname from dyndns.org and use that one.

GerardNijboer
28th August 2007, 14:46
Okay, thanks.
Well, my public IP is always fixed to 80.61.36.XX, so I guess I don't need a DynDNS.org record.
I went to the control panel of my dns provider, and set up an A record to my public IP, and everything works now!
Thanks Falco.