一、查看某個埠接收到的資料
[root@localhost ~]# tcpdump -i eth0 port 3120 # 監聽從3120埠進來的資料包 [root@localhost ~]# tcpdump -s 0 -X 'tcp dst port 3120'
1. 其中etho為網卡名稱,查看網卡可以通過:ifconfig命令查看,
2. 把port改為你想要監聽的埠即可在linux下監聽某個埠的資料,但是列印出來的資料不是很人性化,如果是udp,記得修改tcp為udp,
https://blog.csdn.net/qq_41262248/article/details/80683423
https://blog.csdn.net/lihe55966/article/details/53611666
轉載請註明出處,本文鏈接:https://www.uj5u.com/caozuo/98130.html
標籤:Linux
上一篇:Linux編輯利器-Vim
