You are on page 1of 5

How to Configure pfBlocker - An IP Block List and Country Block Pac...

1 of 5

http://hubpages.com/technology/How-to-Configure-pfBlocker-An-IP-Bl...

How to Configure pfBlocker - An IP Block List and


Country Block Package for pfSense
Updated on June 18, 2012

PfBlocker is a package for pfSense version 2.x that allows you to add IP block list and country block functions to a pfSense firewall or router.
PfBlocker was created to replace the functions of the IP Blocklist ,and Country Block packages.
I would consider this package a must have package for anyone running an email server on their network. This package will quickly allow you
to block the top 10 countries where spam originates from.
PfBocker also allows you to configure custom block lists for blocking traffic to or from any IP addresses or networks that you specify.
There are several free block lists which are available on the web that target known malicious IP ranges, botnet IP addresses, compromised
IP's, and more.

Installing the Package


To install the package open the pfSense package manager by clicking on 'Packages' in the system menu. Locate the package in the list and
click the plus symbol on the right side to begin the installation.
PfBlocker is only available for pfSense version 2.x, so if you haven't upgraded your pfSense installation then you'll need to do so before you
can use this package.
After the installation is finished you will have a new menu item in the firewall menu for the package.

The package can be installed using the package manager.

Configuration
The first tab of the configuration page contains the general package settings. To turn on the blocker you must select the check box 'Enable
pfBlocker', otherwise no firewall rules will be created.
I also like to go ahead and enable the logging feature, it's much easier to troubleshoot any problems that may occur if the logs are turned on.
You will also need to configure the inbound and outbound interfaces and their associated actions, below are explanations for each setting.
Inbound Interface(s) - If you intend to block incoming traffic to your network then you should select your WAN interface in this section.
Inbound deny action - I recommend sticking with the default action of 'Block'. Blocked traffic will be silently dropped by the firewall and the
source will not be notified with a reset packet or ICMP unreachable message.
Outbound Interface(s) - If you want to block outgoing traffic from within your network select the LAN interface here. This feature is useful if
you want to prevent the users on your network from connecting to IP addresses on the block lists.
Outbound deny action - Again the default action here is usually suitable. Reject will notify the source IP with either a reset (RST) packet or
an ICMP unreachable message for UDP traffic. A reject is useful for LAN hosts because it can provide applications and users some idea of
what is going on with their traffic.
When you're finished with the general settings click on the save button.

11/11/2015 5:17 PM

How to Configure pfBlocker - An IP Block List and Country Block Pac...

2 of 5

http://hubpages.com/technology/How-to-Configure-pfBlocker-An-IP-Bl...

Select the inbound and outbound interfaces on the general settings tab.

Top Spammers
The Top Spammers tab allows you to quickly block any of the top 10 countries that spam originates from.
If you are hosting a mail server on your network then this feature is an easy way to reduce the amount of spam coming into your network.
Configuration
1. Select the 'Top Spammers' tab within the configuration page.
2. Select the countries to block from the list. You can select multiple countries by using CTRL + Click.
3. Set the action to 'Deny Inbound' to prevent incoming connections from the selected countries.
4. Click on 'Save' to apply the settings.

If you host a mail server you can easily block the top countries that spam originates from.

Blocking Individual Countries


The package comes pre-loaded with subnet lists for many different countries. You can select individual countries to block by clicking on the
continent tabs in pfBlocker.
After selecting a continent page you can choose one or more countries to block. To select multiple countries hold the control button while
making your selections.
The default action is 'Disabled' which will not block the countries. You must make a selection of either 'Deny Inbound' , or 'Deny Outbound' to
actually block the traffic.
You can whitelist a country by changing the action to one of the permit functions.

11/11/2015 5:17 PM

How to Configure pfBlocker - An IP Block List and Country Block Pac...

3 of 5

http://hubpages.com/technology/How-to-Configure-pfBlocker-An-IP-Bl...

Individual countries can be blocked using the continent tabs.

Adding Block Lists


