opentom
Hello,
Here is my situation:
I have an OpenVPN server running on a Ubuntu Server machine at my house.
My router has a Dynamic public IP address. The public IP usually only changes after the router loses power for a few hours.
I have a domain name that points to my public ip.
Everything was setup fine, and working perfectly for 4 months. I have 5 client devices that could connect.
My power went out for 8 hours yesterday and my router received a new public IP upon reconnecting.
I updated the domain record to point to my new public IP.
All of my client configurations have:
remote mydomainname.com 1194
However, when trying to connect to the VPN from any device, the previous IP is still being used by the OpenVPN client.
In the log I see this entry:
MANAGEMENT: >STATE:1519003153,RESOLVE,,,,,,
TCP/UDP: Preserving recently used remote address: [AF_INET]myPreviousIpAddressHere:1194
So the OpenVPN client is attempting to connect to the previous IP of the server.
Is there a way to prevent this behavior? Maybe a way to always force the resolving of the domain name specified on the remote line in the .ovpn?
Re-adding the .ovpn file under a different name fixes the problem, and my new public IP is resolved. Is that my only option?
Please let me know.
Thanks
-Tom