otter1
Hi there,
I have (succsessfully) build a test setup to connect 2 different LANs via OpenVPN with tun / routing.
(192.168.1.0/24 and 192.168.2.0/24) (i know about the common ip-ranges, this is only a test setup in a separated network)
The both vpn-gateways are windows 7 machines running openvpn 2.3.4
The connection itself works, every client from lan1 can ping/connect to every client in lan2 and vice versa.
The problem is on the vpn-gateway machines itself.
It seems to be a stupid behavior of the windows:
If you are on the vpn-gateway machine in lan1 (lets say 192.168.1.9) and try to ping a client in lan2 (lets say 192.168.2.13), windows will use its tunnel ip-address (10.8.0.x) as sender-ip, instead of using its "regular" ip (192.168.1.9).
The client on lan2 gets the ping-request and sends the ping-reply correctly to 10.8.0.x to the default gw in lan2.
Obviously the default gw in lan 2 has no route to 10.8.0.0/24 and drops the packet.
This behaviour only happens if you ping/connect from the vpn-gateway machine itself.
If you force the ping to come from 192.168.1.9 via ping -S, it works like a charm.
The clients ether on lan1 and lan2 don't have this problem - they can ping/connect to each other perfectly.
Yes, I could add a route for 10.8.0.0/24 in the routers, but that wouldn't be beautiful 😉
Maybe someone else already faced this problem and has an easy solution.
regards,
Jan