One of the great features of this package is that you can add your own IP lists. The list feature allows you to specify a URL for a public block
list which can be automatically downloaded and updated by the package.
PfBlocker supports lists in either text or gzip format.
The custom list function allows you to specify a list of IP's or networks in CIDR format to add to a blocklist.
Adding a Custom List
1. Click on the 'Lists' tab.
2. Enter an Alias Name and optional description for the custom list.
3. Enter a URL or local file of network addresses in CIDR format. (Select either txt or gzip format). You can add individual networks in the
custom list box at the bottom.
4. Set the list action to deny inbound or outbound. Selecting permit will whitelist traffic to these IP's.
5. Choose an update frequency if you want pfBlocker to automatically update the list.
6. Click save to add the custom list.

You can specify your own custom IP lists on the lists tab.

Useful IP Block Lists


Block List

Description

SpamHaus.org DROP List

This list contains networks that are known


to be operated by professional spammers.

URL
http://www.spamhaus.org/drop/drop.lasso

11/11/2015 5:17 PM

How to Configure pfBlocker - An IP Block List and Country Block Pac...

4 of 5

http://hubpages.com/technology/How-to-Configure-pfBlocker-An-IP-Bl...

Block List

Description

URL

DShield Most Active Attackers

IP's of the most active attackers on the


web. Updated daily.

http://feeds.dshield.org/top10-2.txt

Zues IP Blocklist

IP's currently being tracked by the Zues


Tracker. (Command and Control Servers)

https://zeustracker.abuse.ch
/blocklist.php?download=ipblocklist

This table contains some of the most popular block lists available on the web. You can find many more at www.iblocklist.com

Managing Custom Lists


After the list custom list has been saved it will appear in the lists tab. If you plan to add multiple custom lists be sure to set a descriptive name
so you can keep track of them.
5

To make changes to the custom list click on the edit button on the right side. To remove the ilst entry click the X symbol.

Once a custom list has been added it will appear in the lists tab. To add additional lists click on the plus symbol.

Memory Utilization
It's also important to keep in mind that each block list that is enabled will consume system RAM. If your pfSense box doesn't have enough
memory then performance can suffer as a result.
You can monitor memory utilization using the system information dashboard widget. If you find that you are operating above 75% memory
usage then you should consider adding more RAM to the system.

Checking the Status of pfBlocker


The easiest way to make sure that pfBlocker is functioning is to use the dashboard widget.
The pfBlocker dashboard widget will list the number of CIDR ranges that are loaded for each alias, the number of packets blocked by each
list, the status (enabled/disabled) of each list.

To check the status of pfBlocker add the dashboard widget.

Troubleshooting
If pfBlocker doesn't seem to be blocking any traffic there are a few things you can check that may resolve your problems. For additional
assistance check out the pfSense forums.
Make sure that pfBlocker is enabled on the general settings page. If it's not enabled no firewall rules will be created.
Double check the interface selections in the general settings.
Check the system logs (make sure logging is enabled first). PfBlocker log entries will be displayed in the main system logs. The system
logs can be found in the status menu of the web gui. Filter the logs by 'pfblocker' to see only entries for this package.
Make sure the rules were actually created. When pfBlocker is enabled and lists are selected you will see entries on either the WAN or
LAN tab of the firewall rules page. They will appear near the top of the page.
Since pfSense is a stateful firewall a new rule will not be applied to existing states.
This means that a rule to block traffic will not affect existing traffic until the state clears. You can manually clear the states by rebooting
pfSense, or on states page (diagnostics \ States \ Reset states).

pfSense Gear on eBay

11/11/2015 5:17 PM

How to Configure pfBlocker - An IP Block List and Country Block Pac...

5 of 5

http://hubpages.com/technology/How-to-Configure-pfBlocker-An-IP-Bl...

Pfsense 2.2.4 HP-t5740 Intel Atom Firewall 2GR/60G HDD 3gig NICs, Wireless
Buy Now

11/11/2015 5:17 PM

You might also like