I am learning linux networking. I am very confused by the config file locations. What I read on the web doesn't match how my machine is set up.

I am using Mint 18. I am using network-manager & dnsmasq.

On the dnsmasq setup page, they mention that dnsmasq can be configured in /etc/dnsmasq.conf. I do not have this file...

However there is a /etc/dnsmasq.d/network-manager and there is also /etc/NetworkManager/dnsmasq.d/

I think (alhtough I do not know), that /etc/NetworkManager/dnsmasq.d is where I should place my config file. Is this to do with NetworkManager's plugins?

If so what is /etc/dnsmasq.d? Should I put my config file here?


So by running ps ax | grep dnsmasq I was able to see where the config file comes from and what configurations are use currently...

>ps ax | grep dnsmasq
 1273 ?        S      0:00 /usr/sbin/dnsmasq --no-resolv --keep-in-foreground --no-hosts --bind-interfaces --pid-file=/var/run/NetworkManager/dnsmasq.pid --listen-address= --cache-size=0 --conf-file=/dev/null --proxy-dnssec --enable-dbus=org.freedesktop.NetworkManager.dnsmasq --conf-dir=/etc/NetworkManager/dnsmasq.d

As can be seen --conf-dir=/etc/NetworkManager/dnsmasq.d


On Linux Mint, running whereis dnsmaq points the /etc/dnsmasq.d in which is a README file describing that config files can be added to this directory and how to change the default config directory:

# All files in this directory will be read by dnsmasq as 
# configuration files, except if their names end in 
# ".dpkg-dist",".dpkg-old" or ".dpkg-new"
# This can be changed by editing /etc/default/dnsmasq

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.