Uncomplicated Firewall (ufw) is a (easyish) front end for ipTables. Which tends to come installed on Ubuntu distro’s
So what happens when you want to modify the rules. Lets say you want to allow SNMP to one of your servers
Add a new rule;
sudo ufw allow snmp
Cool, so now you have a rule that allows snmp to your server… But wait, this rule will have allowed SNMP from ANYWHERE to your server, normally this would not be good.
So lets remove the old rule, and create one that locks it down to a single network.
sudo ufw delete allow snmp
So that removes the old rule, so now lets add a new rule locking it down to 10.8.1.0/25
sudo ufw allow from 10.8.1.0/25 to any snmp
Then you can verify this rule exists by running
sudo ufw status