I have a very simple dnsmasq setup, where the server with dnsmasq is the main DNS server in the network and all requests, except for hosts specified in /etc/hosts, are just passed through.

What I'm trying to do now, is to apply the altered DNS entries from /etc/hosts to devices specified either by IP or MAC (I don't know which of these is possible) only. For example: google.com is in the hosts file. Now a device queries the DNS server for google.com and receives the correct IP. Another device with a static IP or specific MAC address queries the DNS and gets as a reply.

I looked at the documentation for dnsmasq.conf, but couldn't find anything to accomplish this. Do I maybe have to do some iptables stuff, or is this simply not possible?

1 Answer 1


I don't believe dnsmasq supports split DNS. The normal way to do this would be to configure the device that should pass through to use external DNS servers.

dnsmasq can be configured to send different hosts different resolver lists via DHCP using tags. If you aren't using DHCP for the server, configure the server to use external DNS servers.

It seems like you may be configuring a proxy server. They usually have configure options for the DNS servers the proxy will use. dnsmasq can be used to specify the auto-configuration file that specifies the proxy address.

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.