ufw
NetworkFundamentalsReference onlyUncomplicated firewall (Ubuntu)
Name: ufw = Uncomplicated Firewall
This command is outside what the site lets you practise (mostly distribution-specific or rarely used tools). This page describes how to use it; try it on your own Linux system.
Description
ufw is Ubuntu's firewall front end, managing the underlying iptables/nftables rules with simple allow and deny commands. On a remote server, allow SSH before enabling it or you will lock yourself out.
Syntax
ufw COMMANDCommon options
| enable / disable | Turn the firewall on / off |
| status | Status and rules |
| allow / deny | Allow / deny a port or service |
| limit | Rate-limit connections (against brute force), e.g. ufw limit ssh |
| delete | Delete a rule, e.g. ufw delete allow 80 |
| default | Set the default policy, e.g. ufw default deny incoming |