Community discussions

MikroTik App
 
bormar81
just joined
Topic Author
Posts: 4
Joined: Thu Jan 17, 2019 2:46 pm

Open vpn android

Sun Jan 20, 2019 8:31 pm

I set the open vpn server in my microtik, it works correctly with the various clients copying the files in the configuration folder of open vpn but I have problems with the configuration on android that gives me the error there was an error attempting to connect to the selected server.
The export of the various files is done correctly and asks me when creating username and password, the problem arises when I make the connection.

Here is my .ovpn configuration file:

client
dev tun
proto tcp
remote my public ip 1194
infinite resolv-retry
nobind
persist-key
persist-tun
approx
cert client.crt
key client.key
remote-cert-tls server
cipher AES-128-CBC
auth SHA1
auth-user-pass
redirect-gateway def1
verb 3

How can I solve?

Thank you

Marco
 
pegasus123
Frequent Visitor
Frequent Visitor
Posts: 58
Joined: Tue Jul 24, 2018 7:02 am

Re: Open vpn android

Mon Jan 21, 2019 1:59 pm

if not done already you must use absolutepath for the following of your files like /sdcard/client.crt
 
bormar81
just joined
Topic Author
Posts: 4
Joined: Thu Jan 17, 2019 2:46 pm

Re: Open vpn android

Wed Jan 23, 2019 1:36 am

I solved by creating a .p12 file by following this procedure:
openssl pkcs12 -export -in my-vpn.crt -inkey my-vpn.key -certfile my-ca.crt -out my-vpn.p12

Remove these:

ca my-ca.crt
cert my-vpn.crt
key my-vpn.key

Add this

pkcs12 my-vpn.p12

Now Open Vpn work correctly-

Thanks,
 
juapia
just joined
Posts: 2
Joined: Tue Feb 03, 2015 5:52 am

Re: Open vpn android

Fri Feb 07, 2020 12:12 am

Good Afternoon,

I am having problems connecting form my mobile device as well. I am able to connect through a windows OpenVPN client with a CA.cert, Client.cert, and Client.key.

May I ask for more detail instructions of the ssl command to convert the tee files into a p12? Also, may I ask how is the .ovpn file configured after the changes to the cert files.

Best Regads!

JP.
 
rwinnik
just joined
Posts: 2
Joined: Fri Apr 29, 2016 5:06 pm

Re: Open vpn android

Wed Apr 01, 2020 12:43 am

2 simple questions.
1. PK12 file that was converted and subbed in the opvpn file, was that of the CA, Client or the Server? The process I followed had you make the CA, the CLient and Server certs/key files. I figure I would just have to export that in the PK12 form.

2. Since you are using the PK12 file, you can not use the uniform method of the openvpn file (imbeding the certs and key in the config file). So my question, what is the location for the PK12 file on the android device?

I hope these questions are clear.

I followed this process for my first walk through, https://www.youtube.com/watch?v=6l1sYGLrlz0. It is very good and about three minutes into the video he performs the key generation and about 5:34 minutes he exports the keys. On the web version, you can pick PEM/PK12 format. I was going to use this to export the certs and keys.
.

Who is online

Users browsing this forum: Shambler and 122 guests