Reputation: 749
Is there a way to configure dnsmasq
so that it only serves DNS requests from remote systems? What I want is that ('internet' means outside my network):
dnsmasq
machine just uses the internet DNS servers and ignores dnsmasq
dnsmasq
machine receives a response from dnsmasq
, which could be a locally configured response or one that dnsmasq
has relayed on to the internet DNS serversdnsmasq
system.FYI my use case is needing to patch/respond locally to requests from an embedded system to add resilience with a remote server is down; I can't change the queried hostname
so I want to be able to locally spoof the IP address, but only affecting specific queries from this embedded system which I've manually directed to my local dnsmasq server.
Upvotes: 0
Views: 603
Reputation: 749
After much digging, I stumbled across the answer. The magic incantation required to achieve this is:
$ echo DNSMASQ_EXCEPT=lo | sudo tee --append /etc/default/dnsmasq
$ sudo systemctl restart dnsmasq
Look up DNSMASQ_EXCEPT for details but basically this stops dnsmasq
providing DNS services to the lo
interface.
Upvotes: 1