Ubuntu 12.04 – UFW (Uncomplicated Firewall)

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

sudo ufw allow from to any snmp

Then you can verify this rule exists by running

sudo ufw status

Firewall, Ubuntu , ,

Leave a Reply

Your email address will not be published. Required fields are marked *