Windows system >> Windowsの知識 >  >> Linuxシステムチュートリアル >> LinuxシステムFAQ >> LinuxはIPをpingすることはできません

LinuxはIPをpingすることはできません

  

今日私は問題に遭遇し、IPアドレスをpingすることはできませんどこでもpingは、DNS解決サーバーの問題であると常に考えて、問題はここにありません。

 [root @ www postfix]#cat /etc/resolv.confnameserver 202.96.209.133オプションの試み:1タイムアウト:1回転#nameserver 10.202.72.117nameserver 10.202.72.118nameserver 114.114.114.114nameserver 8.8.8.8 [rootルーティングテーブルを見て、問題はルーティングゲートウェイにはありません。 
 [root @ www postfix]#netstat -rnKernel IPルーティングテーブルDestination Gateway Genmask Flags MSSウィンドウ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 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 eth00.0.0.0 115.28.83.247 0.0.0.0 UG 0 0 0 eth1 [root @ www Postfix]#[root @ www postfix]#[root @ www postfix]#[root @ www postfix]#[root @ www postfix]#routeKernel IPルーティングテーブルDestination Gateway GenmaskフラグメトリックRef Iface115.28.80.0 * 255.25 5.252.0 U 0 0 0 eth110.163.176.0 * 255.255.240.0 U 0 0 0 eth0link-local * 255.255.0.0 U 1002 0 0 eth0link-local * 255.255.0.0 U 1003 0 0 eth1192.168.0.0 10.163.191.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 eth0デフォルト115.28.83.247 0.0.0.0 UG 0 0 0 eth1 

それを見てください。

 [root @ www postfix]#grep hosts /etc/nsswitch.conf#hosts:dbファイルnisplus nis dns#hosts:files dnshosts:dnsファイル最初にdnsに変更しました、テスト済みのファイルでは、まだ機能しません。 

最後にファイアウォールの理由を見つけ、私はファイアウォールをオンにし、pingドメイン名にアクセスできなくしました。

ドメイン名解決はポート53を使用します。ファイアウォールに次の設定を構成する必要があります。

 iptables -A入力-p udp --sport 53 -j ACCEPTiptables -A出力-p udp  -  dport 53 -j ACCEPTiptables -A入力-p udp  -  dport 53 -j ACCEPTiptables -A OUTPUT  - p udp --sport 53 -j ACCEPT
						
Copyright © Windowsの知識 All Rights Reserved