VM von außen nicht erreichbar

Aug 31, 2022
4
0
1
Hallo zusammen,

ich habe folgendes Netzwerkschema:

vswitch.drawio(1).png


Der Proxmox-Host erreicht alle Endgeräte. Ich kann also über den vswitch (Hetzner) sowohl die Cloudserver erreichen als auch die VMs.
Vom Cloudserver aus erreiche ich den Proxmox-Host, aber nicht die VMs.
Die Routen sind in beiden OPNsense-Instanzen gesetzt und die Firewalls für den Verkehr in beide Richtungen offen.
Ich vermute, dass das Problem beim Proxmox-Host liegt und die dort aus der Hetzner-Cloud ankommenden Pakete nicht weitergeleitet werden können. Ich weiß nur nicht, wo der Konfigurationsfehler liegt, da der Proxmox-Host selbst ja alle VMs anpingen kann.


Die Netzwerkkonfiguration auf dem Proxmox-Host sieht wie folgt aus:

Bash:
source /etc/network/interfaces.d/*

auto lo
iface lo inet loopback

iface lo inet6 loopback

auto enp41s0
iface enp41s0 inet manual

auto enp41s0.4000
iface enp41s0.4000 inet manual

auto eth0
iface eth0 inet manual

auto vmbr0
iface vmbr0 inet static
        address 78.x.x.18/32
        gateway 78.x.x.29
        bridge-ports enp41s0
        bridge-stp off
        bridge-fd 0

auto vmbr4000
iface vmbr4000 inet static
        address 10.0.1.2/24
        bridge-ports enp41s0.4000
        bridge-stp off
        bridge-fd 0
        mtu 1400
        up ip route add 10.0.0.0/16 via 10.0.1.1 dev vmbr4000
# Verbindung PVE - OPNsense

auto vmbr10
iface vmbr10 inet static
        address 10.10.0.2/24
        bridge-ports none
        bridge-stp off
        bridge-fd 0
# LAN OPNsense

Hat von euch jemand eine Idee, weshalb die Pakete von den Cloudservern nicht bei den VMs ankommen?
 
Last edited:
Die Traceroute kommt an.

Bash:
traceroute 10.0.0.5
traceroute to 10.0.0.5 (10.0.0.5), 30 hops max, 60 byte packets
 1  OPNsense.mmorath.de (10.10.0.1)  0.229 ms  0.208 ms  0.202 ms
 2  10.0.1.1 (10.0.1.1)  0.480 ms  0.490 ms  0.484 ms
 3  10.0.0.5 (10.0.0.5)  3.276 ms  3.287 ms  3.332 ms

Umgekehrt (vom Cloudserver aus) kommt die Traceroute nur bis zur OPNsene auf der Cloudseite.
Code:
traceroute 10.10.0.102
traceroute to 10.10.0.102 (10.10.0.102), 30 hops max, 60 byte packets
 1  10.0.0.1 (10.0.0.1)  3.769 ms  3.755 ms  3.753 ms
 2  * * *
 3  * * *
 4  * * *
 5  * * *
 6  * * *
 7  * * *
 8  * * *
 9  * * *
10  * * *
11  * * *
12  * * *
13  * * *
14  * * *
15  * * *
16  * * *
17  * * *
18  * * *
19  * * *
20  * * *
21  * * *
22  * * *
23  * * *
24  * * *
25  * * *
26  * * *
27  * * *
28  * * *
29  * * *
30  * * *

Die 10.0.0.1 ist das Gateway des vSwitch

Wenn ich von der Cloudseite aus zur VM pinge, kommt nichts an:

Bash:
ping 10.10.0.102
PING 10.10.0.102 (10.10.0.102) 56(84) bytes of data.
^C
--- 10.10.0.102 ping statistics ---
4 packets transmitted, 0 received, 100% packet loss, time 3054ms

Pinge ich hingegen den dedicated Server selbst an, kommen Pakte an:

Bash:
ping 10.0.1.2
PING 10.0.1.2 (10.0.1.2) 56(84) bytes of data.
64 bytes from 10.0.1.2: icmp_seq=1 ttl=63 time=3.05 ms
64 bytes from 10.0.1.2: icmp_seq=2 ttl=63 time=2.77 ms
64 bytes from 10.0.1.2: icmp_seq=3 ttl=63 time=2.85 ms
^C
--- 10.0.1.2 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
rtt min/avg/max/mdev = 2.765/2.886/3.048/0.118 ms

Ergänzend noch:
10.0.1.1 ist das Gateway des vSwitch von der Dedicated-Seite her.
10.0.0.1 ist das Gateway des vSwitch von der Cloud-Seite her.
 
Last edited:
Ein Switch hat normalerweise keine Gateways, der leitet ja nur Pakete weiter.
Wenn du der Linux Bridge (vSwitch) eine IP gibst, ist die nur für das Management und da gibt man immer nur 1 Gateway.
Will ich vom Host Netzwerke über andere Schnittstellen geroutet erreichen, muss man statische Routen pflegen.

Ich glaube dein ganzes Netzwerksetup hat irgendwo einen kleinen Haken.
Eventuell schilderst du mal das ganze Netzwerk wie die Subnetze unterteilt sind, wer welche Netze routet und welche IPs die jeweiligen Router (Firewalls) haben.
 

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!