Dynamic Block Lists and Spamhaus

Showing results for 
Show  only  | Search instead for 
Did you mean: 
Please sign in to see details of an important advisory in our Customer Advisories area.

Dynamic Block Lists and Spamhaus

L4 Transporter

Does anyone know if the Spamhaus format drop lists (that use ";" delimiters to denote descriptive text) are accepted as PA Dynamic Block lists?




L3 Networker

I don't think you can use any sort of delimiter.  It looks like you'll need to quote the entries too.  So if the list looks like this:

; Spamhaus DROP List 11/09/12 - (c) 2012 The Spamhaus Project

; Last-Modified: Fri, 9 Nov 2012 14:04:03 GMT

; Expires: Sat, 10 Nov 2012 20:45:42 GMT ; SBL154880 ; SBL123577 ; SBL131019 ; SBL131020 ; SBL113323

It would need to become this:



...et cetera

From the on-line help:

Dynamic Block Lists

Objects > Dynamic Block Lists

Use the Dynamic Block Lists page to create an address object based on an imported list of IP addresses. The source of the list must be a text file and must be located on a web server. You can set the Repeat option to automatically update the list on the device hourly, daily, weekly, or monthly. After creating a dynamic block list object, you can then use the address object in the source and destination fields for security policies. Each imported list can contain up to 5,000 IP addresses (IPv4 and/or IPv6), IP ranges, or subnets.

The list must contain one IP address, range, or subnet per line, for example:

“” indicates one address, and “” indicates all addresses from through


“2001:db8:123:1::1” or “2001:db8:123:1::/64”

IP Range:

To specify an address range, select IP Range, and enter a range of addresses. The format is:


where each address can be IPv4 or IPv6.


“2001:db8:123:1::1 - 2001:db8:123:1::22”




Enter a name to identify the Dynamic Block List (up to 32 characters). This name will appear when se...


Enter a description for the block list (up to 255 characters).


Enter an HTTP or HTTPS URL path that contains the text file. For example, http:\\\myfile.txt....


Specify the frequency in which the list should be imported. You can choose hourly, daily, weekly, or...

Test Source URL

Test that the source URL or server path is available.


It's a shame that PA doesn't natively support the the Spamhaus DROP list, as it's only very slightly different from the noted format and is probably one of the most common publicly available (with strong provenance) block lists that is perfectly suited for leveraging in this form of object.

Not applicable


There is no need to put quote to an entry.

regarding the spamhaus, you can use a linux web server with a crontab that generate a text file, this command can do the trick:

curl -L http://www.spamhaus.org/drop/drop.txt | grep -Eo '([0-9]{1,3}\.){3}[0-9]{1,3}/[0-9]{2}' > /path/to/the/file/spamhaus.txt

you can use a crontab to schedule the file update (once a day is enough with spamhaus):

Edit the crontab file:

crontab -e

insert this command (this will update every day at 6:00am the file /path/to/the/file/spamhaus.txt) :

0 6  *  *  *  curl -L http://www.spamhaus.org/drop/drop.txt | grep -Eo '([0-9]{1,3}\.){3}[0-9]{1,3}/[0-9]{2}' > /path/to/the/file/spamhaus.txt

and close the crontab editor

create a dynamic block list object pointing to the correct url to download the generated file.


Thanks cviaud.

It would be really good if the dynamic objects could accept grep commands so this content parsing could be supported natively - there could be a nice little community creating and sharing rules for publically available block lists.  I guess it may also open a door to self-DoS if customers write bad code though!


FYI, the Spamhaus DROP list is included with the EmergingThreats list. This list is directly importable without any preprocessing.


  • 5 replies
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!