These forums are locked and archived, but all topics have been migrated to the new forum. You can search for this topic on the new forum: Search for Create Internal and External DNS zones when Behind NAT on the new forum.
Using NAT has it's advantages, better security, efficient IP allocation, and management. However, one problem that is always comes up is DNS.
Is there a way for me to configure Virtualmin to add a DNS zone on a separate server using the Internal IP?
Server A is the system running Virtualmin, it is behind NAT with the IP 10.0.0.2, it's public IP is 1.2.3.4. Then there is Server B, a DNS server running BIND and Webmin. It's only purpose is to provide DNS to the internal systems, including server A.
I would like to know what is necessary to create a function such as:
You could quite possibly write a post-server-update script to do what you intend; I'm not sure if Virtualmin has the proper configuration options to automatically create a zone on the slave with differing IPs. Probably not, because the way a DNS slave server has to work is to keep exact copies of the master's zones, and not fiddle with the IP addresses.
Another solution would be, depending on whether your router supports that, to use "NAT reflection". If you turn that on, your LAN machines will be able to reach your server from the inside using the external IP. I know my home router does that, and the software router "pfSense" I use on my root servers has an option for it.