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:
192.168.1.5 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
192.168.1.5 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?