No Internet access on guest vm because of routing problems

CentrixDE

Active Member
Sep 3, 2017
6
0
41
27
Hello,

I'm using the following setup:
Host Server with the following IPs

Public IP: 136.243.79.238
Additional IPs: 136.243.79.208
136.243.79.209
136.243.79.210
136.243.79.221

Network Setup: Routed like in the following guide (I know, that the instructions are a bit outdated but I didn't saw any real changes on other configuration examples posted with newer versions of proxmox):
https://community.hetzner.com/tutorials/install-and-configure-proxmox_ve


i'm currently trying to connect my vms to the internet.
I tested it with Debian 10 and can't find the error.

I can ping my guest VM with my host and the other way.
But it seems that there is a routing problem.

Here are my Configs:
Code:
auto lo
iface lo inet loopback

auto ens18
iface ens18 inet static
      address 136.243.79.221
      netmask 255.255.255.255
      pointtopoint 136.243.79.238
      gateway 136.243.79.238
Code:
auto eno1
iface eno1 inet static
  address  136.243.79.238
  netmask  255.255.255.192
  gateway  136.243.79.193
  post-up echo 1 > /proc/sys/net/ipv4/ip_forward
  post-up echo 1 > /proc/sys/net/ipv4/conf/eno1/proxy_arp
  # route 136.243.79.192/26 via 136.243.79.193
  up route add -net 136.243.79.192 netmask 255.255.255.192 gw 136.243.79.193 dev eno1

auto vmbr0
iface vmbr0 inet static
  address 136.243.79.238
  netmask 255.255.255.255
  bridge_ports none
  bridge_stp off
  bridge_fd 0
  up ip route add 136.243.79.208/32 dev vmbr0
  up ip route add 136.243.79.209/32 dev vmbr0
  up ip route add 136.243.79.210/32 dev vmbr0
  up ip route add 136.243.79.221/32 dev vmbr0
Code:
root@host01 ~ # route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         136.243.79.193  0.0.0.0         UG    0      0        0 eno1
136.243.79.192  136.243.79.193  255.255.255.192 UG    0      0        0 eno1
136.243.79.192  0.0.0.0         255.255.255.192 U     0      0        0 eno1
136.243.79.208  0.0.0.0         255.255.255.255 UH    0      0        0 vmbr0
136.243.79.209  0.0.0.0         255.255.255.255 UH    0      0        0 vmbr0
136.243.79.210  0.0.0.0         255.255.255.255 UH    0      0        0 vmbr0
136.243.79.221  0.0.0.0         255.255.255.255 UH    0      0        0 vmbr0

I can't post the results of route -n on the guest VM because I can't install net-tools because of my network issues.

Does anyone know where the problem might occur in my setup?

Edit:
I also allowed IPv4 forwarding on the Host system:
Code:
[...]
# Uncomment the next line to enable packet forwarding for IPv4
net.ipv4.ip_forward=1

# Uncomment the next line to enable packet forwarding for IPv6
#  Enabling this option disables Stateless Address Autoconfiguration
#  based on Router Advertisements for this host
net.ipv6.conf.all.forwarding=1
net.ipv4.conf.all.proxy_arp = 1
[...]
 
Last edited:
I have restarted the host at least once after every 1-2 changes to the networking to be sure that everything loads correctly at startup.
 
Try and run these commands and restart the vps and not dedi

sysctl -w net.ipv6.conf.all.forwarding=1
sysctl -w net.ipv4.ip_forward=1

I've had a odd error with the network and turns out that these didn't stick
 
I just tried that, but it doesn't seem to do anything. I can ping the host but nothing outside.
I, unfortunately, can't trace the packages because none of the required packages is installed.
 

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!