Linux能ping通IPping不通域名
Linux能ping通IPping不通域名
今天碰到個問題,能ping通IP地址,ping不通域名,一直以為是DNS解析服務(wù)器的問題,找了半天,問題不在這里。[root@wwwpostfix]#cat/etc/resolv.conf。nameserver202.96.209.133。optionsattempts:1timeout:1rotate。#nameserver10.202.72.117。nameserver10.202.72.118。nameserver114.114.114.114。nameserver8.8.8.8。[root@wwwpostfix]# 。看了一下路由表,問題也不在路由網(wǎng)關(guān)上。[root@wwwpostfix]#netstat-rn。KernelIProutingtable。
導(dǎo)讀今天碰到個問題,能ping通IP地址,ping不通域名,一直以為是DNS解析服務(wù)器的問題,找了半天,問題不在這里。[root@wwwpostfix]#cat/etc/resolv.conf。nameserver202.96.209.133。optionsattempts:1timeout:1rotate。#nameserver10.202.72.117。nameserver10.202.72.118。nameserver114.114.114.114。nameserver8.8.8.8。[root@wwwpostfix]# 。看了一下路由表,問題也不在路由網(wǎng)關(guān)上。[root@wwwpostfix]#netstat-rn。KernelIProutingtable。
![](https://img.51dongshi.com/20250105/wz/18528789252.jpg)
系統(tǒng)大全為您提供今天碰到個問題,能ping通IP地址,ping不通域名,一直以為是DNS解析服務(wù)器的問題,找了半天,問題不在這里。[root@wwwpostfix]#cat/etc/resolv.confnameserver202.96.209.133optionsattempts:1timeout:1rotate#nameserver10.202.72.117nameserver10.202.72.118nameserver114.114.114.114nameserver8.8.8.8[root@wwwpostfix]#?看了一下路由表,問題也不在路由網(wǎng)關(guān)上。[root@wwwpostfix]#netstat-rnKernelIProutingtableDestination??Gateway????Genmask????Flags?MSSWindow?irttIface115.28.80.0??0.0.0.0????255.255.252.0?U????00?????0eth110.163.176.0??0.0.0.0????255.255.240.0?U????00?????0eth0169.254.0.0??0.0.0.0????255.255.0.0??U????00?????0eth0169.254.0.0??0.0.0.0????255.255.0.0??U????00?????0eth1192.168.0.0??10.163.191.247?255.255.0.0??UG????00?????0eth0172.16.0.0???10.163.191.247?255.240.0.0??UG????00?????0eth010.0.0.0????10.163.191.247?255.0.0.0???UG????00?????0eth00.0.0.0????115.28.83.247?0.0.0.0????UG????00?????0eth1[root@wwwpostfix]#?[root@wwwpostfix]#?[root@wwwpostfix]#?[root@wwwpostfix]#?[root@wwwpostfix]#routeKernelIProutingtableDestination??Gateway????Genmask????FlagsMetricRef??UseIface115.28.80.0??*???????255.255.252.0?U??0???0????0eth110.163.176.0??*???????255.255.240.0?U??0???0????0eth0link-local???*???????255.255.0.0??U??1002?0????0eth0link-local???*???????255.255.0.0??U??1003?0????0eth1192.168.0.0??10.163.191.247?255.255.0.0??UG??0???0????0eth0172.16.0.0???10.163.191.247?255.240.0.0??UG??0???0????0eth010.0.0.0????10.163.191.247?255.0.0.0???UG??0???0????0eth0default????115.28.83.247?0.0.0.0????UG??0???0????0eth1然后再看看:[root@wwwpostfix]#grephosts/etc/nsswitch.conf#hosts:??dbfilesnisplusnisdns#hosts:???filesdnshosts:???dnsfiles我修改為先dns,在files,測試了,也還是不通。最后發(fā)現(xiàn)是防火墻的原因,我開啟了防火墻,造成了ping域名不通。域名解析用到了53端口,需要把下面的設(shè)置配置到防火墻里即可。iptables-AINPUT-pudp--sport53-jACCEPTiptables-AOUTPUT-pudp--dport53-jACCEPTiptables-AINPUT-pudp--dport53-jACCEPTiptables-AOUTPUT-pudp--sport53-jACCEPT???以上就是系統(tǒng)大全給大家介紹的如何使的方法都有一定的了解了吧,好了,如果大家還想了解更多的資訊,那就趕緊點擊系統(tǒng)大全官網(wǎng)吧。??本文來自系統(tǒng)大全http:///如需轉(zhuǎn)載請注明!推薦:win7純凈版
Linux能ping通IPping不通域名
今天碰到個問題,能ping通IP地址,ping不通域名,一直以為是DNS解析服務(wù)器的問題,找了半天,問題不在這里。[root@wwwpostfix]#cat/etc/resolv.conf。nameserver202.96.209.133。optionsattempts:1timeout:1rotate。#nameserver10.202.72.117。nameserver10.202.72.118。nameserver114.114.114.114。nameserver8.8.8.8。[root@wwwpostfix]# 。看了一下路由表,問題也不在路由網(wǎng)關(guān)上。[root@wwwpostfix]#netstat-rn。KernelIProutingtable。
為你推薦