Android OpenVPN

Search This thread

plarser48

Senior Member
Nov 19, 2011
54
3
AT&T

Just curious. Has anyone been able to consistently use an openvpn connection over AT&T 3G networks?

I ask because I've been experimenting a lot lately and discovered that some networks work well for VPN (wap.cingular) while others do not allow DNS resolving (pta APN).

How have you experiences been?
 

randrew2

Member
Jan 23, 2012
24
4
jakarta
  • Like
Reactions: hkfan

Guanfy

Senior Member
Feb 23, 2011
183
27
I'm trying to connect to an openvpn connection via the openvpn app available on the market. I'm running an Archos 70IT rooted with churli's root. When I try using a tcp connection, the status in the app switches to unknown and stays that way until timeout. If I try using a udp connection, I get "error: Cannot allocate TUN/TAP dynamically".

According to the installer app I have tun.ko installed, and I know that I have busy box installed. I've looked all over the place trying to find an answer to this and i'm stumped. Can anyone help me out?
 

randrew2

Member
Jan 23, 2012
24
4
jakarta
I'm trying to connect to an openvpn connection via the openvpn app available on the market. I'm running an Archos 70IT rooted with churli's root. When I try using a tcp connection, the status in the app switches to unknown and stays that way until timeout. If I try using a udp connection, I get "error: Cannot allocate TUN/TAP dynamically".

According to the installer app I have tun.ko installed, and I know that I have busy box installed. I've looked all over the place trying to find an answer to this and i'm stumped. Can anyone help me out?


have you tried to check "load the tunko modules" and choose "load tun.ko modules" -> insmod

and set the tun.ko location to "tun" (default)

if you have tried that but this's still not working, I guess the problem's because ifconfig and route didn't symlinked with busybox

try this:

- mount your /system/xbin (using root explorer)

- then, try to execute this command on terminal emulator:


mkdir /system/xbin/bb
ln -s /system/xbin/busybox /system/xbin/bb/ifconfig
ln -s /system/xbin/busybox /system/xbin/bb/route

- then unmount your /system/xbin

hope this helps :)
 

Guanfy

Senior Member
Feb 23, 2011
183
27
I did as you instructed, and saw a few different things

1. When I tried the module instructions, end result was an error message saying it couldn't load the module. Despite this error the connection process seemed to continue.

2. I setup the linkages that you typed out and it seemed to help somewhat. Now with both TCP and UDP connections I get a "reconnecting due to tls-error" which I wasn't getting before.

3. The handshake thus far goes like this now Startup--->User/Pass--->Unknown(sometimes)--->Wait--->Auth--->tls error or Unknown again--->Wait--->Auth. Then the cycle loops.

Thank you for your help thus far, still stumped though.
 

randrew2

Member
Jan 23, 2012
24
4
jakarta
I did as you instructed, and saw a few different things

1. When I tried the module instructions, end result was an error message saying it couldn't load the module. Despite this error the connection process seemed to continue.

2. I setup the linkages that you typed out and it seemed to help somewhat. Now with both TCP and UDP connections I get a "reconnecting due to tls-error" which I wasn't getting before.

3. The handshake thus far goes like this now Startup--->User/Pass--->Unknown(sometimes)--->Wait--->Auth--->tls error or Unknown again--->Wait--->Auth. Then the cycle loops.

Thank you for your help thus far, still stumped though.


hmm.. I think "tls" error caused by your config (maybe).. could you post your config here?

before that, try to uncheck "load tun modules" that should load tun.ko which's device's preloaded tun.ko
 

Guanfy

Senior Member
Feb 23, 2011
183
27
Ok, here's an example of the TCP config file I use


##############################################
# Sample client-side OpenVPN 2.0 config file #
# for connecting to multi-client server. #
# #
# This configuration can be used by multiple #
# clients, however each client should have #
# its own cert and key files. #
# #
# On Windows, you might want to rename this #
# file so it has a .ovpn extension #
##############################################

# Specify that we are a client and that we
# will be pulling certain config file directives
# from the server.
client

auth-user-pass
#management-query-passwords
#management-hold

# Disable management port for debugging port issues
#management 127.0.0.1 13010

ping 5
ping-exit 30

# Use the same setting as you are using on
# the server.
# On most systems, the VPN will not function
# unless you partially or fully disable
# the firewall for the TUN/TAP interface.
#;dev tap
dev tun

# Windows needs the TAP-Win32 adapter name
# from the Network Connections panel
# if you have more than one. On XP SP2,
# you may need to disable the firewall
# for the TAP adapter.
;dev-node MyTap

