longzuyuan / ics-openvpn

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

Cannot resolve host address (DNS fails) #127

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
1. Connect via App

Expected is a successful name resolution. Name resolution not working.

Google (LGE) Nexus 4
Android 4.2.1 stock

I set up OpenVPN yesterday and everything went well. I was able to connect with 
my phone as easy as pie. Today that didn't work out as it seems the DNS 
resolution fails. What's strange about that is that I am able to access the 
same host via HTTP using Chrome. I experimented with various configs on server 
and client side, but this does not look like a configuration error.
The server is sitting behind a firewall, but udp/1194 is being forwarded. I 
confirmed that by connecting with my laptop.

Configs and logs are attached.

I only post this because I really don't think it is a DNS issue. Maybe you can 
prove me wrong :)

Original issue reported on code.google.com by lorenz.l...@gmail.com on 1 Jan 2013 at 8:03

Attachments:

GoogleCodeExporter commented 9 years ago
You are using the remote-random-hostname. Is this on purpose? 

Original comment by arne@rfc2549.org on 1 Jan 2013 at 9:58

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
No, I removed that option and this resolved the issue.

The parameter name "remote-random-hostname" emphasizes "remote" more. In the 
App I misunderstood the meaning of this flag. I thought this refers to the 
hostname of the client device (or something similar). Please consider renaming 
the option (or it's description = "Adds 6 random chars in front of the *remote* 
hostname" or something the like), or add it to the FAQ.

Another improvement for me as user would be to print the full hostname 
(including random chars) in case it could not be resolved, then some bells 
would start ringing :)
Here it get's weird. Your code should log the full name after randomizataion 
(https://github.com/schwabe/openvpn/blob/new_socket/src/openvpn/socket.c#L241), 
but I am definately only seeing the base name.

Anyway, sorry for spamming your issue tracker, and great thanks for your fast 
answer. Have a wonderful new year!

Original comment by lorenz.l...@gmail.com on 1 Jan 2013 at 10:56

GoogleCodeExporter commented 9 years ago
You picked the wrong branch. The correct one is this 
https://github.com/schwabe/openvpn/blob/android_2.3rc1%2Bds/src/openvpn/socket.c
#L151 And I see the issue thanks.

Original comment by arne@rfc2549.org on 2 Jan 2013 at 9:58

GoogleCodeExporter commented 9 years ago
This issue was closed by revision cd873e0b5a5e.

Original comment by arne@rfc2549.org on 2 Jan 2013 at 10:41