Knowledge Base

VPS & Dedicated Hosting: ConfigServer Security & Firewall (CSF)

 VPS & Dedicated Hosting: ConfigServer Security & Firewall (CSF)

  • Log in to WHM

    ◦ Go to https://yourdomain.com/whm or https://yourdomain.com:2087

    ◦ Enter your root username and password

    ◦ Click Log In


 

  • Install CSF (if not installed)

    Once complete, you’ll see:
    ◦ Installation Completed.

    ◦ Then return to WHM → Plugins → ConfigServer Security & Firewall to open its settings.

    You can find the Testing Mode setting inside the Firewall Configuration tab, as shown below:



  • Disable Testing Mode and Adjust Syslog Restriction

    By default, CSF installs in Testing Mode (ON).
    To disable it:
    ◦  Click Firewall Configuration.
    ◦  Find TESTING = "1" and change it to "0".
    ◦  Click Change, then Restart csf+lfd.

    You may also see a warning about RESTRICT_SYSLOG being disabled:
    ◦
     Change its value to 3 (recommended).
    ◦  Click Change again and restart CSF/LFD when prompted.



  • Disable cPHulk

    To prevent conflicts between CSF and cPHulk:
    ◦  In WHM, go to Security Center → cPHulk Brute Force Protection.
    ◦  Disable cPHulk completely.

 

  • Configure Firewall Ports

    By default, CSF opens standard cPanel ports.
    If you use a custom SSH or SFTP port, you can modify the port list:
    ◦
    Go to Plugins → ConfigServer Security & Firewall → Firewall Configuration
    ◦ Edit the fields:

    • TCP_IN – incoming ports
    • TCP_OUT – outgoing ports

    UDP_IN – incoming UDP ports
    ◦
    Add or remove ports (separated by commas)
    ◦  Click Change, then restart CSF/LFD



  • Manage IPs and Rules

    You can manage IP addresses directly from the CSF interface:
    ◦ Quick Allow – Whitelist an IP
    ◦ Quick Deny – Block an IP
    ◦ Quick Ignore – Ignore an IP from LFD scans
    ◦ Quick Unblock – Remove a blocked IP
    You can also enable or disable the firewall entirely from this section.




  • Manage CSF via Command Line (Optional)

    ◦ You can also manage CSF through SSH commands:


        ◦ After removal, you may re-enable cPHulk or install another firewall.

       

 

Please rate this article to help us improve our Knowledge Base.

0 0