Local dns resolver

Is there any local dns resolvers on OpenWrt, maybe some guides how to make that? And is it worth doing?

The built in package is dnsmasq. Hope this helps.


Thanks! But i also googled unbound from nlnet labs, is there any differences?

And there guides is how to make dnsmasq resolve dns on my router?

The local DNS resolver is normally automatically enabled on the LAN.
Details can be found here


i just can't get it, i need to start DNS server, is dnsmasq work as server out of box? or it still uses ISP dns at the end?


Yes, by default, but this is configurable.

Thanks for answer, i'm trying to find, is there any ways to start dns server and use as dns?


In the meantime you got two more answers which hopefully give you some more ideas.
But if it is not clear enough to you let me write a few more hints:

  1. Openwrt by default installs and enable a DNS server in the LAN (with the IP address of the router).
  2. This DNS Server will also be announced/distributed via the build in DHCP to your clients in the LAN
  3. This DNS Server surely need to have some Upstream DNS servers where it can cask for DNS resolutions for outside your LAN. This upstream server can either be your ISP's DNS or e.g. google
  4. The Upstream DNS normally is automatically configured if you are connected the WAN via DHCP.
1 Like

So, i cant make from my openwrt router MY OWN dns server like 8.8.... or 1.1....? i want my 8 core x86 router do that job, without any connections to world to reduce any site loading latency

Well your openwrt router will similar as "8.8...." answer DNS queries of the clients and it will also cache DNS queries it answered for a specific time but no you can not have a local server that has all DNS answers of the world stored for two reasons:

  1. DNS is dynamic and changes constantly
  2. Storing all possible DNS queries in a local database would be so huge that you would not be able to store that.

That answer i wanted. Thanks. Marked as solution.
And sorry for annoying, just in theory, how much space in theory i need to store all possible queries? Like couple tb? 2-100tb? or even more?



This isn't an either/or question, a forwarder is not a full server (that does it's own hierarchical search to locate the answer).

And as @faser noted, yes you can set dnsmasq to query whatever server you wish.

Even if you had that much space, nothing you're installing is made to perform such a task of retrieving it; and it changes by the second and it's distributed (there's no single location to retrieve all of the DNS hierarchy).


This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.