September 12, 2011

Ubuntu Block/Close/Disable All Ports & Open Required Ports

Hi everyone,

I thought of blocking all my system ports and allow only http(s) ports. Because I am not going to use any others ports except http(s).

With IPkungfu tool, it is possible to block all the ports and allow the necessary ports.

Installing IPkungfu
# apt-get install ipkungfu

Configure IPkungfu
1) /etc/ipkungfu/ipkungfu.conf  //Change the firewall settings
2) /etc/ipkungfu/services.conf  //Change the Port settings
    Syntax: ServiceName: ServicePort:Protocol[:ACCEPT]
    Example:
       http:80:tcp:ACCEPT  //Allow Port
       ftp:21:tcp  //Block Port

Test IPkungfu
# ipkungfu --test

References:
1) http://www.zarzax.com/blog/2009/3/4/ipkungfu-easy-iptables-based-server-firewall.html
2) https://help.ubuntu.com/community/firewall/ipkungfu

No comments:

Featured Post

Java Introdcution

Please send your review and feedback to psrdotcom@gmail.com