Linux networking · Packet capture and firewall

Allow a port (ufw)

Allow incoming SSH. Allow SSH before enabling the firewall.

sudo ufw allow 22/tcp

Caution: Enabling a firewall without allowing SSH can lock you out of a remote server.

Official Linux networking documentation

More packet capture and firewall commands

All packet capture and firewall commands · Linux networking cheatsheet

Was this page helpful?