B
blackfox
Guest
I've been searching for a setup guide for Proxmox on Hetzner, and I've been looking through tons of wiki's and forums, I ended up with more problems than I should have had in the first place.
Therefore this setup guide.
I got 4 SINGLE IP's, NOT an additional SUBNET, which may require a slightly different setup.
The initial setup on Hetzner is pretty straightforward: Activate a Rescue System than Reboot and start installimage.
Scroll down till you see Virtualization/Proxmox
Select if you want Software RAID=1 or not, I selected not RAID=0
For LVM The settings for vg0-root and Swap are already provided for, you still have to manually select vg0-data and point it to /var/lib/vz and set it to all.
If you selected RAID=1 the installation is ready. If you didn't, you still need to set the second HD later after the installation is finished.
Once the installation is finished you can set your 2nd HD or wait with it till everything works.
Edit your settings:
1. /etc/network/interfaces
Take note of the address, broadcast, netmask, and gateway settings you need to reuse then.
# network interface settings
auto lo
iface lo inet loopback
#
auto vmbr0
iface vmbr0 inet static
address YOUR.IP.ADDR.ESS
broadcast YOUR.BRO.ADC.AST
netmask YOUR.NET.MA.SK
gateway YOUR.GA.TE.WAY
bridge_ports eth0
bridge_stp off
bridge_fd 0
post-up echo 1 > /proc/sys/net/ipv4/ip_forward
Or use the default settings and change eth0 in vmbr0 and add:
bridge_ports eth0
bridge_stp off
bridge_fd 0
post-up echo 1 > /proc/sys/net/ipv4/ip_forward
As you can see these settings are the standard Proxmox settings nothing exotic here.
2. /etc/sysctl.conf:
net.ipv4.ip_forward=1
net.ipv4.conf.default.proxy_arp = 0
net.ipv4.conf.all.rp_filter=1
net.ipv4.icmp_echo_ignore_broadcasts=1
kernel.sysrq = 1
net.ipv4.conf.default.send_redirects = 1
net.ipv4.conf.all.send_redirects = 0
You can copy and paste these settings
And that's all settings you need.
Do a #service networking restart at least 2 times and check for errors and/or do a reboot
For OpenVZ containers:
Do NOT ENABLE the virtual MAC with Hetzner for your selected IP Use venet only and fill in that IP, and that's it.
For KVM:
ENABLE the virtual MAC with Hetzner for your selected IP and use that MAC it in the network settings.
Remember your 2nd HD and that's it.
If somebody has selected a IP subnet and a working solution please add it.
Therefore this setup guide.
I got 4 SINGLE IP's, NOT an additional SUBNET, which may require a slightly different setup.
The initial setup on Hetzner is pretty straightforward: Activate a Rescue System than Reboot and start installimage.
Scroll down till you see Virtualization/Proxmox
Select if you want Software RAID=1 or not, I selected not RAID=0
For LVM The settings for vg0-root and Swap are already provided for, you still have to manually select vg0-data and point it to /var/lib/vz and set it to all.
If you selected RAID=1 the installation is ready. If you didn't, you still need to set the second HD later after the installation is finished.
Once the installation is finished you can set your 2nd HD or wait with it till everything works.
Edit your settings:
1. /etc/network/interfaces
Take note of the address, broadcast, netmask, and gateway settings you need to reuse then.
# network interface settings
auto lo
iface lo inet loopback
#
auto vmbr0
iface vmbr0 inet static
address YOUR.IP.ADDR.ESS
broadcast YOUR.BRO.ADC.AST
netmask YOUR.NET.MA.SK
gateway YOUR.GA.TE.WAY
bridge_ports eth0
bridge_stp off
bridge_fd 0
post-up echo 1 > /proc/sys/net/ipv4/ip_forward
Or use the default settings and change eth0 in vmbr0 and add:
bridge_ports eth0
bridge_stp off
bridge_fd 0
post-up echo 1 > /proc/sys/net/ipv4/ip_forward
As you can see these settings are the standard Proxmox settings nothing exotic here.
2. /etc/sysctl.conf:
net.ipv4.ip_forward=1
net.ipv4.conf.default.proxy_arp = 0
net.ipv4.conf.all.rp_filter=1
net.ipv4.icmp_echo_ignore_broadcasts=1
kernel.sysrq = 1
net.ipv4.conf.default.send_redirects = 1
net.ipv4.conf.all.send_redirects = 0
You can copy and paste these settings
And that's all settings you need.
Do a #service networking restart at least 2 times and check for errors and/or do a reboot
For OpenVZ containers:
Do NOT ENABLE the virtual MAC with Hetzner for your selected IP Use venet only and fill in that IP, and that's it.
For KVM:
ENABLE the virtual MAC with Hetzner for your selected IP and use that MAC it in the network settings.
Remember your 2nd HD and that's it.
If somebody has selected a IP subnet and a working solution please add it.
Last edited by a moderator: