Monday, January 18, 2016

domain name system - CentOS VM not resolving to correct IP

I have configured a primary DNS server in centOS and it seems to be working fine. I then configured a secondary DNS in another CentOS VM, but there is a problem.
When I try to ping the domain which is abc.com it resolves to some different IP and FQDN. This is what I get:



Ping to domain



I can ping fine from the primary. Here is my /etc/resolv.conf for the secondary DNS server:



search abc.com

nameserver 192.168.1.1
nameserver 192.168.1.2
nameserver 8.8.8.8
nameserver 8.8.4.4


Here is the /etc/hosts for the secondary DNS server:
enter image description here



Please let me know what I am doing wrong. I am confused because pinging abc.com from the secondary serer resolves 192.168.1.1 which is correct.

Here is bind configuration for primary DNS server:
This is /etc/named.conf
/etc/named.conf
Forward lookup zone
Reverse lookup zone



Here is secondary serer /etc/named.conf
secondary server /etc/named.conf

No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...