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!