If you want to connect to your local server what is behind openvpn and yourself are connected with a VPN to your local network

Yeah .. wierd title

So in my case: I am at location A and I am making a VPN to my local network what is at location B

I can access all my local servers and computers, but one !

“The One” is a server which has a dedicated openvpn connection to location C, when this is active my VPN from location A cannot access “The One” at location B. Only when the OpenVPN connection is terminated

Solution: add a static route on “The One”

check with: ip route show

and add the route like this: ip route add 10.10.10.0/24 via 10.1.1.1 dev eth0

where 10.10.10.0 is the VPN IP range what your local network is giving VPN users and via 10.1.1.1 is the IP of your gateway (router)

… easy peacy ..

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.