[Desire HD Android Development] Crusoe86:
Hi mike,

I have a problem with OpenVPN...

It connects, but no traffic is passing the VPN.

My Server Config (It is a DD-WRT):

proto tcp-server
port 443
dev tap0
ping 15
ping-restart 45
comp-lzo

push "ping 15"
push "ping-restart 45"
#push "route 192.168.1.0 255.255.255.0"
push "route-gateway 192.168.1.1"
push "redirect-gateway def1"
push "dhcp-option DNS 192.168.1.1"

tls-server
ca /tmp/ca.crt
dh /tmp/dh384.pem
cert /tmp/server.crt
key /tmp/server.key

My Client Config:

remote *** 443
client
proto tcp
tls-client
ca ca.crt
cert Chris.crt
key Chris.key
ifconfig 192.168.1.200 255.255.255.0
http-proxy ***
http-proxy-retry
http-proxy-option AGENT HTC_Touch_HD_T8282 Mozilla/4.0 (compatible; MSIE 6.0; Windows CE; IEMobile 7.11)
dev tap
dev-node /dev/tun
resolv-retry infinite
persist-key
persist-tun
script-security 2
verb 3
log status.log
comp-lzo

If I connect from a Windows CLient, all is working fine...

With Android, the tunnel establish, but no ping or data is reaching each other.

Only the keep-alive packets are transmitted, because the tunnel does not disconnect.

Output of "busybox route":

Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
213.196.212.73 10.30.31.65 255.255.255.255 UGH 0 0 0 rmnet0
10.30.31.64 * 255.255.255.252 U 0 0 0 rmnet0
192.168.1.0 * 255.255.255.0 U 0 0 0 tap0
default 192.168.1.1 128.0.0.0 UG 0 0 0 tap0
128.0.0.0 192.168.1.1 128.0.0.0 UG 0 0 0 tap0
default 10.30.31.65 0.0.0.0 UG 0 0 0 rmnet0

Output of "busybox ifconfig":

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:4639 errors:0 dropped:0 overruns:0 frame:0
TX packets:4639 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:242646 (236.9 KiB) TX bytes:242646 (236.9 KiB)

rmnet0 Link encap:Ethernet HWaddr BE:DF:11:D2:F7:E2
inet addr:10.30.31.66 Bcast:10.30.31.67 Mask:255.255.255.252
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:27484 errors:0 dropped:0 overruns:0 frame:0
TX packets:30438 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:20048028 (19.1 MiB) TX bytes:3165261 (3.0 MiB)

tap0 Link encap:Ethernet HWaddr BE:0E:68:92:B9:56
inet addr:192.168.1.200 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::bc0e:68ff:fe92:b956/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:278 errors:0 dropped:0 overruns:0 frame:0
TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:56600 (55.2 KiB) TX bytes:468 (468.0 B)

Output of Logfile:

