PUQ Mautic

WireGuard VPN WHMCS module

Description

WireGuard VPN module WHMCS

 Order now | Download | FAQ

The WireGuard VPN module provides the ability to sell the Virtual Private Network service to customers.

Attention.
The module require the PUQVPNCP control panel with active license.

PUQVPNCP Documentation
PUQVPNCP Download
PUQVPNCP Order now
 

Module Functions:

Available options in the admin panel:

Available options in the client panel:


WHMCS minimal version: 8 +

PUQVPNCP:  1.1 +

image-1720547198756.png

 

 

 

 

Changelog

WireGuard VPN module WHMCS

 Order now | Download | FAQ
v2.0 Released 24-09-2024

Module is coded ionCube v13

Supported php version:


v1.5 Released 10-07-2024
  1. User Interface Optimization
  2. Changed the appearance of the navigation buttons on the home screen
  3. Optimizing the home screen for mobile devices
  4. Added inputs that contain login, wherever the login is present
  5. Added a copy login button wherever the login is present
  6. Added inputs that hide passwords wherever a password is present
  7. Added a button that allows you to peek the password wherever the password is present
  8. Added a copy password button wherever a password is present
  9. Optimized

v1.4.6 Released 21-06-2024
  1. Added MetricsProvider dimensions
  2. Added dimensions for UsageUpdate
  3. Added a function to turn off the display of the One-Time Link for a package
  4. Display changes in the client area
  5. Optimization

v1.4.5 Released 09-10-2023
  1. Supported WHMCS v8.8.0
  2. Translations added/updated (Arabic, Azerbaijani, Catalan, Chinese, Croatian, Czech, Danish, Dutch, English, Estonian, Farsi, French, German, Hebrew, Hungarian, Italian, Macedonian, Norwegian, Polish,  Romanian, Russian, Spanish, Swedish, Turkish, Ukrainian)
  3. Added additional error logging to Log when changing package to change localization
  4. Fixed some bugs

v1.4.2 Released 04-09-2023
  1. Error handling when changing package to change localization
  2. Added additional logging to Activity Log

v1.4.1 Released 29-06-2023
  1. Redesigned error handling
  2. Added additional logging to Activity Log

v1.4 Released 16-06-2023
  1. Significantly revised the approach to transferring the QR code image in emails. Now, WHMCS generates a link to the image, and only the link to the image is included in the email itself
  2. Fixed some bugs

v1.3.6 Released 13-06-2023
  1. Fixed a bug that occurred in the client area if the IKEv2 protocol was disabled

v1.3.5 Released 31-05-2023
  1. Added the ability to change localization (updating the package and switching the server at the client's request)
  2. Added the ability to send QR codes and other important information via email when changing localization/package. This functionality is implemented as a custom email about localization/package change
  3. Fixed some bugs

v1.3 Released 19-05-2023
  1. Added a section in the client area that displays usage statistics by traffic
  2. Added necessary translation strings

v1.2.1 Released 12-05-2023

  1. Fixed bug with time offset in the admin area
  2. Added traffic recalculation in a human-friendly form in the admin area
  3. Added the ability to send a QR code and other important information in the Welcome E-mail. Functionality implemented as a custom Welcome E-mail

v1.2 Released 08-01-2023
  1. Fix bugs with languages
  2. Added ability to download profile for IKEv2
  3. Improved design in various themes

v1.1 Released 05-01-2023
  1. Support WHMCS V8.6+
  2. Support IonCube PHP Loader v12 
  3. Support for PHP 8.1
  4. Added support for IKEv2

v1.0 Released 29-10-2022

First version

 

 

 

Installation and configuration guide

Installation and configuration guide

WHMCS setup(install/update)

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

PHP 8.1

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

PHP 7.4 

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

 

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

 
2. Unzip the archive with the module.
unzip PUQ_WHMCS-WireGuard-VPN-latest.zip
 
3. Copy and Replace "puqWireGuardVPN" from "PUQ_WHMCS-WireGuard-VPN" to "WHMCS_WEB_DIR/modules/servers/"
Installation and configuration guide

PUQVPNCP installation and configuration

WireGuard VPN module WHMCS

 Order now | Download | FAQ
Official documentation:

PUQVPNCP Documentation
PUQVPNCP Download
PUQVPNCP Order now

1. Install the required packages

apt-get update
apt-get install wireguard wireguard-dkms wireguard-tools -y
apt-get install iproute2 iptables -y
apt-get install bind9 -y

2. Download the latest version of the package

https://download.puqcloud.com/cp/puqvpncp/

3. Install the puqvpncp package

wget https://download.puqcloud.com/cp/puqvpncp/puqvpncp_1.1-2_amd64.deb
dpkg -i puqvpncp_1.1-2_amd64.deb

4. After installation, connect to your server via a web browser.

http://SERVER_IP:8098
Username: admin
Password: admin

image-1669217804065.png

image-1668690609770.png

 

5. Enable SSL Let’s Encrypt

Requirements

In order for the system to start the procedure for obtaining an SSL certificate from Let's Encrypt, it is necessary.

In the configuration file, enable the use of SSL and enter the domain name.

nano /etc/puqvpncp/puqvpncp.conf 
LetsEncrypSSL=yes
Domain=XXXXXX.XXX

Restart the PUQVPNCP service

service puqvpncp restart

After these steps, the first time you connect to the server via the https protocol, the system will request an SSL certificate and automatically renew it if necessary.

ATTENTION. After activating SSL, the system will only work in the https protocol on port 443.
A redirect is also set from port 80 to port 443.

To connect to the server via the https protocol, use only the domain that was set in the configuration file.
Otherwise, you will get an error that SSL is not working correctly.

 

6. License configuration is available in the menu item Settings->License

image-1668763551186.png

By default, the system limit is 50 users and the API is disabled.

In order to activate the license key, the key must be entered in the "License Key" field and click on the "Save" button

image-1668764171867.png

 

7.Creation of access API

To manage API Access Hashs, go to the section Settings->API

image-1668764483617.png

Enter the name and IP address of the WHMCS server and click the ADD button

Attention.
The generated Access hash will only be shown once. Copy it, it will be needed during configuration of the product server in the WHMCS system.

Accept the fact that once the Access Hashs API is created, it will only be shown once.
Each API Access Hash only works from a specific IP address.

 

8. Creation of access API

Add new WireGuard is available in the menu item VPN servers->WireGuard->Click Create

image-1669367825882.png

 

image-1669367860027.png

Enter or edit the parameters of the new server/interface and click the ADD button

 

 

Installation and configuration guide

Add server (PUQVPNCP) in WHMCS

WireGuard 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 PUQVPNCP 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 PUQVPNCP in DNS server for Your domain.

image-1669370434236.png

Enter the correct data in the Access Hash field

If you save the correct login and password for PUQVPNCP in the server settings, then the Login to PUQ VPN Control Panel button will open for you without entering a login and password.

image-1669372069538.png

 

Installation and configuration guide

Product Configuration

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

image-1719050604082.png

VPN Server
Link settings
E-mail configuration
VPN users settings

 

Metric Billing

image-1719051111208.pngimage-1719051131599.png

 

Overages Billing

image-1719051698563.png

Installation and configuration guide

Localization change Сonfiguration

WireGuard VPN module WHMCS

 Order now | Download | FAQ

To ensure the functionality of changing localization, you need to make some settings. We will give an example of such a configuration with two independent installations where "(UA) PUQ WireGuard VPN" and "(PL) PUQ WireGuard VPN" are two different packages that have two independent groups of servers and have different locations. In our example, we simulate two localizations and the ability to change client packages, which allow changing localization, it is also worth noting that in our configuration example, many servers are used in each of the two groups, where the server is selected according to the least loaded one, which is necessary for correct load distribution between servers.

Attention! For the correct operation of this functionality, available servers are required. If the server is unavailable, changing the package when changing the locale will fail.

1. Add necessary services according to your requirements. (How to add servers)

image-1685367366465.png

2. Add your servers to specific server groups. 

Add your servers for the first group:

image-1685368563207.png

Add your servers for the second group:

image-1685368168505.png

Server groups look like this:

image-1685382812370.png

Note. Currently only the "Add to the least full server" scenario is implemented.

3. Select the appropriate server groups in the corresponding product.

Choose your servers group for the first product:

image-1685383882558.png

Choose your servers group for the second product:

image-1685384078535.png

4. Select the appropriate package to update.

Choose your package update for the first product:

image-1685388455583.png

Choose your package update for the second product:

image-1685388803760.png

Note. Please note that in order to avoid double notification, notification by means of WHMCS is disabled, because a custom notification will be used.

 

Installation and configuration guide

Email Template (puqWireGuard Custom welcome email template)

WireGuard VPN module WHMCS

 Order now | Download | FAQ
Create an email template for customer notifications.
System Settings->Email Templates->Create New Email Template

Unique Name: puqWireGuard Custom welcome email template

image-1683735003172.png

Subject:

Welcome to Your New VPN Service - Connection Information Enclosed

Body:

Dear {$client_name},

Congratulations and welcome to your new VPN service! We are excited to have you on board, and we appreciate your trust in us to provide you with a secure, private, and fast online experience.

To get started, please find your VPN connection details below:

Username: {$user}
Password: {$password}
Server Hostname: {$server_hostname}
Available connection protocols: {$protocol}


One-time link where you will find all comprehensive information:
{$otl}
Here you will find all the information about the possibility of connecting to a VPN service.
Attention! You can use this link only once, if you need to get the login data from the link again, use the client panel to generate a new link.

Android app download link: https://play.google.com/store/apps/details?id=com.wireguard.android

iPhone app download link: https://apps.apple.com/us/app/wireguard/id1441195209

To quickly connect after downloading the official WireGuard app for your device, scan the QR code below.

{$qrimage_small}
small size

{$qrimage_medium}
medium size

{$qrimage_large}
large size

{$qrimage_max}
max size

You can use these credentials to connect to our VPN service using your preferred VPN client or app. If you need assistance with setting up the connection or require a step-by-step guide, please visit our support page: [your-company-support-page-link].

For your convenience, we have also attached a detailed user manual to this email. The manual will provide you with comprehensive instructions on how to use our service and configure your VPN connection.

Please keep this email safe, as it contains sensitive information about your VPN account. We strongly advise you not to share your login credentials with anyone.

Once again, thank you for choosing our VPN service. We are committed to providing you with the best online experience, and we look forward to serving you.

{$signature}

 

image-1683735378651.png

Installation and configuration guide

Email Template (puqWireGuard Custom change package Email template)

WireGuard VPN module WHMCS

 Order now | Download | FAQ
Create an email template for customer notifications.
System Settings->Email Templates->Create New Email Template

Unique Name: puqWireGuard Custom change package Email template

image-1685365338339.png

 

Subject:

You have changed the location in your VPN service - connection information is attached

Body:

Dear {$client_name},

You received this email because your connection location has changed.

To continue, find your VPN connection information below:

Username: {$user}
Password: {$password}
Server Hostname: {$server_hostname}
Available connection protocols: {$protocol}


One-time link where you will find all comprehensive information:
{$otl}
Here you will find all the information about the possibility of connecting to a VPN service.
Attention! You can use this link only once, if you need to get the login data from the link again, use the client panel to generate a new link.

Android app download link: https://play.google.com/store/apps/details?id=com.wireguard.android

iPhone app download link: https://apps.apple.com/us/app/wireguard/id1441195209

To quickly connect after downloading the official WireGuard app for your device, scan the QR code below.

{$qrimage_small}
small size

{$qrimage_medium}
medium size

{$qrimage_large}
large size

{$qrimage_max}
max size

You can use these credentials to connect to our VPN service using your preferred VPN client or app. If you need assistance with setting up the connection or require a step-by-step guide, please visit our support page: [your-company-support-page-link].

For your convenience, we have also attached a detailed user manual to this email. The manual will provide you with comprehensive instructions on how to use our service and configure your VPN connection.

Please keep this email safe, as it contains sensitive information about your VPN account. We strongly advise you not to share your login credentials with anyone.

Once again, thank you for choosing our VPN service. We are committed to providing you with the best online experience, and we look forward to serving you.

{$signature}

image-1685365225987.png

 

Installation and configuration guide

Important Information About Generating a Unique Open Link for QR Code Delivery in an Email Template

WireGuard VPN module WHMCS

 Order now | Download | FAQ

Introduction

This process allows for the generation of unique open links for QR codes that can be incorporated into email templates in WHMCS. This is convenient for ensuring secure access to your user's configuration data.

Security Mechanism

The security mechanism built into this process has multiple layers of protection that ensure the safety of the data. Details about the implementation of the protection are not disclosed to maintain maximum security.

Activity Notifications

If there are attempts to unauthorized access to the QR code, the administrator will receive corresponding notifications in the WHMCS activity log. This ensures full control and visibility of any attempts to access the QR code.

Important: It's essential to react to these notifications in the activity log and take appropriate security measures.

Notification Levels

Reacting to Notifications

It's necessary to take appropriate security measures when receiving high-level danger notifications. Upon receiving low-level danger notifications, pay attention, but it's not critical. In any case, you will always be aware of attempts to access the QR code, and you will have the IP address of the device making such requests.

Conclusion

Using this mechanism ensures the safety and control of access to a user's configuration data via QR code.

Client Area

Client Area

Home screen

WireGuard VPN module WHMCS

 Order now | DownloadFAQ

Client Area Description

Manage

image-1720546899736.png

Metrics

image-1719052004492.png

Resource Usage

image-1719052036021.png

Summary of the Client Panel Page

 

 

 

 

 

 

Client Area

Traffic statistics

WireGuard VPN module WHMCS

 Order now | DownloadFAQ
This page displays information about client traffic statistics

Month: In this field, you can select the month for which you want to view traffic data

Year: In this field, you can select the year for which you want to view traffic data

Data type toggle: In this field, you can turn on or off the display of days with no traffic

image-1684487488555.png

Displaying data with the option to hide nulls enabled looks like this:

image-1684487123060.png

Admin Area

Admin Area

Product Home Screen

WireGuard VPN module WHMCS

 Order now | Download | FAQ
The main screen of the product contains the following items.

image-1669374707470.png