Step-by-step guide to configure OpenWrt router firmware to use our secure, token-gated DNS-over-HTTPS (DoH) service.
๐ง OpenWrt • Router โ Verified • Working ๐ DoH • Token AuthOpenWrt is a Linux-based router firmware that can be configured to use DNS-over-HTTPS (DoH) with custom providers. This guide will help you configure your OpenWrt router to use our secure DNSaaS service with token-based authentication.
| Service | Endpoint | Authentication |
|---|---|---|
| Primary DNS | https://dns1.oss.co.za/xxxxx/dns-query |
Token in URL path |
| Protocol | DNS-over-HTTPS (DoH) • Port 443 • TLS 1.3 | |
| OpenWrt Version | 22.03+ (with dnsdist or https-dns-proxy support) | |
token_testclient123 (replace with your actual token)token_xxxxxxxxxx
This method uses the https-dns-proxy package, which is designed specifically for OpenWrt to forward DNS queries over HTTPS to a DoH server.
SSH into your OpenWrt router and update the package lists:
Edit the configuration file:
token_testclient123 with your actual token in the URL above.
Disable dnsmasq from acting as a DNS server (it will still serve DHCP):
Check the status:
From the router command line:
Or from a client device on your network:
If https-dns-proxy doesn't meet your needs, you can use dnsdist as an alternative.
token_testclient123 with your actual token in the configuration above.
If you prefer using the web interface, you can configure DoH through LUCI.
Log into your OpenWrt web interface (192.168.1.1 by default).
Go to System โ Software.
Search for https-dns-proxy and install it.
Go to Services โ https-dns-proxy.
Enter the following settings:
https://dns1.oss.co.za/testclient123/dns-query1.1.1.153token_testclient123 with your actual token in the URL above.
Click Save & Apply.
Restart the service if needed: Services โ https-dns-proxy โ Start.
Use these test sites to verify your OpenWrt configuration is working correctly.
| Command | Expected Result |
|---|---|
nslookup example.com 127.0.0.1 |
โ Should return A records |
nslookup zycdjz.com 127.0.0.1 |
โ Should return NXDOMAIN (blocked) |
nslookup adult.filterdns.net 127.0.0.1 |
โ Should return NXDOMAIN (blocked) |
| Test | Expected Result |
|---|---|
nslookup example.com (from any client) |
โ Should return A records |
nslookup zycdjz.com (from any client) |
โ Should return NXDOMAIN (blocked) |
Visit http://adult.filterdns.net in a browser |
โ Should show "This site can't be reached" |
| Test Domain | Expected Result |
|---|---|
https://dnsleaktest.com |
Should show dns1.oss.co.za or 102.220.218.218 |
opkg updateopkg list | grep https-dns-proxyhttps://dns1.oss.co.za/xxxxx/dns-queryuci get dhcp.@dnsmasq[0].port0, dnsmasq is not listening on port 53netstat -tulpn | grep :53/etc/init.d/dnsmasq restart/etc/init.d/dnsmasq reload/etc/init.d/network restartnslookup example.com 127.0.0.1 - should return A recordsnslookup zycdjz.com 127.0.0.1 - should return NXDOMAIN (blocked)ps | grep https-dns-proxyhttps://dnsleaktest.com from a client - should show your DNS serverTo revert to your previous DNS settings:
Reconnect client devices or reboot the router to clear DNS caches.