User Tools

Site Tools


whmcs-csf_unblocker_v4_installation

Overview

With version 4 of the CSF AutoUnblocker module, installation is easier than ever. You no longer have to edit templates edits. We have made it easy to install and configure the module.

Key new features

  • Six compatiable
  • No template installation
  • Remote hash update
  • Remote script update
  • Frontend full language supported
  • CSF Cluster mode support
  • Differential & Passive Unblocking Mode

Requirements

Make sure the remote servers have ioncube 0 loader enabled. If you are running ioncube loader earlier than ioncube 10 then you can either run easyapache to rebuild the ioncube extension automatically or manually update the ioncube loader files.

Installation Instructions

Installation Overview

  1. The Module must be configured and enabled in your WHMCS.
  2. The Provisioning Module of the hosting service needing to use this module must have the module enabled in the Enable for Modules under the Admin Configuration page
  3. The Remote server must be setup with the remote server script Remote Server Installation (root required for installation, not required for running of the remote script). The remote server script must be reachable via http or https
  4. To test the remote server is working correctly, click on the Connection Test under the first column on the Server Listing table.

Remote Server Installation Tutorial Video

WHMCS Installation

There isn't any template modification needed for the module, simply upload the files in the whmcsUpload folder into your working WHMCS directory.

If you are using the csfunblocktech module, make sure you upload the main module first. Activate and configure it and the upload the csfunblocktech module once the main module has been configured. Otherwise, the system will crash.

WHMCS Configuration

Enable the module by going to Setup → Addon Modules. Once activated you will need to fill in the License key as well as configure other module settings under the Setup → Addons Module page.

Here are some configurable options for this module

Option Explaination
License Key Your license key
Mod Status Enable/disable the Module, will not display the unblock button in the product details page
Cluster Mode Enabling this will make the module to only connect to the main server of the cluster
Cluster Server When Cluster mode is enabled, make sure you select the main server for the cluster here. Otherwise the module will not be sending the Cluster command
Display Reason Display the blocked reasoning
Enable API Enable the usage of the API
Unblock Mode (4.56)Differential Mode will compare the whole list to the CSF directory and restart if changes are detected. Passive Mode will add/remove IP on a per individual basis. When Passive Mode is enabled, List Saving mode is disabled and you will not be able to remove DO NO DELETE blocks
Disable Do Not Delete option (Passive)When enabled, the Do Not Delete option will be disabled when Passive mode is enabled
Central Portal (4.6)This mode will allow the client to check for all hosting packages blocking status in one page
Side Bar DisplayShow the search function in the side bar
Main Content DisplayDisplay the unblock function in the main container
Add Central Portal to Service MenuShow the Central Portal under the Service menu
Max Unblock Attempt Maximum unblock a client can have per hour
Always Test Connection Enabling this will always run connection test during reload, otherwise only during first load for the session
Techoptions*Enable/Disable tech module functions
Disable Do Not Delete option for TechWhen enabled, the Do Not Delete option will be disabled for Tech Module
Enable Hosting Enable the display of the unblock module for regular hosting clients
Enable Reseller Enable the display of the unblock module for reseller hosting clients
Enable Server Enable the display of the unblock module for products under Server product type
Enable Other Enable the display of the unblock module for products under Other product type
Regular Reseller Enable reseller search feature for regular hosting clients

Module Configuration (Server Parameters)

Once you have activated the module you can now goto Addons → WHMCS CSF Unblocker to access the module.

There are few things you need to consider when adding the server onto the listing of servers under this module.

Parameters Explaination
IP Address This MUST match the IP of the hosting package (WHMCS → Product → Servers) it is using.
Server Name This will be the display name during the unblocking steps
Hash This must match the $hash in the remote server settings file (CSFSettings.php)
Web Address This must be a web accessible address that CSFUnblockremote.php can be reached via HTTP or HTTPS on the remote server without trailing /. For example, https://yourserver.domain.com
X List The remote server's Deny list
Temp X List The remote server's temp deny list
White List The remote server's whitelist
Generate Hash on Server This will update the hash on the remote server automatically
Update RemoteThis will update the module package on the remote server
Mass Hash Update This will update all the hash recorded on WHMCS, note it will NOT update the $hash in the remote CSFSettings.php file

Language Files

If you already have a language override file for you language, simply open the english.php file then copy and paste the content into your current override files. Otherwise just upload the current one to the modules/addons/csfunblock/lang/ directory.

You will need to make a copy of english.php to your language you are using for WHMCS if you are not using English.

Template Files

The template files are in the modules/addons/csfunblock/templates directory if you need to make any cosmetic changes.

WHMCS Client Frontend

The client end module will be shown on the Service page of the particular service. Make sure you have enabled the server provisioning module in the Admin module (Addons → WHMCS CSF Unblocker → Enable for Modules) to have it showing in the front end.

Remote Server Install (Non-WHMCS server)

Run the following one step installer, it will install the files onto the remote server for you and install the cronjob.

cd /tmp; wget -N http://files.baseservers.com/codebox/whmcs-csfunblocker/installer.tar; tar -xvf installer.tar ; chmod +x installer.php; 

To start the installation

php installer.php arg1 arg2 arg3

Where

Argument 1 Options Explanation
install-ioncube10 install the ioncube 10 version
Argument 2 Options Explanation
cpanel install the files into /var/www/html
cpanel-ea3 install the files into /usr/local/apache/htdocs
da install the files into /var/www/html
Argument 3 Options Explanation
default leave the default hash in the settings file alone
random Generate a random Hash to replace the default hash in the settings file
Any string Replace the default hash with the string provided. Avoid using quotes, it will be stripped out.

Example installer command

cd /tmp; wget -N http://files.baseservers.com/codebox/whmcs-csfunblocker/installer.tar; tar -xvf installer.tar ; chmod +x installer.php; php installer.php install-ioncube10 cpanel default

Manual Install

If you want to install it manually, you can upload the files in remoteUpload to the documentroot of your remote server that can be web accessible using the Web Address listed in the Admin Module.

If the web address is abc.domain.com

Then http://abc.domain.com/CSFUnblockremote.php MUST be accessible publicly

By default cpanel will be stored in

/var/www/html/

directadmin will be in

/var/www/html

Once the file is uploaded, you would need to setup a cronjob to run CSFUnblockremote.php

Here is a sample cronjob

cPanel

*/2 * * * * php -c /var/www/php.ini -q /var/www/html/CSFUnblockremote.php cron > /dev/null 2>&1

DirectAdmin

*/2 * * * * php -c /var/www/php.ini -q /var/www/html/CSFUnblockremote.php cron > /dev/null 2>&1

We are using a local php.ini file so that we don't have to make changes to the system wide php.ini file. If your system wide php.ini have the following functions disabled. It is adviseable to make a copy of the system wide php.ini and make the cronjob to load the local php.ini

system()

posix_getpwuid()

fileowner()

filegroup()

fileperms()

Connection Test

You can run the connection test by going to the Admin Module and click on the first column's icon in the Server Listing.

Tips

If you are getting an error regarding ioncube then you must update to the latest ioncube loader for your PHP to version 9 or 10. Depending the package you downloaded.

whmcs-csf_unblocker_v4_installation.txt · Last modified: 2019/11/14 13:27 by wiki