Mon Aug 22 16:14:17 2011 OpenVPN 2.1_rc15 i686-pc-linux-gnu [SSL] [LZO2] [EPOLL] built on Jan 21 2010
Mon Aug 22 16:14:17 2011 MANAGEMENT: TCP Socket listening on 127.0.0.1:30347
Mon Aug 22 16:14:17 2011 WARNING: using --pull/--client and --ifconfig together is probably not what you want
Mon Aug 22 16:14:17 2011 WARNING: No server certificate verification method has been enabled. See http://openvpn.net/howto.html#mitm for more info.
Mon Aug 22 16:14:17 2011 NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
Mon Aug 22 16:14:17 2011 WARNING: file 'Chris.key' is group or others accessible
Mon Aug 22 16:14:17 2011 LZO compression initialized
Mon Aug 22 16:14:17 2011 Control Channel MTU parms [ L:1576 D:140 EF:40 EB:0 ET:0 EL:0 ]
Mon Aug 22 16:14:17 2011 Data Channel MTU parms [ L:1576 D:1450 EF:44 EB:135 ET:32 EL:0 AF:3/1 ]
Mon Aug 22 16:14:17 2011 Local Options hash (VER=V4): '31fdf004'
Mon Aug 22 16:14:17 2011 Expected Remote Options hash (VER=V4): '3e6d1056'
Mon Aug 22 16:14:17 2011 Attempting to establish TCP connection with 213.196.212.73:443 [nonblock]
Mon Aug 22 16:14:18 2011 TCP connection established with 213.196.212.73:443
Mon Aug 22 16:14:18 2011 Socket Buffers: R=[87380->131072] S=[16384->131072]
Mon Aug 22 16:14:18 2011 TCPv4_CLIENT link local: [undef]
Mon Aug 22 16:14:18 2011 TCPv4_CLIENT link remote: 213.196.212.73:443
Mon Aug 22 16:14:19 2011 TLS: Initial packet from 213.196.212.73:443, sid=d510b9ff 17b00fd1
Mon Aug 22 16:14:19 2011 MANAGEMENT: Client connected from 127.0.0.1:30347
Mon Aug 22 16:14:25 2011 VERIFY OK: depth=1, /C=DE/ST=NRW/L=Cologne/O=Privat/OU=n/a/CN=Server-CA/emailAddress=Crusoe86@web.de
Mon Aug 22 16:14:25 2011 VERIFY OK: depth=0, /C=DE/ST=NRW/O=Privat/OU=n/a/CN=Server/emailAddress=Crusoe86@web.de
Mon Aug 22 16:14:30 2011 Data Channel Encrypt: Cipher 'BF-CBC' initialized with 128 bit key
Mon Aug 22 16:14:30 2011 Data Channel Encrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Mon Aug 22 16:14:30 2011 Data Channel Decrypt: Cipher 'BF-CBC' initialized with 128 bit key
Mon Aug 22 16:14:30 2011 Data Channel Decrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Mon Aug 22 16:14:30 2011 Control Channel: TLSv1, cipher TLSv1/SSLv3 DHE-RSA-AES256-SHA, 384 bit RSA
Mon Aug 22 16:14:30 2011 [Server] Peer Connection Initiated with 213.196.212.73:443
Mon Aug 22 16:14:31 2011 MANAGEMENT: >STATE:1314022471,GET_CONFIG,,,
Mon Aug 22 16:14:31 2011 SENT CONTROL [Server]: 'PUSH_REQUEST' (status=1)
Mon Aug 22 16:14:31 2011 PUSH: Received control message: 'PUSH_REPLY,ping 15,ping-restart 45,route-gateway 192.168.1.1,redirect-gateway def1,dhcp-option DNS 192.168.1.1'
Mon Aug 22 16:14:31 2011 OPTIONS IMPORT: timers and/or timeouts modified
Mon Aug 22 16:14:31 2011 OPTIONS IMPORT: route options modified
Mon Aug 22 16:14:31 2011 OPTIONS IMPORT: route-related options modified
Mon Aug 22 16:14:31 2011 OPTIONS IMPORT: --ip-win32 and/or --dhcp-option options modified
Mon Aug 22 16:14:31 2011 ROUTE default_gateway=10.30.31.65
Mon Aug 22 16:14:31 2011 TUN/TAP device tap0 opened
Mon Aug 22 16:14:31 2011 TUN/TAP TX queue length set to 100
Mon Aug 22 16:14:31 2011 MANAGEMENT: >STATE:1314022471,ASSIGN_IP,,192.168.1.200,
Mon Aug 22 16:14:31 2011 /system/xbin/bb/ifconfig tap0 192.168.1.200 netmask 255.255.255.0 mtu 1500 broadcast 192.168.1.255
Mon Aug 22 16:14:31 2011 /system/xbin/bb/route add -net 213.196.212.73 netmask 255.255.255.255 gw 10.30.31.65
Mon Aug 22 16:14:31 2011 /system/xbin/bb/route add -net 0.0.0.0 netmask 128.0.0.0 gw 192.168.1.1
Mon Aug 22 16:14:31 2011 /system/xbin/bb/route add -net 128.0.0.0 netmask 128.0.0.0 gw 192.168.1.1
Mon Aug 22 16:14:31 2011 Initialization Sequence Completed
Mon Aug 22 16:14:31 2011 MANAGEMENT: >STATE:1314022471,CONNECTED,SUCCESS,192.168.1.200,213.196.212.73

Maybe you or someone can help me with this :(