Most engineers think…
Most engineers hear "DNS Security" and assume it's a separate security profile you add — like Antivirus or URL Filtering — and that turning it to block is the strong, finished setup.
Wrong on both counts, and it costs you in incident response. DNS Security is not its own profile — it's a set of DNS Policies inside the Anti-Spyware profile that phone a cloud service for a per-domain verdict. And plain block is actually the weaker choice when an internal DNS server is in the path: it stops the call but the threat log only shows the DNS server as the source, so you can't tell which PC is infected. The stronger setting is sinkhole — it forges the answer so the real infected host reveals itself in your traffic log. Block hides patient zero; sinkhole hands you their name.
① Why DNS Security — malware phones home before it does anything
Meet Sneha, an L1 SOC analyst at Infosys. A laptop on the trust zone gets infected. Before that malware steals a single file, it has to find its boss — the attacker's command-and-control server. And the very first thing it does is a DNS lookup for a domain like evil-c2.example. Unit 42's research found that nearly 80% of malware uses DNS to kick off C2. That lookup is the earliest, cheapest place to catch an infection — long before any payload moves.
So why not just keep a blocklist of bad domains? Because modern malware is built to defeat exactly that. DGA malware generates thousands of throwaway domains from an algorithm — by date, by a cryptographic seed — and the attacker registers just one. By the time a human adds it to a blocklist, the malware has moved to tomorrow's domain. Other malware hides data inside DNS itself: DNS tunneling smuggles stolen files out one TXT record at a time, riding the port-53 traffic almost every firewall allows.
That is what DNS Security is built for. Instead of a small static list, the firewall asks a cloud service about every domain in real time, and that cloud runs inline machine-learning models trained on tens of billions of domains. It catches the algorithmically-generated domain it has never seen before, and the tunneling pattern hidden in otherwise-normal queries. This lesson ties straight back to blog 03's Anti-Spyware profile — because that is literally where DNS Security lives.
Think of your apartment society's guard at the gate. An old guard had a paper register of banned visitors (the static blocklist) — useless if the troublemaker shows up under a new name. DNS Security is the guard who radios the central control room for every single visitor: "Anyone with this face or this behaviour, even a new name?" The control room (the cloud) has seen the scam across every society in the city and recognises the pattern, not just the name. That live check is why DGA's daily new domains still get caught.
The four threats DNS Security is really aimed at
Tap each card — these are the DNS-borne threats a static blocklist can't keep up with, and the headline categories you'll set actions on.
Malware does a DNS lookup to find its boss server. Catch the lookup and the infection is cut off before it acts.
Algorithm spins thousands of throwaway domains daily; attacker registers one. Cloud ML spots the pattern a blocklist never can.
Stolen data hidden inside DNS queries on port 53. Looks like normal lookups; ML flags the smuggling behaviour.
Domains minted in the last ~32 days are statistically risky. A category you can alert or block on outright.
Rahul at TCS argues: "We already have a blocklist of 50,000 bad domains, so DNS Security is overkill." What's the single best reason DNS Security still matters?
Pause & Predict
Predict: if 80% of malware uses DNS for its first C2 call, what's the advantage of stopping the attack at the DNS lookup rather than waiting to block the C2 connection later? Type your guess.
② Inside the Anti-Spyware profile — DNS Policies, the cloud, and the four actions
Here is the part that trips up every new admin: there is no "DNS Security" profile in the GUI. You configure it under Objects > Security Profiles > Anti-Spyware, then open the DNS Policies tab. That ties DNS Security to blog 03's Anti-Spyware lesson — the same profile that catches spyware phone-home traffic also carries your DNS rules. Once configured, you attach the Anti-Spyware profile to a Security policy rule (or, better, a Security Profile Group) — exactly as you learned for the other profiles.
Inside DNS Policies you'll see two kinds of signature source. Local DNS signatures are a smaller set downloaded with your regular content updates — they work even with no cloud reachability, but they're static. Below them sits the DNS Security source: the live cloud categories. With a valid licence the firewall queries the cloud per domain and gets back a category and a verdict.
Each DNS Security category — Command-and-Control, Malware, DGA, DNS Tunneling, Newly Registered Domains, Phishing, Dynamic DNS, Grayware, Parked, Proxy Avoidance — gets its own policy action and log severity. The four actions are allow, alert, block, and sinkhole. Palo Alto's recommended default for the malicious DNS categories is sinkhole — and the next section is the whole reason why.
About those defaults: the Sinkhole IPv4 ships as the loopback FQDN sinkhole.paloaltonetworks.com and Sinkhole IPv6 as ::1. The FQDN resolves to a Palo-Alto-hosted address — which, importantly, changed from the old 72.5.65.111 to 198.135.184.22. If your team ever hard-coded the old IP into an EDL or a security rule, that stale entry will quietly break your sinkhole detection. Many shops instead point the sinkhole at an unused internal IP (say 172.16.255.1) so the bogus connections never leave the building.
▶ Watch one malicious lookup get sinkholed
An infected host at the Wipro Pune branch tries to reach its C2 server. Follow the DNS query through the firewall as DNS Security forges the answer. Press Play for the healthy path, then Break it to see the failure.
admin@PA-VM> show dns-security counters cloud all admin@PA-VM> request license info
DNS Security cloud connection: connected Last query latency (ms): 42 Queries sent / replies: 18342 / 18342 Cache hit ratio: 0.91 License: DNS Security Expires: November 30 2026 License: Threat Prevention Expires: November 30 2026
Symptom: you set the categories to sinkhole, but the threat log is empty even for test-c2.testpanw.com. Cause is almost always one of three things: (1) the Anti-Spyware profile is configured but not attached to the Security rule the traffic actually hits; (2) the DNS Security licence isn't active, so only the small local signature set runs; or (3) the rule allowing DNS doesn't have logging enabled. Fix: attach the profile (or its Security Profile Group) to the right rule, confirm request license info shows DNS Security active, and enable log forwarding.
Aditya at HCL says: "I added a DNS Security profile to my rule but it does nothing." What's the most likely conceptual error?
Pause & Predict
Predict: the DNS Sinkhole Settings ship with IPv4 = sinkhole.paloaltonetworks.com and IPv6 = ::1. Why might a security team change the IPv4 to an unused INTERNAL address like 172.16.255.1 instead? Type your guess.
③ Sinkhole vs block — finding patient zero behind the DNS server
Now the heart of the lesson. In almost every real network, users don't query the internet directly — they ask an internal DNS server (a Windows AD DNS box), which recurses out through the firewall. That detail breaks naive blocking. When malware on 10.20.30.15 looks up a bad domain, the query the firewall sees comes from 10.20.30.10 — the DNS server, not the infected PC. So if you just block, the threat log says the DNS server is the source. You know an infection exists; you have no idea which machine.
Sinkholing solves exactly this. Instead of dropping the query, the firewall forges the DNS answer: it tells the DNS server (which tells the host) that evil-c2.example resolves to the sinkhole IP. The infected host then tries to connect to that sinkhole IP — and that connection is sourced from the real host, 10.20.30.15. It lands in your traffic log with the actual endpoint as the source. You've found patient zero.
The find-the-host workflow, step by step. First, confirm the sinkhole is firing: Monitor > Logs > Threat, filter (action eq sinkhole) — each line is a sinkholed lookup with the DNS server as source (that's expected at the DNS layer). Then pivot to Monitor > Logs > Traffic and filter on the sinkhole IP as destination — (addr.dst in 172.16.255.1) — and now the source column shows the real infected hosts. Those source IPs are your quarantine list.
# Threat log: confirm sinkhole is acting (action eq sinkhole) # Traffic log: the SOURCE column is now patient zero (addr.dst in 172.16.255.1) and (app eq dns or app eq web-browsing)
RECEIVE_TIME TYPE SRC IP DST IP APP ACTION 2026-06-11 11:04:18 threat 10.20.30.10 198.51.100.4 dns sinkhole 2026-06-11 11:04:21 traffic 10.20.30.15 172.16.255.1 web-browsing allow 2026-06-11 11:06:02 traffic 10.20.30.22 172.16.255.1 web-browsing allow 2026-06-11 11:09:47 traffic 10.20.30.39 172.16.255.1 web-browsing allow # → .15, .22 and .39 are the infected hosts. Quarantine these.
Priya at ICICI faces this
Priya, an L1 analyst, gets a SIEM alert: a known C2 domain was queried from the data centre. The Palo Alto threat log shows the query was blocked — but the source is the AD DNS server (10.20.30.10), so she can't tell which of 400 endpoints is actually infected.
The Anti-Spyware DNS policy is set to block, not sinkhole. With an internal DNS server recursing on behalf of clients, block-only logs the DNS server as the source of every malicious lookup, hiding the real host.
She switches the malicious DNS categories to sinkhole, points the sinkhole at an unused internal IP, and waits for the malware to query again. Then she reads the TRAFFIC log (not just the threat log) for connections to that sinkhole IP.
Objects > Security Profiles > Anti-Spyware > DNS Policies (set sinkhole) → then Monitor > Logs > Traffic (addr.dst in 172.16.255.1)Set the C2/Malware/DGA/Tunneling categories to sinkhole, enable the sinkhole IPs, commit, and confirm the profile is attached to the data-centre Security rule with logging on.
Within the hour the traffic log shows source 10.20.30.15 connecting to the sinkhole IP — the exact infected host. She isolates that endpoint, and the (action eq sinkhole) threat filter confirms the domain is still being caught.
Don't wait for an infection to test it. From a client behind the firewall, resolve the Palo Alto test domains: nslookup test-c2.testpanw.com, test-dnstun.testpanw.com, test-dga.testpanw.com. If your policy is right, the lookup resolves to the sinkhole IP (not the real address), and Monitor > Logs > Threat filtered on (action eq sinkhole) shows a fresh entry. No hit means the profile isn't attached, the licence is inactive, or logging is off — check those three.
Karthik at Flipkart asks: "Block already stops the malware reaching its C2. Why bother with sinkhole instead?"
Pause & Predict
Predict: after enabling sinkhole, the THREAT log still shows the DNS server (10.20.30.10) as the source of the sinkholed query — not the infected host. Is that a misconfiguration? Type your guess.
④ Exceptions, the recent CVE, the licence & the exam
No detection is perfect, and one day DNS Security will flag a domain your business genuinely needs — a partner's odd-looking SaaS hostname caught as Grayware, say. The fix is a DNS Exception, not turning the whole category off. Go to Objects > Security Profiles > Anti-Spyware > DNS Exceptions and add the domain to the DNS Domain/FQDN Allow List. That single FQDN is exempted while every other malicious domain stays sinkholed.
One sharp gotcha here: an EDL does not override a DNS Security cloud action. If you try to 'allow' a domain by putting it in a domain EDL, DNS Security can still sinkhole it — the proper exemption path is the DNS Exceptions allow list. Mixing these up is a classic support ticket.
A sober, current note. Because DNS Security parses untrusted DNS, it has been a target. In December 2024, CVE-2024-3393 — a DoS in the DNS Security feature — was actively exploited: a crafted packet through the data plane could reboot the firewall, and repeated hits dropped it into maintenance mode. More recently, CVE-2026-0229 (published 11 February 2026, CVSS 6.6) is a DoS in the newer Advanced DNS Security feature, triggered when ADNS is enabled with a spyware profile set to block, sinkhole or alert (any non-allow action); it's fixed in PAN-OS 11.2.10 / 12.1.4. The lesson: keeping DNS Security up means keeping PAN-OS patched — a security feature that can be DoS'd is a liability if you skip updates.
Licensing, briefly, because the exam asks: DNS Security needs an active DNS Security licence alongside Threat Prevention (or Advanced Threat Prevention); Advanced DNS Security is its own licence and needs PAN-OS 11.2+. Without the licence, only the small local DNS signatures from content updates apply — fine as a backstop, but it won't catch fresh DGA or tunneling. That local-vs-cloud distinction is a favourite PCNSE question.
Imagine a bank that suspects a scam call centre is phishing its customers. Instead of just blocking the calls (and never learning who fell for it), it sets up a decoy OTP line: anyone tricked into 'confirming' their details gets routed to a harmless internal desk that records who called. The scam is neutralised AND the bank gets a list of exactly which customers to warn. That decoy line is a sinkhole: the malicious lookup is defused, and the real victim reveals themselves so you can help them. Plain block is just slamming the phone down — safe, but you never find the victim.
Cold, in 60 seconds: where does DNS Security live (Anti-Spyware > DNS Policies, not its own profile)? Name the four actions (allow / alert / block / sinkhole). Why is sinkhole better than block (it names patient zero when an internal DNS server hides the host)? Where do you find the infected host (Traffic log, addr.dst in the sinkhole IP)? How do you exempt a false positive (DNS Exceptions allow list)? If that's fluent, you're ready for the PCNSE DNS questions and the next lesson.
An interviewer asks Meera: "Two engineers configure DNS Security. One sets malicious categories to block; the other to sinkhole, pointed at an unused internal IP. The network has an internal AD DNS server. Whose design lets the SOC quarantine the right machine fastest, and why?"
🤖 Ask the AI Tutor
Tap any question — instant, scoped to this lesson. No login, no waiting.
Pre-curated from Palo Alto docs + community Q&A, scoped to this lesson. For a live prod issue, paste your export into chat.techclick.in.
📝 Wrap-up assessment — six more
You've answered 4 inline. Six left. 70% (7 of 10) marks the lesson complete on your profile. Tap Submit all answers at the end.
🧠 In your own words
Type one line: In one line, why does the 'sinkhole' action find the infected host when plain 'block' can't, in a network with an internal DNS server? Then compare to the expert version.
🗣 Teach a friend
Best way to lock it in — explain it in one line to a teammate. Tap to generate a paste-ready summary.
📖 Glossary
- DNS Security
- Palo Alto's cloud-delivered service that gives the firewall a real-time, ML-backed verdict on every domain queried.
- Anti-Spyware profile
- The security profile that carries DNS Security; configure it under the DNS Policies tab, then attach it to a Security rule.
- DNS sinkholing
- Forging a DNS answer to point a malicious domain at a sinkhole IP so the infected host reveals itself in the traffic log.
- Sinkhole IP
- The address the firewall returns for malicious domains. Defaults: IPv4 sinkhole.paloaltonetworks.com, IPv6 ::1; often set to an internal unused IP.
- Patient zero
- The actual infected host in an incident — the specific PC making malicious lookups, which sinkhole exposes.
- DGA
- Domain Generation Algorithm — malware mints thousands of throwaway C2 domains; cloud ML detects the pattern a blocklist can't.
- DNS tunneling
- Hiding non-DNS data (commands, stolen files) inside DNS queries/responses to slip past firewalls that allow port 53.
- Command-and-Control (C2)
- Domains/servers malware contacts for instructions or to exfiltrate data; the top DNS Security category.
- Newly Registered Domain (NRD)
- A domain registered in roughly the last 32 days — statistically high-risk; its own DNS Security category.
- DNS Exceptions
- The Anti-Spyware tab where you add a false-positive FQDN to the DNS Domain/FQDN Allow List to exempt it.
- Local DNS signatures
- A smaller static DNS blocklist shipped in content updates; works offline but can't catch fresh DGA/tunneling like the cloud.
- Advanced DNS Security
- The inline-ML upgrade to DNS Security; needs PAN-OS 11.2+ and its own licence. Subject of CVE-2026-0229.
📚 Sources
- PAN-OS / Advanced Threat Prevention Admin Guide — "How DNS Sinkholing Works" (without sinkhole the threat log shows the local DNS resolver, not the infected host; forged response redirects clients to the sinkhole IP). docs.paloaltonetworks.com/advanced-threat-prevention/administration/configure-threat-prevention/use-dns-queries-to-identify-infected-hosts-on-the-network/how-dns-sinkholing-works
- PAN-OS Admin Guide — "Configure DNS Sinkholing" + "See Infected Hosts that Attempted to Connect to a Malicious Domain" (Objects > Security Profiles > Anti-Spyware > DNS Policies; default Sinkhole IPv4 = sinkhole.paloaltonetworks.com, IPv6 = ::1; Monitor > Logs > Threat filter (action eq sinkhole) then Traffic log on the sinkhole IP). docs.paloaltonetworks.com/advanced-threat-prevention/administration/configure-threat-prevention/use-dns-queries-to-identify-infected-hosts-on-the-network/configure-dns-sinkholing
- DNS Security Administration — "Cloud-Delivered DNS Signatures and Protections" + "Security Profile: DNS Security" (categories: C2, Malware, DGA, DNS Tunneling, NRD, Phishing, Dynamic DNS, Grayware, Parked, Proxy Avoidance; per-category action + log severity; DNS Exceptions allow list; EDLs do not override cloud actions; local vs cloud signatures). docs.paloaltonetworks.com/dns-security/administration/about-dns-security/cloud-delivered-dns-signatures
- LIVEcommunity — "New Update in Palo Alto Networks Hosted Sinkhole IP Address" (hosted sinkhole IP changed from 72.5.65.111 to 198.135.184.22; update any EDL/rule that hard-coded the old IP) + "DNS Sinkhole — working or not?" practitioner thread (verify with test domains and the (action eq sinkhole) filter). live.paloaltonetworks.com/t5/community-blogs/new-update-in-palo-alto-networks-hosted-sinkhole-ip-address/ba-p/1224043
- Palo Alto Security Advisories — CVE-2024-3393 (DNS Security DoS, actively exploited Dec 2024, reboot/maintenance mode) and CVE-2026-0229 (Advanced DNS Security DoS, CVSS 6.6, published 11 Feb 2026, affects PAN-OS 11.2.0–11.2.9 / 12.1.0–12.1.3, fixed 11.2.10 / 12.1.4, triggered with ADNS + non-allow spyware action). security.paloaltonetworks.com/CVE-2026-0229 · security.paloaltonetworks.com/CVE-2024-3393
- Palo Alto PCNSE/PCNSA exam blueprints + DNS Security test domains (test-c2/test-dnstun/test-dga/test-malware.testpanw.com) — Content-ID/Threat-Prevention domain tests DNS sinkhole action, finding infected hosts, local vs cloud signatures and licensing. docs.paloaltonetworks.com/dns-security/administration/configure-dns-security/dns-security-test-domains · paloaltonetworks.com/services/education/certification
What's next?
DNS Security stops the threats that ride DNS. Next we move to the perimeter itself — how Zone Protection and DoS Protection shield your firewall and servers from floods, recon scans and resource-exhaustion attacks before a single policy is even evaluated.