This answer assumes you already have successfully connected your account and have a working adapter.
Ok, after sifting through tutorials on IP tables/routes I found the solution that works with SoftEther that should work with other VPN adapters to tunnel traffic through the adapter.
Start by running
ip neigh to get the default gateway of your VPN's network and the default gateway of this network. You will also need your remote server IP. If this doesn't get the information for you, run
tcpdump on the IP for your VPN adapter.
You can easily combine the bellow steps into a bash script and/or reverse them to disconnect a VPN adapter:
First you will need to get DHCP info from your server with:
sudo dhclient vpn_myadapter
vpn_myadapter is the the adapter name that can be found with
Second you have to create a route from your VPN server's IP address to your local internet gateway that will get you out to the internet. 18.104.22.168 is what I will use as the example server address. Also you will need to know what the adapter names are for your internet connection and your VNA (virtual network adapter), and you can find these with
ifconfig. You can also use ip neigh to get a concise list of your adapters and their gateways.
Command to create a route from VPN IP to local gateway (in this example 192.168.0.1)
sudo ip route add 22.214.171.124/32 via 192.168.0.1 dev eth0
Make sure eth0 is set to the adapter that corresponds with your local gateway
Next you'll delete your default route which routes all traffic by default.
sudo ip route del default
Now you will add a default route that will use the VPN's default gateway. This information can be gathered from either your provider, the server you setup or using a combination of
ip neigh, and
ifconfig. You might be able to find the information at this point, but you should have run
ip neigh at the beginning if you are unable to find the information now. I will use the default default gateway provided by SoftEther which is
sudo ip route add default via 192.168.30.1 dev vpn_myadapter
That should route all your traffic through the remote network. If you are still unable to connect to the internet you will need to run
SecureNatEnable (you shouldn't but might need to run
NatEnable depending on your configuration) on your server if you are unable to get dhcp or internet working after you have connected your client through these steps or your
dhclient command didn't work. I am unsure if your server will need a reboot after updating it.
SecureNatEnable will enable NAT and DHCP.