Introducing XDA:DevCon – A Conference For Developers By Developers
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
royal66
Old
#101  
Member
Thanks Meter 4
Posts: 47
Join Date: Jul 2010
Default IP DHCP

I reflashed with this new rom:
[ROM] Official 2.2, with: busybox, old A2SD+, OpenVPN (TUN), EXT4 support, 802.11N

And it worked instantly


New problem
My OpenVPN server pushes DHCP IP addresses, this works great on win pc.

But the android phone doesn't get IP from the server?
 
blackxored
Old
#102  
Junior Member
Thanks Meter 1
Posts: 22
Join Date: May 2010
Have you tried to check remote set addresses on the openvpn app on the phone. Also setting dhcp won't enable you to get vpn ip addresses by itself.

Sent from my HTC Dream using XDA App
 
royal66
Old
#103  
Member
Thanks Meter 4
Posts: 47
Join Date: Jul 2010
Quote:
Originally Posted by blackxored View Post
Have you tried to check remote set addresses on the openvpn app on the phone. Also setting dhcp won't enable you to get vpn ip addresses by itself.

Sent from my HTC Dream using XDA App
What do you mean? VPN DNS preferences can`t help me here?
Remote adress are set in openvpn client config file and works fine as its connect to server.
Openvpn server push dhcp but the phone does not recieve dhcp from server.
On Pc this works fine.

I do not need DNS as I only access to my home and work network. Openvpn server
dont push internet traffic just local access.

Openvpn server: 192.168.10.1
Gateway: 192.168.10.1
DHCP range: 192.168.10.100-192.168.10.200

In Win 7 Openvpn create a virtuell network adapter that get IP from Openvpn server, maybe i need to config TUN to recieve ip from server?

Admit that i am on thin ice here, but hope someone understand my problem and have a solution?
 
rkantos
Old
#104  
Senior Member
Thanks Meter 1
Posts: 103
Join Date: Jun 2010
Quote:
Originally Posted by royal66 View Post
What do you mean? VPN DNS preferences can`t help me here?
Remote adress are set in openvpn client config file and works fine as its connect to server.
Openvpn server push dhcp but the phone does not recieve dhcp from server.
On Pc this works fine.

I do not need DNS as I only access to my home and work network. Openvpn server
dont push internet traffic just local access.

Openvpn server: 192.168.10.1
Gateway: 192.168.10.1
DHCP range: 192.168.10.100-192.168.10.200

In Win 7 Openvpn create a virtuell network adapter that get IP from Openvpn server, maybe i need to config TUN to recieve ip from server?

Admit that i am on thin ice here, but hope someone understand my problem and have a solution?
I also want to know how to get the traffic going trough OVPN..
 
Crusoe86
Old
(Last edited by Crusoe86; 7th August 2010 at 08:32 AM.)
#105  
Senior Member
Thanks Meter 25
Posts: 504
Join Date: Jan 2009
Location: Cologne
Quote:
Originally Posted by rkantos View Post
I also want to know how to get the traffic going trough OVPN..
Do you want to know how to route the full traffic (Internet etc. to the VPN tunnel)?

ATTENTION!!! You have to modifiy the adresses to fit in your system

dhcp-option DNS 192.168.1.1 (it sets the DNS to the specified address)
route-gateway 192.168.1.1 (this sets the gateway address)
redirect-gateway def1 (and this one routes the full traffic (including Internet) through the VPN tunnel)

I use this parameters in my Win7 config and it works well. These commands are available in Linux, too.

I hope this was what you searching for

BTW: I want to buy a Desire (with Froyo) and play with andriod on my HD2.
Is the "recovery mode" or what you all talking about also available on the "HD2 MOD". Or is this not possible? I mean these "adb" commands.

I need OpenVPN because my APN "wap.vodafone.de" is not support all needed features of the Desire (like HTC Weather for e.g.). On WM 6.5 I use "ProxyCap" but that is not available for Android. It makes the proxy available for all apps, also those who have no own proxysettings (like Live Messenger (please no alternatives to messengers with proxysupport )
If somebody has an alternative, then OpenVPN has a lower priority for me
OpenVPN Tutorial for FroYo
 
royal66
Old
#106  
Member
Thanks Meter 4
Posts: 47
Join Date: Jul 2010
[QUOTE=Crusoe86;7547611]Do you want to know how to route the full traffic (Internet etc. to the VPN tunnel)?

ATTENTION!!! You have to modifiy the adresses to fit in your system

dhcp-option DNS 192.168.1.1 (it sets the DNS to the specified address)
route-gateway 192.168.1.1 (this sets the gateway address)
redirect-gateway def1 (and this one routes the full traffic (including Internet) through the VPN tunnel)

I use this parameters in my Win7 config and it works well. These commands are available in Linux, too.

I hope this was what you searching for
/QUOTE]
Hello
I need only access to the LAN side of network as mention earlier in this thread.
The openvpn connects but i do not access the LAN, properly because it do not get IP adresses from the OPENVPN server.

My LAN setup:
Openvpn server: 192.168.10.10
Gateway: 192.168.10.1
DHCP range: 192.168.10.100-192.168.10.200

