Every time I (re)start dnsmasq it replaces /etc/resolv.conf
with nameserver 127.0.0.1 ...
.
However that maschine has not to use the local DNS service. (Please don't ask why, the whole environment is like it is…)
How do I actually prevent dnsmasq from touching /etc/resolv.conf
?
Neither removing resolvconf
nor chattr +i /etc/resolv.conf
is an option.
Best Answer
You can have
dnsmasq
use a differentresolv.conf
file, so when/etc/resolv.conf
points to 127.0.0.1,dnsmasq
will actually just use the otherresolv.conf
file and leave/etc/resolv.conf
alone.Add the following line to your
dnsmasq.conf
file:And then create the file
/etc/dnsmasq.d/dnsmasq-resolv.conf
to look something like this: