Installation tutorial

how to install

Install solusvm

Please follow SolusVM's official tutorial to install SolusVM on the server and add it to your SolusVM master

Install addons

Download the solusvm_nat plugin and upload it as a whole to your whmcs/modules/addons

upload file

Enable this addons in whmcs and modify the permissions to allow administrators to access it

enable addons

Configure addons

Add additional api

Click on the solusvm_nat management panel under addons in the whmcs administrator background

Upload this file to /usr/local/solusvm/www/api of the solusvm main control in the solusvm_vm file and the script file extend_api.php, and then use the following command to run it to get the key

php /usr/local/solusvm/www/api/extend_api.php
addons

Fill in the address of this api and the key obtained in addons, complete other settings and save

Use a browser to access the extension API file (/usr/local/solusvm/www is the root directory of the website), if successful, the following content will appear

{"result":"error","error":"key error"}

Receipt of this reply means the installation was successful

Set up a slave server

Create a net bridge

Use this command to create a network bridge natbr0

brctl addbr natbr0

Then use this command to edit this bridge

vi /etc/sysconfig/network-scripts/ifcfg-natbr0

Write the following content

DEVICE=natbr0
TYPE=Bridge
BOOTPROTO=static
IPADDR=10.111.111.1(You can use other intranet segments, delete this)
NETMASK=255.255.255.0
ONBOOT=yes

Save content and restart the network

service network restart

Install api

Upload nat_check.php in the script folder in solusvm-nat to any directory of the slave server

Create a new file config.ini in /opt/solusvm_nat/,and write the following content

RPC_URL="https://xxxxx/modules/addons/solusvm_nat/rpc/node.php" 
NIC="br0"
SEGMENT="10.111.111.0/24"

Test whether the configuration is normal

Execute the following command to see if the command response is as expected

php nat_check.php

If you are prompted that iptables is not found, you need to use the following command to create a soft link

ln -s /sbin/iptables-save /usr/sbin/

If you receive the following response, the installation is normal

Public interface: br0 (8.8.8.8)
Intranet segment: 10.111.111.0/24

!!! No nat forward rule found, clean all nat rules !!!

Rules counter:
New: 0
Delete: 0
Exist(s): 0

Add a scheduled task

Create task with the command

crontab -e

Add the following content,then save

*/5 * * * * rm -f /usr/local/solusvm/data/.hosts
*/1 * * * * php -q /root/nat_check.php

Settings in the SolusVM master control

Modify the kvm bridge of the corresponding node in the SolusVM master control and modify it to natbr0

kvm bridge

Add ip block like public network ip,the range of these ips is the range when you created the bridge

ip block

Last updated

Was this helpful?