On Mon, Jul 17, 2023 at 11:30:18AM +0200, Petr Menšík wrote:
> What is specified in dnsmasq does not matter. host by default does not 
> talk to dnsmasq directly. It reads /etc/resolv.conf and uses nameserver 
> specified there. If that is IP of dnsmasq, okay. If it is not, well, the 
> problem might be elsewhere. Because I don't know what is there, I cannot 
> help.
> 
Ah, yes, sorry I understand now,  /etc/resolv.conf is:-

    nameserver 127.0.0.1

> If you do "dig @localhost jacquibennett.com", then you are asking 
> dnsmasq explicitly. Just "dig jacquibennett.com" uses server in 
> /etc/resolv.conf, which may not even contain localhost address at all. 
> That is why I have asked what is there.
> 
> On 17. 07. 23 9:00, Chris Green wrote:
> > On Sun, Jul 16, 2023 at 11:58:38PM +0200, Petr Menšík wrote:
> >> I think you have failed to show us what is in /etc/resolv.conf on the
> >> machine, which is running host command.
> >>
> > It's specified in /etc/dnsmasq.conf:-
> >
> >      resolv-file=/run/NetworkManager/no-stub-resolv.conf
> >
> > ... and the contents are:-
> >
> >      # Generated by NetworkManager
> >      search zbmc.eu
> >      nameserver 192.168.1.2
> >
> >> unless listen-address or interface is specified, it should listen on all
> >> interfaces.
> >>
> > Yes, that's what I thought.
> >
> >
> >> 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.
> >>
> > Ah, thank you, I hadn't thought to check options for the host command,
> > I had been using dig to look deeper.
> >
> > Typically when I tried just now both the above host commands worked
> > instantly with no errors!  I'll have to keep trying to work out what's
> > wrong.
> dig is better tool anyway, stay using that. host returns more compact 
> result, but is worse tool when hunting strange errors. Mostly because 
> without -t parameters it does 3 queries and possibleerror does not have 
> clear indication, to which it belongs.
> >
> >> 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
> 
> -- 
> Petr Menšík
> Software Engineer, RHEL
> Red Hat, http://www.redhat.com/
> PGP: DFCF908DB7C87E8E529925BC4931CA5B6C9FC5CB
> 
> 
> _______________________________________________
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss@lists.thekelleys.org.uk
> https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss

-- 
Chris Green

_______________________________________________
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss

Reply via email to