Rigabula
Hello,
I've been struggling for couple of day now for one specific situation for an OpenVPN client config.
I've a machine(laptop, which moves in and out of the office) with Win10 and want to set the client to connect to the server no matter of the network where it is.
I've managed to do couple of scripts - one for the local area and one for external network.
I thought that if I set up the config file with only the public IP of my router(static) it will work every time - it works from WAN side, but thats not the case when the client is in the LAN area of the server. The openvpn timeouts and cant connect to the server.
Will try to explain it with numbers also:
Router static IP: 123.123.123.123(just for the example)
Server LAN IP(reserved): 192.168.1.100
OpenVPN VPN IP: 10.8.0.1 OpenVPN port: 1234(for the example)
When I run client with Remote 123.123.123.123 port 1234 from LAN( IP on the real network interface is 192.168.100.112(reserved) OpenVPN does not connect
The thing is that theres a program which connection to the server is hardcoded with an IP - so when the laptop is in the office the server is on 192.168.1.100, but when its on the road its 10.8.0.1. I'd like to skip the part when I have to change that IP every time the laptop moves.
Hope you guys got what I mean.
Thank you all in advance.
PS: I've used the example files that came with OpenVPN instalation and edited those parameters to be able to implement them in my network.
If there were a similar thread, please point it out as I couldn't find it.