localhost or LAN addresses in /etc/hosts
cl at isbd.net
Sat Dec 13 10:44:08 UTC 2008
On Sat, Dec 13, 2008 at 07:35:24AM +0100, Nils Kassube wrote:
> 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 (192.168.1.4) get
> > local addresses? The other machines on the LAN use 192.168.1.4 for DNS
> > and that's fine with a file such as /etc/hosts.dnsmasq but 192.168.1.4
> > can't use 192.168.1.4 as it's DNS can it?
> Yes it can. Or you can use 127.0.0.1 if you prefer.
You're right of course, but a little extra configuration of dnsmasq is
required to tell it where the upstream DNS is as, by default, it uses
More information about the ubuntu-users