Monday, March 31, 2014

Opening Ports In CSF Firewall


CSF can be configured in Web Host Manager (WHM) as well as over ssh. You need to open up the following file:


nano /etc/csf/csf.conf


and add the port you mean to open to the needed line:


# Allow incoming TCP ports
TCP_IN = "20,21,22,25,53,80,110,143,443,465,587,993,995,26"
# Allow outgoing TCP ports
TCP_OUT = "20,21,22,25,37,43,53,80,110,113,443,587,873"



CSF then needs to be restarted for the change to take effect:


csf -r

From Within WHM

In WHM, type configserver in the Find bar in the upper left hand corner. Click on ConfigServer Security&Firewall. On that page, click on the Firewall Configuration button:



That page will allow you to edit the exact same file you would if you were accessing it over ssh:



Like with the ssh instructions, add the necessary port to the list, then click Change at the bottom of the page to save your changes. After that is run, you will need to restart csf. Thankfully, the very next screen you will see has a button for that, Restart csf+lfd

0 comments:

Post a Comment

    Blogger news

    Blogroll

    About