Discussion:
[Dnsmasq-discuss] dnsmasq-2.18: ignoring nameserver 127.0.0.1 - local interface
gypsy
2004-11-26 20:49:32 UTC
Permalink
I am moving this discussion from private Email between me and Simon so
that google searches can find the answer for others with the same
problem.

g>> I cannot believe the answer to this is not in the FAQ or to be found
via google, but it isn't.
g>>
g>>
Simon Kelley
2004-11-27 10:24:33 UTC
Permalink
I _THINK_ I understand the docs correctly <g>. Herewith all the facts I
search chsoft.biz
nameserver 127.0.0.1
domain-needed
bogus-priv
filterwin2k
server=206.72.64.80
server=206.72.64.70
address=/doubleclick.net/127.0.0.1
except-interface=eth1
domain=chsoft.biz
local-ttl=86400
bogus-nxdomain=12.158.80.10
bogus-nxdomain=64.94.110.11
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.
I hope it is safe to ignore the fact that this machine uses proxyARP so
that it listens to all 5 of the external IPs on eth1 and then forwards
to the correct machine via a complex routing table on eth0. If we have
to "go there", it really complicates this discussion. It should not be
relevant, but what do I know?!!
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
"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,
12.158.80.10, 64.94.110.11) 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

HTH

Simon.
gypsy
2004-11-27 17:57:48 UTC
Permalink
Post by Simon Kelley
I _THINK_ I understand the docs correctly <g>. Herewith all the facts I
search chsoft.biz
nameserver 127.0.0.1
domain-needed
bogus-priv
filterwin2k
server=206.72.64.80
server=206.72.64.70
address=/doubleclick.net/127.0.0.1
except-interface=eth1
domain=chsoft.biz
local-ttl=86400
bogus-nxdomain=12.158.80.10
bogus-nxdomain=64.94.110.11
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.
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
"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,
12.158.80.10, 64.94.110.11) 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
HTH
Simon.
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.

gypsy
Simon Kelley
2004-11-27 20:21:13 UTC
Permalink
Post by gypsy
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.
dnsmasq does ignore resolv.conf, it has to be there for everything else.
I guess the documentation assumes the knowledge that "all the programs
on a system which need a DNS server find it by looking in /etc/resolv.conf"
Post by gypsy
For the record, I should also mention that I had to stop axfrdns. With
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.
To run axfrdns and dnsmasq on the same machine, it must have two
addresses. Yours doesn't, so you can't have both daemons on the same port.
Post by gypsy
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.
No problem.

Cheers,

Simon.

Loading...