Problem Statement
How do you view, add, and delete firewall rules using UFW?
Explanation
Use ufw status numbered to list all active rules with indexes.
To remove a rule, run ufw delete <rule_number>. You can add rules with ufw allow or ufw deny for specific ports or services.
Code Solution
SolutionRead Only
sudo ufw status numbered sudo ufw delete 2
Practice Sets
This question appears in the following practice sets: