[SOLVED] VMs don't have internet access - Need assistence

hubeuR

New Member
Sep 4, 2019
1
0
1
26
Hello there!
I rented a root server from Hetzner, installed Proxmox via. the rescue mode and worked pretty well so far.

The only problem I have right now (well, since 2 days and a lot of tutorials) is, that the VMs don't have internet access.
The configuration I use at etc/network/interfaces is:

Code:
###########################################
# Host-Adapter [IPv4]
auto lo
iface lo inet loopback
# device: enp0s31f6 (ethernet, port0, slot31, ..) << Change to your specific device
auto  enp0s31f6
iface enp0s31f6 inet static
       address   <Hetzner IPv4>
       netmask   <Hetzner Netmask>
       broadcast <Hetzner Broadcast>
       gateway   <Hetzner Gateway>
       up route add -net <Hetzner IPv4> netmask <Hetzner Netmask> gw <Hetzner Gateway> dev enp0s31f6
       post-up echo 1 > /proc/sys/net/ipv4/conf/enp0s31f6/proxy_arp

# Host-Adapter [IPv6]
iface enp0s31f6 inet6 static
       address   <Hetzner IPv6>
       netmask   128
       gateway   fe80::1
       up sysctl -p

# Guest-Network [NAT]
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 enp0s31f6 -j MASQUERADE
        post-up   iptables -A FORWARD --in-interface vmbr0 -j ACCEPT
        post-down iptables -t nat -D POSTROUTING -s '10.10.10.0/24' -o enp0s31f6 -j MASQUERADE
        post-down iptables -D FORWARD --in-interface vmbr0 -j ACCEPT

###########################################

I also don't have an additional IP from Hetzner. (If that matters)
Every help is appreciated.

Thank you in advance and greetings from Germany
 
Still having issues? If it's solved, you could share you solution so others can benefit from it as well.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!