I'm trying to setup Networkmanager to use dnsmasq to do DNS cache on a single Slackware machine that gets its IP address from the router. The reason that I want to use Networkmanager for this is that I want to have this working on my laptop that needs to connect to different wireless networks. Although I get the network-connection and the logfile mentions dnsmasq working it doesn't seem to cache, which I attribute to /etc/resolv.conf not having the localhost address.
I've set the configuration of Networkmanager as
Code:
[main]
plugins=keyfile
dhcp=dhcpcd
dns=dnsmasq
[keyfile]
hostname=dwarfstar
With this configuration /etc/resolv.conf remains
Code:
# Generated by NetworkManager
search lan
nameserver 192.168.1.254
So there is no localhost in that file, which I would expect for dnsmasq to work. I've tried to fix this by adding a file /etc/resolv.conf.head containing "nameserver 127.0.0.1" as recommended on the corresponding
archlinux wiki. However this file is ignored and the resolv.conf file remains as above.
Can somebody provide me with a suggestion on how to make NetworkManager work with dnsmasq as I'm stuck on this and I can't find much guidance on Google.