1

I have two OpenVPN config files that I am using, one is my personal VPN so I can access my unit when offsite, and the other is a VPN for private internet access.

These two work flawless when used apart, but I'm having trouble getting my internal VPN to work but still routing all internet traffic through the security VPN as well.

Here are the two configs. Internal VPN Config:

remote {IP}
comp-lzo
dev tun
auth-user-pass /etc/openvpn/ovpn.txt
ca /etc/openvpn/ca.crt
client

route 0.0.0.0 192.0.0.0 net_gateway
route 64.0.0.0 192.0.0.0 net_gateway
route 128.0.0.0 192.0.0.0 net_gateway
route 192.0.0.0 192.0.0.0 net_gateway

Private internet VPN Config:

client
dev tun
proto udp
remote us-east.privateinternetaccess.com 1198
resolv-retry infinite
nobind
persist-key
persist-tun
cipher aes-128-cbc
auth sha1
tls-client
remote-cert-tls server
auth-user-pass auth.txt
comp-lzo
verb 1
reneg-sec 0
crl-verify crl.rsa.2048.pem
ca ca.rsa.2048.crt
disable-occ
redirect-gateway def1

All I need to do is keep my internal VPN working for me to access remotely, my local network working, and then route all internet traffic through the private VPN.

If I start the private VPN by itself leaving the internal VPN off, it all works perfectly fine without a problem.

openvpn auth.conf
  • I don't understand what you're trying to accomplish with 2 configs. Why doesn't the private config take the place of the other? Are they seperate servers (services)? – user508889 Nov 14 '16 at 20:34
  • Yes, separate servers. The internal is so I alone can access my PCs when out of the office. The Private VPN is for encrypted private internet access from that one PC while "IN" the office. Both need to be online at all times, but all internet traffic must route through the Private VPN and the Internal VPN must keep working during that. – jfreak53 Nov 14 '16 at 21:09
1
+50

Both your VPN configs explicitly say that you want to route ALL traffic through them.

route 0.0.0.0 192.0.0.0 net_gateway

and in your other profile:

redirect-gateway def1

Since you seem to explicitly route the other networks in the internal vpn config profile, removing:

route 0.0.0.0 192.0.0.0 net_gateway

should remove the conflicting routes and allow you to reach hosts behind the networks you explicitly route with the other route commands.

a note worth mentioning though is that there has been a bug around in network manager preventing you from using two openVPN connections simultaneously.

Not sure if its solved yet

But you can always run one of the two VPN connections from the terminal to make sure you are not tripping over that potential problem

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.