[Dnsmasq-discuss] How to prevent Network Manager changing /etc/resolv.conf so dnsmasq doesn't cache?
Chris Green
cl at isbd.net
Tue Nov 5 22:08:05 UTC 2024
On Tue, Nov 05, 2024 at 03:50:05PM -0500, David Kronenwetter via Dnsmasq-discuss 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?
> > --
>
> The 192.168.1.1 is probably coming from DHCP? If so, configure your
> DHCP server to advertise the preferred DNS server. You could also
> configure your firewall to redirect all DNS requests to the preferred
> DNS server. Just make sure you don’t block dnsmasq in the process.
192.169.1.1 is absolutely correct! That's not the problem. What I
need is to be able to set /etc/resolv.conf to point to the system
itslef so that DNS requests go dnsmasq.
--
Chris Green
More information about the Dnsmasq-discuss
mailing list