Unban Center For WHMCS

From ModulesGarden Wiki
Jump to: navigation, search

Contents

About Unban Center For WHMCS

Unban Center For WHMCS allows your clients to easily unban IP addresses in submodules such as cPanel, DirectAdmin, InterWorx and Plesk directly from your WHMCS client area.
Additionally, the module lets you create your own submodules in order to integrate them with other systems and control panels.
  • Client Area Features:
✔ Automatically Detect And Unban IP Address From:
✔ Control Panel
✔ Control Panel Hosted On Client's VPS
✔ Check If IP Address Is Banned
✔ Show Reason Of Ban
✔ View Time Until Next Available Unban Action
  • Admin Area Features:
✔ Configure Per Product:
✔ Enable/Disable Unban Ability
✔ Configure Unban Behavior
✔ Define Black List Of IP Addresses - Protected From Unban Action
✔ Define Unban Delay - Protection From Abuse
✔ Define If Customer Can Unban Other IP Address Than Their Current One
✔ Set Up Default Settings
✔ Define Products Using Product Group Settings - Control Panel
✔ Define Products Using Default Settings - VPS / Dedicated Server
✔ Unban Single Client From Chosen Product
✔ Unban Multiple Clients From Chosen Control Panel
✔ Check If Client IP Address Is Banned
✔ View And Clear Logs
  • Supported Modules:
✔ cPanel & cPanel Extended For WHMCS - CSF and cPHulk
✔ Plesk & Plesk Extended For WHMCS - Fail2Ban
✔ DirectAdmin & DirectAdmin Extended For WHMCS - CSF
✔ InterWorx & InterWorx Extended For WHMCS - Native Firewall
  • General Info:
✔ Supports IPv4 and IPv6
✔ Intuitive Creation Of Additional Submodules
✔ Multi-Language Support
✔ Supports PHP 5.4 Up To PHP 7
✔ Supports WHMCS Templates Five and Six
✔ Supports WHMCS V6 and V7

Installation

This tutorial will show you how to successfully install and configure Unban Center For WHMCS.

We will guide you step by step through the whole installation and configuration process.

1. Log in to your client area and download the module.
UB 1.png
2. In the downloaded file you will find two packages that support different PHP versions.
As presented on the screen below, the first one is dedicated to PHP 7, while the second one is aimed at PHP 5.4 up to PHP 5.6.
It does not apply to open source versions.

Note: You can check current PHP version in your WHMCS. To do so proceed to 'Utilities' → 'System' → 'PHP Info'.

UB 2.png
3. Extract the downloaded file and choose the one with the right PHP version. Upload and extract the PHP file into the main WHMCS directory.

The content of PHP version files should look like this.

Gfhfguj.png
4. When you install Unban Center For WHMCS for the first time you have to rename 'license_RENAME.php' file.

File is located in 'modules/addons/unbanCenter/license_RENAME.php'. Rename it from 'license_RENAME.php' to 'license.php'.

UB 3.png
5. In order to configure your license key, you have to edit the previously renamed 'license.php' file.

Enter your license key between quotation marks as presented on the following screen. You can find your license key in your client area → 'My Products'.

UB 4.png
6. Now you have to activate the module in your WHMCS system.

Log in to your WHMCS admin area. Go to 'Setup' 'Addon Modules'. Afterwards, find 'Unban Center' and press 'Activate' button.

UB 5.png
7. In the next step you need to permit access to this module.

To do so, click on 'Configure' button, tick 'Full Administrator' and press 'Save Changes'.

UB 6.png
8. Go to 'Addons' 'Unban Center' 'Integration Code' tab and follow the instructions of integration to allow access from the client area.

The integration codes differ depending on the WHMCS version and template you are using.
Once you perform the integration properly, the status of the integration will change to Done.

If you run Unban Center on WHMCS V5.x then you will have to copy and paste the below code:

UB 7.png
If you run Unban Center on the latest WHMCS V6.x.x then you will have to firstly decide which template you use:
  • Integration code for WHMCS V6.x.x, template SIX
