Chapter 6.2: Put Proxmox behind ClearOS
In ClearOS click on the menu Network -> Settings -> IP settings
Edit the ens19 network interface and click on Update:
- Role: Hot LAN
- Connection type: Static
- IP address: 192.168.170.1
- Netmask: 255.255.255.0
Now the widget should look like this
Click on Network -> Infrastructure -> DHCP Server and check if the subnet for ens19 192.168.170.0 looks like this. You should’t need to edit anything.
Click on Network -> Infrastructure -> SSH Server and click on Allow connections
Now generate a very strong ClearOS password for the root user, it’s time to change it. ClearOS will always be exposed to internet, so choose a very very strong password.
Click on Root -> User profile and change the ClearOS root password
Now we need to edit the OpenVPN configuration. To do so open a new terminal window and log into ClearOS as root with this command. Remember to use the password that you just updated, not the old one.
ssh root@[ClearOS IP address]
Type this command to edit the OpenVPN configuration file:
You need to add a line to access Proxmox and one for each site that will be hosted by your system. For the moment this lines allow up to 6 internet sites.
push “route 192.168.170.0 255.255.255.0”
push “route 192.168.180.0 255.255.255.0”
push “route 192.168.181.0 255.255.255.0”
push “route 192.168.182.0 255.255.255.0”
push “route 192.168.183.0 255.255.255.0”
push “route 192.168.184.0 255.255.255.0”
push “route 192.168.185.0 255.255.255.0”
The file now should look exactly like this except for the domain name:
Go back to ClearOS and stop the OpenVPN service. Then start it again.
Go to Proxmox, click on the Proxmox server in the left sidebar, then Network and double click on the vmbr0 IP address
Delete everything but don’t touch the Bridge ports: eth0 field, type ClearOS in the Comment field, then click OK
Double click on the vmbr1 IP address field
Insert this settings:
- IP address: 192.168.170.100
- Subnet mask: 255.255.255.0
- Comment: Proxmox
Click on the ClearOS VM, then click on Options, then double click on the Start at boot field, select it and hit OK
Double click on the Start/Shutdown order field, configure ClearOS to be the first VM to boot and hit OK
Now click on the ClearOS VM, then Network and triple check that your IP settings look exactly like this. Then, click on Restart
If you are absolutely sure that everything is correctly configured hit Yes
The Proxmox server will reboot, then it will automatically start the ClearOS virtual machine, so wait 3 or 4 of minutes. Afterwards you should be able to connect to Proxmox from this address only when the OpenVPN connection is active:
Confirm the security exception and log into Proxmox
It’s time to change the Proxmox password too. To do so click on Datacenter -> Users -> root, then click on Password
Type in the new password and press OK