Knowledge Base ISC Main Website Ask a Question/Contact ISC
What if I want to use a simpler walled garden triggered by IP address?
Author: Paul Vixie Reference Number: AA-00521 Views: 2149 Created: 2011-11-01 06:20 Last Updated: 2011-11-01 19:43 0 Rating/ Voters

It's possible that the only thing you know about an attacker is the IP address block they will use for their "phishing" web servers. If you don't know what domain names they'll use and you don't know what name servers they'll use, but you do know that every one of their "phishing" web servers in a small block of IP addresses, then you can trigger on all answers which would include records in this address range using RPZ rules that look like the following example:

$ORIGIN rpz.example.com.
22.0.212.94.109.rpz-ip          CNAME   drop.garden.example.com.
*.212.94.109.in-addr.arpa       CNAME   .
*.213.94.109.in-addr.arpa       CNAME   .
*.214.94.109.in-addr.arpa       CNAME   .
*.215.94.109.in-addr.arpa       CNAME   .

Here, if a truthful answer would include an A (address) RR (resource record) whose value was within the 109.94.212.0/22 address block, then a sythentic answer will be sent instead of the truthful answer. Assuming the question is www.malicious.net, the synthetic answer will be:

www.malicious.net.              CNAME   drop.garden.example.com.
drop.garden.example.com.        A       192.168.7.89
This assumes that you've entered real DNS content (outside of your RPZ):

$ORIGIN example.com.
walled-garden                   A       192.168.7.89

In this example there is no "*" in the CNAME target name, and so the original query name will not be present in your walled garden web server's log file. This is an undesireable loss of information, and is shown here for example purposes only. See "When maintaining a DNS RPZ, how do I keep infected users in a walled garden?" for an example policy action that would preserve this information.

Other queries will also be affected by the above RPZ example rules, which are the PTR queries used in address-to-name translation. If your mail or web server receives a connection from an address in the example 109.94.212.0/22 address block, they will perform a PTR (pointer) record lookup to find out domain name is associated with that IP address. This kind of address-to-name translation is usually used for diagnostic or logging purposes, but it is also common for e-mail servers to reject any e-mail from IP addresses which have no address-to-name translation. (Most mail from such IP addresses will be spam, so the lack of a PTR record here has some predictive value.)

By using the "force name-does-not-exist" policy trigger on all lookups in the PTR name space associated with an address block, you can give your servers a hint that these IP addresses are probably sending junk.

See also: Building DNS Firewalls with Response Policy Zones (RPZ)

© 2001-2014 Internet Systems Consortium

Feedback
  • Please help us to improve the content of our knowledge base by letting us know how we can improve this article or by submitting suggestions for other articles you'd like to see created. Information on how to obtain further help on our products or services can be found on our main website.' If you have a technical question or problem on which you'd like help, we recommend searching our community mailing list archives and/or posting your question there (you will need to register there first for your posts to be accepted). The bind-users and the dhcp-users lists particularly have a long-standing and active membership.
Info Submit Feedback on this Article
Nickname: Your Email: Subject: Comment:
Enter the code below:
Quick Jump Menu