I have been thinking of writing about this for long time but someone else did and it is nice write-up so here is the link – https://fedoramagazine.org/using-the-networkmanagers-dnsmasq-plugin/
Here is link to a very nice and definitive guide to DNS. Very detailed and useful. There is a pdf version as well to download 🙂
Thanks to Andrijana Nikolic for providing a valuable resource to share with you all.
Now, couple of days back , I setup dnsmasq in NetworkManager but was astonished to see that there was no dnsmasq running. I checked with dig and saw that there was no response from localhost for dns queries. Checked “ps -eaf|grep dns” and found that there was no dnsmasq running. I knew that once you mention “dns=dnsmasq” in the NetworkManager then it should start up but that was not happening. And then I checked audit log, found that some permissions were denied by SELinux.
First check if dnsmasq is indeed having issues because of SELinux:
grep -C 5 sealert /var/log/messages
If you do see something then time to fix it.
grep dnsmasq /var/log/audit/audit.log audit2allow -M mypol && semodule -i mypol.pp systemctl restart NetworkManager
And with this, you should be done, though you might have to repeat this multiple times.