Cannot connect to Access server outside the network

Business solution to host your own OpenVPN server with web management interface and bundled clients.
Post Reply
gilbertrd
OpenVpn Newbie
Posts: 1
Joined: Sun Aug 07, 2022 8:17 am

Cannot connect to Access server outside the network

Post by gilbertrd » Sun Aug 07, 2022 8:23 am

I am a total noob and has very limited networking knowledge (learning though). I installed openvpn access server on my ubuntu server with the help of tutorials. I managed to run it fine and I can connect to it with the devices inside my local network. However, i cannot connect to the server using mobile data on my phone or an outside network. It just doesnt connect. I tried importing profile and use url but none works.
I have looked up this community and found a similar post but I dont know how to do it and couldnt find any info on the internet
This is the answer on that post .
// update it under Server Network Settings, in the 'host name or IP address field'. Preferably set it to a DNS record that resolves to the public IP address that your Access Server can be reached at. If you don't have a DNS record then use an IP address //

Iam not sure how to do that. I have found the option to change hostname but not sure what to add there. I would greatly appreciate if anyone can help me with this with an easy to follow answer.

sorry for my bad english.

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

Re: Cannot connect to Access server outside the network

Post by openvpn_inc » Sun Aug 07, 2022 11:18 am

gilbertrd wrote:
Sun Aug 07, 2022 8:23 am
// update it under Server Network Settings, in the 'host name or IP address field'. Preferably set it to a DNS record that resolves to the public IP address that your Access Server can be reached at. If you don't have a DNS record then use an IP address //

Iam not sure how to do that. I have found the option to change hostname but not sure what to add there. I would greatly appreciate if anyone can help me with this with an easy to follow answer.
Hi Gil,

You have correctly identified the problem. Unfortunately the answer is outside of OpenVPN Access Server. We cannot tell you what your hostname or IP address is.

Typically a beginning home user would install a server behind a NAT (network address translation) router, possibly one provided by your ISP. By default such routers will do source NAT for your local machines. But for a NAT host to be able to receive packets from the Internet, the router must also do destination NAT for the necessary ports and protocols.

Destination NAT is often called "port forwarding". For Access Server you need to forward these ports from the router:
  • TCP port 443
  • UDP port 1194
The next step is to identify what your router's external IP address is. The router itself can probably tell you, but there are also numerous "What is my IP?" web services available.

That address (or preferably, a hostname that resolves to that address) is what you would put in the hostname field.

There are numerous free dynamic DNS providers which can give you a hostname to use. Or you could try using the ISP's own reverse DNS name (called "PTR" in DNS terms) as your hostname. But note that if the ISP changes your IP address, that name would change as well.

That's why a dynamic DNS name is useful. You can use a client to update it whenever your IP address changes.
gilbertrd wrote:
Sun Aug 07, 2022 8:23 am
sorry for my bad english.
That is not a problem. Your English is better than my Insert-ANY-language-name-here. HTH.

regards, rob0
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.net/support

Post Reply