Ubuntu 8.04 comes with a new firewall management tool called “ufw” (Uncomplicated Firewall). The official description for ufw is
ufw – program for managing a netfilter firewall.
type ufw to see the commands.
Commands:
enable Enables the firewall
disable Disables the firewall
default ARG set default policy to ALLOW or DENY
logging ARG set logging to ON or OFF
allow|deny RULE allow or deny RULE
delete allow|deny RULE delete the allow/deny RULE
status show firewall status
version display version information
ufw is quite simple to use for adding or removing rules. First off, you need to enable the firewall. In terminal type (p.s. you have to be in root or just sudo):
sudo ufw enable
then
sudo ufw status
the above will show your current firewall status, if you already have rules added it will display them as well.
Adding a simple rule using the ufw goes like this. Let’s assume you want everyone under the same network to be able to access your computer.
sudo ufw allow from 192.168.1.0/24
or allow a port (tcp/udp)
sudo ufw allow 53
allow a port (tcp only)
sudo ufw allow 25/tcp
add a deny rule
sudo ufw deny 25/tcp
to delete a rule
sudo ufw delete allow 25/tcp
more info can be found under the man page
hello..i need help about setting how can i access yahoo..
this time i can only browse google sites only..
thanks
Hi nik,
Have you try disabling ufw and try accessing yahoo sites? you said you are able to access “google sites only” meaning google only sites such as google.com, *.google.com??? or you are able to get to yahoo website only if you are directed from google search result??
hi aric,
i have disable ufw but nothing happen ..
i dont know but when i try to search yahoo in google search and result is i able to see the link to yahoo pages”then when i klik yahoo sites it will stop .
are this problem from mozila beta?
Pingback: netfilter
Thank you so much for a very nice ufw introductory page but I’m still having a problem understanding what you’re doing. I’ve been trying to understand exactly what this line does:
$ sudo ufw default deny && sudo iptables -L -n | grep ‘INPUT (policy’
Can you please explain it and perhaps tell me where to find more info?
Also, I’m finding that whenever I start ubuntu, ufw is not automatically starting up for me. Every time I start ubuntu, I find myself needing to run the following commands:
$ sudo ufw status
$ sudo ufw enable
$ sudo ufw default deny
$ sudo ufw status
Any thoughts on what might be happening or how I might fix it?
If it’s not too much trouble, can you please send answer via an e-mail? Again, I thank you very much for your help and for such a great page!
Sincerely,
Rich