centOSから外部にpingはできます
Linux
1[root@7971df01d10c /]# ping google.com 2PING google.com (172.217.161.46) 56(84) bytes of data. 364 bytes from nrt12s23-in-f14.1e100.net (172.217.161.46): icmp_seq=1 ttl=37 time=36.2 ms 464 bytes from nrt12s23-in-f14.1e100.net (172.217.161.46): icmp_seq=2 ttl=37 time=59.0 ms 564 bytes from nrt12s23-in-f14.1e100.net (172.217.161.46): icmp_seq=3 ttl=37 time=29.0 ms 664 bytes from nrt12s23-in-f14.1e100.net (172.217.161.46): icmp_seq=4 ttl=37 time=717 ms 764 bytes from nrt12s23-in-f14.1e100.net (172.217.161.46): icmp_seq=5 ttl=37 time=60.6 ms
ローカルにpingも通ります
Linux
1[root@7971df01d10c /]# ping 172.17.0.2 2PING 172.17.0.2 (172.17.0.2) 56(84) bytes of data. 364 bytes from 172.17.0.2: icmp_seq=1 ttl=64 time=0.043 ms 464 bytes from 172.17.0.2: icmp_seq=2 ttl=64 time=0.062 ms 564 bytes from 172.17.0.2: icmp_seq=3 ttl=64 time=0.062 ms 664 bytes from 172.17.0.2: icmp_seq=4 ttl=64 time=0.042 ms 764 bytes from 172.17.0.2: icmp_seq=5 ttl=64 time=0.062 ms 864 bytes from 172.17.0.2: icmp_seq=6 ttl=64 time=0.063 ms
ip aを打った時はこんな感じです
Linux
1[root@7971df01d10c /]# ip a 21: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1 3 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 4 inet 127.0.0.1/8 scope host lo 5 valid_lft forever preferred_lft forever 62: tunl0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN group default qlen 1 7 link/ipip 0.0.0.0 brd 0.0.0.0 83: ip6tnl0@NONE: <NOARP> mtu 1452 qdisc noop state DOWN group default qlen 1 9 link/tunnel6 :: brd :: 106: eth0@if7: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default 11 link/ether 02:42:ac:11:00:02 brd ff:ff:ff:ff:ff:ff link-netnsid 0 12 inet 172.17.0.2/16 brd 172.17.255.255 scope global eth0 13 valid_lft forever preferred_lft forever
外部からssh接続を試みた時はこのように表示されます
linux
1ssh: connect to host 172.17.0.2 port 22: Network is unreachable
外部からのPing
Linux
1ping 172.17.0.2 2PING 172.17.0.2 (172.17.0.2): 56 data bytes 3Request timeout for icmp_seq 0 4Request timeout for icmp_seq 1 536 bytes from 60.47.170.89: Destination Host Unreachable 6Vr HL TOS Len ID Flg off TTL Pro cks Src Dst 7 4 5 00 5400 46e1 0 0000 3c 01 7c24 10.13.204.27 172.17.0.2
回答3件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。