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]
       http:80:tcp:ACCEPT  //Allow Port
       ftp:21:tcp  //Block Port

Test IPkungfu
# ipkungfu --test

Post a Comment

Featured Post

Java Introdcution

Please send your review and feedback to