Hello my friends!
I have bought a Dedicated Server at Hetzner and ordered an additional IP address in order to have one for the Proxmox VE itself, and another for a VM I will create inside Proxmox VE.
Now, my problem is, I have tried for around 5-6 hours to use some instructions found on the internet ( e.g. , or e.g.2 ) but I did not manage to make a VM have internet access. Please, I am desperate, could someone help me?
In the following I will use:
<IP0> = Main IP of the server ( which I use to connect to Proxmox VE )
<IPV6> = Main ipv6 of the server
<IP1> = Secondary IP that I have bought
<GATEWAY0> = gateway ip indicated by Hetzner
After a fresh install of proxmox using installImage from Hetzner, my /etc/network/interfaces looks something like this:
Now, from what I understand, I am able to create a network like 192.168.100.x , which can have multiple machines that use my <IP0> as a "gateway", something like this:
Then, can someone help me setup a network config file that has one "vmbr0" for example which allows a VM to have <IP1>, and a "vmbr1" which is a 'subnet' just like the one mentioned in the code right above this paragraph?
I have bought a Dedicated Server at Hetzner and ordered an additional IP address in order to have one for the Proxmox VE itself, and another for a VM I will create inside Proxmox VE.
Now, my problem is, I have tried for around 5-6 hours to use some instructions found on the internet ( e.g. , or e.g.2 ) but I did not manage to make a VM have internet access. Please, I am desperate, could someone help me?
In the following I will use:
<IP0> = Main IP of the server ( which I use to connect to Proxmox VE )
<IPV6> = Main ipv6 of the server
<IP1> = Secondary IP that I have bought
<GATEWAY0> = gateway ip indicated by Hetzner
After a fresh install of proxmox using installImage from Hetzner, my /etc/network/interfaces looks something like this:
Code:
# network interface settings; autogenerated
# Please do NOT modify this file directly, unless you know what
# you're doing.
#
# If you want to manage parts of the network configuration manually,
# please utilize the 'source' or 'source-directory' directives to do
# so.
# PVE will preserve these directives, but will NOT read its network
# configuration from sourced files, so do not attempt to move any of
# the PVE managed interfaces into external files!
source /etc/network/interfaces.d/*
auto lo
iface lo inet loopback
iface lo inet6 loopback
auto enp35s0
iface enp35s0 inet static
address <IP0>/27
gateway <GATEWAY0>
up route add -net <aa.bb.cc ( identical with IP0)>.224 netmask 255.255.255.224 gw <GATEWAY0> dev enp35s0
# route <aa.bb.cc ( identical with IP0)>.224/27 via <GATEWAY0>
iface enp35s0 inet6 static
address <IPV6>/64
gateway fe80::1
iface eth0 inet manual # <- Topic Author comment: I think this is actually useless
Now, from what I understand, I am able to create a network like 192.168.100.x , which can have multiple machines that use my <IP0> as a "gateway", something like this:
Code:
auto vmbr0
iface vmbr0 inet static
address 10.10.10.1
netmask 255.255.255.0
bridge-ports none
bridge-stp off
bridge-fd 0
post-up echo 1 > /proc/sys/net/ipv4/ip_forward
post-up iptables -t nat -A POSTROUTING -s '10.10.10.0/24' -o vmbr1 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s '10.10.10.0/24' -o vmbr1 -j MASQUERADE
Then, can someone help me setup a network config file that has one "vmbr0" for example which allows a VM to have <IP1>, and a "vmbr1" which is a 'subnet' just like the one mentioned in the code right above this paragraph?
Last edited: