openVPN as a way to connect to a LAN by another client, different from server
Posted
by
Einar
on Server Fault
See other posts from Server Fault
or by Einar
Published on 2013-11-08T20:03:37Z
Indexed on
2013/11/08
21:58 UTC
Read the original article
Hit count: 242
Setup:
- one LAN handled by a router without a publicly available IP address but without any outbound connection restrictions ("target LAN");
- a separate server publicly reachable from the Internet ("gateway").
I am trying to set up openVPN so that a third client can connect to the "gateway" and access the "target LAN". As the router of "target LAN" is not reachable from the Internet directly, it connects to the gateway itself via openVPN as well.
The problem is how to handle routing. The LAN router has two network interfaces (for the outside network and the LAN itself). In openVPN (the server on the gateway) I set
client-to-client
and
push "route 192.168.10.0 255.255.255.0"
but I assume this would be horribly wrong (it actually messed up the routing on the LAN router until I killed openVPN).
openVPN is not using bridging, is configured via tun.
Other config details from the server
server 10.8.0.0 255.255.255.0
client-config-dir ccd
route 192.168.10.0 255.255.255.0
And the client file in ccd is
iroute 192.168.10.0 255.255.255.0
What can be adjusted to ensure that a third client can connect through openVPN and access the LAN mentioned earlier?
© Server Fault or respective owner