Cloudmin installation on Hetzner Root Server
This is an article and documentation at the same time on how to install the virtualization software “virtualmin/cloudmin” onto a Hetzner Root Server.
This can be challenging at some points which is related to Hertzners way of networking.
The following article/procedure is assuming of you having one ethernet eth0 with several additional ip addresses ordered via the robot login.
First, you have to go to the rescue console of the root server and install an operating system (OS) of your choice. Experience has shown that Ubuntu or Debian will work fine. CentOS can be installed but the configuration is even more tricky.
Update your OS using the following commands:
When the updating and upgrading process is done, reboot your system.
Get Cloudmin Script
Now, download the cloudmin script under the /tmp folder: https://www.webmin.com/cinstall-kvm.html
Type following commands in the following order:
- wget https://cloudmin.virtualmin.com/gpl/scripts/cloudmin-kvm-debian-install.sh
- cd /tmp
- chmod +x cloudmin-gpl-debian-install.sh
Install the Script
Install cloudmin via the script:
Post successful install, reboot OS to be sure all is ok. You should be able to login to the cloudmin gui via https://server-ip-adress:10000
It is always good to setup a FQDN or hostname on the server, but you can do this now.
Network Config – Hertzner Specific
This specific config needs to be done on the hetzner servers for it to work, nano into this file(/etc/sysctl.conf) and add appropriate flags. Save the file.
- sysctl -w net.ipv4.ip_forward=1
- Forwarding for IPv6 needs to be activated as well. This setting is also already in the Hetzner default installation and needs to be changed.
- sysctl -w net.ipv6.conf.all.forwarding=1
- Reboot the OS.
We have to configure the bridge networking as per the config settings described here (https://www.virtualmin.com/documentation/cloudmin/virtualization/kvm)
For KVM instances to access the host system’s network, you must setup a network bridge. These instructions assume that your host system has only one network interface, and it is eth0 .
This changes your system from using eth0 for it’s primary network interface, to br0, a bridge device, You will want to make a backup of your current network configuration before making these changes. It is also highly recommended to have console access to your server when the changes are being made. If something goes wrong network access can be lost.
- Go to Webmin -> Networking -> Network Configuration -> Network Interfaces, and select the ** Activated at Boot** tab.
- Click on eth0 and change the IPv4 address to No address configured. Remember the current IP address and netmask, as they will be needed in the next step. Click the Save
- Click Add a new bridge, and fill in the IP address and netmask that used to be assigned to eth0.
- In the Connect bridge to interface field select eth0, then click Create.
- Return to the main page of the Network Configuration module, and click on Routing and Gateways . Find the current default IPv4 gateway from the Active configuration tab, and enter it on the Boot time configuration tab with br0 selected as the interface.
- Go back to the main page of the Network Configuration module, and click the Apply Configuration
Note that after the above steps. the eth0 device will no longer have an IP address; the br0 device has the IP after bridging is operational.
- If you have an IPv6 address, you will want to perform the above steps for the IPv6 address as well.
- Screenshots below to show my settings..
- Network configuration file( /etc/network/interfaces) should look like something like this, notice the pointopoint
Hetzner Online GmbH – installimage
# Loopback device: auto lo br0 eth0 iface lo inet loopback iface lo inet6 loopback # device: eth0 iface eth0 inet static address 220.127.116.11 netmask 255.255.255.255 pointopoint 18.104.22.168 gateway 22.214.171.124 iface br0 inet static address 126.96.36.199 netmask 255.255.255.255 bridge_ports none bridge_stp off bridge_fd 0 up ip route add 188.8.131.52/32 dev br0 up ip route add 184.108.40.206/32 dev br0 up ip route add 220.127.116.11/32 dev br0
Ping from outside
Reboot the OS, to verify if you still can ping the ip addresss and have access to the host system.
Trying creating your first KVM and check if you able to assign an ipaddress and if it does have access to both the host and to the internet
Enjoy :), drop us a note if this helped you or if you need help.. link