[root@Carlton ~]# tcpdump -nn -i eth0 tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes 17:09:47.904929 IP 172.18.28.147.22 > 119.145.10.77.61439: Flags [P.], seq 1959163761:1959163953, ack 1325680290, win 467, length 192 17:09:47.905908 IP 172.18.28.147.22 > 119.145.10.77.61439: Flags [P.], seq 192:368, ack 1, win 467, length 176 17:09:47.906906 IP 172.18.28.147.22 > 119.145.10.77.61439: Flags [P.], seq 368:528, ack 1, win 467, length 160 17:09:47.907905 IP 172.18.28.147.22 > 119.145.10.77.61439: Flags [P.], seq 528:688, ack 1, win 467, length 160 17:09:47.908723 IP 119.145.10.77.61439 > 172.18.28.147.22: Flags [.], ack 192, win 259, length 0 17:09:47.908907 IP 172.18.28.147.22 > 119.145.10.77.61439: Flags [P.], seq 688:944, ack 1, win 467, length 256 17:09:47.909909 IP 172.18.28.147.22 > 119.145.10.77.61439: Flags [P.], seq 944:1104, ack 1, win 467, length 160 17:09:47.910905 IP 172.18.28.147.22 > 119.145.10.77.61439: Flags [P.], seq 1104:1264, ack 1, win 467, length 160 17:09:47.911904 IP 172.18.28.147.22 > 119.145.10.77.61439: Flags [P.], seq 1264:1424, ack 1, win 467, length 160
若是你的系統沒有這個命令,則使用yum install -y tcpdump 進行安裝tcp
仔細觀察結果,會發現IP + Port 的信息 至於後面不用太關心。 用的時候去百度code