[SOLVED] OpenVPN ins hinterliegende LAN

PostFix

New Member
Sep 27, 2018
5
1
3
27
Ich habe eine normale Ubuntu-VM (kein Container) mit der Standard-Netzwerkkarte (vmbr0) sowie einem dort installiertem OpenVPN.
Eine VPN-Verbindung vom Handy aus funktioniert, jedoch erreiche ich die anderen VM`s sowie das Home-Netzwerk nicht. Nur die Dienste des OpenVPN-Servers selbst.

Auf dem VPN-Server (der Ubuntu-VM) sind diese Regeln bereits aktiviert.
/etc/sysctl.conf --> net.ipv4.ip_forward = 1 und firewall-cmd --direct --passthrough ipv4 -t nat -A POSTROUTING -s 10.8.0.0/24 -o ens18 -j MASQUERADE

Das VPN-Netz spannt IP`s von 10.8.0.1 - 10.8.0.253. Das lokale Netz ist 192.168.100.1 - 192.168.100.253.
Das Gateway ist die 192.168.100.1 (eine Fritzbox in der ebenfalls die statische Route 10.8.0.0 an Gateway 192.168.100.1 hinzugefügt wurde)

Proxmoxversion: 5.4-13
 

Attachments

  • interface_auf_Proxmox.PNG
    interface_auf_Proxmox.PNG
    27.3 KB · Views: 18
  • route_auf_VM.PNG
    route_auf_VM.PNG
    42.3 KB · Views: 17
Das masquerading sollte innerhalb der Ubuntu-VM passieren.
Dann sehen die anderen hosts im Netz immer die Ubuntu-VM als source und schicken die Antworten korrekt an sie, und dort werden sie dann ins VPN weitergeschickt

eine Fritzbox in der ebenfalls die statische Route 10.8.0.0 an Gateway 192.168.100.1 hinzugefügt wurde)
das braucht es in der Regel nicht

Ich hoffe das hilft!
 
Freut zu hören!
bitte den thread als 'SOLVED' markieren - das hilft anderen mit ähnlichen Problemen.
Danke!
 

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!