Client-side connecting to the wrong IP

Business solution to host your own OpenVPN server with web management interface and bundled clients.
Post Reply
bschaefer
OpenVpn Newbie
Posts: 2
Joined: Mon Apr 12, 2021 6:12 pm

Client-side connecting to the wrong IP

Post by bschaefer » Mon Apr 12, 2021 7:28 pm

Hello! I've created an EC2 instance with OpenVPN AS on AWS.
Everything was working fine until I've changed the IP to an elastic IP on the EC2 instance.
I've updated the admin console (changed the network IP).
The client.ovpn have the right informations (I will hide some personal informations)

# OVPN_ACCESS_SERVER_PROFILE=**correct user**@**correct IP**
[...]
# OVPN_ACCESS_SERVER_WSHOST=**correct IP**:443

But when the client side tries to connect, it gets this error:
session-start: ** ERROR ** Failed to connect: Connection, Client reconnect

This is the log. It seems that the client side, even with the client.ovpn configured with the new IP, still tries to connect to the old IP from the server.

Apr 12 14:33:06 **local user** net.openvpn.v3.log[5565]: {tag:***} Network Configuration INFO: Socket protect called for socket 8, remote: '**old/wrong IP**', tun: '', ipv6: no
Apr 12 14:33:10 **local user** net.openvpn.v3.log[5565]: {tag:***} Client INFO: Reconnecting
Apr 12 14:33:10 **local user** net.openvpn.v3.log[5565]: {tag:***} Client VERB1: Waiting for server response

I'm able to connect to the server console (Ubuntu based) and to Admin page. My problem is only with the client connection (I've tried on windows and linux)
I didn't changed anything on admin page, besides of "hostname or IP address" on the network settings. Am i missing something?
I'm sorry if this is a basic config, but I've searched everywhere and didn't finding an answer.

User avatar
openvpn_inc
OpenVPN Inc.
Posts: 88
Joined: Tue Feb 16, 2021 10:41 am

Re: Client-side connecting to the wrong IP

Post by openvpn_inc » Tue Apr 13, 2021 6:17 am

Hello bschaefer,

I would like to suggest that instead of manually updating the config file (which, if done correctly, should work) and instead make the necessary correction on your Access Server configuration and download/import a new connection profile altogether.

In the Admin UI of the Access Server go to the Network Settings page and in the 'host name or IP address' field put the new address of your Access Server. I would recommend instead of an IP address to use a DNS name here like "vpn.mycompany.com" or whatever domain you have. That way, if you ever change the IP address again, you can simply update the DNS record instead of reprovisioning/reconfiguring your VPN clients to get the new IP address. However if you want you can just keep using an IP address here directly - in that case fill in the public IP address of your Elastic IP.

And then save settings, update running servers, and import a new connection profile on your VPN client, and you should be good.

Kind regards,
Johan
Image OpenVPN Inc.
Answers provided by OpenVPN Inc. staff members here are provided on a voluntary best-effort basis, and no rights can be claimed on the basis of answers posted in this public forum. If you wish to get official support from OpenVPN Inc. please use the official support ticket system: https://openvpn.nets/support

bschaefer
OpenVpn Newbie
Posts: 2
Joined: Mon Apr 12, 2021 6:12 pm

Re: Client-side connecting to the wrong IP

Post by bschaefer » Mon Apr 19, 2021 3:44 am

Thank you, Jordan. this worked for me.

For some reason, DNS worked, but IP dont.

Post Reply