opkg update opkg install stubby ca-bundle nano
ca-bundle lets Stubby verify TLS certs from upstream servers. Skip it and enjoy mysterious failures at 1am./etc/init.d/stubby enable /etc/init.d/stubby start logread -e stubby
On OpenWrt, DNSSEC validation lives inside Stubby/getdns โ not in DoT itself. Stubby needs a writable directory. OpenWrt won't create it. Because of course it won't.
mkdir -p /var/lib/stubby chown -R stubby:stubby /var/lib/stubby
/etc/rc.local before exit 0 if Stubby doesn't recreate it on boot.OpenWrt manages Stubby via UCI by default. Switch to manual mode so stubby.yml is in charge. Or as I like to call it: the "let me drive" setting.
nano /etc/config/stubby
option manual '1'
nano /etc/stubby/stubby.yml
# Writable dir from Step 3 appdata_dir: "/var/lib/stubby" # Enable DNSSEC validation dnssec_return_status: GETDNS_EXTENSION_TRUE
/etc/init.d/stubby restart logread -e stubby
# Normal domain โ should resolve fine dig @127.0.0.1 -p 5453 example.com +dnssec
# Intentionally broken DNSSEC โ should SERVFAIL dig @127.0.0.1 -p 5453 dnssec-failed.org
Your router is silently rejecting spoofed DNS responses while everyone else on the network has absolutely no idea. That's the dream.