I’m not using the GUI on windows client, I followed the guide to manage openvpn as a service (ovpnconnector [install|set-config profile|start]). The windows pc client is in a remote location, I need it tries openvpn connection when it starts up.
The issue should not be related to TTL of DDNS provider because “ping” command reports right IP (in my example above 91.82.73.64). I also tried to force resolving mydomain.example.net by putting it within hosts file:
“c:\windows\system32\drivers\etc\hosts”
and verify with ping commmand: if I manually change the associated IP adddress, ping tries to contact the new one, and not the old. This should exclude any ddns provider issue.
And should exclude also dnscache problems at OS level, but I’m not sure.
Tried “ipconfig /flushdns” yet and seems to do nothing. The new lines of ovpnconnector.log report it is still trying to contact the old IP.
Tried also to add “register-dns” to the config, but ovpnconnector cannot start, it returns an error… so I removed that option, could retry and report. I could try it again and report exactly the error, but I don’t need the DNS to be pushed by the openvpn server through the vpn tunnel, I just need to establish the connetcion and the client tries to contact a wrong IP. I read about “register-dns” option, but frankly I’m still not sure about what it does exactly.
In my case I want just the remote client connects to the local server. After that I use a vncviewer from the server to remotely control the windows client. I don’t need any other vpn feature like tunneling DNS or routing client internet connection throght my vpn server and so on…
By reading an howto recommended by Openvpn forum:
The OpenVPN client by default will sense when the server’s IP address has changed, if the client configuration is using a remote directive which references a dynamic DNS name. The usual chain of events is that (a) the OpenVPN client fails to receive timely keepalive messages from the server’s old IP address, triggering a restart, and (b) the restart causes the DNS name in the remote directive to be re-resolved, allowing the client to reconnect to the server at its new IP address.
Anyway in my case it doesn’t seem to work exactly as explained above. May be due to some option I have in the config? It is posted above…