PUQ Mautic

Installation and configuration guide

Basic concepts and requirements

Business-VPN module WHMCS

 Order now | Download | FAQ
Requirements for the successful operation of the module

An IP address class must be reserved for the solution. Each end customer receives one IP address after activating the service.

 

Please refer to the basic mode of operation of the module to better understand its operation and functionality.

The basic logic of the module

During the creation of a service for the end client, the module does the following actions:

  1. Automatically selects a free public IP address from the server available in the settings. When choosing an available IP address, services in the terminated state are not taken into account, i.e. previously used IP. (Previously used IP addresses for services that have not been extended and have expired will be used to activate the service for the new client.)
  2. The module configures the selected public IP address on the network interface of the router.
  3. The module creates firewall rules such as:
    • NAT rules for accessing the Internet private network
    • Allowing firewall rules for communication between IP's of a private network
    • Block rules that block traffic between all other private networks.
Mikrotik management schema

 

 

WHMCS setup(install/update)

Business-VPN module WHMCS

 Order now | Download | FAQ

Module is coded ionCube v13

Supported php version:

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-Business-VPN/php82/PUQ_WHMCS-Business-VPN-latest.zip

PHP 8.1

wget http://download.puqcloud.com/WHMCS/servers/PUQ_WHMCS-Business-VPN/php81/PUQ_WHMCS-Business-VPN-latest.zip

PHP 7.4

wget http://download.puqcloud.com/WHMCS/servers/PUQ_WHMCS-Business-VPN/php74/PUQ_WHMCS-Business-VPN-latest.zip

All versions are available via link: https://download.puqcloud.com/WHMCS/servers/PUQ_WHMCS-Business-VPN/

2. Unzip the archive with the module.
unzip PUQ_WHMCS-Business-VPN-latest.zip
3. Copy and Replace "puqBusinessVPN" from "PUQ_WHMCS-Business-VPN" to "WHMCS_WEB_DIR/modules/servers/"

Mikrotik preparation and configuration

Business-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

image-1666164439793.png

 

Add server (router Mikrotik) in WHMCS

Business-VPN module WHMCS

 Order now | Download | FAQ
Add a new server to the system WHMCS.

Login to Your WHMCS panel and create new server in WHMCS (System Settings->Products/Services->Servers)

image-1663142713076.png

System Settings->Servers->Add New Server

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.

 

The format in which you need to enter a list of public IP addresses and private subnets is as follows. 

To define the available pool of IP addresses, for each available IP number you should enter another line where the data is separated by the "|" separator. Each line with an IP number definition has the following structure:

<PUBLIC_IP>|<MASK_OF_ PUBLIC_NETWORK>|<PRIVATE_NETWORK>|<MASK_OF_PRIVATE_NETWORK>

image-1666084404668.png

Enter the correct data in the username and password field

image-1666084894938.png

 

Product Configuration

Business-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 Business-VPN" module

image-1666343550750.png

VPN users settings
Mikrotik configuration
Basic settings