Setting up a proxmox VM to act as a VPN gateway for other containers

I am looking to create a VM who’s network goes through a 3rd party private vpn. The goal is to allow other VMs and containers can use as a gateway.

I attempted to use the following tutorial but no luck.

I am unable to start the VPN:

ar 24 02:54:34 piavpn systemd[1]: Starting PIA-Wireguard Connection… Mar 24 02:54:35 piavpn bash[487]: 0 Mar 24 02:54:35 piavpn bash[488]: 0 Mar 24 02:54:35 piavpn bash[465]: Server did not return OK. Stopping now. Mar 24 02:54:35 piavpn systemd[1]: pia-connect.service: Main process exited, code=exited, status=1/FAILURE Mar 24 02:54:35 piavpn systemd[1]: pia-connect.service: Failed with result ‘exit-code’. Mar 24 02:54:35 piavpn systemd[1]: Failed to start PIA-Wireguard Connection. Any ideas?

How you describe what you’re after makes me think that you’re turning over wrong stones.

ProxMox should not be touched by third party software.
You’d run a VM or LXC with a router OS and/ or VPN installed and then use that as the gateway, ie. set how the traffic leaves through the VPN as an exit node.

You can then create a network bridge in ProxMox as a universal separate network where all traffic blindly gets forced through your routers VPN if it leaves your defined subnets and have a all-around solution.

You can also do this on a single VM with docker and some of the arr stacks oriented as setting up gluetun automatically.

I like the ‚manual‘ approach, since part of it is learning for me.

Consider setting up a pfsense VM, configuring it to connect to VPN, and then connecting other guest machines to its LAN for secure VPN access. https://docs.netgate.com/pfsense/en/latest/recipes/virtualize-proxmox-ve.html

To add to this:

Your virtual router will have access to both networks, the one with your WAN router and the separate one for internal traffic, while your network restricted nodes would only get the separate one.

You could very well use VLANs at this point, but im not too familiar with them at my point of the journey as to properly explain them with ProxMox and OPNsense

Thanks will try this

Thank you. Will try to figure it out!