I have OpenVPN server setup on a Mikrotik RB2011iL (v6.49.2) and I'm using OpenVPN Connect v3.2.5 (7182) for Android, but I'm not able to connect. My phone's android version is Oxygen OS 11.0. The .ovpn config file is working great on my Windows client v3.3.4.
OpenVPN on Android shows that it's trying to connect then eventually gives an error message: "There was an error attempting to connect to the selected server."
In the meantime, Mikrotik's logs is showing:
TCP connection established from X.X.X.X
: using encoding - AES-256-CBC/SHA1
Here's the unified form .ovpn I'm using:
client
dev tun
proto tcp-client
remote <My IP>
port 1194
nobind
persist-key
persist-tun
tls-client
remote-cert-tls server
verb 4
mute 10
cipher AES-256-CBC
auth SHA1
auth-user-pass secret
auth-nocache
redirect-gateway def1
<ca>
-----BEGIN CERTIFICATE-----
Gibberish text
-----END CERTIFICATE-----
</ca>
key-direction 1
<cert>
Certificate:
Data:
Version: 3 (0x2)
Serial Number:
serial-text
Signature Algorithm: sha256WithRSAEncryption
Issuer: CN=Easy-RSA CA
Validity
Not Before: Jan 11 21:51:19 2021 GMT
Not After : Dec 27 21:51:19 2023 GMT
Subject: CN=philipp-pc
Subject Public Key Info:
Public Key Algorithm: rsaEncryption
RSA Public-Key: (2048 bit)
Modulus:
modulus-text
Exponent: 65537 (0x10001)
X509v3 extensions:
X509v3 Basic Constraints:
CA:FALSE
X509v3 Subject Key Identifier:
subject-key-text
X509v3 Authority Key Identifier:
keyid:key-id-text
DirName:/CN=Easy-RSA CA
serial:dirname-text
X509v3 Extended Key Usage:
TLS Web Client Authentication
X509v3 Key Usage:
Digital Signature
Signature Algorithm: sha256WithRSAEncryption
signature-text
-----BEGIN CERTIFICATE-----
Gibberish text
-----END CERTIFICATE-----
</cert>
<key>
-----BEGIN ENCRYPTED PRIVATE KEY-----
Gibberish text
-----END ENCRYPTED PRIVATE KEY-----
</key>
I'm not sure what am I missing. Thank you for your assistance!
OpenVPN Connect v3.2.5 on Android not connecting
-
- OpenVpn Newbie
- Posts: 8
- Joined: Sat Jan 08, 2022 6:11 am
-
- OpenVPN Protagonist
- Posts: 11137
- Joined: Fri Jun 03, 2016 1:17 pm
Re: OpenVPN Connect v3.2.5 on Android not connecting
See your server log.
-
- OpenVpn Newbie
- Posts: 8
- Joined: Sat Jan 08, 2022 6:11 am
Re: OpenVPN Connect v3.2.5 on Android not connecting
Thank you for taking the time to assist.
The server logs are showing me:
TCP connection established from X.X.X.X
: using encoding - AES-256-CBC/SHA1
Normally, it is supposed to be followed by these lines, but that doesn't happen and just stays hung:
<ovpn-username>: connected
username logged in, 10.10.x.x from X.X.X.X
Thoughts?
-
- OpenVPN Protagonist
- Posts: 11137
- Joined: Fri Jun 03, 2016 1:17 pm
Re: OpenVPN Connect v3.2.5 on Android not connecting
Perhaps the Openvpn-Connect client is not compatible with your router.
Here is the sort of information required: viewtopic.php?f=30&t=22603#p68963
Here is the sort of information required: viewtopic.php?f=30&t=22603#p68963
-
- OpenVpn Newbie
- Posts: 8
- Joined: Sat Jan 08, 2022 6:11 am
Re: OpenVPN Connect v3.2.5 on Android not connecting
I got it working!! Everything in the .ovpn file is correct, the only thing missing was the 'secret' file. I never copied it over to the same directory where the .ovpn file was, which would explain why I was only seeing TCP connection (in the logs), but no mention of the username.
Thank you all for your assistance. You can mark this thread as solved!
Thank you all for your assistance. You can mark this thread as solved!