[Dnsmasq-discuss] dnsmasq-2.18: ignoring nameserver 127.0.0.1- local
Sat, 27 Nov 2004 09:57:48 -0800
Simon Kelley wrote:
> gypsy wrote:
> > I _THINK_ I understand the docs correctly <g>. Herewith all the facts I
> > believe are pertinent:
> > /etc/resolv.conf:
> > search chsoft.biz
> > nameserver 127.0.0.1
> > /etc/dnsmasq.conf:
> > domain-needed
> > bogus-priv
> > filterwin2k
> > server=184.108.40.206
> > server=220.127.116.11
> > address=/doubleclick.net/127.0.0.1
> > except-interface=eth1
> > domain=chsoft.biz
> > local-ttl=86400
> > bogus-nxdomain=18.104.22.168
> > bogus-nxdomain=22.214.171.124
> > log-queries
> > The linux box has 2 NICs. eth0 faces the LAN and eth1 faces the
> > internet. Its name is ns.chsoft.biz, from which you will correctly
> > assume that it is the name server. There is a block of 5 usable IPs and
> > this machine is on the last usable IP (.158). It runs axfrdns and
> > tinydns but *not* dnscache because I believe dnscache is abusive of the
> > root servers. I want dnsmasq to provide DNS for the entire LAN,
> > including itself.
> > THE PROBLEM:
> > When I put localhost ("nameserver 127.0.0.1") into /etc/resolv.conf
> > (refer to the above resolv.conf) and start dnsmasq, dnsmasq reports this
> > error:
> > "ignoring nameserver 127.0.0.1 - local interface"
> > Side note: a google search finds many instances of this error message.
> > I cannot figure out how to configure dnsmasq to act as a cache for the
> > host on which it is running. Frankly, this is not "a must" because this
> > Linux box runs only sshd, axfrdns and tinydns. Nevertheless, I want
> > this to work.
> > Please advise.
> So I think that you've already succeeded: have you looked in the log to
> see if DNS queries from this host are passing through dnsmasq? My guess
> is that they are.
> The reason for the "ignoring nameserver" is that dnsmasq is looking in
> /etc/resolv.conf for upstream nameservers, as well as in
> /etc/dnsmasq.conf, so it ends up with the set of (127.0.0.1,
> 126.96.36.199, 188.8.131.52) as upstream nameservers. However, dnsmasq
> also knows that it is listening on 127.0.0.1 for DNS queries, so it's
> clever enough to ignore that - and tell you about it. This is quite
> important, since looping-back queries will cause them to circulate
> hundreds of times until tables are filled and the query gets thrown away.
> To get rid of the warning, you can tell dnsmasq not to read
> /etc/resolv.conf, by adding "no-resolv" to /etc/dnsmasq.conf
I am happy to report success. However, I wish to point out that, even
though "no-resolv" is set, resolv.conf must nevertheless contain
"nameserver 127.0.0.1". Please clarify this in the man page because I
expected "no-resolv" to totally ignore resolv.conf but it does not.
For the record, I should also mention that I had to stop axfrdns. With
or without "bind-interfaces", dnsmasq "failed to bind listening socket:
Address already in use". I believe that's because axfrdns does not bind
an interface, it binds an IP, which in my setup is never going to work.
Thank you VERY much for your assistance. I cannot tell you how many
times I have been disappointed, but you restore my faith - in both the
software and in the support.