Today encountered a problem, can ping the IP address, Ping does not pass the domain name, has been thought to be a DNS resolution server problem, find a half-day, the problem is not here.
Looking at the routing table, the problem is not the routing gateway.
[[email protected] postfix]# netstat-rnkernel IP routing tabledestination Gateway genmask Flags MSS Window irtt Iface115.28.80.0 0.0.0.0 255.255.252.0 U 0 0 0 eth110.163.176.0 0.0.0 .0 255.255.240.0 U 0 0 0 eth0169.254.0.0 0.0.0.0 255.255.0.0 u 0 0 0 eth0169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth1192.168.0.0 10.163.191.247 25 5.255.0.0 UG 0 0 0 eth0172.16.0.0 10.163.191.247 255.240.0.0 UG 0 0 0 eth010 .0.0.0 10.163.191.247 255.0.0.0 UG 0 0 0 eth00.0.0.0 115.28.83.247 0.0.0.0 UG 0 0 0 eth1[[email protected] postfix]# [[email protected] postfix]# [[email protected] postfix]# [[email protected] postfix]# [[email protected] postfix]# routekernel IP Routing tableDestination Gateway Genmask Flags Metric Ref Use Iface115.28.80.0 * 255.255.252.0 U 0 0 0 eth110.163.17 6.0 * 255.255.240.0 u 0 0 0 Eth0link-local * 255.255.0.0 u 1 002 0 0 Eth0link-local * 255.255.0.0 U 1003 0 0 eth1192.168.0.0 10.163.19 1.247 255.255.0.0 ug 0 0 0 eth0172.16.0.0 10.163.191.247 255.240.0.0 ug 0 0 0 eth010.0.0.0 10.163.191.247 255.0.0.0 UG 0 0 0 eth0default 115.28.83.247 0.0.0.0 UG 0 0 0 eth1
And then look at:
[[email protected] postfix]# grep hosts/etc/nsswitch.conf#hosts: db Files Nisplus NIS dns#hosts: files dnshosts : DNS Files
I modified the DNS first, in the files, tested, also still not pass.
Finally found that the reason for the firewall, I opened the firewall, causing the ping domain name does not pass.
Domain name resolution used to port 53, you need to configure the following settings to the firewall.
Iptables-a input-p UDP--sport 53-j acceptiptables-a output-p UDP--dport 53-j acceptiptables-a input-p UDP--dpor T 53-j acceptiptables-a output-p UDP--sport 53-j ACCEPT
This allows you to ping the domain name.