Is this correct?:
dhcp-option DNS 192.168.10.1
route-gateway 192.168.10.1
redirect-gateway def1: can I drop this if do not need internet to redirect?

Some question:
What about android device IP? doesnt it need IP in the same range(192.168.10.x) not joust gateway or DNS
This commands, in console? And before or after Openvpn connects?
Maybe it is possible to create a script every time openvpn starts, and run this commands?

Many question, hope you understand me.
Thanx
 
fiftyclick
Old
#107  
fiftyclick's Avatar
Senior Member
Thanks Meter 15
Posts: 165
Join Date: Sep 2007
Location: Toronto
Default OpenVPN connected & routed, but no browser?

Seems like i have an odd issue -- my browser seems to be the only thing that doesn't work right now. Emails, the XDA app, etc.. all work fine, just not the browser app..

traceroute is valid too, and the gateway is setup properly. On my laptop, using the same setup, it can access http just fine (and the XDA app shows that my phone is doing it fine too).

any suggestions? Could it be related to apn settings?
Phone: Samsung Galaxy Nexus
Carrier: Bell Mobility
Plan: $51+tax: Unlimited voice/sms/data/roaming/long distance
 
Crusoe86
Old
#108  
Senior Member
Thanks Meter 25
Posts: 504
Join Date: Jan 2009
Location: Cologne
Quote:
Originally Posted by rkantos View Post
I also want to know how to get the traffic going trough OVPN..
Hey
Take a look at my tutorial
Maybe it helps you with your configuration
OpenVPN Tutorial for FroYo
 
jeroen__online
Old
(Last edited by jeroen__online; 20th September 2010 at 11:12 AM.) Reason: fixed
#109  
Junior Member
Thanks Meter 2
Posts: 11
Join Date: Sep 2010
Default dns problem

Hi, I'm having a rather strange problem with OpenVPN-settings on OpenDesire 4.0.x. Openvpn works fine through Wifi, but it fails when I try to connect through 2G/3G. It seems like it has something to do with DNS resolving of the Openvpn monitor interface, but I don't know how to resolve it. Here's the relevant logcat part:
Code:
D/OpenVPN-DaemonMonitor[/sdcard/openvpn/myserver.ovpn]-mgmt(  833): attach():using management port at 53105
E/OpenVPN-DaemonMonitor[/sdcard/openvpn/myserver.ovpn]-mgmt(  833): attaching to OpenVPN daemon
E/OpenVPN-DaemonMonitor[/sdcard/openvpn/myserver.ovpn]-mgmt(  833): java.net.UnknownHostException: localhost
E/OpenVPN-DaemonMonitor[/sdcard/openvpn/myserver.ovpn]-mgmt(  833):   at java.net.InetAddress.lookupHostByName(InetAddress.java:504)
E/OpenVPN-DaemonMonitor[/sdcard/openvpn/myserver.ovpn]-mgmt(  833):   at java.net.InetAddress.getLocalHost(InetAddress.java:459)
E/OpenVPN-DaemonMonitor[/sdcard/openvpn/myserver.ovpn]-mgmt(  833):   at de.schaeuffelhut.android.openvpn.service.ManagementThread.attach(DaemonMonitor.java:4
05)
E/OpenVPN-DaemonMonitor[/sdcard/openvpn/myserver.ovpn]-mgmt(  833):   at de.schaeuffelhut.android.openvpn.service.ManagementThread.run(DaemonMonitor.java:351)

V/OpenVPN-DaemonMonitor[/sdcard/openvpn/myserver.ovpn]-mgmt(  833): Could not attach to OpenVPN monitor port
D/OpenVPNDaemonEnabler(  833): Received OpenVPN daemon state changed from Unknown to Disabled
D/OpenVPN-DaemonMonitor[/sdcard/openvpn/myserver.ovpn]-mgmt(  833): terminated
It fails on a "java.net.UnknownHostException: localhost", so it looks like disabling Wifi is breaking DNS (even for localhost) resolving? It works fine when I start OpenVPN-settings when Wifi is connected, then disable wifi and enable 'myserver.ovpn' in the app, but fails when wifi hasn't been connected. There is an entry linking 127.0.0.1 to 'localhost' in /etc/hosts.

Any help is very much appreciated!

EDIT: this was solved by removing the line "::1 localhost" from both /etc/hosts and /system/etc/hosts, I'm not sure why it's there but it solves my issue.
 
buckminst
Old
(Last edited by buckminst; 13th October 2010 at 02:30 AM.)
#110  
Junior Member
Thanks Meter 0
Posts: 4
Join Date: Oct 2010
Quote:
Originally Posted by jeroen__online View Post
EDIT: this was solved by removing the line "::1 localhost" from both /etc/hosts and /system/etc/hosts, I'm not sure why it's there but it solves my issue.
FYI, ::1 is the IPv6 version of the local loopback address.
If the ::1 localhost definition was the only one and your kernel doesn't have IPv6 support, name resolution will fail.

 
Post Reply+
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Go to top of page...