Linux networking · Packet capture and firewall
Save a capture for Wireshark
Write packets to a file you can open in Wireshark.
sudo tcpdump -i eth0 -w capture.pcap host 203.0.113.10
Official Linux networking documentation
More packet capture and firewall commands
- Capture traffic on an interface
- Capture traffic for a port
- Show the firewall rules (ufw)
- Allow a port (ufw)
- Turn the firewall on (ufw)
- List nftables rules
All packet capture and firewall commands · Linux networking cheatsheet