Community discussions

MikroTik App
 
User avatar
MTeeker
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 92
Joined: Tue Jun 14, 2011 2:42 pm
Location: Australia

OpenVPN and Android

Wed Oct 08, 2014 8:56 am

Hi,

I wonder if anyone has successfully managed to do so and would be so kind sharing their knowledge and point me in the right direction.

You see, I have successfully connected to my RB493G via OpenVPN and also the LAN behind it, using my WIN7 PC. I also can connect via OpenVPN to a USA-based VPN server on my Android tablet. It allows me to watch Netflix from outside USA. So my openVPN works on my Android tablet.

But have not been able to connect the MikroTik oVPN server from my Android tablet. I kept getting the messages alternating between 'connecting' and 'reconnecting'. And it stops after the set 5 times. I have searched low and high, tried various settings but to no avail. So I guess it's the issue with MikrotTik openVPN.

Much appreciate for your help.
Edited for clarity.
 
User avatar
MTeeker
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 92
Joined: Tue Jun 14, 2011 2:42 pm
Location: Australia

Re: OpenVPN and Android

Thu Oct 09, 2014 8:57 am

Nobody has ever used an Android tablet to connect to MikroTik's OpenVPN? Like to securely access the LAN behind it?
 
Ambul
just joined
Posts: 7
Joined: Sat Sep 27, 2014 7:56 pm

Re: OpenVPN and Android

Tue Oct 14, 2014 1:30 am

Can someone confirm? I'd also like to know.
 
User avatar
MTeeker
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 92
Joined: Tue Jun 14, 2011 2:42 pm
Location: Australia

Re: OpenVPN and Android

Sat Nov 15, 2014 8:23 am

Since the reply to my query was so overwhelming, [cough, cough], I feel my patience was tested to the limits at times with using MikroTik. But I love its value and full of features. I also wish some gentle push with appropriate efforts by MikroTik to make its products even more valuable in terms of finding out its features in a more systematic way.

I know my MCNA qualification does not mean I know all about MikroTik products. But I do own a copy of excellent 'RouterOS by Example' by Stephen R.W. Disher, as well as first edition of 'Learn RouterOS' by Dennis Burgess. But still found myself many times stumbling in the dark (so to speak) by lack of documented features by examples. Please do not see this as a complaint.

(I know of a certain IT company which asks chosen beta testers to help develop its product such as debugging and documentation before the product is released. The price to the company is relatively cheap: Beta testers got to keep the products they test. That's simple. I am one of their beta testers so I know but I can't name name.) [End of unsolicited advice] :-)

Back to the issue at hand, I finally resolved the issue after a lot of perseverance and time. I am glad to say that I can now connect to MikroTik (RB493G) via OpenVPN from my Android devices - one is my HTC Desire (h/ware is a bit old) running modified Cyanogen ROM (4.2.2); the other is my Acer A500 (also a few years old) tablet running modified Omni version 4.4.4. I used to connect via PPTP but it can be easily cracked (source Edward Snowden).

For those who are interested, I have to set OpenVPN server to IP mode for Android devices to connect. Whereas Windows can only connect if I set it to ethernet mode. In short, I can only connect one type of devices at a time but not Windows and Android at the same time. In addition the following script to make it to work (Android only) along these lines:

dev tun
proto tcp-client
remote pubic-ip-adress-of-Mikrotik-router (or your DNS name)
ca ca.crt
tls-client
#comp-lzo # Do not use compression.
persist-tun
persist-key
verb 3
cipher BF-CBC
auth SHA1
pull
route local-network-ip-adress netmask ip-adress-of-ovpnserver
# additional subnets on your local network s/be added here in the same format if you want access when connected.
auth-user-pass


Cheers
P.S. Now the question 'How to have Windows and Android connecting Mikrotik openVPN server at the same time? Or is it possible?
Over to expert. Anyone at all.
 
User avatar
MTeeker
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 92
Joined: Tue Jun 14, 2011 2:42 pm
Location: Australia

Re: OpenVPN and Android

Sun Nov 16, 2014 2:59 am

I got the answer to my own question at bottom of last post.

OpenVPN server cannot accept dev tun (i.e. Android device) and dev tap (i.e. Windows) as clients concurrently.

Use Ethernet mode for Windows-based device connection, and IP mode for Android devices. VPN providers must have different OVPN servers at their end to handle Windows connections separately from Android devices.

Please mark this issue resolved. Thank you.
 
MTikSeekeroe
newbie
Posts: 34
Joined: Fri Nov 06, 2009 5:12 am

Re: OpenVPN and Android

Thu May 07, 2015 9:20 am

A new PAID app on Google Play Store that allows Android-based devices to connect using TAP. Not TUN.

