The OpenWrt Project is a Linux operating system targeting embedded devices, which is often used as an open-source solution for routers.
This guide covers setting Quad9 in the DNS forwarder settings. When using your OpenWrt router as a DNS server, it will forward DNS requests to Quad9.
0. Log into your LuCI control panel, typically at http://192.168.1.1
1. Navigate to Network -> DHCP and DNS
2a. Set 22.214.171.124 and 126.96.36.199, or the addresses of your preferred Quad9 service in the "DNS forwardings" input fields.
3.Navigate to Resolv and Hosts Files sub-tab, and make sure "Ignore resolv file" is Enabled.
4. Click Save & Apply at the bottom. Since you are not changing the DHCP settings, the change should be instantaneous after this.