I have configured Raspbian with a Raspberry Pi , which makes me a DHCP server and DNS (bind) among other things.
On the DNS server I have several internal domains configured, for example:
www.mydomain.local Suppose you point to 192.168.0.80
As the DHCP server is configured to assign, to the clients, to itself as a DNS server, all the devices in my network recognize and navigate to the local domains.
What I need to know, if it is possible to do, is that when a request to the DNS server comes from the IP of the response, return 127.0.0.1 em> instead of the IP of the subnet, example:
If the computer with IP 192.168.0.80 queries for the domain www.mydomain.local , instead of returning 192.168.0.80 , which is what would return to other computers, should return 127.0.0.1
I know that I can solve this by writing the entry in the host file of the computer in question, but I would do better than it could resolve the DNS server