[SOLVED] Local DNS with BIND and Android OS name resolution problem

Issues related to configuring your network
Post Reply
Greg767
Posts: 6
Joined: 2012/09/28 09:28:22

[SOLVED] Local DNS with BIND and Android OS name resolution problem

Post by Greg767 » 2012/09/28 09:43:30

Hi All,

I have a small local webserver that is connected to a wireless access point that has DHCP. The DHCP sends the server's IP as well as DNS server.
Server's hostname is ttserver, the domain is tt.blu.

When I connect either windows or iOS on the AP, it resolves ttserver.tt.blu correctly, so I can access my web directories typing the [name]/webdir.
But when I connect an Android device, ttserver.tt.blu returns page not found and directories are not found either. Of course, if I enter the IP of the server it shows the standard apache webpage on the Android device as well.

So can it be Bind config problem or is it Android related? Is there a way to see whats going on when there is request from the Android device?

Thanks a lot
Greg

Greg767
Posts: 6
Joined: 2012/09/28 09:28:22

Re: Local DNS with BIND and Android OS name resolution problem

Post by Greg767 » 2012/09/28 09:53:04

I just read in another thread about ipcop or pfsense.
Would any of these be able to resolve the server's name for clients (mobile devices) connected to the AP? The goal would be that clients connected to the AP don't need to type IP address to get to the webdirectory.

Thanks
Greg

User avatar
TrevorH
Site Admin
Posts: 33277
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

[SOLVED] Local DNS with BIND and Android OS name resolution

Post by TrevorH » 2012/09/28 11:00:22

Install wireshark on the server and run it to trace DNS packets so that you can see what the Android device is asking for - if it's asking your DNS server for anything. If no packets show up then it probably isn't using the DNS server from the DHCP info - perhaps it's been hardcoded in the device network settings?

Greg767
Posts: 6
Joined: 2012/09/28 09:28:22

Re: Local DNS with BIND and Android OS name resolution problem

Post by Greg767 » 2012/09/28 12:51:41

OK thanks a lot for the quick reply, I will try that.

Greg

driftwood
Posts: 119
Joined: 2012/01/26 14:40:16

Re: Local DNS with BIND and Android OS name resolution problem

Post by driftwood » 2012/09/28 15:05:50

ipcop and pfsense aren't applications, they are firewall distros, requiring a dedicated machine (which can be an old one).
I suggested them to that other guy as they have user-friendly i/f's to iptables, and I thought he was getting in out of his depth as a newbie trying to hack iptables directly.
I don't think they are relevant to your problem, TrevorH suggestion seems sensible, as usual.

Greg767
Posts: 6
Joined: 2012/09/28 09:28:22

Re: Local DNS with BIND and Android OS name resolution problem

Post by Greg767 » 2012/09/28 15:59:09

Okay thanks driftwood for the explanations.
I'll get back with the results.

Greg

Greg767
Posts: 6
Joined: 2012/09/28 09:28:22

Re: Local DNS with BIND and Android OS name resolution problem

Post by Greg767 » 2012/09/28 19:46:44

So looking at wireshark output, the IOS browser sends an A query and that gets a correct response, and Android sends an AAAA query and that doesn't get a correct response.
I did some research in google and I saw people deactivating IPv6 in BIND. Could it be the solution?
I don't really know how to do it. Although I tried to edit the /etc/sysconfig/named file and put OPTION="-4" at the end but it didn't change much.
Any ideas are welcome!

Thanks
Greg

Greg767
Posts: 6
Joined: 2012/09/28 09:28:22

Re: Local DNS with BIND and Android OS name resolution problem

Post by Greg767 » 2012/09/29 08:58:48

Hey,

Problem is resolved.
Firstly there is a bug in the android os. When the networking route is not defined it only sends AAAA queries and when it fails it doesn't send an A query.
The workaround is to set a gateway in the DHCP. This way android sends both AAAA and A queries.

Thanks for your input
Greg

User avatar
TrevorH
Site Admin
Posts: 33277
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: [SOLVED] Local DNS with BIND and Android OS name resolution problem

Post by TrevorH » 2012/09/29 12:18:42

Excellent, glad you found the solution.

Post Reply