Make directory to store the internal and external zone files.
[root@~]# vi /var/named/internal/abc.com.zone
$ttl 400
abc.com. IN SOA ns1.abc.com. root.abc.com. (
1
1800
3600
1800
1801 )
IN NS ns1.abc.com.
IN MX 10 mail.abc.com.
abc.com. IN A 192.168.1.123
www IN A 192.168.1.123
mail IN A 192.168.1.123
ns1 IN A 192.168.1.123
Edit the internal zone file "/var/named/internal/abc.com" for private IP 192.168.x.x
[root@~]# vi /var/named/external/abc.com.zone
$ttl 400
abc.com. IN SOA ns1.abc.com. root.abc.com. (
1
1800
3600
1800
1801 )
IN NS ns1.abc.com.
IN MX 10 mail.abc.com.
abc.com. IN A 202.123.123.123
www IN A 202.123.123.123
mail IN A 202.123.123.123
ns1 IN A 202.123.123.123
Edit the external zone file "/var/named/internal/abc.com" for public IP 202.123.123.123
Step 3
[root@~]# /etc/init.d/named restart
Restart named service.
[root@~]# dig @202.123.123.123 yahoo.com
Test DNS from external network from other external server.
C:\nslookup
server 192.168.1.123
yahoo.com
Test DNS from internal network from client window PC.