maikcat wroteadd a static route to your windows so that traffic destined to your vpn network
flows via openvpn servers lan ip.
Michael.
I'm not sure what the static route would be in this case.
From the laptop to the server it's straight forward enough. We know the LAN IP address of the Windows server (which is the same physical computer as the OpenVPN server) is 192.168.128.2, so we can add a static route to send traffic destined for 192.168.128.2 to the OpenVPN client at 10.8.0.6:
route add 192.168.128.0 mask 255.255.255.0 10.8.0.6
But from the server to the laptop is not so straight forward, as the laptop will be connecting from any IP address.
So what I think is happening is the if the laptop is on a LAN IP of 10.0.0.2, for example, connects to the VPN and pings the server, the packets are routed down the tunnel ok. But when the server receives those packets from 10.0.0.2, it has no way of knowing to send the reply down the VPN tunnel. And I can't do a static route, because the laptop will be connecting from different IP addresses depending on where it is.
From what I am reading, this is possibly where IP masquerading comes in. I need to make any packets coming down the VPN tunnel to the Windows server appear like it's coming from the VPN tunnels IP address of 10.8.0.1. Then it will know to respond to anything from the tunnel by sending it back through the tunnel.
Is this correct? Even if it is I have no idea how to go about achieving this, so I'd appreciate any guidance.
Thanks for all your assistance.