How to change DNS provider by web UI


is this the right place in the UI to change the DNS provider?


Can I enter more than one and if yes, how does OpenWrt decide wich one to use?

Thanks and regards, Marek

I assume you want to change your ISP's provider DNS to something popular like googles/cloudflare/OpenDNS.
Check this post, actually only the first change on the WAN interface is needed for a basic setup.


Network - DHCP and DNS - Advanced Settings tab.
Check the options Strict Order and All Servers.

1 Like

Thank you very much for the link. I have followed all set up steps and its working.
Why is there a 6 in front of the DNS-IPs:

  1. Go to 'Network > Interfaces > LAN'
  2. Under 'DHCP Server' set 'DHCP-Options' to '6,,'
  3. Click the 'Save' button

What makes the difference between just editing WAN versus following the hole set up instructions?

This is what the DHCP server will advertise as NS to the hosts. If you don't use it, the router itself will be advertised and will cache and forward the queries to the upstream NSs.

1 Like

Its the option number for dnsmasq, aka you want announce/push those dns server ip's.

By default openwrt itself acts as nameserver and clients get your routers ip as DNS server aka, the WAN settings tell openwrt (dnsmasq) which external DNS it should actually use for lookups.

The lan setup pushes the given external DNS servers to your clients, so your clients directly use the external servers instead of your router. I prefer the WAN only setup, since i also use Adblock inside the router, which only works if your router acts as DNS server.

1 Like

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