在Debian系統上,可通過以下工具監控網絡活動,以下是具體方法及對應工具:
sudo apt update && sudo apt install tcpdump
sudo tcpdump -i eth0
sudo tcpdump -i eth0 host 192.168.1.100 # 過濾IP
sudo tcpdump -i eth0 port 80 # 過濾端口
sudo tcpdump -i eth0 -w capture.pcap
sudo apt update && sudo apt install wireshark
http
、tcp.port == 443
)篩選特定流量。sudo apt install iftop
sudo iftop -i eth0
實時顯示接口流量、主機排名及協議分布。sudo
或root權限運行工具。以上工具可根據需求選擇,tcpdump適合命令行快速分析,Wireshark適合圖形化深度解析,iftop適合實時流量監控。