Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 31 Mar 2003 22:56:18 +0000
From:      Ryan Merrick <sandshrimp@attbi.com>
To:        "W. Sierke" <ws@senet.com.au>
Cc:        freebsd-questions@FreeBSD.org
Subject:   Re: localhost name resolution problem
Message-ID:  <3E88C792.5020906@attbi.com>
References:  <024501c2f7c6$080ab560$0264a8c0@regional.net.au>

next in thread | previous in thread | raw e-mail | index | archive | help
W. Sierke wrote:

>Hi,
>
>In the course of trying to resolve a problem with sendmail (refusing to
>deliver even local mail), I saw a note in the sendmail configuration docs
>which says "host localhost must resolve to 127.0.0.1". However, when I
>checked my system I instead found (details obscured):
>
># host localhost
>localhost.my.domain is a nickname for my.domain
>my.domain has address 202.x.x.x
>
>
>Someone suggested I check localhost.:
>
># host localhost.
>Host not found.
>
>
>I'm not (wasn't) running a nameserver, my host.conf contains the entries
>hosts and bind in that order, resolv.conf has a single, automatic (from
>PPPoE)
>nameserver entry which works, hostname is set to this_machine.my.domain.
>
>hosts contains
>::1 localhost.my.domain localhost
>127.0.0.1 localhost.my.domain localhost
>192.168.100.1 this_machine.my.domain this_machine
>192.168.100.2 another_machine.my.domain another_machine
>...
>
>
>
>
>  
>

Your #/etc/hosts file should read for IPv4 localhost
127.0.0.1    localhost.Your_local_domain.com localhost

There should be another line in #/etc/hosts your host
192.168.100.1    My_host.Your_local_domain.com My_host

You can add as many lines as you want. with IP address, hostname, nickname.

-Ryan



 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3E88C792.5020906>