Flexible DNS routing
Use domain lists and ordered rules to choose upstream DNS servers, address families, and blocking policies for fine-grained control over resolution.
LOCAL DNS, BUILT FOR OPENWRT
A local DNS server for OpenWrt. Choose upstreams for different domains, manage your cache, and connect DNS answers to your network rules.
FEATURES
Turnout DNS (updns) is a local DNS server for OpenWrt. Run it independently or as an upstream for dnsmasq.
Use domain lists and ordered rules to choose upstream DNS servers, address families, and blocking policies for fine-grained control over resolution.
Choose from UDP, TCP, DNS over TLS (DoT), and DNS over HTTPS (DoH) for flexible upstream DNS connections.
Cache DNS responses according to their TTL and refresh records before they expire to reduce repeated queries and improve resolution efficiency.
Configure with LuCI and UCI, manage the service with procd, and integrate with dnsmasq and nftables.
Use updns <domain> to inspect matched rules, resolution paths, and responses to quickly diagnose DNS issues.
Use NXDOMAIN or Zero-IP blocking and independently control returned IPv4 (A) and IPv6 (AAAA) records by rule.
HOW IT WORKS
updns applies blocking rules first, then checks local records and valid cache. When needed, it queries the selected upstream. Resolved addresses can also be added to nftables sets.
Read the full guideOptional · nftables set integration
DOCUMENTATION
Learn about installation, operating modes, and configuration. Find troubleshooting guidance when you need it.
GET STARTED
Before you start, check that your device runs OpenWrt 25.12. Official prebuilt APKs currently target that release series and available architectures.
On OpenWrt 25.12, install from the signed package feed. Independently verify the public-key fingerprint before proceeding; do not use --allow-untrusted.
wget -O /tmp/updns-public.pem https://downloads.garinasset.com/updns/openwrt/signing.pem
sha256sum /tmp/updns-public.pemExpected SHA-256: 27ffe5d333a95b10c81de1279078036a00a4d169741a1f26c5e4e98e539aeb4e
Only continue after confirming the SHA-256 matches the expected value above:
cp /tmp/updns-public.pem /etc/apk/keys/updns.pem
. /etc/openwrt_release
RELEASE="${DISTRIB_RELEASE%.*}"
ARCH="$(apk --print-arch)"
echo "https://downloads.garinasset.com/updns/openwrt/${RELEASE}/${ARCH}/packages.adb" >> /etc/apk/repositories.d/customfeeds.list
apk update
apk add updns luci-app-updns luci-i18n-updns-zh-cnAfter installation, enable and save/apply the service under Services → Turnout DNS in LuCI. Fresh installs are disabled by default and listen on UDP/TCP port 153. Choose standalone or dnsmasq-upstream operation; back up configuration and check existing DNS services and ports before switching.
Read the complete configuration and operations guideBLOG
Inspect service and cache settings, then learn what the hit ranking can and cannot tell you.
Read articleThink of DNS as asking for directions: different questions can go to different guides.
Read articleUnderstand TTL, cache hits, proactive prefetch, and their limits.
Read article