How to set Custom DNS Resolvers for OpenWRT in Luci?

I would like to use CloudFlare DNS resolvers:

1.1.1.1
1.0.0.1

Depending on the router, I have 2 different use cases:

  1. The DNS resolvers should be set globally for the entire router if there is only one LAN interface present (or the same resolvers should be used for all interfaces).

  2. Different DNS resolvers might have to be used for specific LAN interfaces in the case that multiple LANs / VLANs are present in a router.

How do I configure this in Luci for each use case?

Thanks for your feedback!

https://openwrt.org/docs/guide-user/services/dns/stubby

This is only possible to setup by installing an additional package? There is no way to configure this in Luci out-of-the-box?

You can enter any dns servers as dnsmasq forwarders, 1.. 4... 8... 9... in place mentioned in same doc...DoH proxy will encrypt dns from you to cloudflare.

In the WAN interface for 1.

Are you referring to this guide @brada4 ?

https://openwrt.org/docs/guide-user/services/dns/doh_dnsmasq_https-dns-proxy