So I looked through BIND and Dnsmasq and unable to figure this out.
I have a few of servers on DigitalOcean, and they are on the same datacenter. I want to be able to use internal IPs to get better intra network pings and (obviously, free private network traffic). Given the following two servers:
Name Public IP Private IP
srv1 192.0.2.1 10.10.10.1
srv2 198.51.100.2 10.10.10.2
When digging from external network (say my laptop), I want something like this
account.codingblocks.com. 79 IN CNAME srv2.cb.lk.
srv2.cb.lk. 85844 IN A 198.51.100.2
When digging from inside srv1, I want this instead
account.codingblocks.com. 79 IN CNAME srv2.cb.lk.
srv2.cb.lk. 85844 IN A 10.10.10.2
Is this possible ? If yes, how.