# Are we connecting to a TCP or
# UDP server? Use the same setting as
# on the server.
proto tcp
;proto udp

# The hostname/IP and port of the server.
# You can have multiple remote entries
# to load balance between the servers.
# All VPN Servers are added at the very end
;remote my-server-2 1194

# Choose a random host from the remote
# list for load-balancing. Otherwise
# try hosts in the order specified.
# We order the hosts according to number of connections.
# So no need to randomize the list
# remote-random

# Keep trying indefinitely to resolve the
# host name of the OpenVPN server. Very useful
# on machines which are not permanently connected
# to the internet such as laptops.
resolv-retry infinite

# Most clients don't need to bind to
# a specific local port number.
nobind

# Downgrade privileges after initialization (non-Windows only)
;user nobody
;group nobody

# Try to preserve some state across restarts.
persist-key
persist-tun

# If you are connecting through an
# HTTP proxy to reach the actual OpenVPN
# server, put the proxy server/IP and
# port number here. See the man page
# if your proxy server requires
# authentication.
;http-proxy-retry # retry on connection failures
;http-proxy [proxy server] [proxy port #]

# Wireless networks often produce a lot
# of duplicate packets. Set this flag
# to silence duplicate packet warnings.
;mute-replay-warnings

# SSL/TLS parms.
# See the server config file for more
# description. It's best to use
# a separate .crt/.key file pair
# for each client. A single ca
# file can be used for all clients.
ca ./keys/ca.crt
cert ./keys/hmauser.crt
key ./keys/hmauser.key

# Verify server certificate by checking
# that the certicate has the nsCertType
# field set to "server". This is an
# important precaution to protect against
# a potential attack discussed here:
# http://openvpn.net/howto.html#mitm
#
# To use this feature, you will need to generate
# your server certificates with the nsCertType
# field set to "server". The build-key-server
# script in the easy-rsa folder will do this.
;ns-cert-type server

# If a tls-auth key is used on the server
# then every client must also have the key.
;tls-auth ta.key 1

# Select a cryptographic cipher.
# If the cipher option is used on the server
# then you must also specify it here.
;cipher x

# Enable compression on the VPN link.
# Don't enable this unless it is also
# enabled in the server config file.
#comp-lzo

# Set log file verbosity.
verb 3

# Silence repeating messages
;mute 20

# Detect proxy auto matically
#auto-proxy

# Need this for Vista connection issue
route-metric 1

# Get rid of the cached password warning
#auth-nocache

#show-net-up
#dhcp-renew
#dhcp-release
#route-delay 0 120

# added to prevent MITM attack
ns-cert-type server

#
# Remote servers added dynamically by the master server
# DO NOT CHANGE below this line
#
remote 180.189.157.78:443 443 # 0


And here's an example of a UDP file that I use

##############################################
# Sample client-side OpenVPN 2.0 config file #
# for connecting to multi-client server. #
# #
# This configuration can be used by multiple #
# clients, however each client should have #
# its own cert and key files. #
# #
# On Windows, you might want to rename this #
# file so it has a .ovpn extension #
##############################################

# Specify that we are a client and that we
# will be pulling certain config file directives
# from the server.
client

auth-user-pass
#management-query-passwords
#management-hold

# Disable management port for debugging port issues
#management 127.0.0.1 13010

ping 5
ping-exit 30

# Use the same setting as you are using on
# the server.
# On most systems, the VPN will not function
# unless you partially or fully disable
# the firewall for the TUN/TAP interface.
#;dev tap
dev tun

# Windows needs the TAP-Win32 adapter name
# from the Network Connections panel
# if you have more than one. On XP SP2,
# you may need to disable the firewall
# for the TAP adapter.
;dev-node MyTap

# Are we connecting to a TCP or
# UDP server? Use the same setting as
# on the server.
;proto tcp
proto udp

# The hostname/IP and port of the server.
# You can have multiple remote entries
# to load balance between the servers.
# All VPN Servers are added at the very end
;remote my-server-2 1194

# Choose a random host from the remote
# list for load-balancing. Otherwise
# try hosts in the order specified.
# We order the hosts according to number of connections.
# So no need to randomize the list
# remote-random

# Keep trying indefinitely to resolve the
# host name of the OpenVPN server. Very useful
# on machines which are not permanently connected
# to the internet such as laptops.
resolv-retry infinite

# Most clients don't need to bind to
# a specific local port number.
nobind

# Downgrade privileges after initialization (non-Windows only)
;user nobody
;group nobody

# Try to preserve some state across restarts.
persist-key
persist-tun

# If you are connecting through an
# HTTP proxy to reach the actual OpenVPN
# server, put the proxy server/IP and
# port number here. See the man page
# if your proxy server requires
# authentication.
;http-proxy-retry # retry on connection failures
;http-proxy [proxy server] [proxy port #]

# Wireless networks often produce a lot
# of duplicate packets. Set this flag
# to silence duplicate packet warnings.
;mute-replay-warnings

# SSL/TLS parms.
# See the server config file for more
# description. It's best to use
# a separate .crt/.key file pair
# for each client. A single ca
# file can be used for all clients.
ca ca.crt
cert hmauser.crt
key hmauser.key

# Verify server certificate by checking
# that the certicate has the nsCertType
# field set to "server". This is an
# important precaution to protect against
# a potential attack discussed here:
# http://openvpn.net/howto.html#mitm
#
# To use this feature, you will need to generate
# your server certificates with the nsCertType
# field set to "server". The build-key-server
# script in the easy-rsa folder will do this.
;ns-cert-type server

# If a tls-auth key is used on the server
# then every client must also have the key.
;tls-auth ta.key 1

# Select a cryptographic cipher.
# If the cipher option is used on the server
# then you must also specify it here.
;cipher x

# Enable compression on the VPN link.
# Don't enable this unless it is also
# enabled in the server config file.
#comp-lzo

# Set log file verbosity.
verb 3

# Silence repeating messages
;mute 20

# Detect proxy auto matically
#auto-proxy

# Need this for Vista connection issue
route-metric 1

# Get rid of the cached password warning
#auth-nocache

#
# Remote servers added dynamically by the master server
# DO NOT CHANGE below this line
#
remote 72.55.153.75 53 # 0
 

randrew2

Member
Jan 23, 2012
24
4
jakarta
^ thats not what I mean. the config you attached was a config that comes with the installer. that absolutely won't work even you've tried to connect 1000 times :D

here I give you an example on the attachment..
read inside the config carefully, and place them on /sdcard/openvpn
dont forget to add ca.crt on the same folder.. ;)
 

Attachments

  • cfg.rar
    379 bytes · Views: 130

Guanfy

Senior Member
Feb 23, 2011
183
27
Randrew2, take a closer look at the two files I pasted. Those are config files, and they do work, otherwise I couldn't access this forum to talk to you. Do you need the keys and ca file or can you work from the config files?
 

artisticcheese

Senior Member
Aug 26, 2003
781
18
www.unixsucks.com
OpenVPN client does not get IP from VPN server

Hello,

My client connects successfully but never gets IP from VPN server. Same OVPN file works perfectly on Windows desktop. Do I need to put IP config in OVPN file or there is easier way to fix this?

Thanks,
G
 

totaluser

Member
Dec 16, 2010
30
0
Hello everybody,
I would like to ask if there is a more up-to-date OpenVPN binary than the 2.1.1 posted on the github
I would like to try OpenVPN 2.3 which has IPv6 capability on my Gingerbread based phone

Does anybody have such a binary or a guide how to crosscompile one?



Thank you very much in advance,
Best regards,
Martin
 

tonytang8006

Member
Sep 5, 2012
28
0
Ok I have set up my VPN, www.vcupone.com

I downloaded openvpn-ca.cer and clein-free.ovpn

I have copied both of them to SDCARD/openvpn,

Now when I turn on the openvpn, (check the box), then it could find Client-free.ovpn, it becomes 'resolve' but only in 1 second, then becomes 'wait' ....

wait for ever....

Anybody can let me know what's wrong with that?

Thanks.
 

iwanttoknow

Senior Member
Jun 21, 2016
523
105
Hi all,

Is today OpenVPN for Android offering SOCKS5 interface ?

Thanks in advance for your replies.


Envoyé de mon SM-A510F en utilisant Tapatalk
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    Hi,

    I successfully connected to the VPN server. However the tap doesn't seems to retrieve the IP address from the DHCP at the server. So, every time I connect to the VPN, I'll need to manually refresh the tap device ip manually by running "netcfg tap0 dhcp" using Terminal.

    I tried putting in this line in the conf file,
    Code:
    up "netcfg tap0 dhcp"

    but it doesn't run.

    Any help would be greatly appreciated.
    1
    does any one know...how to save the Username and password in OpenVPN ?..
    Am using OpenVPN in CM7 nightly

    just create a file named 'pass.txt' then enter your username and password like this:


    place the file inside the same folder with config

    then on your config, add this line:

    auth-user-pass pass.txt

    I hope that might help :)
    1
    Contact senior devlopers....

    Dont forget hitting thanks......