I'd like to redirect example.com to the local host, but only for specific MAC addresses. Obviously, specifying


in dnsmasq.conf does this for everyone. Is there any way that say MAC1 will be redirected to localhost, while MAC2 will get the correct IP address of example.com?

  • The MAC address is only relevant between the hardware and the kernel. The standard socket APIs never even see it. Any decisions you want to make based on MAC address have to happen in kernel space. – Andrew B Dec 12 '14 at 9:45

Short answer: no. Dnsmasq does not have that kind of functionality. The --address setting applies globally.


If you are in Linux you could use iptables to redirect traffic to different DNS servers based on their MAC addresses.

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.