The server log when the connection gets refused:

Thu Sep  1 10:35:14 2011 someuser/my.ip.add.res:41091 PUSH: Received control message: 'PUSH_REQUEST'
Thu Sep  1 10:35:14 2011 someuser/my.ip.add.res:41091 SENT CONTROL [someuser]: 'PUSH_REPLY,route 192.168.0.0 255.255.0.0,dhcp-option DNS 192.168.0.1,route-gateway 192.168.7.1,ping 10,ping-restart 120,ifconfig 192.168.7.10 255.255.0.0' (status=1)
Thu Sep  1 10:35:14 2011 read UDPv4 [ECONNREFUSED]: Connection refused (code=111)

On Android I am using tap device. In Openvpn -> advanced Settings I have specified the location of ta.key file.

Logcat output from Adnroid device:

I/mtpd    ( 2509): Using protocol openvpn
I/mtpd    ( 2509): Starting openvpn (pppox = -1)
I/mtpd    ( 2509): openvpn started (pid = 2511)
I/openvpn ( 2288): WARNING: you are using user/group/chroot/setcon without persist-tun -- this may cause restarts to fail
I/openvpn ( 2288): WARNING: No server certificate verification method has been enabled.  See http://openvpn.net/howto.html#mitm for more info.
I/openvpn ( 2288): NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
I/openvpn ( 2288): WARNING: file '/mnt/sdcard/key/ta.key' is group or others accessible
I/openvpn ( 2288): Control Channel Authentication: using '/mnt/sdcard/key/ta.key' as a OpenVPN static key file
I/openvpn ( 2288): LZO compression initialized
I/openvpn ( 2288): NOTE: UID/GID downgrade will be delayed because of --client, --pull, or --up-delay
I/openvpn ( 2288): UDPv4 link local: [undef]
I/openvpn ( 2288): UDPv4 link remote: my.ip.add.res:41111
I/openvpn ( 2288): [server] Peer Connection Initiated with my.ip.add.res:41111

Note: my.ip.add.res is the server ip address.

link|improve this question

69% accept rate
What's your OpenVPN config look like (strip any sensitive parts)? Can you repeat the test with the server's logging verbosity turned up (say, verb 5)? – Shane Madden Sep 1 '11 at 5:36
feedback

1 Answer

Is your local iptables FW blocking outgoing connections ?

link|improve this answer
I have not specified any rules for iptables on Android. And my client network firewall isn't blocking anything, as another desktop device, which is on the same network, connects with the openvpn server without any issue. – nixnotwin Sep 1 '11 at 8:03
Are you trying to connect over a GSM/UMTS Connection or WLAN ? – Izac Sep 1 '11 at 10:36
Both, tried it several time without any success. – nixnotwin Sep 1 '11 at 10:54
Mh can you try to establish the connection from a pc and see if that works. – Izac Sep 3 '11 at 10:01
Yes, pc connection works fine. – nixnotwin Sep 4 '11 at 2:54
show 1 more comment
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.