I have public DNS for company domain (
example.org, for example) on DNS hosting service. And I have local DNS server (BIND) in office which forwards public DNS. In office I have servers which provide services (web, mail, etc) in public domain and also have local IP addresses.
I want to give access for public domain from office throught local IP addresses of servers.
For example. In public DNS I have A record
mail.example.org -> 22.214.171.124, which should be translated in local DNS to
mail.example.org -> 192.168.15.2. I.e. when client from office will request IP for
mail.example.org, local DNS server (BIND) will request this from public DNS and replace IP in answer if this IP in special list (list of servers public IPs with local IPs).
Is there any way to replace IP in DNS answer for several IPs in BIND server?
The best way is to replace exactly IP in answer and not to generate public zones for local IPs on local DNS.