[Dnsmasq-discuss] Problem with 127.0.1.1 versus 127.0.0.1
Petr Menšík
pemensik at redhat.com
Sun Jul 16 21:58:38 UTC 2023
I think you have failed to show us what is in /etc/resolv.conf on the
machine, which is running host command.
unless listen-address or interface is specified, it should listen on all
interfaces.
Try using host -v jacquibennett.com, it might provide more details what
exactly has timed out.
If unsure what is host contacting, try separate queries to server
specified explicitly:
- host -v jacquibennett.com 127.0.0.1
- host -v jacquibennett.com 127.0.1.1
That might provide hints what is failing and what is working.
Cheers,
Petr
On 7/16/23 22:10, Chris Green wrote:
> I use dnsmasq on a number of, mostly Ubuntu, home systems. One system
> at 192.168.1.2 acts as the DNS server for my LAN, then there are
> several 'client' systems that just use dnsmasq as a caching DNS server
> for their own lookups.
>
> I *suspect* I have a problem with looking up names via the local
> dnsmasq because it is listening only on 127.0.1.1 and the request is
> on 127.0.0.1#53.
>
> for example a 'host'command on my laptop returns:-
>
> chris$ host jacquibennett.com
> ;; communications error to 127.0.0.1#53: timed out
> jacquibennett.com has address 153.92.6.161
> jacquibennett.com has IPv6 address 2a02:4780:a:1080:0:174b:7855:7
> jacquibennett.com mail is handled by 5 mx1.hostinger.com.
> jacquibennett.com mail is handled by 10 mx2.hostinger.com.
>
> But dnsmasq is running on the laptop:-
>
> dnsmasq 7443 1 0 09:27 ? 00:00:01 /usr/sbin/dnsmasq -x /run/dnsmasq/dnsmasq.pid -u dnsmasq -7 /etc/dnsmasq.d,.dpkg-dist,.dpkg-old,.dpkg-new --local-service --trust-anchor=.,20326,8,2,e06d44b80b8f1d39a95c0b0d7c65d08458e880409bbc683457104237c7f8ec8d
>
>
> The dnsmasq configuration file on the laptop (and other client
> systems) is almost non-existent, it's just:-
>
> resolv-file=/run/NetworkManager/no-stub-resolv.conf
>
> ... /run/NetworkManager/no-stub-resolv.conf is:-
>
> # Generated by NetworkManager
> search zbmc.eu
> nameserver 192.168.1.2
>
>
> ... and in /etc/dnsmasq.d I just have a blacklist file with lots of
> address=<something> entries, but that's all. The /etc/default/dnsmasq
> file just has:-
>
> ENABLED=1
> CONFIG_DIR=/etc/dnsmasq.d,.dpkg-dist,.dpkg-old,.dpkg-new
>
>
> So why do I get that timeout error from the 'host' coommand? It's as
> if dnsmasq on the local machine isn't listening on 127.0.0.1. Does it
> only listen on 127.0.1.1 by default?
>
--
Petr Menšík
Software Engineer, RHEL
Red Hat, https://www.redhat.com/
PGP: DFCF908DB7C87E8E529925BC4931CA5B6C9FC5CB
More information about the Dnsmasq-discuss
mailing list