How to install CSF?

You can install CSF by downloading the package from


Extract the package

#tar -zxvf csf.taz
#cd csf

[CSF firewall requires to remove any currently running IP based firewall]

If any IP based firewall is running. Remove it


Install script


we can start the firewall in testing mode using this commands.

#csf -s
//start the firewall

Configuration file of csf is /etc/csf/csf.conf

It is very important to check the firewall on which ports to open and close all remaining port numbers. Open the /etc/csf/csf.conf and edit the following line with port numbers.

#Incoming TCP ports
TCP_IN = “20,21,22,25,53,80,110,143,443,953,993,995,2082,2083,2087,2086.2089”
# Allow outgoing TCP ports
TCP_OUT = “20,21,22,25,37,43,53,80,110,443.953,2087,2089”
#Incoming UDP ports
UDP_IN = “20,21,53,953”
#Outgoing UDP ports
UDP_OUT = “20,21,53,113,123,953

Disable the Testing mode and start the firewall

If you require help, contact SupportPRO Server Admin

Server not running properly? Get A FREE Server Checkup By Expert Server Admins - $125 Value

Leave a Reply