UB 7 1.png
  • Integration code for WHMCS V6.x.x, template FIVE
UB 7 2.png
9. You have just successfully installed Unban Center For WHMCS!

You can access your module at 'Addons' 'Unban Center'.

UB 8.png

Configuration and Management

Unban Center For WHMCS allows you to provide your clients with an ability to easily unban desired IP addresses from external server.

Additionally, you are able to protect specific IP addresses from the unban action.

Unban Types

Our module has been designed in a way that you may now manage banned IP addresses on several different panels of particular type.

These are:

  • cPanel - unban on CSF, cPHulk (Blacklist Management and History Reports) or both at once
  • DirectAdmin - unban on CSF
  • InterWorx - unban on native firewall
  • Plesk - unban on Fail2Ban

It is also possible to unban only the current IP address. You simply need to select such option (i.e. Allow the user to unban a current IP address only)
while setting the configuration or create a list of IP addresses that, no matter what type you have chosen, will not be unbanned (Black List of IP Addresses).

Now read the below sections to learn about advanced configuration of banned IPs management in both control panels and VPS/dedicated servers.

Control Panels

At the 'Control Panels' tab you can easily enable and configure unban action for all or for chosen servers only.

Configuration of Single Product

Let's show you how to enable unban functionality for cPanel Extended product.

Start with marking 'Enabled' checkbox and then define time intervals to declare how often your client will be able to perform unban action on a specific product.
Afterwards, press 'Advanced Settings'.

UB 11.png
Next, select desired value from 'Unban Type', remember that in case of cPanel you may choose between:
  • Unban on CSF
  • Unban on cPHulk (Blacklist Management and History Reports)
  • Unban on both of the above

Enter IP addresses that will be unable to be unbanned into 'Black List of IP Addresses' textbox if there are such.
Additionally, you can permit your clients to unban any IP address through unmarking checkbox as shown on the following screen.
Confirm those settings through pressing 'Save Changes' button.

UB 12.png

Configuration of Multiple Products

You can configure multiple products from one product group at once.

All product groups containing at least one supported module will be displayed in our module → 'Control Panels' tab.
Press 'Advanced Settings' next to the desired product group to proceed.

UB 12 1.png
On the following screen you can see unban functionality settings for a product group.

As you may have noticed there are two tabs, 'cPanel' and 'cPanel Extended For WHMCS'.
It means that products in a selected product group are using both cPanel and cPanel Extended For WHMCS modules.
This way you can set up unban functionality for cPanel and cPanel Extended products separately.

UB 12 2.png
Product group settings apply only to disabled products or products marked as 'Uses Group Settings'.

Therefore, unban feature settings of product group will not be applied to modified product even if it belongs to that group.
Products for which group settings are applied to are marked with 'Uses Group Settings' as shown on the following screen.

UB 12 2 1.png
You can force group settings for all products in that group through using 'Set For All' button.

Note: 'Set For All' will force group settings only for enabled products.
In order to apply group settings to all products, disable group, enable it and press 'Set For All'.

UB 12 2 2.png

VPS/Dedicated Servers

VPS/Dedicated Servers tab allows you to set configuration for default submodules and all available products.
Unban IP addresses in several different panels set up on any VPS or dedicated server.

Default Submodules

Our product offers four already configured submodules to perform unban action in. These are:
  • cPanel & cPanel Extended for WHMCS (unban on CSF, cPHulk or both)
  • Plesk & Plesk Extened For WHMCS (Fail2Ban)
  • DirectAdmin & DirectAdmin Extended For WHMCS (CSF)
  • InterWorx & InterWorx Extended For WHMCS (native firewall)

You may also create your own submodules, to learn how to do that, please read carefully this section.

Settings

Select desired value from 'Unban Type' and enter IP addresses that will be unable to be unbanned into 'Black List of IP Addresses' text area.

What is more, you can allow your clients to unban any IP address if you unmark checkbox as shown on the following screen.

UB 18.png

