Well, after chasing around for some days and looking for answers to
this issue I have decided that Network Manager is the problem.

On my Raspberry Pi systems with no Network Manager it all configures
correctly when you install dnsmasq.  /etc/resolv.conf has "nameserver
127.0.0.1" in it and /run/dnsmasq/resolv.conf has "nameserver
192.168.1.2" (which is correct for me as 192.168.1.2 is the DNS server
for my LAN) and dnsmasq is run with "-r /run/dnsmasq/resolv.conf". 

However, whatever I have tried, on this xubuntu 21.10 laptop it
configures as above *except* that /run/dnsmasq/resolv.conf is empty,
it says "# Generated by resolvconf" but has nothing in it.

So, what I have done is to put a file in /etc/dnsmasq.d containing
just the one line:-
    resolv-file=/run/NetworkManager/no-stub-resolv.conf

The file /run/NetworkManager/no-stub-resolv.conf does contain the
correct upstream DNS server.

I suspect that Network Manager with dns=dnsmasq in the configuration
file is supposed to configure things correctly (as on the Pi above)
but for some reason it doesn't work quite right.

However my workaround isn't too onerous and means my laptop can run
dnsmasq and will use whatever DNS is provided by the network it is
connected to.

-- 
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