Networkmanager dnsmasq

I’m trying to get network manager to use dnsmasq… I’m familiar with doing this on Ubuntu and Fedora.

I’ve created the directory /etc/NetworkManager/conf.d and put a file in there 00-use-dnsmasq.conf containing:


I’ve restarted NetworkManager and it still uses the name server advertised by my router. I’ve modified /etc/resolv.conf and then restarted NetworkManager and the changes are overwritten.

Why is clear linux behaving different to other distributions?

It is pretty standard for NetworkManager to overwrite the resolv.conf file. You can change the permissions to keep that from happening if you want. Have you tried adding the configuration for dnsmasq in /etc/NetworkManager/dnsmasq.d?

By default clearlinux uses systemd-resolved and we’ve modified NetworkManager to keep using it. This is likely the cause. I don’t know how to solve your problem here, though.

yep, i put the zone in dnsmasq.d

NetworkManager isn’t even starting dnsmasq.

I checked the configure flags here

I’m not sure whether this is the cause but it seems that it’s not configured with dnsmasq support, which is enabled by --with-dnsmasq flag.

I actually get this in my logs when I try to restart NetworkManager with dns=dnsmasq:

NetworkManager[457]: dnsmasq: DBus not available: set HAVE_DBUS in src/config.h

I ended up solving this by putting this in /etc/systemd/resolved.conf:


Which both wrote to /etc/resolv.conf and stopped systemd listening for dns on port 53 so I could run dnsmasq (although not via NetworkManager)