[Dnsmasq-discuss] How to prevent Network Manager changing /etc/resolv.conf so dnsmasq doesn't cache?

Sven Geuer sge at debian.org
Tue Nov 5 21:32:52 UTC 2024


Hi Chris,

On Tue, 2024-11-05 at 19:59 +0000, Chris Green wrote:
> I have just moved from xubuntu to debian and I'm trying to work out
> how to configure dnsmasq and Network Manager.
> 
> I have installed the default Debian 12 with an xfce4 desktop which
> runs Network Manager to configure network connections etc.  I want
> dnsmasq to provide a cacheing DNS service but Network Manager writes
> /etc/resolv.conf at start-up (and if it's restarted) to be:-
> 
>     # Generated by NetworkManager
>     search zbmc.eu
>     nameserver 192.168.1.1
> 
> So that stops DNS requests going via dnsmasq, they just go straight
> to
> my router at 192.168.1.1.  
> 
> So, is this supposed to work nicely together somehow or do I have to
> do something radical to stop Network Manager writing
> /etc/resolv.conf?
> 

add the resolvconf package per

   sudo apt install resolvconf

it is suggested by the dnsmasq package and mediates nicely between
resolv.conf files from whatever, even multiple, sources and dnsmasq
(thanks to hook scripts provided by dnsmasq). Read

   https://manpages.debian.org/bookworm/openresolv/resolvconf.8.html

to learn more about resolvconf.

Cheers,
Sven
-- 
GPG Fingerprint
3DF5 E8AA 43FC 9FDF D086 F195 ADF5 0EDA F8AD D585
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 854 bytes
Desc: This is a digitally signed message part
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20241105/42fc7952/attachment.sig>


More information about the Dnsmasq-discuss mailing list