Linux networking · Packet capture and firewall
Capture traffic for a port
Show only traffic to or from port 443.
sudo tcpdump -i any -nn port 443
Official Linux networking documentation
More packet capture and firewall commands
- Capture traffic on an interface
- Save a capture for Wireshark
- 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