localhost or LAN addresses in /etc/hosts

Nils Kassube kassube at gmx.net
Sat Dec 13 06:35:24 UTC 2008

Chris G wrote:
> On Fri, Dec 12, 2008 at 10:17:53PM +0100, Nils Kassube wrote:
> > Chris G wrote:
> > > dnsmasq uses the entries in /etc/hosts to provide information to
> > > other machines on the LAN.  Thus it *needs* an entry for isbd
> > > somewhere to tell other machines what isbd's address is.
> >
> > Dnsmasq _can_ use the entries from "/etc/hosts" but it can also use
> > entries from a separate file e.g. "/etc/hosts.dnsmasq" (I think
> > that's the filename proposed in the config file). I would suggest you
> > use "/etc/hosts" only for the localhost entry and
> > "/etc/hosts.dnsmasq" for everything else. Then the resolver asks
> > dnsmasq for everything except localhost.
> Then how does the machine where dnsmasq is running ( get
> local addresses? The other machines on the LAN use for DNS
> and that's fine with a file such as /etc/hosts.dnsmasq but
> can't use as it's DNS can it?

Yes it can. Or you can use if you prefer.


More information about the ubuntu-users mailing list