I'm looking into a simple split horizon DNS implementation. Using GoDaddy for my Internet DNS and Microtik routers for LAN DNS in a couple locations.
In my office I have a server, on the Internet is
hq.company.com, but on my office network, I've been using a DNS entry on the Microtik with a different name
My most naive guess at a 'split horizon' implementation was to make an entry in the Microtik router with the same name as the GoDaddy entry,
However, having done that I can see it's not working as I'd hoped. Both addresses are coming through in random order when using the
host command. I've also tried clearing my laptop's (OSX) local DNS cache too.
$ host hq.company.com hq.company.com has address 192.168.88.177 hq.company.com has address 188.8.131.52 $ host hq.company.com hq.company.com has address 184.108.40.206 hq.company.com has address 192.168.88.177 $ host hq.company.com hq.company.com has address 192.168.88.177 hq.company.com has address 220.127.116.11
My desired behavior is, when I'm in the office, local DNS provides only the local address for
hq.company.com, and when I'm not in the office, GoDaddy DNS provides for the public IP.