Forcing routing to specific external addresses through VPN server
Posted: Thu Sep 26, 2019 4:05 pm
Hi folks
I've been chasing documentation, forum articles and everything else I can read for a couple of days now to try and get this working, and I'm still getting nowhere, so its time to ask for help.
The scenario is fairly simple. We have a network running its own OpenVPN server, in to which our small team connect. I've deliberately set that up to force connected clients' DNS to go through the VPN server, to ensure that our server names (thing.company.local) resolve. However, all their traffic apart from addresses within our network then routes to their normal gateways rather than the VPN - there's simply no point in forcing all their non-network traffic such as their browsing and windows updates through our VPN server. SO far, so good, and that's all working.
However, for a few very specific addresses outside our network, I need to force connected clients to route through the VPN server rather than directly. At the client end I should be able to just run a route command, and I know I can ultimately add that to the downloaded users' config file in the VPN login - for now, I'm just running route commands manually while I test this. However, my route command:
route add <dest address> mask 255.255.255.255 <OpenVPN server IP address>
is simply getting me "Destination host unreachable" at the first stage when I check with a traceroute to that destination address.
Is this an OpenVPN server config problem, or something wrong with my route command? Any assistance gratefully appreciated. Thanks.
I've been chasing documentation, forum articles and everything else I can read for a couple of days now to try and get this working, and I'm still getting nowhere, so its time to ask for help.
The scenario is fairly simple. We have a network running its own OpenVPN server, in to which our small team connect. I've deliberately set that up to force connected clients' DNS to go through the VPN server, to ensure that our server names (thing.company.local) resolve. However, all their traffic apart from addresses within our network then routes to their normal gateways rather than the VPN - there's simply no point in forcing all their non-network traffic such as their browsing and windows updates through our VPN server. SO far, so good, and that's all working.
However, for a few very specific addresses outside our network, I need to force connected clients to route through the VPN server rather than directly. At the client end I should be able to just run a route command, and I know I can ultimately add that to the downloaded users' config file in the VPN login - for now, I'm just running route commands manually while I test this. However, my route command:
route add <dest address> mask 255.255.255.255 <OpenVPN server IP address>
is simply getting me "Destination host unreachable" at the first stage when I check with a traceroute to that destination address.
Is this an OpenVPN server config problem, or something wrong with my route command? Any assistance gratefully appreciated. Thanks.