loonuae / android-openvpn-settings

Automatically exported from code.google.com/p/android-openvpn-settings
0 stars 0 forks source link

"Use VPN DNS" When Reconnecting #21

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. In preference, select "Use VPN DNS Server", and fill in the IP of the 
VPN DNS server.
2. Connect to the VPN server.
3. After successful connection, restart VPN server service. 
4. The client (phone) will try to reconnect, and then get stuck 
at "Resolve".

What is the expected output? What do you see instead?

When the VPN connection is lost, system DNS is reset to the 3G data DNS 
server instantly. This is correct and can be seen from "getprop net.dns1" 
or from the popup of "Fix DNS". At this time, OpenVPN Settings should have 
no problem resolve the IP of the VPN server using the 3G data DNS server 
when it tries to reconnect. However, for some reason, it get stuck here 
and cannot resolve the IP of the VPN server. I haven't read the code, but 
my guess is that the process is still using the VPN DNS server to resolve 
the IP of the VPN server while it cannot reach the VPN DNS server before 
the VPN channel is established.

What version of the product are you using? On what operating system?

Latest version of 0.4.4. Phone is Tmobile G1 with Cyanogenmod 4.2.15.1.

Please provide any additional information below.

Every time I woke up the phone, I found the VPN was disconnected and stuck 
at "Resolve". I have to click to disable the channel, wait for a minute 
for the channel to recover (be able to click to turn on again). It looks 
like the VPN was unable to resolve the IP of the VPN server after the 
connection was lost and trying to reconnect. 

Original issue reported on code.google.com by jac...@gmail.com on 12 Apr 2010 at 8:58

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Hmm, seems more like a race condition between openvpn and OpenVPN-Settings. If
openvpn sends it's DNS request before OpenVPN-Settings could revert the 
DNS-Server
DNS lookups will fail.

Ideally OpenVPN-Settings would use the hold feature to avoid this situation.

Original comment by friedrich.schaeuffelhut on 30 Apr 2010 at 7:37

GoogleCodeExporter commented 8 years ago
Yes, it is more like a race condition. I deleted my last comment because I 
found my 
method (NAT rule to intercept port 53 DNS request) would still fail 
occasionally  
and leave the VPN client stuck in "resolve" status, which means the following 
two 
situations are both possible, 

1. The DNS request (to 3G DNS server) is sent over to the VPN server.
2. The DNS request (to VPN's DNS server) is sent to the 3G network.

Original comment by jac...@gmail.com on 1 May 2010 at 1:28

GoogleCodeExporter commented 8 years ago
I changed the VPN's DNS server to a public one and the client would still get 
stuck 
at "resolve" sometimes with my DNS NAT rule running. This could possibly mean 
that 
the above case 2 is not happening. Maybe the DNS request (to 3G DNS server) is 
sent 
over to the VPN server when the tunnel is closed and the VPN server is blocking 
the 
data before the client is re-auth'ed.

Original comment by jac...@gmail.com on 2 May 2010 at 4:02

GoogleCodeExporter commented 8 years ago
I confirmed the above guess in comment 4. When the OpenVPN-Settings is stuck 
at "resovle", the VPN channel has already been closed but the route table is 
not 
cleaned up and still pointed the gateway to the VPN server.

I have another thought (unrelated to this problem). OpenVPN-Settings can use 
the 
output from openvpn to find out and set up the server pushed DNS automatically, 
if 
the user does not choose to manually override. 

Original comment by jac...@gmail.com on 23 May 2010 at 12:17

GoogleCodeExporter commented 8 years ago
Is there a workaround for the issue? Very frustrating to wait to reconnect for 
more 
than a minute every time the phone looses 3G. 

Original comment by iurie.bo...@gmail.com on 4 Jun 2010 at 10:04

GoogleCodeExporter commented 8 years ago

Original comment by friedrich.schaeuffelhut on 16 Sep 2010 at 2:14

GoogleCodeExporter commented 8 years ago

Original comment by friedrich.schaeuffelhut on 16 Sep 2010 at 3:37

GoogleCodeExporter commented 8 years ago
Till the "bug" have fixed-state u can get the app "set dns". I entered the DNS 
for the VPN and the Google ones. Now i can work with the openvpn-seetings app :)

so long zeitsofa

Original comment by zeits...@gmail.com on 14 Oct 2011 at 10:54

GoogleCodeExporter commented 8 years ago
Issue 48 has been merged into this issue.

Original comment by friedrich.schaeuffelhut on 28 Dec 2011 at 11:52

GoogleCodeExporter commented 8 years ago

Original comment by friedrich.schaeuffelhut on 27 Jan 2012 at 8:34

GoogleCodeExporter commented 8 years ago
Very godnicly

Original comment by Dinoband...@gmail.com on 10 Mar 2014 at 11:33