Palo Alto Networks Knowledgebase: How to Configure DNS Sinkhole

How to Configure DNS Sinkhole

Created On 08/05/19 20:23 PM - Last Updated 08/05/19 20:36 PM


Starting with PAN-OS 6.0, DNS sinkhole is an action that can be enabled in Anti-Spyware profiles. A DNS sinkhole can be used to identify infected hosts on a protected network using DNS traffic in environments where the firewall can see the DNS query to a malicious URL.


The DNS sinkhole enables the Palo Alto Networks device to forge a response to a DNS query for a known malicious domain/URL and causes the malicious domain name to resolve to a definable IP address (fake IP) that is given to the client. If the client attempts to access the fake IP address and there is a security rule in place that blocks traffic to this IP, the information is recorded in the logs.

This information is covered in detail in: How to Verify DNS Sinkhole Function is Working.


Important! When choosing a "fake IP", make sure that the IP address is a fictitious IP address that does not exist anywhere inside of the network. DNS and HTTP traffic must pass through the Palo Alto Networks firewall for the malicious URL to be detected and for the access to the fake IP to be stopped. If the fake IP is routed to a different location, and not through the firewall, this will not work properly.



  1. Make sure the latest Antivirus updates are installed on the Palo Alto Networks device.
    From the WebUI, go to Device > Dynamic Updates on the left. Click "Check Now" in the lower left, and make sure that the Anti-Virus updates are current. If they are now, please do that before proceeding. The Automatic Updates can be configured if they are not setup.
    sinkhole - dynamic updates.png
    Note: A paid Threat Prevention subscription for the DNS sinkhole is required to function properly.

  2. Configure the DNS Sinkhole Protection inside of an Anti-Spyware profile. Click on the Objects > Anti-Spyware under Security Profiles on the left.
    Use either an existing profile or create a new profile. In the example below the "alert-all" is being used:
    sinkhole - anti virus.png

    Click the name of the profile - alert-all, click on the DNS Signatures tab.
    sinkhole - anti spyware profile.png

    Change the "Action on DNS queries" to 'sinkhole' if it is not already set to sinkhole.
    Click in the Sinkhole IPv4 field either select the default Palo Alto Networks Sinkhole IP ( or a different IP of your choosing. If you opt to use your own IP, ensure the IP is not used inside your network and preferably not routable over the internet (RFC1918).
    Click on Sinkhole IPv6 and enter a fake IPv6 IP. Even if IPv6 is not used, something still needs to be entered. The example shows ::1 . Click OK. 

    Note: If nothing is entered for the Sinkhole IPv6 field, OK will remain grayed out.

  3. Apply the Anti-Spyware profile on the security policy that allows DNS traffic from the internal network (or internal DNS server) to the internet.
    Click on Policies > Security on the left side.
    Inside the rules, locate the rule that allows DNS traffic outbound, click on the name, go to the Actions tab, and make sure that the proper Anti-Spyware profile is selected. Click OK.
    sinkhole - policy.png

  4. The last thing needed is to have a security rule that will block all web-browsing and SSL access to the fake IP and also :1 if using IPv6. This will ensure to deny traffic to the fake IP from any infected machines.
    sinkhole - block sinkhole.png
  5. Commit the configuration


See Also

For instructions on testing and verifying the setup reference the following document:

How to Verify DNS Sinkhole Function is Working


For Video tutorials on DNS Sinkhole subject:

Video Tutorial: How to Configure DNS Sinkhole

Video Tutorial: How to Verify DNS Sinkhole


owner: rvanderveken

  • Print
  • Copy Link

Choose Language