Page 1 of 1

Access with external IP

Posted: Thu Aug 26, 2021 9:08 pm
by setau
I am very new in terms of using a vpn. I had made an autoinstall version of a openvpn server in a vps. that is working good.
After that i installed a openvpn client in other vps. when I start the vpn client i lose access to the vps with his external IP.
Can anyone please help me ?? what i should do?? What is missing to have access with external IP access?
THank you

Re: Access with external IP

Posted: Fri Aug 27, 2021 10:06 am
by openvpn_inc
Hello setau,

Most likely the VPN server is instructing the VPN client to send all Internet-related traffic through the VPN tunnel. If you're trying to now reach that VPN client directly on its public IP, the replies will be redirected through the VPN server. This is what I think is happening.

Before VPN is established, packets follow this path:
Your computer > Your VPS
Your VPS > Your computer

After VPN is established, packets follow this path:
Your computer > Your VPS
Your VPS > VPN server > Your computer

Since this is an unexpected path from the point of view of your computer, it will not work. Basically your computer is talking to a particular system (your VPS) and receiving replies from another system (VPN server). This is called asymmetric routing.

You can:
- SSH into your VPN server, and from there SSH to the VPN IP address of your VPS system, which will work over the VPN link.
- Connect your computer to the VPN server, and from there SSH to the VPN IP address of your VPS system, which will work over the VPN link.
- Add a route to your VPS somehow (either with OpenVPN or just directly in the routing table) that makes an exception for this rule to send all Internet-related traffic through the VPN tunnel. If for example your home IP is a static public IP you can add an exception for that IP address to always go through the default gateway. In OpenVPN directives that would look like: route 123.45.67.89 255.255.255.255 net_gateway - this can be pushed from the server or added into the client connection profile directly.
- Turn off the instruction to redirect all Internet-related traffic through the VPN tunnel, so that only certain private subnets that you need access to get redirected through the VPN tunnel, and any requests coming from the public Internet are responded to as before. On Access Server this function can be turned on/off under VPN Settings > Redirect all client Internet traffic through the VPN tunnel.

Kind regards,
Johan

Re: Access with external IP

Posted: Sun Aug 29, 2021 9:07 pm
by setau
Thank you for your answer
I ll try as your information
thanks