ABHIONLINUX
Site useful for linux administration and web hosting

2009/07/30

CSF insatallation

Install CSF Firewall for Cpanel

Download the package
wget http://www.configserver.com/free/csf.tgz

Untar it :
tar -zxf csf.tar.gz

Run the install script
sh /csf/install.sh

Remove apf and bfd
sh /etc/csf/remove_apf_bfd.sh

csf -s
// start the firewall
csf -r
// restart the firewall
csf -f
// flush the rules or stop the firewall.

Specify the port you want to open

# Allow incoming TCP ports
TCP_IN = "20,21,22,25,53,80,110,143,443,465,953,993,995,2077,2078,2082,2083,2087"
# Allow outgoing TCP ports
TCP_OUT = "20,21,22,25,37,43,53,80,110,113,443,587,873,953,2087,2089,2703"
# Allow incoming UDP ports
UDP_IN = "20,21,53,953"
# Allow outgoing UDP ports
# To allow outgoing traceroute add 33434:33523 to this list
UDP_OUT = "20,21,53,113,123,873,953,6277"

No comments:

Post a Comment