What's new

How to set OpenVPN ?

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

cowboy

Regular Contributor
I want to set OpenVPN on my Android device. I have set OpenVPN Server on Asuswrt and I am using a dynamic DNS (DDNS) (afraid.org).

I get on my Android the Error OpenVPN Connection Timeout and in the logfile: "Transport Error: DNS resolve error on all.dnsomatic.com for UDP session: HOST not found (authoritative)"

I set the OpenVPN server on my AC87U router as shown below and exported the .ovpn file and imported it in my Android device. The .ovpn file has the following settings:

client
dev tun
proto udp
remote all.dnsomatic.com 1194
float
comp-lzo adaptive
keepalive 15 60
ns-cert-type server
<ca>
-----BEGIN CERTIFICATE-----

...................................

what am I doing wrong ?


KNGY8Md.png


and:

x2PMtRT.jpg
 
Last edited:
Do I have to configure the OpenVPN Client Settings too on my Asus Router ?
 
You have to manually enter the desired DDNS in your ovpn file. DNS-o-Matic is a "meta" DDNS. The router has no way of knowing what real DDNS hostnames are configured in DNS-o-Matic, it only knows about the DNS-o-Matic server that the router contacts to request updating all of your services.
 
You have to manually enter the desired DDNS in your ovpn file. DNS-o-Matic is a "meta" DDNS. The router has no way of knowing what real DDNS hostnames are configured in DNS-o-Matic, it only knows about the DNS-o-Matic server that the router contacts to request updating all of your services.
I have a Dynbamic DNS from freedns.afraid.org. It goes something like this: mydomain.moo.com . So I should open the ovpn file and replace manually the line "remote all.dnsomatic.com 1194" to "remote mydomain.moo.com 1194 right" ?

Is your DDNS address really "all.dnsomatic.com"?
What does your "Host Name" say on the https://192.168.1.1:8443/Advanced_ASUSDDNS_Content.asp page?
yes.

Fd97C87.png
 
Good I am one step closer now, but still can't connect. On my Android I get the message "waiting for server". The log file on Android looks like this:

Connecting to mydomain.mooo.com:1194 via UDPv4.
Server poll timeout, trying next remote entry...
Contacting IP Adress via UPD-
EVENT:WAIT
Connecting to mydomain.mooo.com:1194 via UDPv4
Server poll timeout.....


Here is the System Log from the router:

May 7 19:46:56 openvpn[4774]: 192.168.x.xxx:57xxx TLS: Initial packet from [AF_INET]192.168.x.xxx:57xxx, sid=2113b556 980630ad
May 7 19:47:06 openvpn[4774]: 192.168.x.xxx:38xxx TLS: Initial packet from [AF_INET]192.168.x.xxx:38xxx, sid=9eb6b61d 3327c0f9
May 7 19:47:15 openvpn[4774]: 192.xxx.x.xxx:34xxx TLS: Initial packet from [AF_INET]192.168.x.xxx:34xxx, sid=44c20da3 52bc4954
May 7 19:47:26 dnsmasq-dhcp[442]: DHCPREQUEST(br0) 192.168.x.xxx 3c:xx:xx:54:xx:18
May 7 19:47:26 dnsmasq-dhcp[442]: DHCPACK(br0) 192.168.1.211 3c:xx:xx:54:xx:18 android-e459c1dd6f6e
May 7 19:47:57 openvpn[4774]: 192.168.x.xxx:57xxx TLS Error: TLS key negotiation failed to occur within 60 seconds (check your network connectivity)
May 7 19:47:57 openvpn[4774]: 192.168.x.xxx:57xxx TLS Error: TLS handshake failed
May 7 19:47:57 openvpn[4774]: 192.168.1.xxx:57xxx SIGUSR1[soft,tls-error] received, client-instance restarting
 
Last edited:
which open vpn program you use on android? if you using this one you can not connect with your home network.....try to connect with mobile signal...
Code:
https://play.google.com/store/apps/details?id=net.openvpn.openvpn&hl=en
or try with this one.....this can connect over home network.....
Code:
https://play.google.com/store/apps/details?id=de.blinkt.openvpn&hl=en
 
If you use new Marshmallow you can forget to get it working. Android has a bug in new software.
You can connect but not get routed. Only get back to Lollipop solve problem.
 
I also use on my Router https and the port 8443

which open vpn program you use on android? if you using this one you can not connect with your home network.....try to connect with mobile signal...
Code:
https://play.google.com/store/apps/details?id=net.openvpn.openvpn&hl=en
or try with this one.....this can connect over home network.....
Code:
https://play.google.com/store/apps/details?id=de.blinkt.openvpn&hl=en
Yes I am using the first one OpenVPN client from Google Play Store. I will check to see if it works with the second one you suggest.

If you use new Marshmallow you can forget to get it working. Android has a bug in new software.
You can connect but not get routed. Only get back to Lollipop solve problem.
Yes I am using Marshmallow. This is bad if it is true.
 
which open vpn program you use on android? if you using this one you can not connect with your home network.....try to connect with mobile signal...
Code:
https://play.google.com/store/apps/details?id=net.openvpn.openvpn&hl=en
or try with this one.....this can connect over home network.....
Code:
https://play.google.com/store/apps/details?id=de.blinkt.openvpn&hl=en
So yes this solved the problem.

After installing OpenVPN for Android my devices connected. But do you know whats the difference ? Is there a bug in the official OpenCPN client on Google Play ?

PBbgGVp.png
 
ps. I see in the advance options the setting Username/Password Authentication and Username/Password Authentication only. What is the difference ?
 
If you use new Marshmallow you can forget to get it working. Android has a bug in new software.
You can connect but not get routed. Only get back to Lollipop solve problem.

Maybe this workaround solve problem for now:
DNS does not work unless the DNS server in the VPN range.
On Samsung 6.x VPN is reported not to work unless the VPN app is exempted from Powersave
features.

EDIT: just tested working!!!
 
Last edited:
When I set in my Asus Router the option Username/Password Authentication to YES and Username/Password Authentication only to NO. The connection is working very well. I can even connect from my Android with both apps mentioned above from other internet places.
 

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top