I have a Virtual Private Server (VPS) that I connect to on port 22 using ssh.

Once I'm connected to that VPS I make web requests from it (through curl for example)

By default these web requests come from the public IP the VPS assigns me.

What I want to do is connect to Private Internet Access (PIA) Virtual Private Network (VPN) on the VPS so that instead of having the web requests on the VPS come from the public IP that was assigned to it, web requests will come from PIA's VPN

So far to try to get this to work I've installed network manager and have enabled it to manage ifupdown and installed openvpn and the different configs that private internet access installs with its install shell script and connected to the VPN using nmcli

This shows that there is a connection to the tunnel but all traffic is still being routed over eth0 not the VPN tunnel.

I believe this is due to how iptables is currently setup but I don't understand iptables enough to route outgoing traffic on the VPS over the private internet access VPN while still being able to maintain my port 22 SSH over the VPS's default IP/gateway.

Any help on how I could get this setup would be greatly appreciated.