Connecting VMs to a WireGuard VPN Tunnel

Stift7

New Member
Aug 15, 2024
1
0
1
Hey, I need some help... In my home network (10.1.0.0/16), I have a Proxmox server with a WireGuard LXC container. From this container, a VPN tunnel (10.7.0.0/24) is established to my second Proxmox server in a network at a friend's place, where I don't have access to the router. Therefore, I previously set the Proxmox host to DHCP and installed WireGuard on the host. Now, the problem is that I can only access the Proxmox host and not the VMs. Is there any way I can connect the VMs directly to the tunnel without them needing to get IP addresses in the "remote network"? Thanks for any help!
 
Add a route route on the VM's for your 10.1.0.0/16 (why so large btw?) with a "next hop" / gateway of your wireguard-container on your friend's side
That way, if traffic is coming from your network, it knows that to reply it needs to send it to your wireguard-container, and not to your friend's router

Do note that for this to continuously work, you will have to set a static ip for this container, else on a server/router reboot, it can get a different IP, and you'll have to change all those static routes on all VM's through the console.
 

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!