View Full Version : [ubuntu] How to know if UFW deny by default
jocampo
August 19th, 2009, 11:42 AM
I think UFW denies by default unless you change it. I also reinforce it on my server using
sudo ufw default deny
After implementing some rules of my own, of course.
My question is, when I check active rules using
sudo ufw status
My active rules are listed, but Ubuntu does not say if "deny default" is there. Is this a normal behavior, do we have another command or flag which can list that?
Thanks in advance,
Jose.
Nepherte
August 19th, 2009, 11:59 AM
I think UFW denies by default unless you change it. I also reinforce it on my server using
sudo ufw default deny
Prior some rules of my own, of course.
If you first enter your rules and then issue a default deny, the rules you entered are removed.
My question is, when I check active rules using
sudo ufw status
My active rules are listed, but Ubuntu does not say if "deny default" is there. Is this a normal behavior, do we have another command or flag which can list that?
Thanks in advance,
Jose.
It is normal behavior that ufw status doesn't list it, although it would clarify a lot if it did.
jocampo
August 19th, 2009, 12:36 PM
It is normal behavior that ufw status doesn't list it, although it would clarify a lot if it did.
Thank you very much, that clarifies my question and is what I suspected. I appreciate your help.
If you first enter your rules and then issue a default deny, the rules you entered are removed.
Sorry, but not true.
In fact, that's the safest way to do it. You specify what you want to be open or allowed 1st and at the end ... "default deny" and later, "ufw enable". Check this out, from my server
sudo ufw status
Status: active
To Action From
-- ------ ----
22 ALLOW Anywhere
80 ALLOW Anywhere
means, my rules are there, not removed ...
kevdog
August 19th, 2009, 01:50 PM
If you just type iptables -L at the command line (this is what ufw works with anyway), you can see the current rule set with the default policies.
bodhi.zazen
August 19th, 2009, 05:05 PM
+1
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.