Installation and configuration guide
- WHMCS setup(install/update)
- Setup guide: Mikrotik preparation and configuration
- Setup guide: WHMCS preparation and configuration
- Add server (router Mikrotik) in WHMCS
- Email Template (puqMikrotikVPN notification traffic limit)
- Email Template (puqMikrotikVPN Suspension Notification traffic limit)
- Product Configuration in WHMCS
- Product Addons Configuration in WHMCS
WHMCS setup(install/update)
Mikrotik VPN module WHMCS
Order now | Download | FAQ
Module is coded ionCube v13
Supported php version:
- php 7.4 WHMCS 8.11.0 -
- php 8.1 WHMCS 8.11.0 +
- php 8.2 WHMCS 8.11.0 +
To install and update a module, you must perform one and the same action.
1. Download the latest version of the module.
PHP 8.2
wget http://download.puqcloud.com/WHMCS/servers/PUQ_WHMCS-Mikrotik-VPN/php82/PUQ_WHMCS-Mikrotik-VPN-latest.zip
PHP 8.1
wget http://download.puqcloud.com/WHMCS/servers/PUQ_WHMCS-Mikrotik-VPN/php81/PUQ_WHMCS-Mikrotik-VPN-latest.zip
PHP 7.4
wget http://download.puqcloud.com/WHMCS/servers/PUQ_WHMCS-Mikrotik-VPN/php74/PUQ_WHMCS-Mikrotik-VPN-latest.zip
All versions are available via link: http://download.puqcloud.com/WHMCS/servers/PUQ_WHMCS-Mikrotik-VPN/
2. Unzip the archive with the module.
unzip PUQ_WHMCS-Mikrotik-VPN-latest.zip
3. Copy and Replace "puqMikrotikVPN" to "WHMCS_WEB_DIR/modules/servers/"
Setup guide: Mikrotik preparation and configuration
Mikrotik VPN module WHMCS
Order now | Download | FAQ
Note: Enter the following commands one by one and wait for the command to complete.
I. Check RouterOS version
Make sure that the version of RouterOS is 7+
system/package/print
II. Enabling HTTPS Create your own root CA on your router
/certificate
add name=LocalCA common-name=LocalCA key-usage=key-cert-sign,crl-sign
III. Sign the newly created CA certificate
/certificate
sign LocalCA
IV. Create a new certificate for Webfig (non-root certificate)
Note: as common-name=XXX.XXX.XXX.XXX You enter public IP adddress of the router.
/certificate
add name=Webfig common-name=XXX.XXX.XXX.XXX
V. Sign the newly created certificate for Webfig
/certificate
sign Webfig ca=LocalCA
VI. Enable SSL (www-ssl) and specify to use the newly created certificate for Webfig
/ip service
set www-ssl certificate=Webfig disabled=no
VII. Enable api-ssl and specify to use the newly created certificate for Webfig
/ip service
set api-ssl certificate=Webfig disabled=no
VIII. Enable VPN server
To enable the VPN server
Setup guide: WHMCS preparation and configuration
Mikrotik VPN module WHMCS
Order now | Download | FAQ
Module is coded ionCube v13
Supported php version:
- php 7.4 WHMCS 8.11.0 -
- php 8.1 WHMCS 8.11.0 +
- php 8.2 WHMCS 8.11.0 +
To install and update a module, you must perform one and the same action.
1. Download the latest version of the module.
PHP 8.2
wget http://download.puqcloud.com/WHMCS/servers/PUQ_WHMCS-Mikrotik-VPN/php82/PUQ_WHMCS-Mikrotik-VPN-latest.zip
PHP 8.1
wget http://download.puqcloud.com/WHMCS/servers/PUQ_WHMCS-Mikrotik-VPN/php81/PUQ_WHMCS-Mikrotik-VPN-latest.zip
PHP 7.4
wget http://download.puqcloud.com/WHMCS/servers/PUQ_WHMCS-Mikrotik-VPN/php74/PUQ_WHMCS-Mikrotik-VPN-latest.zip
All versions are available via link: http://download.puqcloud.com/WHMCS/servers/PUQ_WHMCS-Mikrotik-VPN/
2. Unzip the archive with the module.
unzip PUQ_WHMCS-Mikrotik-VPN-latest.zip
3. Copy and Replace "puqMikrotikVPN" to "WHMCS_WEB_DIR/modules/servers/"
4. Create new server Mikrotik in WHMCS (System Settings->Products/Services->Servers)
System Settings->Servers->Add New Server
- Enter the correct Name and Hostname
- In the "Assigned IP Addresses field", enter a list of IP addresses that will be issued to users.
- In the Server Details section, select the "PUQ Mikrotik VPN" module and enter the correct username and password for the Mikrotik router.
- To check, click the "Test connection" button
5. Create a new Products/Services
System Settings->Products/Services->Create a New Product
In the Module settings section, select the "PUQ mikrotik VPN" module
- License key: A pre-purchased license key for the "PUQ Mikrotik VPN" module. For the module to work correctly, the key must be active
- Comment PREFIX: The prefix that will be added to the VPN user's comment on the Mikrotik router
- Profile: PPP secret profile on mikrotik router
- Service: A service that will be available to a VPN user on a Mikrotik router
- Bandwidth Download: Download Bandwidth Limit in M/s
- Bandwidth Upload: Upload Bandwidth Limit M/s
- Traffic One Time/Monthly in GB/Traffic Quarterly in GB/Traffic Semi-Annually in GB/Traffic Annually in GB/Traffic Biennially in GB/Traffic Triennially in GB : Packet traffic that will be added to the balance every billing period, respectively
- Save traffic history (days): The number of days it takes to save user traffic usage statistics
- User notification traffic limit email template: The template of the letter that will be sent to the client if the remaining traffic is less than XXX
- Notification traffic remainder less than X GB: The amount of traffic on the client's balance below which a notification will be sent.
- Suspend exceeding traffic limit email template: The template of the letter that will be sent to the client if his traffic balance is 0 or less 0
- Link to instruction: Link to the instruction, if filled out, it will be reflected in the client area
- Support PPtP/Support L2TP: If checked, it will be reflected in the client zone
- L2TP IPSec PSK key: it will be reflected in the client zone
Add server (router Mikrotik) in WHMCS
Mikrotik VPN module WHMCS
Order now | Download | FAQ
Add a new server to the system WHMCS.
System Settings->Servers->Add New Server
- Enter the correct Name and Hostname
Name is just for Your convenience and You can put there anything You like ie: Mygreat mikrotik routr
You can choose whatever hostname You want. Valid entries look similar to: vpn.mydomain.com, ourgreatvpn.mydomain.net. You can also dedicate whole domain ie: myVPNservices.com if You like. The important thing is to resolve the choosen IP address of the Mikrotik router in DNS server for Your domain.
- In the "Assigned IP Addresses field", enter a list of IP addresses that will be issued to users.
- In the Server Details section, select the "PUQ Mikrotik VPN" module and enter the correct username and password for the Mikrotik router.
- To check, click the "Test connection" button
Email Template (puqMikrotikVPN notification traffic limit)
Mikrotik VPN module WHMCS
Order now | Download | FAQ
Create an email template for customer notifications.
System Settings->Email Templates->Create New Email Template
- Email Type: Product/service
- Unique Name: puqMikrotikVPN notification traffic limit
Subject:
Traffic less than {$notification_traffic_remainder} GB - {$username}
Body:
Dear {$client_name},
This letter informs you that the traffic limit of the service is coming to an end.
Product/Service: {$service_product_name}
Due Date: {$service_next_due_date}
Username: {$username}
Left traffic: {$traffic_balance_gb} GB
After renewing the service, {$traffic_billingcycle_gb} GB will be automatically added.
{$signature}
Email Template (puqMikrotikVPN Suspension Notification traffic limit)
Mikrotik VPN module WHMCS
Order now | Download | FAQ
Create an email template for customer notifications.
System Settings->Email Templates->Create New Email Template
- Email Type: Product/service
- Unique Name: puqMikrotikVPN Suspension Notification traffic limit
Subject:
Suspension Information - {$username}
Body:
Dear {$client_name},
This letter informs you that the VPN account has been suspended due to traffic exhaustion.
The traffic limit will be restored from the next service cycle.
It is also possible to switch to a package with a large amount of traffic.
Product/Service: {$service_product_name}
Due Date: {$service_next_due_date}
Username: {$username}
Left traffic: {$traffic_balance_gb} GB
After renewing the service, {$traffic_billingcycle_gb} GB will be automatically added.
{$signature}
Product Configuration in WHMCS
Mikrotik VPN module WHMCS
Order now | Download | FAQ
Add new product to WHMCS
System Settings->Products/Services->Create a New Product
In the Module settings section, select the "PUQ mikrotik VPN" module
- License key: A pre-purchased license key for the "PUQ Mikrotik VPN" module. For the module to work correctly, the key must be active
- Comment PREFIX: The prefix that will be added to the VPN user's comment on the Mikrotik router
- Profile: PPP secret profile on mikrotik router
- Service: A service that will be available to a VPN user on a Mikrotik router
- Bandwidth Download: Download Bandwidth Limit in M/s
- Bandwidth Upload: Upload Bandwidth Limit M/s
- Traffic One Time/Monthly in GB/Traffic Quarterly in GB/Traffic Semi-Annually in GB/Traffic Annually in GB/Traffic Biennially in GB/Traffic Triennially in GB : Packet traffic that will be added to the balance every billing period, respectively
- Save traffic history (days): The number of days it takes to save user traffic usage statistics
- User notification traffic limit email template: The template of the letter that will be sent to the client if the remaining traffic is less than XXX
- Notification traffic remainder less than X GB: The amount of traffic on the client's balance below which a notification will be sent.
- Suspend exceeding traffic limit email template: The template of the letter that will be sent to the client if his traffic balance is 0 or less 0
- Link to instruction: Link to the instruction, if filled out, it will be reflected in the client area
- Support PPtP/Support L2TP: If checked, it will be reflected in the client zone
- L2TP IPSec PSK key: it will be reflected in the client zone
- Statistics collection frequency : The frequency with which traffic usage statistics will be collected. It also checks the positive balance and if the traffic balance is exhausted, it disables the vpn account on the Mikrotik server.
Product Addons Configuration in WHMCS
Mikrotik VPN module WHMCS
Order now | Download | FAQ
In order to provide customers with the opportunity to purchase additional traffic, use Product Addons
Create new Product Addons in the WHMCS system.
System Settings->Product Addons->Add New Addon
- Product Type: Other
- Module Name: PUQ Mikkrotik VPN
- Traffic in GB : The amount of traffic that will be added after payment by the client