Community discussions

MikroTik App
 
artbybart
just joined
Topic Author
Posts: 9
Joined: Wed Dec 08, 2021 8:54 pm

OpenVPN Connect v3.2.5 on Android not connecting

Mon Jan 10, 2022 4:07 am

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 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 file 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>

Thank you for your assistance!
 
AlexM2020
newbie
Posts: 30
Joined: Sat Jan 04, 2020 12:19 pm

Re: OpenVPN Connect v3.2.5 on Android not connecting

Mon Jan 10, 2022 10:10 am

Good morning,
I found an identical problem in the various attempts to make an OpenVPN server on mikrotik reachable with Android or IOS clients.
Apparently any OpenVPN server configuration on mikrotik is not compatible with mobile clients (OpenVPN Connect) if you do the same test with a linux or windows pc it works fine.
Honestly I have not reached the point of reference to this problematic point, looking in the various forums have come to the same conclusion.
I have solved with OpenVPN Linux servers.
 
artbybart
just joined
Topic Author
Posts: 9
Joined: Wed Dec 08, 2021 8:54 pm

Re: OpenVPN Connect v3.2.5 on Android not connecting

Wed Jan 12, 2022 10:36 pm

I finally got it working!!

Bottom Line: Everything in the .ovpn file and server are 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!
 
resca
newbie
Posts: 33
Joined: Sat Mar 26, 2016 12:23 pm

Re: OpenVPN Connect v3.2.5 on Android not connecting

Mon Feb 21, 2022 5:08 pm

You are several steps ahead of me!!!
How did you create the .ovpn file?
And, my further question would be: where did you get this .secret file?
I just generated ca and branch certificates and the branch key, nothing else.
Thanks.
 
User avatar
own3r1138
Long time Member
Long time Member
Posts: 689
Joined: Sun Feb 14, 2021 12:33 am
Location: Pleiades
Contact:

Re: OpenVPN Connect v3.2.5 on Android not connecting

Mon Feb 21, 2022 9:06 pm

@resca
How did you create the .ovpn file?
You can copy&paste the setting in a text editor and save it as a .ovpn file.
And, my further question would be: where did you get this.secret file?.

This is still not implanted in MT RouterOS.

Who is online

Users browsing this forum: Bing [Bot], normis and 197 guests