Featured
Enable UFW firewall with SSH
Enable the firewall while explicitly allowing SSH to avoid getting locked out.
Enables the UFW firewall and opens port 22 before activating, preventing you from locking yourself out of SSH. UFW defaults to deny-all inbound after enable.
When you need this: Immediately after installing a fresh Ubuntu server before exposing any services.
Command
2 views
0 copies
Related in this category
Log in to save
Free account — save snippets into your own collections.