linmaogithub / android-openvpn-settings

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

Can't get IP from VPN server #79

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
OpenVPN server : DD-WRT in router
My OpenVPN client works fine in Windows, but doesn't work in Android.
I found the problem is caused by the tap0 interface can't get IP from VPN 
server.
After I connect to the VPN server, I use ConnectBot to key in the following 
commands:
>netcfg tap0 dhcp
>route add -net 0.0.0.0 netmask 128.0.0.0 gw 192.168.10.1
>route add -net 128.0.0.0 netmask 128.0.0.0 gw 192.168.10.1
Then the OpenVPN in Android works fine.
Is it possible to be fixed in OpenVPN Settings?

Original issue reported on code.google.com by gemma.yc...@gmail.com on 8 Jul 2011 at 6:14

GoogleCodeExporter commented 8 years ago
What do you send those commands to? The server?

Original comment by todda...@gmail.com on 1 Aug 2011 at 12:04

GoogleCodeExporter commented 8 years ago
To Android system

Original comment by gemma.yc...@gmail.com on 1 Aug 2011 at 5:17

GoogleCodeExporter commented 8 years ago
I had a similar problem...
If I don't set a "ifconfig" parameter in the client config, the tap0 device 
won't come up.
Now I can use OpenVPN with my DD-WRT Router and Android device HTC DesireHD and 
"Fix HTC Routes" option enabled.

Original comment by crusoe2...@googlemail.com on 25 Aug 2011 at 6:26

GoogleCodeExporter commented 8 years ago

Original comment by friedrich.schaeuffelhut on 27 Jan 2012 at 9:18

GoogleCodeExporter commented 8 years ago
can u  tell how  u  set the "ifconfig" parameter in the client config ?   
 i  have the same problem,and  still not be sovled.

Comment 3 by crusoe2...@gmail.com, Aug 24, 2011
I had a similar problem...
If I don't set a "ifconfig" parameter in the client config, the tap0 device 
won't come up.
Now I can use OpenVPN with my DD-WRT Router and Android device HTC DesireHD and 
"Fix HTC Routes" option enabled.

Original comment by 54yangxi...@gmail.com on 18 Apr 2012 at 6:36

GoogleCodeExporter commented 8 years ago
i used “netcfg tap0 dhcp”  
but it‘s not use for me 
  action 'dhcp' failed (timer expired)

Original comment by 54yangxi...@gmail.com on 19 Apr 2012 at 4:26

GoogleCodeExporter commented 8 years ago
While I can manually execute "netcfg tap0 dhcp" from the Terminal after a 
successful OpenVPN connection, I have been unable to add this as a script via 
the --up directive. For instance, in my ovpn profile:
up "/system/bin/sh /sdcard/openvpn/postconnect.sh"

and the postconnect.sh script:
#!/system/bin/sh
/system/bin/sh /system/bin/netcfg tap0 dhcp

Can anyone give me some pointers?

Original comment by jaul...@gmail.com on 20 Jun 2013 at 4:01