What's new

Android skipping local DNS

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Wessel Koornstra

New Around Here
Hi,

I know it looks a little bit opportunistic but I'm encountering an issue with my router and I hope there is somebody to help me out.
I've recently switched from dd-wrt to asuswrt merlin and has already proven to be a wise step. In the wake of the switch I also reflashed a couple of linksys routers to openwrt. So I'm no stranger when it comes to working with custom firmware.
But I guess I've met my match in IPv6 and Android. I've searched and found several solutions on setting up a local dns, but mostly with IPv4. But my ISP is providing IPv6 and I always receive an IPv6 address unless I disable it on the client.
I've been able to redirect traffic for my windows machines, so that when using a certain domain they are redirected to a local IP address. But I can't seem to do that for my Android Phone (Oneplus One CM 13, Android 6.0.1), but this is also the case on a tablet (zenpad 8, android 7).
I've setup the router ip address as the default dns, I've disabled the router advertisement or upstream querying. I did for both IPv4 and IPv6. On the WAN side if setup opendns as the dns server(s) to use.
But still when resolving the domain from my android device the nslookup shows a google dns as the one resolving the domain and not the router.
I could use some help with a manual or ways to pinpoint my issue.

I'm running the latest stable 380.4 on a asus AC68U.

I hope anybody will be able to help me out.

Kind Regards,

Wessel Koorsntra
 
Last edited:
I had a look at DNS filtering, but it wasn't completely clear how that functions. But maybe I misread it.

I'll try it when I'm home tonight with the setting Router. I'll keep you posted.

At the moment I've got the domain redirect set within jffs/hosts.add is that correct or should that be dnsmasq.conf.add?

Kind Regards,

Wessel
 
At the moment I've got the domain redirect set within jffs/hosts.add is that correct or should that be dnsmasq.conf.add?
hosts.add will redirect a host using a hostname or a FQDN. The same can be achieved with dnsmasq but the syntax is not as simple, so I prefer using the hosts file. However, the hosts file cannot redirect an entire domain (*.mydomain.com), for that you would have to use dnsmasq.
 
I had a look at DNS filtering, but it wasn't completely clear how that functions. But maybe I misread it.

I'll try it when I'm home tonight with the setting Router. I'll keep you posted.

At the moment I've got the domain redirect set within jffs/hosts.add is that correct or should that be dnsmasq.conf.add?

Kind Regards,

Wessel

DNS filtering forces all clients to use the specified DNS server. Either put in the preferred DNS server in the DNS fields there, or select the "router" and configure the preferred DNS servers on the WAN page.
 
I tested it by putting the dns filtering on the router to on and selecting Router as the preferred setting global. But still the nslookup from my android phone shows 8.8.4.4. as the used dns server. When I disable IPv6 on the phone the dns lookup via de router works but with IPv6 turned on it simply won't resolve. Do I need to flush anything on the phone btw?
I've reverted all the settings. After switching to Custom in DNS filtering and setting the server to ip address of the router I lost my connection to it. :)

I'll switch back to dnsmasq.conf.add since I'm familiar with both.

I was wondering if it might have something to do with my IPv6 settings. Nothing special, but might be good to know:

Native
DHCP-PD on
release prefix on

Connect to DNS off
IPv6 ::ffff:a00:1

Enable router advertisement Disable

On the WAN page I used the dns servers for OpenDNS.

Thank you already for the warm welcome and support.

Kind Regards,

Wessel
 
Wessel,

Most of the conversation above is beyond me, but I've experienced a similar issue on my Android devices. I determined in my case, that the cause of the problem was the "Data Saver" function in the Chrome Browser. When "Data Saver" was turned on, the device would not use the dns servers I set up in my router. Turning "Data Saver" off remedied this. I think turning "Data Saver" on forces the device to use Google's dns Servers to allow them to compress the data first.
 
Phil,

Thanks for your response I've checked the setting but it was already turned off. So we need to continue the search.

Kind Regards,

Wessel
 
Phil,

Thanks for your response I've checked the setting but it was already turned off. So we need to continue the search.

Kind Regards,

Wessel
Taking a step back - which app are you using to perform NSLookup? I use PingTools which shows me the DHCP provided info for DNS, and the DNS Lookup tool lets me either use default (i.e. DHCP provided) or manual
 
I've tried pingtools and that shows my router as dns server. But the domain resolution still doesn't work. I've also tried he.net and that gave me an unknown host when doing a traceroute via IPv4 and IPv6 a ping gives the external ip when using IPv4 and unknown hosts for IPv6. So maybe I missed a setting somewhere else.

Kind Regards,

Wessel
 
Hi,

I've found some interesting information on my phone. When I connect to my network I receive the following ipv6 dns settings and the fourth one is the ip address of my router.

fe80::225:9cff:fe64:846c
fe80::c2c1:c0ff:fe3a:e2d0
fe80::c2c1:c0ff:fe4e:b26f

In the meantime I've checked with my provider and IPv6 is from his point disabled, it was already. And I've disabled both the dns filter and the IPv6 settings.

Does the above info ring a bell with anybody? Maybe I've configured something completely wrong. But I can't seem to find where I went wrong.

Kind Regards,

Wessel
 
Those are non-routable link local addresses.

See if you can match the MAC addresses from which they may be derived.

fe80::0225:9cff:fe64:846c -> 00:25:9c:64:84:6c -> Cisco-Linksys, LLC
fe80::c2c1:c0ff:fe3a:e2d0 -> c0:c1:c0:3a:e2:d0 -> Cisco-Linksys, LLC
fe80::c2c1:c0ff:fe4e:b26f -> c0:c1:c0:4e:b2:6f -> Cisco-Linksys, LLC
 
CollinTaylor you saved me!

When you mentioned the mac addresses I realised that I migrated three AP's in our home to OpenWRT. I followed the provided instructions, but apparently they were a little outdated. And until now I didn't yet dived into IPv6. So I had a nice learning curve and disabled on all three routers the IPv6 dhcp servers.

Thanks again!

Kind Regards,

Wessel
 

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top