Insights
How to prevent DNS cache poisoning
Prevent DNS cache poisoning with DNSSEC validation. Restrict recursive lookups and check that your gateway preserves source-port variation.

On this page
To prevent Domain Name System (DNS) cache poisoning, enable Domain Name System Security Extensions (DNSSEC) validation on the resolver your devices use. If you don't run that resolver, choose one that validates.
In short:
- Validate DNS answers. Reject answers that fail a required signature check.
- Harden your resolver. Keep it patched and limit access to intended clients.
- Check app settings. Make sure your apps use the resolver you chose.
Start with a resolver that checks signatures
1. Turn on validation or choose a resolver that checks signatures.
A recursive resolver looks up DNS answers for your devices and caches them for reuse. If you run it, enable DNSSEC validation using the instructions for your resolver software. If a provider runs it, confirm that the service you plan to use enforces validation.
2. Check what the resolver accepts and rejects.
A trust chain links signed DNS data back to a trusted starting point. A validator uses that chain to authenticate signed dataOpens in a new tab. Data with no trusted chain, such as an answer from an unsigned domain, can still resolve without DNSSEC authentication. An answer that fails a required check must be rejected, not treated as unsigned.
If your resolver's maintainer provides a validation check, use it to confirm that valid signed answers resolve and answers that fail a required check are rejected. A successful lookup on its own doesn't prove validation is working.
Limit who can use your resolver and check its outgoing ports
Only change settings or inspect traffic where you have permission. Save your current settings so you can restore them if clients lose DNS access.
3. Patch the resolver and restrict recursive lookups.
Keep the resolver software and its host patched. On a private resolver, limit recursive lookups to intended clientsOpens in a new tab by source address or by the network interface the request comes in on. Turn recursion off on servers that don't need it. Restricting access reduces exposure, but it doesn't authenticate replies.
Check from both sides of the access rule using lookups that need recursion. An allowed client should get an answer. A test client outside the allowed scope shouldn't get recursive service.
4. Compare outgoing source ports on both sides of the gateway.
If your resolver sends its own queries over the User Datagram Protocol (UDP), varying the source portOpens in a new tab makes forged replies harder to match to a query. Network address translation (NAT) at the gateway can weaken that defense by rewriting the ports. Encryption between an app and its resolver doesn't tell you what happens to ports on the resolver's outgoing queries.
Observe several actual outgoing queries on the resolver side of the gateway and match them to the same queries on the internet-facing side. Compare the source ports for that set:
- If the ports vary before the gateway but become fixed, fall into a narrow range or follow a predictable sequence after it, review the gateway's NAT behavior.
- If that pattern is already present before translation, review how the resolver selects its source ports.
- If the ports still vary without those patterns after translation, the gateway hasn't visibly collapsed the variation in your sample.
If you can't inspect both sides, leave the result unverified. A small sample can reveal an obvious pattern, but it can't prove the ports are unpredictable or that the resolver validates answers.
Check which resolver your apps use
5. Check the device setting and any app overrides.
Identify the resolver set on the device, then check the browsers and other apps you manage for a separate DNS setting. If an app points somewhere else, switch it to the intended resolver or confirm that the other resolver also validates. Use encrypted DNS to protect lookups in transit to the chosen resolver. An app can encrypt its lookups and still bypass the validation policy you chose.
6. Confirm where a lookup actually goes.
A setting tells you where the app is configured to send lookups, not where a live request went. If you have access to the intended resolver's query log, look for an entry you can tie to a fresh lookup from the app. A match confirms that lookup reached the resolver. If you can't tie the lookup to the log, don't count the setting alone as proof of the route.
Where doxx.net fits. doxx.net encrypts DNS lookupsOpens in a new tab on a private network that runs on its own DNS infrastructure. If you want encrypted lookups on that network, download the doxx.net appOpens in a new tab to connect a device.