Question

Combine iptables and ufw

  • Posted July 6, 2013

Hey!

Is it correct that ufw and iptables can be combined, the thing is that i would lve some help on getting a iptables up that block dos/syn flood / and what else to block :D

i a little on thin ice on if i should add :

iptables -P INPUT DROP iptables -P FORWARD DROP iptables -P OUTPUT

before OR after i have made som ruleset?

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.

Did you try using “sudo ufw reload” after updating your iptables? I have not tried it, but this mentions it:

https://askubuntu.com/questions/1152070/cve-2019-11479-convert-iptables-command-to-ufw-format

Could have been i misread :)

Where did you learn “that ufw and iptables can be combined?” <br> <br>According to this article (<a href=“http://ubuntu-tutorials.com/2008/05/04/why-ufw-does-not-need-a-gui”>Why ufw Does Not Need A GUI</a> ) that’s already the case (albeit it’s a little dated), in that ufw uses/manipulates iptables. That is, ufw <i>sits on top of</i> iptables. <br> <br>According to the <a href=“http://manpages.ubuntu.com/manpages/precise/man8/ufw-framework.8.html”>Ubuntu Manpages</a>, “ufw uses many user-defined chains in addition to the built-in iptables chains.” The <a href=“http://manpages.ubuntu.com/manpages/precise/man8/ufw-framework.8.html”>Ubuntu Manpage on ufw</a> also provides some examples. <br> <br>In re: to a ufw HowTo, DigitalOcean has a nice tutorial: <a href=“https://www.digitalocean.com/community/articles/how-to-setup-a-firewall-with-ufw-on-an-ubuntu-cloud-server”>How to Setup a Firewall with UFW on an Ubuntu Cloud Server</a>