DNS issues on Android phone with OpenWrt + AdGuard Home

Funny i have the same issue.
I am using OWRT 21.02 and I have my own Adguard Home dns up in azure.

I have forwarded my dns to this adguard server.. however, if I use my adguard servers domain name on my android phone, nothing works. But if i switch to mobile data, it works fine.

  • Forwarded what DNS - how?
  • What domain are you inserting into your mobile device?
  • Also, clearly explain how your issue relates to the OpenWrt
  • What happens if you remove this configuration that already forwards traffic to the DNS server? :wink:
  • I assume your server runs DoH?
  • Are you running a Kong build?
  • Lastly, did you see this part - do you allow for this on your network? :thinking:

Go figure - if you need in-depth assistance with this, you may wish to make a new thread (i.e. to provide detailed information on your specific issue) - as the OP's issue is solved.

1 Like

on top of what @lleachii just wrote, 21.02 is EOL, you should upgrade.

1 Like

Why so much attitude..? I was just sharing my experience. Don't be so rude to others.

I am running OWRT on a Mi Router 4A Gigabit router.


This is where i forward my dns request to my Adguard home server that runs on Azure.

I have DoH and DoT enabled in my Adguard server. So if I add my DoH url to my phone, and if I connect to my home wifi, which is managed by my OWRT router, then the internet stops working for my phone. But if i switch over to mobile data while still keeping the DoH records, i can talk to my Adguard server fine and get the dns resolved.

For my home, i am still dependent on plain text DNS. OWRT serves DHCP and all dns requests gets forwarded to my Adguard server. It's only the DoH that doesn't work through OWRT router

and on the phone ?

your network is, your DNS isn't.

again, how is this related to openwrt ?

Yes I know.. the only reason I am still using this version is because I am using MWAN3 to route traffic between two uplinks. IPsets..

I don't know how to get the same done using nftables..due to lack of my knowledge in nftables, i decided to live with 21.02.07 version :frowning:

I am running it on a Xiaomi Mi Router 4A Giga

I have no clue what you're referring to.

Thanks, but not sure how this helped.

Something like this is usually configured on the WAN interface.

So, how is OpenWrt configured to use DoH?

  • Does your phone do DoH?
  • Where are you adding this setting to your phone?

So far, you are describing normal behavior.

  • Have you setup secure DNS anywhere?
  • How do you forward traffic to Azure?

Your issue is not similar to the other post. You need to provide details.

To get what done - provide detailed information on what you're referring to?

your router uses electricity too, I guess you could call the power company ?

it's equally related, until you explain how the openwrt device is messing up your phone <> clouded AGH connection.

1 Like

The reason why it is related to OWRT is because it doesn't work when I am behind the OWRT router..

It has got nothing to do with Adguard. It responds fine if sit behind mobile data or other router(same ISP)

We know that and explained why. If you're willing to provide the requested information, we could assist you.

So far, you're seem to be describing:

  • that you want secure DNS via DoH
  • but never configured DoH anywhere (maybe on your Azure server, but it's not clear yet)
  • additionally you blocked regular DNS requests on your network - which your Androids need to use secure a DNS server that is configured by its hostname (a race condition or chicken-or-the-egg paradox yes, but true nonetheless)

We need you to clarify that's not the case.

1 Like

there's nothing in the default openwrt config that would stop a device from making DoH requests (it'd would block all HTTPS traffic in the process).

if it doesn't work, you've probably made a config error


Please connect to your OpenWrt device using ssh and copy the output of the following commands and post it here using the "Preformatted text </> " button:
grafik
Remember to redact passwords, MAC addresses and any public IP addresses you may have:

ubus call system board
cat /etc/config/network
cat /etc/config/wireless
cat /etc/config/dhcp
cat /etc/config/firewall
1 Like

not using AGH, but your AGH Azure server needs to provide a DoH server, but I guess it does, since it's working when you disable the wifi on the phone ?

1 Like

Not necessarily. I understand the DNS setting on Androids to be normal plain-text DNS. You merely specify a specific recursive DNS server [by name] (e.g. you must specify one.one.one.one - and not 1.1.1.1, hence requiring a normal plain-text DNS lookup in the first instance anyways). This is why I asked if the Android was somehow configured to used DoH in another manner.

Some reading:

While the article says "encrypted" - I'm not aware of that.

I was going for the cert aspect.

guess Android would throw an error if the DoH connection wasn't secure, hence FQDN and working initial plain text DNS lookup.

1 Like

That's also why I asked the poster how they forwarded the DNS requests and how the Android is setup. :wink:

1 Like

Problem is you don't read properly.

  1. I never said I blocked regular DNS
  2. If you read carefully, I clearly said my AdGuard Home server in Azure is configured for DoH. If you don't know what Adguard Home is and how it functions, that's understandable. But I can explain to you it's functionality
  3. Yes I want secure DNS over DoH.

Let me explain again in English.

I have an OWRT setup at home. This router is my local DHCP and DNS server for all Wired and wireless clients. I have an Adguard Home(AGH) setup in Azure with DoT and DoH support enabled.

So, the current setup is that whenever a client sends a DNS request to my OWRT, the router will forward the DNS query to my AGH's public IP. So, in other words, it is my upstream DNS. So this bit is working great without a single issue.

per say lets assume my DoH address is "one.mydomain.com", if I configure my Android phone to use this URL as my private DNS, as long as I am on mobile data or sit behind any other non-OWRT router, it works fine. But as soon as I sit behind my OWRT router, it stops working.

in my understanding, when my phone tries to resolve "one.myurl.com", it sends the request to OWRT and the OWRT forwards the query to my AGH server.

I will upload the requested details as soon as I go back home

" That's also why I asked the poster how they forwarded the DNS requests and how the Android is setup."

is this what you you are referring to?

one location would be

there's a reason why you were asked to provide your config in DNS issues on Android phone with OpenWrt + AdGuard Home - #11 by frollic

1 Like

Hi Both,

I managed to fix it.