Using NetworkManager with DNSMasq and Slackware

dnsmasq on Slackware 14.2 is compiled without D-Bus.

The logs show NetworkManager trying to start dnsmasq, but failing:

After downloading the source files and SlackBuild resources from a Slackware Mirror, validate the GPG  signature using the provided .asc file. Below are the contents of a directory after I assembled all the required pieces.

After extracting the Makefile from the dnsmasq source archive, we can see an elegant way of making the necessary changes in order to include D-Bus support.

We need to create a diff file we can use with the SlackBuild.

Then we modify the SlackBuild:

There are a few configuration options we need to make before we reinstall.

Create a new file under /etc/NetworkManager/conf.d/00-dnsmasq.conf with the following contents:

Then under /etc/NetworkManager/dnsmasq.d/dnsmasq.conf insert:

Restart NetworkManager.

Now we can remove the old instance of dnsmasq and install the patched version:

No need to manually start dnsmasq as NetworkManager will work its magic:

When all of that is complete you may want to blacklist dnsmasq from being updated automatically.

Edit /etc/slackpkg/blacklist and add ‘dnsmasq‘ to the end of the file.

Now if everything worked /etc/resolv.conf should contain the loopback address and the logs should show the configuration options chosen for dnsmasq.

Thanks for reading.

Categories: System Administration

Tags: , , , , , , , , , , ,

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: