# Installation and configuration guide



# Setup (install/update)

### Mikrotik WireGuard Business-VPN module **[WISECP](https://puqcloud.com/link.php?id=78)** 

##### [Order now](https://puqcloud.com/index.php?rp=/store/wisecp-module-mikrotik-wireguard-business-vpn) | [Download](https://download.puqcloud.com/WISECP/Product/PUQ_WISECP-Mikrotik-WireGuard-Business-VPN/) | [FAQ](https://faq.puqcloud.com/)

<p class="callout info">To install and update a module, you must perform one and the same action.</p>

#####  

##### 1. Download the latest version of the module.

```Powershell
wget https://download.puqcloud.com/WISECP/Product/PUQ_WISECP-Mikrotik-WireGuard-Business-VPN/php81/PUQ_WISECP-Mikrotik-WireGuard-Business-VPN-latest.zip
```

<p class="callout info">All versions are available: [https://download.puqcloud.com/WISECP/Product/PUQ\_WISECP-Mikrotik-WireGuard-Business-VPN/](https://download.puqcloud.com/WISECP/Product/PUQ_WISECP-Mikrotik-WireGuard-Business-VPN/)</p>

#####  

##### 2. Unzip the archive with the module.

```Powershell
unzip PUQ_WISECP-Mikrotik-WireGuard-VPN-latest.zip
```

#####  

##### 3. Copy and Replace "puqMikrotikWireGuardBusinessVPN" from "PUQ\_WISECP-Mikrotik-WireGuard-Business-VPN" to "WISECP\_WEB\_DIR/coremio/modules/Product/"

# License Activation

### Mikrotik WireGuard Business-VPN module **[WISECP](https://puqcloud.com/link.php?id=78)** 

##### [Order now](https://puqcloud.com/index.php?rp=/store/wisecp-module-mikrotik-wireguard-business-vpn) | [Download](https://download.puqcloud.com/WISECP/Product/PUQ_WISECP-Mikrotik-WireGuard-Business-VPN/) | [FAQ](https://faq.puqcloud.com/)

##### 1. Log in to the administrative area of your **[WISECP](https://puqcloud.com/link.php?id=78)**.

#####   
2. Go to module configuration.

```
Services -> Service Management -> Module Settings -> Other -> All Modules -> PUQ Mikrotik WireGuard Business-VPN
```

[![image-1700485721333.png](https://doc.puq.info/uploads/images/gallery/2023-11/scaled-1680-/image-1700485721333.png)](https://doc.puq.info/uploads/images/gallery/2023-11/image-1700485721333.png)

[![image-1700485726951.png](https://doc.puq.info/uploads/images/gallery/2023-11/scaled-1680-/image-1700485726951.png)](https://doc.puq.info/uploads/images/gallery/2023-11/image-1700485726951.png)

[![image-1700485737918.png](https://doc.puq.info/uploads/images/gallery/2023-11/scaled-1680-/image-1700485737918.png)](https://doc.puq.info/uploads/images/gallery/2023-11/image-1700485737918.png)

[![image-1700923806126.png](https://doc.puq.info/uploads/images/gallery/2023-11/scaled-1680-/image-1700923806126.png)](https://doc.puq.info/uploads/images/gallery/2023-11/image-1700923806126.png)

##### 3. On the open page, enter the purchased license key for this product and click the '**Check and Save**' button to validate the key and save it.

[![image-1700923838633.png](https://doc.puq.info/uploads/images/gallery/2023-11/scaled-1680-/image-1700923838633.png)](https://doc.puq.info/uploads/images/gallery/2023-11/image-1700923838633.png)

# Mikrotik preparation and configuration

### Mikrotik WireGuard Business-VPN module **[WISECP](https://puqcloud.com/link.php?id=78)** 

##### [Order now](https://puqcloud.com/index.php?rp=/store/wisecp-module-mikrotik-wireguard-business-vpn) | [Download](https://download.puqcloud.com/WISECP/Product/PUQ_WISECP-Mikrotik-WireGuard-Business-VPN/) | [FAQ](https://faq.puqcloud.com/)

<p class="callout info align-center">Note: **Enter the following commands one by one and wait for the command to complete.**</p>

##### Check RouterOS version

<p class="callout warning">**Make sure that the version of RouterOS is 7+**</p>

```shell
system/package/print 
```

#####  

##### Enabling HTTPS Create your own root CA on your router

```
/certificate
add name=LocalCA common-name=LocalCA key-usage=key-cert-sign,crl-sign
```

#####  

##### Sign the newly created CA certificate

```
/certificate
sign LocalCA
```

##### Create a new certificate for Webfig (non-root certificate)

<p class="callout info">Note: as common-name=XXX.XXX.XXX.XXX You enter public IP adddress of the router.</p>

```
/certificate
add name=Webfig common-name=XXX.XXX.XXX.XXX
```

#####  

##### Sign the newly created certificate for Webfig

```
/certificate
sign Webfig ca=LocalCA 
```

#####  

##### Enable SSL (*www-ssl)* and specify to use the newly created certificate for Webfig

```
/ip service
set www-ssl certificate=Webfig disabled=no
```

#####  

##### Enable api-ssl and specify to use the newly created certificate for Webfig

```
 /ip service 
 set api-ssl certificate=Webfig disabled=no 
```

# Add server (Mikrotik) in WISECP

### Mikrotik WireGuard Business-VPN module **[WISECP](https://puqcloud.com/link.php?id=78)** 

##### [Order now](https://puqcloud.com/index.php?rp=/store/wisecp-module-mikrotik-wireguard-business-vpn) | [Download](https://download.puqcloud.com/WISECP/Product/PUQ_WISECP-Mikrotik-WireGuard-Business-VPN/) | [FAQ](https://faq.puqcloud.com/)

##### 1. Log in to the administrative area of your **[WISECP](https://puqcloud.com/link.php?id=78)**.

#####   
2. Go to module configuration.

```
Services -> Service Management -> Module Settings -> Other -> All Modules -> PUQ Mikrotik WireGuard Business-VPN
```

[![image-1700485721333.png](https://doc.puq.info/uploads/images/gallery/2023-11/scaled-1680-/image-1700485721333.png)](https://doc.puq.info/uploads/images/gallery/2023-11/image-1700485721333.png)

[![image-1700485726951.png](https://doc.puq.info/uploads/images/gallery/2023-11/scaled-1680-/image-1700485726951.png)](https://doc.puq.info/uploads/images/gallery/2023-11/image-1700485726951.png)

[![image-1700485737918.png](https://doc.puq.info/uploads/images/gallery/2023-11/scaled-1680-/image-1700485737918.png)](https://doc.puq.info/uploads/images/gallery/2023-11/image-1700485737918.png)

[![image-1700908237215.png](https://doc.puq.info/uploads/images/gallery/2023-11/scaled-1680-/image-1700908237215.png)](https://doc.puq.info/uploads/images/gallery/2023-11/image-1700908237215.png)

#####  

##### 3. In the opened page, click the '**Add Server**' button.

[![image-1700924292215.png](https://doc.puq.info/uploads/images/gallery/2023-11/scaled-1680-/image-1700924292215.png)](https://doc.puq.info/uploads/images/gallery/2023-11/image-1700924292215.png)

##### 4. On the opened page, enter all the necessary information:

- **Name**: Displayed name of the server.
- **Maximum Number of Accounts**: The number of services that can be on this server.
- **Server Group**: Optionally, choose the server group.
- **DNS 1 and DNS 2**: are DNS servers that will be specified in the configuration of WireGuard clients.
- **Assigned IP Addresses**: a list of Interface fot public IP, Public IP, Private Net that will be assigned to WireGuard VPN clients, with each address on a new line. Format: <div><div>```
    <interface>|<public_ip>/<mask>|<private_network>/<mask>
    ```
    
    </div></div>
- **IP Address or Domain**: The address of the [MikroTik](https://mikrotik.com/) router you are connecting to.
- **Username:** is the username for the account on [MikroTik](https://mikrotik.com/).
- **Password:** is the password for the account on [MikroTik](https://mikrotik.com/).
- Check the **SSL** box if you want to use SSL-encrypted connection. If necessary, specify the port and perform a connection test.

[![image-1700924467454.png](https://doc.puq.info/uploads/images/gallery/2023-11/scaled-1680-/image-1700924467454.png)](https://doc.puq.info/uploads/images/gallery/2023-11/image-1700924467454.png)

# Service/Product configuration

### Mikrotik WireGuard Business-VPN module **[WISECP](https://puqcloud.com/link.php?id=78)** 

##### [Order now](https://puqcloud.com/index.php?rp=/store/wisecp-module-mikrotik-wireguard-business-vpn) | [Download](https://download.puqcloud.com/WISECP/Product/PUQ_WISECP-Mikrotik-WireGuard-Business-VPN/) | [FAQ](https://faq.puqcloud.com/)

<p class="callout info">If you do not have a **Service Group** where you want to place the new service, you need to create a new **Service Group**</p>

##### 1. Log in to the administrative area of your **[WISECP](https://puqcloud.com/link.php?id=78)**.

##### 2. Create New Service Group

  
Go to

```
Services -> Service Management -> Add Group
```

[![image-1700487270737.png](https://doc.puq.info/uploads/images/gallery/2023-11/scaled-1680-/image-1700487270737.png)](https://doc.puq.info/uploads/images/gallery/2023-11/image-1700487270737.png)

Enter all the necessary data and click the '**Create Group**' button.  
[![image-1700487384497.png](https://doc.puq.info/uploads/images/gallery/2023-11/scaled-1680-/image-1700487384497.png)](https://doc.puq.info/uploads/images/gallery/2023-11/image-1700487384497.png)

##### 3. Adding a New Service  
  


Go to

```
Services -> our service group where you need to add the new service.
```

[![image-1700487595449.png](https://doc.puq.info/uploads/images/gallery/2023-11/scaled-1680-/image-1700487595449.png)](https://doc.puq.info/uploads/images/gallery/2023-11/image-1700487595449.png)

In the opened window, click the '**Create New Service**' button.

[![image-1700487653237.png](https://doc.puq.info/uploads/images/gallery/2023-11/scaled-1680-/image-1700487653237.png)](https://doc.puq.info/uploads/images/gallery/2023-11/image-1700487653237.png)

On the opened page, enter all the necessary details for your new service and navigate to the '**Core**' tab.  
  
Select the '**PUQ Mikrotik WireGuard Business-VPN**' module from the drop-down list of modules.

[![image-1700924994747.png](https://doc.puq.info/uploads/images/gallery/2023-11/scaled-1680-/image-1700924994747.png)](https://doc.puq.info/uploads/images/gallery/2023-11/image-1700924994747.png)

##### 4. Fill in the configuration options according to your preferences.

- **Server Group** is the group of servers from which a server will be chosen for provisioning the service
- **Number of VPN Accounts:** the quantity of VPN user accounts a client can create within this package
- **Bandwidth Download** and **Bandwidth Upload** represent the connection speed that will be restricted by these parameters, in megabits per second, respectively.
- **Comment Prefix** will be added at the comment in **[MikroTik](https://mikrotik.com/)**
- **Port Forwarding:** If the checkbox is selected, it means the client will have the ability to redirect ports from the main public address to internal addresses.
- **Internal Traffic**: If the checkbox is selected, it indicates that internal traffic between VPN clients of the client will be allowed.
- **NAT Rules on Public IP**: If the checkbox is selected, firewall rules, specifically NAT (Network Address Translation) to the public IP address, will be created during the service deployment.
- **Persistent Keepalive**/**AllowedIPs:** parameters of configuration WireGuard clients
- **Interface MTU**: This parameter will be set during the creation of the WireGuard interface.
    
    <div><form class="stretch mx-2 flex flex-row gap-3 last:mb-2 md:mx-4 md:last:mb-6 lg:mx-auto lg:max-w-2xl xl:max-w-3xl"></form></div>
- **Link to Instruction** Provide the link to the instruction for the service, and it will be displayed in the client area as a separate button
- **Link to VPN Clients** Provide the link to the page for downloading VPN clients for the service, and it will be displayed in the client area as a separate button

