serega1983 / android-openvpn-settings

Automatically exported from code.google.com/p/android-openvpn-settings
GNU General Public License v3.0
1 stars 0 forks source link

Got IP from VPNserver, connected, but ifconfig shows 192.168.74.255 for tap0 #134

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.using .ovpn config works on my pc
2.
3.

What is the expected output? What do you see instead?
192.168.74.XX (range 10-15), cant ping or connect to VPN network devices

What version of the product are you using?
latest

Which Android phone are you using?
HTC One X

Which firmware version are you using?
4.04

Please provide any additional information below.

client
dev tap
proto udp
remote my.dyndns.org 1194
resolv-retry infinite
nobind
persist-key
persist-tun
ca ca.crt
cert client1telepesserver.crt
key client1telepesserver.key
ns-cert-type server
comp-lzo
verb 3

log files on droid

Fri Jul 20 23:27:10 2012 MANAGEMENT: CMD 'bytecount 0'
Fri Jul 20 23:27:11 2012 SENT CONTROL [telepesserver]: 'PUSH_REQUEST' (status=1)
Fri Jul 20 23:27:11 2012 PUSH: Received control message: 
'PUSH_REPLY,route-gateway 192.168.74.4,ping 10,ping-restart 120,ifconfig 
192.168.74.12 255.255.255.0'
Fri Jul 20 23:27:11 2012 OPTIONS IMPORT: timers and/or timeouts modified
Fri Jul 20 23:27:11 2012 OPTIONS IMPORT: --ifconfig/up options modified
Fri Jul 20 23:27:11 2012 OPTIONS IMPORT: route-related options modified
Fri Jul 20 23:27:11 2012 TUN/TAP device tap0 opened
Fri Jul 20 23:27:11 2012 TUN/TAP TX queue length set to 100
Fri Jul 20 23:27:11 2012 MANAGEMENT: >STATE:1342819631,ASSIGN_IP,,192.168.74.12,
Fri Jul 20 23:27:11 2012 /system/bin/ifconfig tap0 192.168.74.12 netmask 
255.255.255.0 mtu 1500 broadcast 192.168.74.255
Fri Jul 20 23:27:11 2012 Initialization Sequence Completed
Fri Jul 20 23:27:11 2012 MANAGEMENT: 
>STATE:1342819631,CONNECTED,SUCCESS,192.168.74.12,86.101.7.61

reponse of 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:10438 errors:0 dropped:0 overruns:0 frame:0
          TX packets:10438 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:637178 (622.2 KiB)  TX bytes:637178 (622.2 KiB)

rmnet0    Link encap:Ethernet  HWaddr 56:A8:A0:49:A4:E9  
          inet addr:10.159.169.231  Bcast:255.255.255.255  Mask:0.0.0.0
          inet6 addr: fe80::54a8:a0ff:fe49:a4e9/64 Scope:Link
          UP BROADCAST RUNNING NOARP MULTICAST  MTU:1500  Metric:1
          RX packets:8749 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1034 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:2511177 (2.3 MiB)  TX bytes:118400 (115.6 KiB)

tap0      Link encap:Ethernet  HWaddr 0A:C8:31:EA:03:03  
          inet addr:192.168.74.255  Bcast:192.168.74.255  Mask:255.255.255.0
          inet6 addr: fe80::8c8:31ff:feea:303/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:629 errors:0 dropped:114 overruns:0 frame:0
          TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100 
          RX bytes:153029 (149.4 KiB)  TX bytes:468 (468.0 B)

Original issue reported on code.google.com by o...@mesterkez.hu on 20 Jul 2012 at 9:36

GoogleCodeExporter commented 9 years ago
same p

Original comment by maxi.cam...@gmail.com on 11 Aug 2012 at 8:25

GoogleCodeExporter commented 9 years ago
Same problem on a Samsung Galaxy S3 fw 4.04. Openvpn Settings 0.4.12
Seems to be a problem with how Openvpn calls ifconfig. If I connect and then in 
a terminal do su ifconfig tap0 192.168.52.57 (or the address that openvpn 
reports it has connected to) I can ping the VPN gateway but that's it.

Original comment by titom...@gmail.com on 28 Oct 2012 at 11:14

GoogleCodeExporter commented 9 years ago
The problem must have been that I somehow fumbled  the installation of Busybox. 
I went with the default and let it install to /system/bin instead of xbin. When 
I checked ifconfig and route in /system/bin they were links to toolbox instead 
of busybox. After much googling I pieced together the following procedure which 
fixed the problem for me. I don't presume to take any credit for this, the 
solution is around  there. I just had to adapt it to my installation. Here it 
is:

su
mount -o remount, rw /system
ln -s /system/bin/busybox /system/bin/ifconfig
ln -s /system/bin/busybox /system/bin/route
mount -o remount, ro /system

Original comment by titom...@gmail.com on 29 Oct 2012 at 10:54

GoogleCodeExporter commented 9 years ago
Error above, there should not be spaces after the commas in the mount commands.

Original comment by titom...@gmail.com on 29 Oct 2012 at 10:56

GoogleCodeExporter commented 9 years ago
I realized I forgot to mention that I had to delete the old links before making 
new ones. WIth that the complete procedure becomes:

su
mount -o remount,rw /system 
rm /system/bin/ifconfig
rm /system/bin/route
ln -s /system/bin/busybox /system/bin/ifconfig 
ln -s /system/bin/busybox /system/bin/route
mount -o remount,ro /system

The last bit is there to write-protect /system again so you don't mess up more 
than necessary. If your busybox is installed elsewhere the paths need to be 
adjusted accordingly. Take care, not having /system write-protected makes it 
easy to mess up

Original comment by titom...@gmail.com on 30 Oct 2012 at 7:45