Available Products

Check selected product and press 'Advanced Settings'.
UB 18 1.png
Enable unban functionality for that product. Now you can either choose to use 'Default' settings (declared for default submodule)

or configure new settings for the product separately. Remember to 'Save Changes'.

UB 18 2.png

Unban Users

'Unban Users' tab allows you to unban your clients IP address from any of the external servers on which they own an account.

You can unban IP address assigned to your client accounts as well as custom IP address. Press 'Unban' as shown on the following screen.
Note: You will be able to unban only from external servers enabled at 'Unban Center For WHMCS' 'Control Panels' and 'VPS/Dedicated Servers'.

UB 12 3.png
Data on 'VPS host Address', 'Username', 'Password' will be filled in automatically. Select 'SSL Connection' ' if you wish.

Note! These details will appear only in case of VPS products used by the client.

UB 12 4.png
You may now check the status of the client's IP. Press 'Check Client IP Address'.
UB 12 41.png
Alternatively, fill in IP address to check.
UB 12 42.png
To unban client's IP, fill in the data just like in case of checking IP status and press 'Unban Client IP Address'.
UB 12 43.png
You can also type in a given IP and press 'Unban' then.
UB 12 44.png
To unban multiple accounts at once, select checkbox near accounts to unban and press 'Unban Selected' as shown on the screen below.
UB 12 6.png

Client Area

Please note that client area button 'Unban Your IP' is visible only if you have properly inserted integration codes, the integration is precisely described in installation section point 7.

Let's proceed to the client area → 'Services' 'My Services' in order to try out unban action.
Press 'Unban Your IP' to proceed to 'Unban Center'.

UB 13.png
Now, select product for which you want to perform unban IP address action.
UB 14.png
You will see a full product name and its status, underneath you will find IP address to be unbanned and VPS host details (provided you have selected a VPS product).
UB 15.png
Check if your IP is banned or unban it immediately. Once the action is completed you will be notified about the results.
UB 15x.png
In case you have set up a low delay time, you will need to wait for the next unban attempt.
UB 15 4.png
UB 15 3.png

Logs

All unban requests and their results can be found at 'Unban Center' 'Logs' tab.

You can find here information related to user or admin who requested unban action and its date.
Use 'Clear Logs' button to delete old and unnecessary log entries.

UB 16.png

Creating 3rd Party Submodule

The main goal of Unban Center For WHMCS is allowing you to quickly and easily create additional submodules.

All you need is a little knowledge of PHP programming language and documentation of integrated module API.
Required information regarding the submodule itself is located inside the exemplary submodule.
It can be found at 'your_whmcs/modules/addons/unbanCenter/submodules/'.
Owing to that, you are able to make your offer much more competitive and extend it to other systems, control panels and servers.

UB 17.png
Start with renaming copy of 'sample' folder to the name used by 3rd party module.

Let's say folder with module to integrate with Unban Center For WHMCS, which is located in 'your_whmcs/modules/servers/' is named 'dummyIntegration'.
For that case, your folder at 'your_whmcs/modules/addons/unbanCenter/submodules/' should be named 'dummyIntegration'.
File 'sampleUnbanSubmodule' located in the previously renamed folder should be renamed to 'dummyIntegrationUnbanModule'.
Afterwards, edit file 'dummyIntegrationUnbanModule' and follow instructions inside.

Tips

Common Problems

1. When you have problems with connection, check whether your SELinux or firewall does not block ports.
2. After update some functionalities are not working properly.

Cause: Your browser store old JavaScript in its cache.
Solution: Reload full page by using key combination to bypass your cache.

3. When upgrading your module to the latest version to run on WHMCS V6.x.x, remember to insert appropriate integration code for the template you are using.

There is a different code for template Five and for template Six.

Personal tools
Namespaces

Variants
Actions
Navigation
WHMCS Modules
cPanel Modules
Magento Extensions
Magento Themes
PrestaShop Modules
Blesta Extensions
General
Social
Unban Center For WHMCS