0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

tracerouteを使って、TCP,UDPのポートが開通しているか確認する。途中で遮断されている場合。

Last updated at Posted at 2019-03-24

まとめ

一覧で整理,GoogleDrive
一覧で整理,webdav

TCP、途中遮断

途中でパケットがDROPされているので、タイムアウト(***)している

$ sudo traceroute -n -q 1 -T -p 81   192.168.0.120 
traceroute to 192.168.0.120 (192.168.0.120), 30 hops max, 60 byte packets
 1  192.168.4.1  2.174 ms
 2  192.168.1.1  2.415 ms
 3  *
 4  *

TCP、途中遮断なし

$ sudo traceroute -n -q 1 -T -p 8080 192.168.0.120 
traceroute to 192.168.0.120 (192.168.0.120), 30 hops max, 60 byte packets
 1  192.168.4.1  2.043 ms
 2  192.168.1.1  2.723 ms
 3  192.168.1.254  4.015 ms
 4  192.168.0.120  6.878 ms

UDP、途中遮断

$ sudo traceroute -n -q 1 -U -p 162 192.168.0.120 
traceroute to 192.168.0.120 (192.168.0.120), 30 hops max, 60 byte packets
 1  192.168.4.1  2.357 ms
 2  192.168.1.1  2.052 ms
 3  * ---- ここにある、192.168.1.254でDROP
 4  *

UDP、通過

$ sudo traceroute -n -q 1 -U -p 53 192.168.0.120 
traceroute to 192.168.0.120 (192.168.0.120), 30 hops max, 60 byte packets
 1  192.168.4.1  2.601 ms
 2  192.168.1.1  2.349 ms
 3  192.168.1.254  3.518 ms ------- ここは通過して
 4  192.168.0.120  4.828 ms !X ---- ここで拒否応答 

tracerouteの結果の見方

引用元1
引用元2

! は [ICMP Type=3] Destination Unreachable

!H は [Type=3/Code=1] Host Unreachable
宛先IPの1つ手前のNW機器が宛先IPのARPを解決しようとしたが
(ホストダウン等が原因で)ARP解決できなかった場合に返されます。

!X は [Type=3/Code=13] Communication Administratively Prohibited 
途中のNW機器がACLによりその通信を拒否していることが多いです。
!X が表示されている行のIPがアサインされているNW機器の設定を調べましょう。

!N は [Type=3/Code=0] Net Unreachable
宛先の2つ以上手前のNW機器において、NextHopのARPが応答しないときなどに返されます。

!P は [Type=3/Code=2] Protocol Unreachable
そもそもそのホストのOS等で UDP 自体をサポートしていない場合に返されます。

!Z [Type=3/Code=13] 
communication with destination host administratively prohibited
宛先ネットワークへの通信がACLで拒否されている 
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?