IP Manager For WHMCS
From ModulesGarden Wiki
(Difference between revisions)
|
|
Line 304: |
Line 304: |
| ===Creation of Integration Submodule=== | | ===Creation of Integration Submodule=== |
| {| | | {| |
− | |style="padding: 10px 0px 15px 15px;"|You can create your own integration, all you need is knowledge of php programming language.<br /> | + | |style="padding: 10px 0px 15px 15px;"|You can create your own integration, all you need is knowledge of PHP programming language.<br /> |
| You can do it using '' 'Autorelease' '' submodule file.<br /> | | You can do it using '' 'Autorelease' '' submodule file.<br /> |
| 1. To begin, make copy of '' 'AutorelaseIntegration.php' '' located at '' 'your_whmcs/modules/addons/ipmanager2/app/modules' ''. | | 1. To begin, make copy of '' 'AutorelaseIntegration.php' '' located at '' 'your_whmcs/modules/addons/ipmanager2/app/modules' ''. |
Revision as of 16:06, 6 November 2013
IP Manager For WHMCS allows you to conveniently add and manage IP pools, and automatically assign IP addresses to your servers, products, addons or configurable options.
With our module you will be also able to assign an IP pool for a specified client, integrate with 3rd party applications like cPanel, export IP pools or view clear graphs.
What is more, IP Manager For WHMCS will allow your customers to easily manage their IP addresses from the WHMCS client area.
|
✔ Create Multiple Configurations For The Multiple Scenarios Of The Assigning
|
✔ Create Multiple Relations In One Configuration For Products, Addons, Configurable Options Or Servers
|
✔ Assign Pool For Specified Client
|
✔ Export IP Pools With The Information Assignment To XML And CSV Format
|
✔ View Whole IP List From Specified Pool
|
✔ Filter Data In The IP List
|
✔ Create An IP Pool By A Range Instead Of A CIDR (For IPv4)
|
✔ Exclude Selected IP Addresses From A Pool
|
✔ Delete Single IP Address Or A Bunch Of IP Addresses From A Pool
|
✔ Integrate IP Through Assigning With The 3rd Party Applications: cPanel and Plesk
|
✔ Create New Integration Modules
|
✔ Manual Assigning/Unassigning The IP From Pool For Specified Client Service
|
✔ Automatic Choosing The First Free IP Address In The Configuration Related Pools
|
✔ View Information When The Configuration Assigned Pools Has No More Free IP Addresses Inside
|
✔ Intelligent IP Assigning For Related Configurable Options With The 'Quantity' Type
|
✔ Clean Graphs That Shows Current Usage Of The IP Pool Grouped By Months
|
✔ IP Pool Usage Statistics Presented By Numbers And Progress Bars With Different Colors Dependant On The Usage Of The Pool
|
✔ Integration With WHMCS Client Area
|
✔ Supports WHMCS V5 and Later
|
Installation
This tutorial will show you how to successfully install and configure IP Manager 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 IP Manager For WHMCS.
|
2. Upload and extract the module into the main WHMCS directory.
Files in your WHMCS directory should look like this.
|
3. When you install IP Manager for the first time you have to rename 'license_RENAME.php' file.
File is located at 'modules/addons/ipmanager2/license_RENAME.php' . Rename it from 'license_RENAME.php' to 'license.php' .
|
4. In order to configure your license key, you have to edit a previously renamed 'license.php' file.'
Enter your licence key between quotation marks as presented on the following screen. You can find your license key at your client area → 'My Products' .
|
5. 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 'IP Manager' and press 'Activate' button.
|
6. 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' .
|
7. Last step is setting chmod 755 to 'storage' folder.
Folder is located at 'you_whmcs/modules/addons/ipmanager2' .
|
8. You have just successfully installed IP Manager!
You can access your module at 'Addons' → 'IP Manager' .
|
Configuration and Management
IP Manager For WHMCS allows your customers to automatically manage dedicated IP addresses. Newest IP Manager supports both IPv4 and IPv6.
You can add dedicated IP addresses pool, automatically assign it to clients/products/servers/addons/configurable options.
Module also enables clients to manage and order dedicated IP addresses.
In this short guide we will present you the possibilities of our module.
|
IP Pools
To manage any IP pool via IP Manager you have to add it first.
They are two ways to do that. You can use CIDR notation or enter IP range.
Note:IP range is supported only for IPv4.
|
Adding IP Pool in CIDR Notation
Go to 'IP Pools' tab, select 'Classless Inter-Domain Routing (CIDR)' .
Select IP version, type first IP from pool you want to add and netmask (in prefix notation).
Note: First IP from pool should be compatible with CIRD notation.
|
You can exclude any number of IP addresses from the pool.
To do so, enter them into 'Excluded IP Addresses:' textbox, one IP address per line.
Afterwards, press 'Add Pool' button.
|
Adding IP Pool as IP Range
Go to 'IP Pools' tab, select 'IP Range' .
Type first and last IP from pool you want to add.
|
You can exclude any number of IP addresses from the pool.
To do so, enter them into 'Excluded IP Addresses:' textbox, one IP address per line.
Afterwards, press 'Add Pool' button.
|
Management of IP Pools
If you want to assign pool of IP to specyfic client, our module makes it available to you.
You can achieve that through using autocomplete textbox to find and choose client and pressing 'Save Changes' button.
Note: IP addresses will be added to all new products of client assigned to IP pool.
|
To view IP pool details press on its address as shown on the following screen.
|
In IP pool review you can find information about current assignment of IP addresses from pool and manually manage their assignment.
To facilitate the management of addresses we also added records filter.
Note: The screen below presents IP pool review with manually assigned service 'mytestingdomain.com'.
|
You can also remove IP addresses from IP pool.
Simply select checkboxes next to them, select 'Delete From The Pool' from 'Action For Selected:' .
Afterwards, confirm through pressing 'Save Changes' button.
|
Automatic IP Assignment
Main reason for creation of this module was to automatize the assignment of IP addresses.
Here we will show you how to set up configuration for it.
In order to start, go to 'Configuration' → 'Create Configuration' .
Type your configuration name, press textboxes corresponding to options you want to add and select them from dropdown menus.
Afterwads, press 'Create New Configuration' button.
On the screen below you can see sample configuration with two product.
|
Now you have to assign at least one IP pool to configuration. You can do it by pressing 'Assigned Pools' button.
|
Next, choose IP pool from a dropdown menu and press 'Add Pool' button.
Keep in mind that you can assign multiple pools to configuration.
|
Advanced Configuration
Lets say, that you want to set multiple IP assignment to specyfic product or so on, it is available with our module!
Here we will show you how to set up multiple IP addresses assignment to configurable options 'Extra IP Addresses' .
Create a new configuration as while setting up standard configuration.
When you are done press on 'Configurable Options' as shown on the screen below.
|
Afterwards, mark checkboxes next to configurable options you wanna assinged IP addresses to.
Enter quantity of IP addresses which will be assigned to each configurable options, next press 'Save Changes' .
|
Usage Graph
At each configuration you can find graph of usage, which shows you statistics of IP addresses assignment in time.
|
3rd Party Integration
In this tab you can setup 3rd party integration which allows you to manage IP through our module in your whmcs and synchronize changes at 3rd party servers.
Note: To use these integration submodules (except 'Test Integration Module') you have to set up free IP pools (cPanel) or IP addresses (Plesk) on servers.
|
Enabling 3rd Party Integration
Activation of all integration modules looks simillar.
Start by pressing 'Activate' button next to module you want to activate.
|
Press 'Configure' button, select configuration to apply module for and confirm through clicking 'Save Changes' .
|
Test Integration Module
This module logs information about IP processing for 'Autorelease' type products.
Your order should look similar to the one on the screen below.
Note: You need to set up server of 'Autorelease' type, otherwise logs will not show up.
|
Creation of Integration Submodule
You can create your own integration, all you need is knowledge of PHP programming language.
You can do it using 'Autorelease' submodule file.
1. To begin, make copy of 'AutorelaseIntegration.php' located at 'your_whmcs/modules/addons/ipmanager2/app/modules' .
|
2. Rename copy to your new submodule name.
Note: File name have to end with 'Integration' , for example 'NewSubmoduleIntegration.php'.
|
3. Edit it, start by entering basic setting.
1. Class name should be same as file name.
2. Submodule name visible in IP Manager.
3. Submodule description you want to display.
4. Place here module name you are integrating ( best way is to copy folder name of module ).
|
4. Now it's time to implement integration part, you will need integrated module documentation for it.
1. Configuration of 3rd party integration submodule.
2. Place code here assigning IP address to module product.
3. You can add code to unassign IP address here.
|
4. In order to view submodule you just created, log in to your WHMCS and go to 'Addons' → 'IP Manager' → '3rd Party Integration' .
|
Integration Code
Integration described below is not obligatory.
Module allows your customers to view IP addresses assigned to their product any buy new ones.
To enable it, simply follow these simple steps:
|
Correctly placed code is presented on the following screen.
|
In the client area it should look like on the screen below.
|
To allow your customer to buy new IP addresses you need to set up product addon for product and add this addon to configuration in IP Manager.
|
Add IP via Addon
Setting up addon allows your client to add IP address to their product using integration.
go to 'Setup' → 'Products/Services' → 'Product Addons' and press 'Add New Addon'
|
Afterwards, enter addon name, description and select applicable products.
Set pricing for addon by choosing 'Billing Cycle' and typing price.
Confirm through pressing 'Save Changes' button.
|
Now, go to 'Addons' → 'IP Manager' and use configuration you created before or create new one.
Remember to add previously created addon as configuration relation.
You can do it by pressing 'Addon' button as shown on the following screen.
|
Tick checkbox next to addon and enter quantity of IP addresses to add.
Afterwards, click 'Save Changes' button.
|
If you enabled integraton for client area, your client should see something similar to the screen below.
To view product addon you added, press 'Buy an IP for Service' button.
|
As you can see, your client can order 'Additional IP' addon from here.
|
Management of Custom Hooks
Our module allows you to use custom hooks. All you have to do is to create some functions using php programming language.
Here you can see the possible hooks:
before_ip_assign_hook($ip, $serviceid, $relation, $configid)
after_ip_assign_hook($ip, $serviceid, $relation, $configid)
before_ip_integrating_hook($ip, $service, $server)
after_ip_integrating_hook($ip, $service, $server)
before_ip_disintegrating_hook($ip, $service, $server)
after_ip_disintegrating_hook($ip, $service, $server)
|
To find details about hooks read file 'custom_hooks.php' .
You can find there hook, information about its time of run, return values and parameters.
For example, if you want to throw message to activity log after IP adress assignment find hook 'after_ip_assign_hook($ip, $serviceid, $relation, $configid)' and type:
Logger::factory()->log('Custom hook was triggered');
It should look like on the screen below:
|
How To Update
In order to upgrade your module, follow these steps:
1. Upload and extract IP Manager module to your WHMCS server.
|
2. Go to 'your_whmcs/template_c' , refresh content and remove all files except 'index.php' .
|
Management of Export
You can export your IP pools to .cvs and .xml files.
To export, go to 'Export' tab, choose IP pool to export and file format.
Confirm through pressing 'Save Changes' button. Download of file will start shortly.
Note: Your 'storage' folder located at 'your_whmcs/modules/addons/ipmanager2' should have chmod set to 755.
|
Tips
1. If your client will order a product bonded to two configurations (e.g. by product type and configurable option), IP Manager will add IP addresses from both configurations.
|
2. If you see something like this at 'Addon' → 'IP Manager' , remove content of 'template_c' (except 'index.php' file).
|
3. If you export file and it is empty, check your 'Storage' folder chmod, it should be set to 755. Folder is located at 'your_whmcs/modules/addons/ipmanager2' .
If you still have that problem, set chmod 777.
|
Common Problems
1. When you have problems with connection, check whether your SELinux or firewall is not blocking ports.
|