Manage firewall in Ubuntu 11.04


Hi the Ubuntu users.


I suggest ufw to manage the firewall. Check the status
sudo ufw status


enable it or disable it by typing
sudo ufw enable / disable 


There are two default policies for the firewall. Either block all incoming unless otherwise expressed with rules, or allow all incoming connections unless otherwise blocked by rules.
I suggest to block all incoming and to add rules to allow specific ports, protocols or services to access you. However, this can be an issue for common use. Choose your policy wise.


sudo ufw default deny (or) allow
according to your needs. I'll continue assuming I have chosen the deny one.


sudo ufw status 
will list any existing rules. Type 


sudo ufw app list 
to check the allowed services. Now type 


sudo cat /etc/service | grep ftp | cat
to list the services for eg. FTP. To add a rule for port 20 and TCP protocol in ufw type
sudo ufw allow 20/tcp


Check it by typing sudo ufw status
Finally make sure to enable the firewall logging by typing
sudo ufw logging on.


Good luck.

Comments

Popular posts from this blog

Ubuntu 11.04 - Process management (2/6)

Ubuntu 11.04 - Memory management (3/6)

Ubuntu 11.04 - File Systems (5/6)