I'm trying to setup an OpenVPN access for clients through a server A I own. But I want these clients to connect to another OpenVPN server on an host B, configured as client on A.
OVPN OVPN [Client] -------> [Server A] -------> [Host B] tun0 tun0 -- tun1 10.8.0.2 10.8.0.1 -- 10.9.0.2 10.9.0.1
Forwarding is allowed between the
tun1 interfaces. My initial idea was to push to the client the route to access
10.9.0.1, and use this address as a gateway, which would allow the clients to use services directly on
10.8.0.1 as well as access the world through the host B.
However, OpenVPN on the client doesn't seem to run the necessary
ip route add ... commands if I only do the following so it doesn't seem as easy:
server 10.8.0.0 255.255.255.0 push "route 10.9.0.1 255.255.255.255 10.8.0.1" push "route-gateway 10.9.0.1" push "redirect-gateway def1 bypass-dhcp"
Thanks for your help.