User Tools

Site Tools


WHMCS-CSF Firewall Customer Unblocking Module


This module will make life easier for your customers. Whenever your customer gets blocked on the firewall, he/she may simply log into WHMCS and check if their IP is blocked. If so the IP is listed, then he/she will have the option to get it unlisted without ever contacting your company's support.


  • Remote calls without needing SSH access (root access is needed initially to setup the permission, *ownership for the files and the cronjobs)
  • Hash is checked before anything is executed
  • Regular hosting user and reseller hosting user mode (the mod will automatically get the regular hosting user, while reseller hosting user will the option to search for a client's IP address in the block list)
  • Customizable messages
  • External access safe
  • No special PHP extension is needed
  • Check for both deny list (csf.deny) and temp ban list (csf.tempban)


WHMCS Admin Installation

  1. Upload the csf_firewall/ directory into yourwhmcsinstall/modules/admin/
  2. Login into your WHMCS → Utilities → Addon Modules → Csf Firewall. The mod will then prompt you to install the new table into your database if this is the first time running
  3. Once the table is ready, reload the page. Now you should see a table with column names such as: IP Address, Server Name, Hash and Web Address. To enter your remote server's information, simply scroll down to the bottom and you should be able to see a form prompting you for the information.
  4. *IP Address - The IP Address for the remote server
    • Server Name - The name of the server you want your customer to see when the module is doing the checking
    • Hash - The MD5 hash from the remote server's password
    • Web Address - The URL to reach your remote server's php file (Enter the address without http:///)
  5. The WHMCS admin side setup is complete, next is the WHMCS Customer Product template file.

WHMCS Customer Product Details Template

  1. Open the clientareaproductdetails.tpl for the theme you are currently using
  2. Find the place you want to place the buttons. (For the default template, we place it between <p align=“center”>{$serverclientarea}</p> and {if $username}) Paste the codes included with the zip package into the page.
  3. Save the and this part is done.

Display Message Customization

  1. Open csf_settings.php
  2. Change the message you want it to display
  3. Save it once you are done
  4. Once you have set everything, it is time to upload the rest of the files needed on the WHMCS side. Upload the files csf_checkban.php, csf_settings.php and csf_unban.php to the root installation base of WHMCS.
  5. Once uploaded the WHMCS side is done.

Remote Server Configuration

There are two different way of remote server installation we support. This instruction will explain both of them in details.

Method One: Standalone account

This method is designed and optimized for installation on a cPanel server with suPHP.

  1. Create an cPanel hosting account on the server you are installing for. The domain should match the one you have set for on the WHMCS side.
  2. Open csf_settings_remote.php and edit the following settings. (See bottom of this page for the definition of each variable)
  3. Upload the csf_check.php, csf_settings_remote.php and csf_unban.php to the public_html directory
  4. For this method you will need to change some file/directory ownership for the CSF files. Please refer to the include instructions in the package
  5. Once the permissions are set, the final step is to set the cronjob. This cronjob is needed for CSF to restart. Refer to the included instructions again in the package to complete the cronjob installation.
  6. Method one installation is complete.

Method Two: Server cron based

  • This method is designed to be used on system which is more stricter on security.
  • You do not need to create a separate account for this.
  • The path to the PHP files must be web accessible same as method one

Please refer to the installation instruction included in the package for the Method Two install.

   * **hash** -  The matching pre-MD5 pass code you used to enter on the WHMCS side
   * **csf** - The path to your CSF installation. Leave as default if you did not change the installation folder. (Default = /etc/csf/)
   * **files_location** - The path to the deny files will be saved to. The default is set to the web inaccessible of the account. You can leave it as is.
   * **method** - This is the installation method you are using for this remote server. (1 or 2)
whmcs-csf_firewall_customer_unblocking_module.txt · Last modified: 2015/04/30 17:30 (external edit)