Combine iptables and ufw

Posted July 6, 2013 15.2k views
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?

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.

Submit an Answer
2 answers
Where did you learn "that ufw and iptables can be combined?"

According to this article (Why ufw Does Not Need A GUI ) that's already the case (albeit it's a little dated), in that ufw uses/manipulates iptables. That is, ufw sits on top of iptables.

According to the Ubuntu Manpages, "ufw uses many user-defined chains in addition to the built-in iptables chains." The Ubuntu Manpage on ufw also provides some examples.

In re: to a ufw HowTo, DigitalOcean has a nice tutorial: How to Setup a Firewall with UFW on an Ubuntu Cloud Server
  • hi,as you say “ufw sits on top of iptables.”,I have a doubt: under ubuntu, iptables service is not active, but ufw service is active, and when I set some rules by ufw, it really works.So what I want to express is that which one will work if I set some rules by both?

Could have been i misread :)