No more switching b/w TAP and TUN to suit Windows and Android prior to connection. Very neat.

https://play.google.com/store/apps/deta ... nvpn&hl=en

In case anybody is interested.
 
aleco18
just joined
Posts: 1
Joined: Sat Mar 03, 2018 6:25 pm

Re: OpenVPN and Android

Sat Mar 10, 2018 1:34 am

Since the reply to my query was so overwhelming, [cough, cough], I feel my patience was tested to the limits at times with using MikroTik. But I love its value and full of features. I also wish some gentle push with appropriate efforts by MikroTik to make its products even more valuable in terms of finding out its features in a more systematic way.

I know my MCNA qualification does not mean I know all about MikroTik products. But I do own a copy of excellent 'RouterOS by Example' by Stephen R.W. Disher, as well as first edition of 'Learn RouterOS' by Dennis Burgess. But still found myself many times stumbling in the dark (so to speak) by lack of documented features by examples. Please do not see this as a complaint.

(I know of a certain IT company which asks chosen beta testers to help develop its product such as debugging and documentation before the product is released. The price to the company is relatively cheap: Beta testers got to keep the products they test. That's simple. I am one of their beta testers so I know but I can't name name.) [End of unsolicited advice] :-)

Back to the issue at hand, I finally resolved the issue after a lot of perseverance and time. I am glad to say that I can now connect to MikroTik (RB493G) via OpenVPN from my Android devices - one is my HTC Desire (h/ware is a bit old) running modified Cyanogen ROM (4.2.2); the other is my Acer A500 (also a few years old) tablet running modified Omni version 4.4.4. I used to connect via PPTP but it can be easily cracked (source Edward Snowden).

For those who are interested, I have to set OpenVPN server to IP mode for Android devices to connect. Whereas Windows can only connect if I set it to ethernet mode. In short, I can only connect one type of devices at a time but not Windows and Android at the same time. In addition the following script to make it to work (Android only) along these lines:

dev tun
proto tcp-client
remote pubic-ip-adress-of-Mikrotik-router (or your DNS name)
ca ca.crt
tls-client
#comp-lzo # Do not use compression.
persist-tun
persist-key
verb 3
cipher BF-CBC
auth SHA1
pull
route local-network-ip-adress netmask ip-adress-of-ovpnserver
# additional subnets on your local network s/be added here in the same format if you want access when connected.
auth-user-pass


Cheers
P.S. Now the question 'How to have Windows and Android connecting Mikrotik openVPN server at the same time? Or is it possible?
Over to expert. Anyone at all.
Hello Friend, could you help me to connect my Android Phone to my OpenVPN Server installed in mikrotik? I´ve tryed to connect generating new certificates but I don´t know how config the Android OVPN client.
I agree if you could help me step by step the configuration.
Thanks very much
 
sebus504
newbie
Posts: 25
Joined: Thu Mar 29, 2012 10:30 pm

Re: OpenVPN and Android

Fri Apr 13, 2018 10:03 am

Hello, how can I connect the android to the ovpn server on mikrotik, the client on the windows connects but the android does not.
 
dave864
newbie
Posts: 34
Joined: Fri Mar 11, 2016 2:37 pm

Re: OpenVPN and Android

Sat Dec 01, 2018 10:47 pm

Could anyone help provide a real idiot guide to ovpn with Mikrotik and Android please?

I have tried making a cert and configuring the ovpn client but can't get it to work.

I have tired my certs generated, inside my Mikrotik, with L2TP and can't get that working either. All I can use is preshared keys!
 
dave864
newbie
Posts: 34
Joined: Fri Mar 11, 2016 2:37 pm

Re: OpenVPN and Android

Sat Dec 01, 2018 10:49 pm

My internal IP is 192.168.60.1 for the vpn elements.
Perhaps some of my error is with the certs so can we start there please?

Every guide ive read does the certs differently for SAN and most guide assume knowledge and miss out tons of details. I just can't get this working.
 
thedarknono
just joined
Posts: 1
Joined: Thu Jan 17, 2019 3:41 pm

Re: OpenVPN and Android

Sat Sep 28, 2019 4:06 pm

Hello,

If you want to add routes on client side compatible with the Android OpenVPN Connect app :
#0.0.0.0/1 and 128.0.0.0/1 toward the tunnel :
route 0.0.0.0 128.0.0.0 vpn_gateway
route 128.0.0.0 128.0.0.0 vpn_gateway

#Multicast range outside the tunnel :
route 224.0.0.0 240.0.0.0 net_gateway

You can't use the actual IP of the gateway anymore (which is an improvement).

Hope that help.

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 91 guests