Palo Alto DNS Proxy Rule for Reverse DNS

I am using the DNS Proxy on a Palo Alto Networks firewall for some user subnets. Besides the default/primary DNS server, it can be configured with proxy rules (also called conditional forwarding) which I am using for reverse DNS lookups, i.e., PTR records, that are answered by a BIND DNS server. While it is easy and well-known to configure the legacy IP (IPv4) reverse records, the IPv6 ones are slightly more difficult. Fortunately, there are some good tools on the Internet to help reversing IPv6 addresses.

I am using a PA-200 with PAN-OS 7.1.2. The BIND server runs on a Ubuntu 12.04.5 LTS with BIND version 9.8.1-P1. For some general information about DNS reverse lookups, use this Wikipedia article. Similar to the notation of IPv6 address in the DNS.

DNS Proxy Rule

This is the configuration of my DNS Proxy with one proxy rule for the reverse lookups. Note that the connections from the Palo Alto to the DNS servers are established via IPv6 though the bulk of DNS lookups is still IPv4 (A records).

Palo Alto DNS Proxy Rule 01

These are the “domain names” I configured. The first lines are the well-known legacy IP reverse zones (RFC1918, thanks to Israel in the comments for telling me that I was missing many zones for the 172.16.0.0/12 range!) while the last one is my /48 global unicast IPv6 subnet.

Now all DNS queries are primarily sent to the DNS server at 2003:51:6012:120::a08:53, while the reverse DNS (rDNS) lookups are sent to 2003:51:6012:120::11.

BIND Zone

I am using a BIND server for my reverse zones. Here are two of the many zones configured within the “named.conf.local” configuration file:

And this is part of my /48 zone for IPv6 PTR records:

Test ‘n Wireshark

This is a basic test from a Windows 7 client behind one of the user subnets on the Palo Alto. It uses the IPv4 address of the Palo Alto layer 3 interface (192.168.125.1) for DNS queries. I tested a normal DNS name weberblog.net  as well as a private/RFC1918 IPv4 address 192.168.100.0 . (Yes, in this case, the *.0 IPv4 address is not the network address but a real address.)

Captured on the Palo Alto (Monitor -> Packet Capture), these are two screenshots from Wireshark that show the connections to the different DNS servers for the different use cases. In any case, the queries from the Palo Alto are made from the appropriate layer 3 interfaces with the corresponding IPv6 addresses, in my case 2003:51:6012:125::1, etc.:

Some Notes

For more information about the DNS proxy use this Palo Alto Networks article: How to Configure DNS Proxy on a Palo Alto Networks Firewall.

Also note that during some configuration changes (commits) on the Palo Alto, the DNS proxy was not working anymore at all! The only way to bring it back to life was to restart the process from the CLI on the Palo:

Cheers.

Featured image “Unklar” by 5auge is licensed under CC BY-NC-ND 2.0.

2 thoughts on “Palo Alto DNS Proxy Rule for Reverse DNS

  1. Nice post, helped me figure out my reverse DNS issue.

    I didn’t notice one thing when I attempted to implement this. Your current entries will only allow IP addresses in the 172.16.0.0/24 subnet. It doesn’t match the entire RFC1918 scope. Not sure if there’s a single entry way to resolve this, but I just added entries for each.
    *.10.in-addr.arpa
    *.16.172.in-addr.arpa
    *.17.172.in-addr.arpa
    *.18.172.in-addr.arpa
    *.19.172.in-addr.arpa
    *.20.172.in-addr.arpa
    *.21.172.in-addr.arpa
    *.22.172.in-addr.arpa
    *.23.172.in-addr.arpa
    *.24.172.in-addr.arpa
    *.25.172.in-addr.arpa
    *.26.172.in-addr.arpa
    *.27.172.in-addr.arpa
    *.28.172.in-addr.arpa
    *.29.172.in-addr.arpa
    *.30.172.in-addr.arpa
    *.31.172.in-addr.arpa
    *.168.192.in-addr.arpa

    Thanks again for the post.

Leave a Reply to Israel Cancel reply

Your email address will not be published. Required fields are marked *