Question

Understanding ufw on Ubuntu 14.04

  • Posted June 18, 2014

Hi all, Pretty new to the whole online security game and edging my way towards production. I’m keen to understand the precise role ufw plays. You read that it is just a “front end” to iptables. So netfilter/ iptables are always running anyway with or without ufw? And does a call to “ufw disable” turn off netfilter??

I ask because I have webmin installed, which offers me a perfectly comprehensible UI for adding rules to iptables. By adding rules in webmin and checking the ‘Activate at Boot’ option, then rebooting, am I actually securing my system, or do I have to run ufw enable to have a running firewall?

Noob question I know but it’s sort of big deal to get this right (especially since I’ve had thousands of unauthorized access attempts to Dovecot over the last few days.)

Thanks Mark

Subscribe
Share

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

OK, cheers. I’ll give it a shot.

Basically, “UFW disable” just flushes out all rules. If you leave it disabled, you can have scripts (like webmin) manage your firewall for you. Safest way to make sure is this:

run “ufw disable”

open up webmin. Add rules. Reboot. Hop on, and run this:

iptables-save

If you see your rules, you’re good. If not, you have a problem.