[Dnsmasq-discuss] dnsmasq does not respond correctly on loopback(lo)

fred at damen.org fred at damen.org
Wed Oct 13 20:20:34 BST 2010


I now see the option in the installed man page.
There is no mention of this option in my /etc/dnsmasq.conf file.

I do not suspect that this is the issue though:
Each computer, the server in question included, all have the same name(s), i.e. interfaces are not named separately.
Computers severed by dnsmasq both for DHCP and DNS work as expected,
  i.e. the network printer 192.168.0.x, DNS name 'printer1' gets its name through dnsmasq DHCP server on 192.168.0.1,
       computer nick 192.168.0.y who has its DNS server set in /etc/resolv.conf to 192.168.0.1 can ping printer1, printer1.damen.org.
The SERVER 192.168.0.1(and external interface) with its first nameserver set to 127.0.0.1 and following nameservers set to external name
servers in its /etc/resolv.conf can not ping printer1, printer1.damen.org.  On the SERVER if you direct the DNS queries
to go directly to 192.168.0.1 using dig's @ option the DNS name printer1 can be resolved correctly.  Going directly to
DNS server at 127.0.0.1 using dig does not resolve the DNS name.

Before I added 127.0.0.1 as the first nameserver in /etc/resolv.conf the name resolution for DNS names external to my LAN was slow and after
adding it external name resolution when fast,  and the fact that 'dig @127.0.0.1 printer1' does not indicate inability to contact the
DNS server, I suspect that dnsmasq is acting as a DNS server on 127.0.0.1.  But why does dnsmasq not resolve the names in its DHCP
configuration on the 127.0.0.1 interface?

Thanks for the help,

Fred

> I guess I gave you the wrong spelling of the option.  It is in the online
> man page but has an 's' not a 'z'.  You might also check for the abbreviated
> option which is "-y".
>
> *-y, --localise-queries*Return answers to DNS queries from /etc/hosts which
> depend on the interface over which the query was received. If a name in
> /etc/hosts has more than one address associated with it, and at least one of
> those addresses is on the same subnet as the interface to which the query
> was sent, then return only the address(es) on that subnet. This allows for a
> server to have multiple addresses in /etc/hosts corresponding to each of its
> interfaces, and hosts will get the correct address based on which network
> they are attached to. Currently this facility is limited to IPv4.
>
>
>
> On Tue, Oct 12, 2010 at 6:38 PM, <fred at damen.org> wrote:
>
>> localize-queries does not appear in my /etc/dnsmasq.conf and there are no
>> /etc/dnsmasq.d/* files.
>> There is no mention of localize-queries in the dnsmasq installed man page.
>>
>> > Are you by any chance using localize-queries?
>> >
>> > On Mon, Oct 11, 2010 at 11:52 PM, <fred at damen.org> wrote:
>> >
>> >> Greetings,
>> >>
>> >> I have dnsmasq working using DHCP and DNS fine except that the dnsmasq
>> >> server responds incorrectly on the loopback address, i.e. other
>> computers
>> >> that get ip address(s) (dhcp) and resolve names (DNS) works but
>> resolving
>> >> dns names on the host on which dnsmasq is running indicates the
>> configured
>> >> dns names are unresolvable.
>> >>
>> >> /etc/resole.conf
>> >> nameserver 127.0.0.1
>> >> nameserver xx.xx.xx.xx
>> >>
>> >> /etc/dnsmasq.conf
>> >> ...
>> >> interface=lo
>> >> interface=eth0
>> >> listen-address=127.0.0.1
>> >> ...
>> >>
>> >> /var/log/messages
>> >> ...
>> >> Oct 11 23:32:55 damen dnsmasq[17165]: started, version 2.52 cachesize
>> 150
>> >> Oct 11 23:32:55 damen dnsmasq[17165]: compile time options: IPv6
>> >> GNU-getopt DBus no-I18N DHCP TFTP
>> >> Oct 11 23:32:55 damen dnsmasq-dhcp[17165]: DHCP, IP range 192.168.0.16
>> --
>> >> 192.168.0.254, lease time 12h
>> >> Oct 11 23:32:55 damen dnsmasq[17165]: reading /etc/resolv.conf
>> >> Oct 11 23:32:55 damen dnsmasq[17165]: using nameserver xx.xx.xx.xx#53
>> Oct
>> >> 11 23:32:55 damen dnsmasq[17165]: ignoring nameserver 127.0.0.1 - local
>> >> interface
>> >> Oct 11 23:32:55 damen dnsmasq[17165]: read /etc/hosts - 5 addresses ...
>> >>
>> >> ping printer1
>> >> ping: unknown host printer1
>> >>
>> >> dig @192.168.0.1 printer1
>> >> ...
>> >> ;; QUESTION SECTION:
>> >> ;printer1.                      IN      A
>> >>
>> >>
>> >> ;; ANSWER SECTION:
>> >> printer1.               0       IN      A       192.168.0.101
>> >> ...
>> >>
>> >> dig @127.0.0.1 printer1
>> >> ...
>> >> ;; QUESTION SECTION:
>> >> ;printer1.                      IN      A
>> >>
>> >> ;; AUTHORITY SECTION:
>> >> .                       6862    IN      SOA     a.root-servers.net.
>> >> nstld.verisign-grs.com. 2010101101
>> >> 1800 900 604800 86400
>> >> ...
>> >>
>> >> uname -a
>> >> Linux damen.us 2.6.33.6-147.2.4.fc13.x86_64 #1 SMP Fri Jul 23 17:14:44
>> UTC
>> >> 2010 x86_64 x86_64 x86_64 GNU/Linux
>> >>
>> >>
>> >> Any and all help appreciated,
>> >>
>> >> Fred
>> >>
>> >>
>> >>
>> >>
>> >> _______________________________________________
>> >> Dnsmasq-discuss mailing list
>> >> Dnsmasq-discuss at lists.thekelleys.org.uk
>> >> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
>> >>
>> >
>>
>>
>




More information about the Dnsmasq-discuss mailing list