freebsd-questions-local at be-well.ilk.org
Wed Nov 26 13:58:41 PST 2003
Bryan Cassidy <b_cassidy at bellsouth.net> writes:
> I was told I should add a hostname. (my domain name maybe?
> bsdjunky.dyndns.org? Will that do?)
So far, this could mean several things. hostname(1) should have a
reasonable idea of the host's name, if possible.
> He said I should put an entry in
> /etc/hosts that maps the IP of your box to the hostname you gave it.
There's not necessarily any need for this. DNS should resolve it
properly, if a bit slower. Some applications will require a reverse
mapping (cvsup comes to mind), but if the real DNS is correct, you
don't need hosts to do that.
> Then put that hostname into main.cf.
There's no standard file by that name. Maybe you're configuring
postfix? In that case it's a postfix question, but again, editing
hosts is usually only necessary if there's a DNS mapping missing.
> How would I go about adding a
> hostname to /etc/hosts that maps the IP of my box? I use DHCP if that
Putting your hostname on the loopback address (127.0.0.1) is usually a
> Never added anything to /etc/hosts before so don't know the
> syntax or anything about what I should add.
man 5 hosts
or read what's already in the file.
> Just add simply on the first
> line without any whitespaces bsdjunky.homeunix.org or something else?
An IP address, whitespace, and one or more DNS names.
More information about the freebsd-questions