Can someone help me setup a split-tunnel VPN connection on my headless ubuntu 15.10 server? I have PIA.
I would imagine you could do it by manually configuring routes. Rather than letting openvpn override the routes you would manually configure them so that the openvpn interface is the default gateway and the lan interface (and router if you have multiple local networks) is used fo your local subnet(s)
You may even be able to add the routes in to your openvpn config and have openvpn sort it out when it connects. In fact that's probably the best way to do it.
Let me have a look and I'll reply if I come up with anything more specific.
You can try adding this line to your config file
route add (network) mask (subnet mask) gw (local address)
So if your local network is on the 192.168.0.0/24 subnet and your computers address is 192.168.0.10 then the line would look like this:
route add 192.168.0.0 mask 255.255.255.0 gw 192.168.0.10
Not sure if that will work or not but it's worth a try.
Hopefully that's what you meant by split tunnel, otherwise maybe to can elaborate a little on what you mean.
I want to make the LAN the default gateway and OpenVPN the extra interface. I dont want all my traffic running over VPN by default. Only my Transmission traffic.
Well you should be able to stop openvpn from overriding the default gateway by removing that from the config.
As for transmission, if it has an option to bind to a specific interface you can use that to set it to use the openvpn interface. Otherwise I'm not sure how to do it.
I have my vpn client running on pfsense and can use the firewall to change the gateway based on port or ip, which is how I do something similar to what you want. But I'm not sure how to do it on a local machine.
One option is to run transmission in a Vm and have the VM run the VPN client.
i have thought about wiping my current setup and starting from scratch and using Docker. I hear I can set it up so that the Transmission part would include the VPN and would run separate from the rest of the machine
That should work
Yeah I use VPNC modifying the routes by hand. Once I got the split to where I wanted I just threw a function in my bashrc so that I could read them whenever.