I am trying to set up a DNS server to change a few domains in my local netwkork - first with bind9, then with dnsmasq. With both software, I resulted in the same problem: When executing nslookup / dig on the dns server itself, I am getting the correctly changed ip matches.
However, when doing a lookup on machines using the DNS server, it returns the wrong (original) host ip, instead of the modified one.
On the dns itself
nslookup mydomain.com Server: 127.0.0.1 Address: 127.0.0.1#53 Name: mydomain.com Address: <correctly modified host ip>
On devices with flushed caches (mac / android):
nslookup mydomain.com Server: <dns server ip> Address: <dns server ip>#53 Non-authoritative answer: Name: mydomain.com Address: <original host ip>
The question is, why is the entry on the server correct, but faulty on the clients?