diff --git a/net/pfSense-pkg-pfBlockerNG/Makefile b/net/pfSense-pkg-pfBlockerNG/Makefile
index 7ebac376dd12..97203588853e 100644
--- a/net/pfSense-pkg-pfBlockerNG/Makefile
+++ b/net/pfSense-pkg-pfBlockerNG/Makefile
@@ -1,7 +1,7 @@
# $FreeBSD$
PORTNAME= pfSense-pkg-pfBlockerNG
-PORTVERSION= 2.0.1
+PORTVERSION= 2.0.2
CATEGORIES= net
MASTER_SITES= # empty
DISTFILES= # empty
diff --git a/net/pfSense-pkg-pfBlockerNG/files/usr/local/pkg/pfblockerng.xml b/net/pfSense-pkg-pfBlockerNG/files/usr/local/pkg/pfblockerng.xml
index c7f2c068539a..41bbdb8f7503 100644
--- a/net/pfSense-pkg-pfBlockerNG/files/usr/local/pkg/pfblockerng.xml
+++ b/net/pfSense-pkg-pfBlockerNG/files/usr/local/pkg/pfblockerng.xml
@@ -48,7 +48,7 @@
Describe your package requirements hereCurrently there are no FAQ items provided.pfblockerng
- 2.0
+ 2.0.2
pfBlockerNG: General Settings/usr/local/pkg/pfblockerng/pfblockerng.incpfBlockerNG: Save General Settings
@@ -214,23 +214,20 @@
Enable pfBlockerNGenable_cb
+ Enable/Disablecheckbox
- Enable/Disable]]>
-
- begin
+ Keep Settingspfb_keep
+ Keep settingscheckbox
- Note: - with 'Keep settings' enabled, pfBlockerNG will maintain run state
- on Installation/Upgrade If 'Keep Settings' is not 'enabled' on pkg Install/De-Install, all settings will be Wiped!
+ Note: - with 'Keep settings' enabled, pfBlockerNG will maintain run state
+ on Installation/Upgrade. If 'Keep Settings' is not 'enabled' on pkg Install/De-Install, all settings will be Wiped!
Note: To clear all downloaded lists, uncheck these two checkboxes and 'Save'.
re-check both boxes and run a 'Force Update']]>
-
+
on
-
-
- endCRON Settings
@@ -240,8 +237,7 @@
Hour Intervalpfb_intervalEvery hour
- Select the cron hour interval. The interval selected will be used with the start min/hour below.
- Ensure that all list 'Update settings' are within the selected interval/start hour settings.]]>
+ Select the Cron hour interval.]]>
select
@@ -261,7 +257,7 @@
Start Minpfb_min:00
- Select Cron Update Minute]]>
+ Select the Cron update minute.]]>
select
@@ -277,7 +273,7 @@
Start Hourpfb_hour0
- Select the start hour]]>
+ Select the Cron start hour.]]>
select
@@ -312,7 +308,7 @@
Start Hour]]>pfb_dailystart
- 0 This is used by the 'Daily/Weekly' scheduler only.]]>
+ 0 Select the 'Daily/Weekly' start hour.]]>select
@@ -347,10 +343,10 @@
Enable De-Duplicationenable_dupcheckbox
- Only for IPv4 Lists
+ Only used for IPv4 Deny Lists
- Enable Aggregation of CIDRs
+ Enable CIDR Aggregationenable_aggcheckboxOptimise CIDRs (not recommended for slow systems with large lists)
@@ -358,33 +354,33 @@
Enable Suppressionsuppression
- checkbox
-
- Country blocking lists cannot be suppressed. This will also remove any RFC1918 addresses from all lists.
- Alerts can be suppressed using the '+' icon in the Alerts tab and IPs added to the 'pfBlockerNGSuppress' alias
+
+ Alerts can be suppressed using the '+' icon in the Alerts tab and IPs added to the 'pfBlockerNGSuppress' alias
A blocked IP in a CIDR other than /32 or /24 will need a 'Whitelist alias' w/ list action: 'Permit Outbound' Firewall rule
- Do not use the pfBlockerNGSuppress Alias in a Firewall Rule.
+
Do not use the pfBlockerNGSuppress Alias in a Firewall Rule.
This alias is used during the cron download process only.]]>
-
+
+ checkboxGlobal Enable Loggingenable_logcheckbox
-
- This overrides any log settings in the Alias tabs.]]>
+ Firewall Rule logging - Enable Global logging to [ Status: System Logs: FIREWALL Log ]
+ This overrides any log settings in the Alias tabs.
- Disable MaxMind Country database CRON updates
+ Disable MaxMind Updatesdatabase_cccheckbox
-
- This does not affect the MaxMind binary cron task]]>
+ This will disable the MaxMind monthly Country database Cron update.
+ This does not affect the MaxMind binary cron task.
- Max daily download failure threshold
+ Download Failure Thresholdskipfeed0 (Disabled)
Select max daily download failure threshold via CRON. Clear widget 'failed downloads' to reset.]]>
@@ -402,12 +398,12 @@
0
- Restore previous download on failure
+ Restore on Failurerestore_feed
- checkbox
- Enabled
+ Enabled
When 'selected', on a download failure, the previously downloaded list is restored.]]>
-
+
+ checkboxon
@@ -497,15 +493,15 @@
Floating Rulesenable_floatcheckbox
- Enabled: Auto-rules will be generated in the 'Floating Rules' tab
- Disabled: Auto-rules will be generated in the selected Inbound/Outbound interfaces
+ Enabled: Auto-rules will be generated in the 'Floating Rules' tab
+ Disabled: Auto-rules will be generated in the selected Inbound/Outbound interfaces Rules will be ordered by the selection below.]]>
-
+
Rule Orderpass_order
- Default Order: | pfB_Block/Reject | All other Rules | (original format)
+ | pfB_Block/Reject | All other Rules | (original format)
Select The 'Order' of the Rules
Selecting 'original format', sets pfBlockerNG rules at the top of the Firewall TAB.
Selecting any other 'Order' will re-order all the rules to the format indicated!]]>
@@ -536,10 +532,10 @@
Kill Stateskillstates
- checkbox
-
- Firewall states will be cleared.]]>
+ When 'Enabled', after a cron event or any 'Force' commands, any blocked IPs found in the
+ Firewall states will be cleared.
+ checkbox
@@ -548,7 +544,6 @@
Creditscredits
- infopfBlockerNG
Created in 2015 by BBcan177.
Based upon pfBlocker by Marcello Coutinho and Tom Schaefer.
@@ -556,17 +551,19 @@
MaxMind Inc. @ MaxMind.com.
The database is automatically updated the first Tuesday of each month]]>
+ infoSupport
- info
- If you like this package, please support the developer @ BBCan177@gmail.com.]]>
+ If you like this package, please support the developer @ BBCan177@gmail.com
+ ]]>
+ info
- Click to SAVE Settings and/or Rule edits. Changes are applied via CRON or
- 'Force Update']]>
+
Click to SAVE Settings and/or Rule edits. Changes are applied via CRON or
+ 'Force Update'
]]>listtopic
@@ -592,4 +589,4 @@
sync_package_pfblockerng();
]]>
-
\ No newline at end of file
+
diff --git a/net/pfSense-pkg-pfBlockerNG/files/usr/local/pkg/pfblockerng/pfblockerng.inc b/net/pfSense-pkg-pfBlockerNG/files/usr/local/pkg/pfblockerng/pfblockerng.inc
index c08291dbd85b..36c92cb0e24c 100644
--- a/net/pfSense-pkg-pfBlockerNG/files/usr/local/pkg/pfblockerng/pfblockerng.inc
+++ b/net/pfSense-pkg-pfBlockerNG/files/usr/local/pkg/pfblockerng/pfblockerng.inc
@@ -48,13 +48,6 @@ require_once('/usr/local/pkg/pfblockerng/pfblockerng_extra.inc'); // 'include fu
global $g, $config, $pfb;
-$pfs_version = substr(trim(file_get_contents('/etc/version')), 0, 3);
-if ($pfs_version == '2.2') {
- $pfb['prefix'] = '/usr/pbi/pfblockerng-' . php_uname('m');
-} else {
- $pfb['prefix'] = '/usr/local';
-}
-
// Folders
$pfb['dbdir'] = "{$g['vardb_path']}/pfblockerng";
$pfb['aliasdir'] = "{$g['vardb_path']}/aliastables";
@@ -68,8 +61,8 @@ $pfb['origdir'] = "{$pfb['dbdir']}/original";
$pfb['dnsdir'] = "{$pfb['dbdir']}/dnsbl";
$pfb['dnsorigdir'] = "{$pfb['dbdir']}/dnsblorig";
$pfb['dnsalias'] = "{$pfb['dbdir']}/dnsblalias";
-$pfb['geoipshare'] = "{$pfb['prefix']}/share/GeoIP";
-$pfb['ccdir'] = "{$pfb['prefix']}/share/GeoIP/cc";
+$pfb['geoipshare'] = '/usr/local/share/GeoIP';
+$pfb['ccdir'] = '/usr/local/share/GeoIP/cc';
// Application Paths
$pfb['grep'] = '/usr/bin/grep';
@@ -96,7 +89,7 @@ $pfb['dnsbl_info'] = "{$pfb['dbdir']}/dnsbl_info";
$pfb['dnsbl_conf'] = '/var/unbound/pfb_dnsbl_lighty.conf';
$pfb['dnsbl_cert'] = '/var/unbound/dnsbl_cert.pem';
$pfb['script'] = '/usr/local/pkg/pfblockerng/pfblockerng.sh';
-$pfb['aliasarchive'] = "{$pfb['prefix']}/etc/aliastables.tar.bz2";
+$pfb['aliasarchive'] = '/usr/local/etc/aliastables.tar.bz2';
// Unbound files and folders
$pfb['dnsbl_file'] = '/var/unbound/pfb_dnsbl'; // Filename Extension not referenced
@@ -198,8 +191,9 @@ function pfb_global() {
$pfb['24hour'] = $pfb['config']['pfb_dailystart']; // Start hour of the 'Once a day' schedule
$pfb['iplocal'] = $config['interfaces']['lan']['ipaddr']; // Lan IP address
$pfb['dnsbl'] = $pfb['dnsblconfig']['pfb_dnsbl']; // Enabled state of DNSBL
- $pfb['dnsbl_port'] = $pfb['dnsblconfig']['pfb_dnsport'] ?: ''; // Lighttpd web server http port setting
- $pfb['dnsbl_port_ssl'] = $pfb['dnsblconfig']['pfb_dnsport_ssl']?: ''; // Lighttpd web server https port setting
+ $pfb['dnsbl_port'] = $pfb['dnsblconfig']['pfb_dnsport']; // Lighttpd web server http port setting
+ $pfb['dnsbl_port_ssl'] = $pfb['dnsblconfig']['pfb_dnsport_ssl']; // Lighttpd web server https port setting
+ $pfb['dnsbl_alexa'] = $pfb['dnsblconfig']['alexa_enable']; // Alexa whitelist
// Restore previous download on failure (default to 'on')
$pfb['restore'] = $pfb['config']['restore_feed'] != '' ? $pfb['config']['restore_feed'] : 'on';
@@ -890,11 +884,11 @@ function pfblockerng_alexa() {
// Array of TLDs to include in Whitelist
$pfb_include = array_flip(explode(',', $pfb['dnsbl_alexa_inc']));
- if (($handle = fopen("{$pfb['dbdir']}/top-1m.csv", 'r')) !== FALSE) {
- $pfb_output = fopen("{$pfb['dbdir']}/pfbalexawhitelist.txt", 'w');
+ if (($handle = @fopen("{$pfb['dbdir']}/top-1m.csv", 'r')) !== FALSE) {
+ $pfb_output = @fopen("{$pfb['dbdir']}/pfbalexawhitelist.txt", 'w');
for ($x=1; $x <= $pfb['dnsbl_alexa_cnt']; ++$x) {
- $aline = fgetcsv($handle);
+ $aline = @fgetcsv($handle);
// Collect Domain TLD
$tld = array_pop(explode('.', $aline[1]));
@@ -917,8 +911,8 @@ function pfblockerng_alexa() {
$log = "\nAlexa conversion Failed. File: top-1m.csv, not found.\n";
pfb_logger("{$log}", 2);
}
- fclose($handle);
- fclose($pfb_output);
+ @fclose($handle);
+ @fclose($pfb_output);
}
@@ -1126,7 +1120,7 @@ function pfb_download($list_url, $file_dwn, $pflex=FALSE, $header, $format, $log
// Download using cURL
else {
- if (($fhandle = fopen("{$file_dwn}.raw", 'w')) !== FALSE) {
+ if (($fhandle = @fopen("{$file_dwn}.raw", 'w')) !== FALSE) {
if (!($ch = curl_init($list_url))) {
$log = "\nFailed to create cURL resource... Exiting...\n";
pfb_logger("{$log}", "{$logtype}");
@@ -1191,7 +1185,7 @@ function pfb_download($list_url, $file_dwn, $pflex=FALSE, $header, $format, $log
}
curl_close($ch);
}
- fclose($fhandle);
+ @fclose($fhandle);
}
}
@@ -1210,17 +1204,17 @@ function pfb_download($list_url, $file_dwn, $pflex=FALSE, $header, $format, $log
}
else {
pfb_logger('.', 1);
- $pfb_output = fopen("{$file_dwn}.orig", 'w');
- if (($fhandle = gzopen("{$file_dwn}.raw", 'r')) !== FALSE) {
- if (($fhandle = gzopen("{$file_dwn}.raw", 'r')) !== FALSE) {
- while (($line = gzgets($fhandle, 1024)) !== FALSE) {
+ $pfb_output = @fopen("{$file_dwn}.orig", 'w');
+ if (($fhandle = @gzopen("{$file_dwn}.raw", 'r')) !== FALSE) {
+ if (($fhandle = @gzopen("{$file_dwn}.raw", 'r')) !== FALSE) {
+ while (($line = @gzgets($fhandle, 1024)) !== FALSE) {
fwrite($pfb_output, $line);
}
}
$retval = 0;
}
- gzclose($fhandle);
- fclose($pfb_output);
+ @gzclose($fhandle);
+ @fclose($pfb_output);
}
}
elseif ($file_type == 'application/x-bzip2') {
@@ -1661,7 +1655,7 @@ function pfb_livetail($logfile, $mode) {
//file deleted or reset
$lastpos = $len;
} else {
- $f = fopen("{$logfile}", 'rb+');
+ $f = @fopen("{$logfile}", 'rb+');
if ($f === false) {
break;
}
@@ -1682,11 +1676,11 @@ function pfb_livetail($logfile, $mode) {
}
$lastpos = ftell($f);
- fclose($f);
+ @fclose($f);
// Capture remaining output
if ($mode != 'view' && strpos($pfb_output, 'UPDATE PROCESS ENDED') !== FALSE) {
- $f = fopen($pfb['log'], 'rb');
+ $f = @fopen($pfb['log'], 'rb');
fseek($f, $lastpos);
$pfb_buffer = fread($f, 2048);
$pfb_output .= str_replace( "\r", '', $pfb_buffer);
@@ -1694,7 +1688,7 @@ function pfb_livetail($logfile, $mode) {
clearstatcache(false, $pfb['log']);
ob_flush();
flush();
- fclose($f);
+ @fclose($f);
// Call log mgmt function
pfb_log_mgmt();
@@ -1722,21 +1716,21 @@ function pfb_livetail($logfile, $mode) {
if (!empty($pfb_query)) {
// Increment DNSBL Alias counter
- if (($handle = fopen("{$pfb['dnsbl_info']}", 'r')) !== FALSE) {
+ if (($handle = @fopen("{$pfb['dnsbl_info']}", 'r')) !== FALSE) {
flock($handle, LOCK_EX);
- $pfb_output = fopen("{$pfb['dnsbl_info']}.bk", 'w');
+ $pfb_output = @fopen("{$pfb['dnsbl_info']}.bk", 'w');
flock($pfb_output, LOCK_EX);
// Find line with corresponding DNSBL Aliasname
- while (($line = fgetcsv($handle)) !== FALSE) {
+ while (($line = @fgetcsv($handle)) !== FALSE) {
if ($line[0] == $pfb_query) {
$line[3] += 1;
}
fputcsv($pfb_output, $line);
}
- fclose($pfb_output);
- fclose($handle);
+ @fclose($pfb_output);
+ @fclose($handle);
@rename ("{$pfb['dnsbl_info']}.bk", "{$pfb['dnsbl_info']}");
}
}
@@ -1753,7 +1747,7 @@ function pfb_livetail($logfile, $mode) {
if ($tlen > $lastpos) {
$tlen = $tlen - $lastpos;
ftruncate($f, $tlen);
- fclose($f);
+ @fclose($f);
$lastpos = $tlen;
}
}
@@ -1858,7 +1852,6 @@ function sync_package_pfblockerng($cron='') {
$pfb['dnsbl_iface'] = $pfb['dnsblconfig']['dnsbl_interface']?: 'lan'; // VIP Local Interface setting
$pfb['dnsbl_ip'] = $pfb['dnsblconfig']['action'] ?: 'Disabled'; // Enable/Disable IP blocking from DNSBL lists
$pfb['dnsbl_rule'] = $pfb['dnsblconfig']['pfb_dnsbl_rule'] ?: 'Disabled'; // Auto create a Floating Pass Rule for other Lan subnets
- $pfb['dnsbl_alexa'] = $pfb['dnsblconfig']['alexa_enable'] ?: 'Disabled'; // Enable Alexa whitelist
$pfb['dnsbl_alexa_cnt'] = $pfb['dnsblconfig']['alexa_count'] ?: '1000'; // Alexa whitelist domain setting
$pfb['dnsbl_alexa_inc'] = $pfb['dnsblconfig']['alexa_inclusion'] ?: ''; // Alexa TLDs inclusions for whitelisting
@@ -2504,8 +2497,8 @@ function sync_package_pfblockerng($cron='') {
$e_skip = $e_found = FALSE; // Variables for Easylists
$fail_list = ''; $csvfail = $ipcount = $ip_cnt = 0;
- if (($fhandle = fopen("{$file_dwn}.orig", 'r')) !== FALSE) {
- while (($line = fgets($fhandle, 3072)) !== FALSE) {
+ if (($fhandle = @fopen("{$file_dwn}.orig", 'r')) !== FALSE) {
+ while (($line = @fgets($fhandle, 3072)) !== FALSE) {
// On 'category match', parse EasyList feed
if (isset($easylist)) {
@@ -2745,7 +2738,7 @@ function sync_package_pfblockerng($cron='') {
}
}
}
- fclose($fhandle);
+ @fclose($fhandle);
unset($csvline, $easylist); // Unset variables
// Remove duplicates and save any IPs found in domain feed
@@ -2827,16 +2820,16 @@ function sync_package_pfblockerng($cron='') {
if ($pfb['aliasupdate']) {
// Create master alias file
- $pfb_output = fopen("{$pfb['dnsalias']}/{$alias}", 'w');
+ $pfb_output = @fopen("{$pfb['dnsalias']}/{$alias}", 'w');
foreach ($lists_dnsbl_current as $clist) {
- if (($handle = fopen("{$pfbfolder}/{$clist}.txt", 'r')) !== FALSE) {
- while (($line = fgets($handle, 3072)) !== FALSE) {
+ if (($handle = @fopen("{$pfbfolder}/{$clist}.txt", 'r')) !== FALSE) {
+ while (($line = @fgets($handle, 3072)) !== FALSE) {
fwrite($pfb_output, $line);
}
}
- fclose($handle);
+ @fclose($handle);
}
- fclose($pfb_output);
+ @fclose($pfb_output);
// Update domain alias statistics
$dns_now = date('M d G:i', time());
@@ -2887,14 +2880,14 @@ function sync_package_pfblockerng($cron='') {
}
// Save alias statistics to file (Remove any feeds that are not referenced)
- $handle = fopen("{$pfb['dnsbl_info']}", 'w');
+ $handle = @fopen("{$pfb['dnsbl_info']}", 'w');
fwrite($handle, "# Keeping this file open in a file editor will interrupt DNSBL!\n");
foreach ($dnsbl_info as $alias) {
if (in_array($alias[0], $alias_dnsbl_all)) {
fputcsv($handle, $alias);
}
}
- fclose($handle);
+ @fclose($handle);
}
// Create DNSBL firewall rules/alias if action permits
@@ -2921,16 +2914,16 @@ function sync_package_pfblockerng($cron='') {
$dnsbl_ip = glob("{$pfb['dnsdir']}/*.ip");
if (!empty($dnsbl_ip)) {
if ($pfb['updateip'] || !file_exists("{$pfb['aliasdir']}/pfB_DNSBLIP.txt")) {
- $pfb_ips = fopen("{$pfb['aliasdir']}/pfB_DNSBLIP.txt", 'w');
+ $pfb_ips = @fopen("{$pfb['aliasdir']}/pfB_DNSBLIP.txt", 'w');
foreach ($dnsbl_ip as $d_ip) {
- if (($handle = fopen("{$d_ip}", 'r')) !== FALSE) {
- while (($line = fgets($handle, 1024)) !== FALSE) {
+ if (($handle = @fopen("{$d_ip}", 'r')) !== FALSE) {
+ while (($line = @fgets($handle, 1024)) !== FALSE) {
fwrite($pfb_ips, $line);
}
}
- fclose($handle);
+ @fclose($handle);
}
- fclose($pfb_ips);
+ @fclose($pfb_ips);
}
// Update DNSBL_IPs aliastable
@@ -2967,16 +2960,16 @@ function sync_package_pfblockerng($cron='') {
if ($pfb['domain_update']) {
if (!empty($lists_dnsbl_all)) {
pfb_logger("\n\n------------------------------------------\nAssembling database...", 1);
- $pfb_output = fopen("{$pfb['dnsbl_file']}.raw", 'w');
+ $pfb_output = @fopen("{$pfb['dnsbl_file']}.raw", 'w');
foreach ($lists_dnsbl_all as $current_list) {
- if (($handle = fopen("{$pfb['dnsdir']}/{$current_list}.txt", 'r')) !== FALSE) {
- while (($line = fgets($handle, 3072)) !== FALSE) {
+ if (($handle = @fopen("{$pfb['dnsdir']}/{$current_list}.txt", 'r')) !== FALSE) {
+ while (($line = @fgets($handle, 3072)) !== FALSE) {
fwrite($pfb_output, $line);
}
}
- fclose($handle);
+ @fclose($handle);
}
- fclose($pfb_output);
+ @fclose($pfb_output);
// Perform sort and uniq on DNSBL database File. Validation of file required before use.
exec("{$pfb['cat']} {$pfb['dnsbl_file']}.raw | /usr/bin/sort | /usr/bin/uniq > {$pfb['dnsbl_file']}.tmp && /bin/rm -f {$pfb['dnsbl_file']}.raw");
@@ -3409,8 +3402,8 @@ function sync_package_pfblockerng($cron='') {
}
}
- if (($fhandle = fopen("{$file_dwn}.orig", 'r')) !== FALSE) {
- while (($line = fgets($fhandle, 1024)) !== FALSE) {
+ if (($fhandle = @fopen("{$file_dwn}.orig", 'r')) !== FALSE) {
+ while (($line = @fgets($fhandle, 1024)) !== FALSE) {
// Record original line for regex matching, if required.
$oline = $line;
@@ -3551,7 +3544,7 @@ function sync_package_pfblockerng($cron='') {
pfb_logger("{$log}", 2);
}
}
- fclose($fhandle);
+ @fclose($fhandle);
pfb_logger("\n", 1);
if (!$custom) {
diff --git a/net/pfSense-pkg-pfBlockerNG/files/usr/local/pkg/pfblockerng/pfblockerng.sh b/net/pfSense-pkg-pfBlockerNG/files/usr/local/pkg/pfblockerng/pfblockerng.sh
index ace6dbfe98de..bb139a96d3dc 100644
--- a/net/pfSense-pkg-pfBlockerNG/files/usr/local/pkg/pfblockerng/pfblockerng.sh
+++ b/net/pfSense-pkg-pfBlockerNG/files/usr/local/pkg/pfblockerng/pfblockerng.sh
@@ -13,21 +13,13 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-pfs_version=$(/bin/cat /etc/version | /usr/bin/cut -c 1-3)
-if [ "${pfs_version}" = '2.2' ]; then
- mtype=$(/usr/bin/uname -m)
- prefix="/usr/pbi/pfblockerng-${mtype}"
-else
- prefix='/usr/local'
-fi
-
now=$(/bin/date +%m/%d/%y' '%T)
# Application Locations
-pathgrepcidr="${prefix}/bin/grepcidr"
-pathaggregate="${prefix}/bin/aggregate"
-pathmwhois="${prefix}/bin/mwhois"
-pathgeoip="${prefix}/bin/geoiplookup"
+pathgrepcidr="/usr/local/bin/grepcidr"
+pathaggregate="/usr/local/bin/aggregate"
+pathmwhois="/usr/local/bin/mwhois"
+pathgeoip="/usr/local/bin/geoiplookup"
pathgunzip=/usr/bin/gunzip
pathhost=/usr/bin/host
pathtar=/usr/bin/tar
@@ -44,8 +36,8 @@ etblock="$(echo ${8} | sed 's/,/, /g')"
etmatch="$(echo ${9} | sed 's/,/, /g')"
# File Locations
-aliasarchive="${prefix}/etc/aliastables.tar.bz2"
-pathgeoipdat="${prefix}/share/GeoIP/GeoIP.dat"
+aliasarchive="/usr/local/etc/aliastables.tar.bz2"
+pathgeoipdat="/usr/local/share/GeoIP/GeoIP.dat"
pfbsuppression=/var/db/pfblockerng/pfbsuppression.txt
pfbalexa=/var/db/pfblockerng/pfbalexawhitelist.txt
masterfile=/var/db/pfblockerng/masterfile
@@ -978,4 +970,4 @@ case "${1}" in
*)
;;
esac
-exitnow
\ No newline at end of file
+exitnow
diff --git a/net/pfSense-pkg-pfBlockerNG/files/usr/local/pkg/pfblockerng/pfblockerng_dnsbl.xml b/net/pfSense-pkg-pfBlockerNG/files/usr/local/pkg/pfblockerng/pfblockerng_dnsbl.xml
index 250d2e121325..edd6ca3d6489 100644
--- a/net/pfSense-pkg-pfBlockerNG/files/usr/local/pkg/pfblockerng/pfblockerng_dnsbl.xml
+++ b/net/pfSense-pkg-pfBlockerNG/files/usr/local/pkg/pfblockerng/pfblockerng_dnsbl.xml
@@ -147,9 +147,9 @@
Enable DNSBLpfb_dnsblcheckbox
-
+
To Utilize, Unbound DNS Resolver must be enabled.]]>
-
+
DNSBL Virtual IP
@@ -170,7 +170,7 @@
input3
- Enter a single PORT that is in the range of 1 - 65535
+ Enter a single PORT that is in the range of 1 - 65535
This Port must not be in use by any other process.]]>
8081
@@ -181,7 +181,7 @@
input3
- Enter a single PORT that is in the range of 1 - 65535
+ Enter a single PORT that is in the range of 1 - 65535
This Port must not be in use by any other process.]]>
8443
@@ -225,7 +225,8 @@
List Action
- Disabled
+ Disabled
+
Select the Action for Firewall Rules when any DNSBL Feed contain IP addresses.
'Disabled' Rule: Disables selection and does nothing to selected Alias.
@@ -239,7 +240,7 @@
still allowing deliberate outgoing sessions to be created in the other direction.
'Alias' Rule: 'Alias' rules create an alias for the list (and do nothing else).
- This enables a pfBlockerNG list to be used by name, in any firewall rule or pfSense function, as desired.]]>
+ This enables a pfBlockerNG list to be used by name, in any firewall rule or pfSense function, as desired.
]]>
actionselect
@@ -270,7 +271,7 @@
info
- Note: In general, Auto-Rules are created as follows:
+ Note: In general, Auto-Rules are created as follows:
Inbound - 'any' port, 'any' protocol and 'any' destination
Outbound - 'any' port, 'any' protocol and 'any' destination address in the lists
Configuring the Adv. Inbound Rule settings, will allow for more customization of the Inbound Auto-Rules.
@@ -321,9 +322,9 @@
Invertautonot
- Invert - Option to invert the sense of the match.
- ie - Not (!) Destination Address(es)]]>
-
+ Invert - Option to invert the sense of the match.
+ ie - Not (!) Destination Address(es)]]>
+ checkbox
@@ -351,8 +352,8 @@
Enable Alexaalexa_enable
- Top 1 million sites list.
- (Global 1 month average traffic ranking)
+ Top 1 million sites list.
+ (Global 1 month average traffic ranking)
Alexa can be used to whitelist the most popular domain names to avoid false positives.
To use this feature, select the number of 'Top Domains' to whitelist. You can also 'include' which TLDs to whitelist.
@@ -365,7 +366,7 @@
The complete 'Top 1M list' can be downloaded from
Here (Database is free to use.)
When enabled, this list will be automatically updated once per month along with the MaxMind Database.]]>
-
+
checkbox
@@ -594,4 +595,4 @@
sync_package_pfblockerng();
]]>
-
\ No newline at end of file
+
diff --git a/net/pfSense-pkg-pfBlockerNG/files/usr/local/pkg/pfblockerng/pfblockerng_dnsbl_easylist.xml b/net/pfSense-pkg-pfBlockerNG/files/usr/local/pkg/pfblockerng/pfblockerng_dnsbl_easylist.xml
index f416e7d8dd88..76045d76f996 100644
--- a/net/pfSense-pkg-pfBlockerNG/files/usr/local/pkg/pfblockerng/pfblockerng_dnsbl_easylist.xml
+++ b/net/pfSense-pkg-pfBlockerNG/files/usr/local/pkg/pfblockerng/pfblockerng_dnsbl_easylist.xml
@@ -141,7 +141,7 @@
90
- EasyList Feeds]]>
+ EasyList Feedsrowhelper
@@ -281,4 +281,4 @@
sync_package_pfblockerng();
]]>
-
\ No newline at end of file
+
diff --git a/net/pfSense-pkg-pfBlockerNG/files/usr/local/pkg/pfblockerng/pfblockerng_dnsbl_lists.xml b/net/pfSense-pkg-pfBlockerNG/files/usr/local/pkg/pfblockerng/pfblockerng_dnsbl_lists.xml
index e07ee0c1cae6..cfc207efe2c1 100644
--- a/net/pfSense-pkg-pfBlockerNG/files/usr/local/pkg/pfblockerng/pfblockerng_dnsbl_lists.xml
+++ b/net/pfSense-pkg-pfBlockerNG/files/usr/local/pkg/pfblockerng/pfblockerng_dnsbl_lists.xml
@@ -161,18 +161,18 @@
InfoListsinfo
- 'Format': Select the Format type.
- 'State': Select the run state.
+ 'Format': Select the Format type.
+ 'State': Select the run state. 'Source':
Select the Action for Firewall Rules on lists you have selected.
'Disabled' Rules: Disables selection and does nothing to selected Alias.
@@ -264,7 +265,7 @@
'Alias Native' lists are kept in their Native format without any modifications.
Note:
When manually creating 'Alias' type firewall rules; Do not add (pfB_) to the
start of the rule description, use (pfb_) (Lowercase prefix). Manually created 'Alias' rules with 'pfB_' in the
- description will be auto-removed by package when 'Auto' rules are defined.
]]>
+ description will be auto-removed by package when 'Auto' rules are defined.
]]>
actionselect
@@ -282,6 +283,7 @@
+
@@ -302,7 +304,7 @@
info
- Note: In general, Auto-Rules are created as follows:
+ Note: In general, Auto-Rules are created as follows:
Inbound - 'any' port, 'any' protocol and 'any' destination
Outbound - 'any' port, 'any' protocol and 'any' destination address in the lists
Configuring the Adv. Inbound Rule settings, will allow for more customization of the Inbound Auto-Rules.
@@ -353,9 +355,9 @@
Invertautonot
- Invert - Option to invert the sense of the match.
- ie - Not (!) Destination Address(es)]]>
-
+ Invert - Option to invert the sense of the match.
+ ie - Not (!) Destination Address(es)]]>
+ checkbox
@@ -394,4 +396,4 @@
sync_package_pfblockerng();
]]>
-
\ No newline at end of file
+
diff --git a/net/pfSense-pkg-pfBlockerNG/files/usr/local/pkg/pfblockerng/pfblockerng_v4lists.xml b/net/pfSense-pkg-pfBlockerNG/files/usr/local/pkg/pfblockerng/pfblockerng_v4lists.xml
index 24c8b2791566..c47ec560c16e 100644
--- a/net/pfSense-pkg-pfBlockerNG/files/usr/local/pkg/pfblockerng/pfblockerng_v4lists.xml
+++ b/net/pfSense-pkg-pfBlockerNG/files/usr/local/pkg/pfblockerng/pfblockerng_v4lists.xml
@@ -162,25 +162,25 @@
info
- 'Format': Select the Format type.
- 'State': Select the run state.
+ 'Format': Select the Format type.
+ 'State': Select the run state. 'Source':
'Header/Label': This field must be unique. This names the file and is referenced in the widget.
- (ie: Spamhaus_drop, Spamhaus_edrop)
]]>
+ (ie: Spamhaus_drop, Spamhaus_edrop)]]>
- IPv4 Lists]]>
+ 'Format': Select the file format that URL will retrieve.
'auto' - Default parser
'regex' - 'Regex' style parsing (ie: html Lists)
@@ -237,7 +237,8 @@
List Action
- Default: Disabled
+ Disabled
+
Select the Action for Firewall Rules on lists you have selected.
'Disabled' Rules: Disables selection and does nothing to selected Alias.
@@ -263,13 +264,13 @@
'Alias' Rules: 'Alias' rules create an alias for the list (and do nothing else).
This enables a pfBlockerNG list to be used by name, in any firewall rule or pfSense function, as desired.
-
Options - Alias Deny, Alias Permit, Alias Match, Alias Native
-
'Alias Deny' can use De-Duplication and Reputation Processes if configured.
-
'Alias Permit' and 'Alias Match' will be saved in the Same folder as the other Permit/Match Auto-Rules
+
Options - Alias Deny, Alias Permit, Alias Match, Alias Native
+
'Alias Deny' can use De-Duplication and Reputation Processes if configured.
+
'Alias Permit' and 'Alias Match' will be saved in the Same folder as the other Permit/Match Auto-Rules
'Alias Native' lists are kept in their Native format without any modifications.
Note:
When manually creating 'Alias' type firewall rules; Do not add (pfB_) to the
start of the rule description, use (pfb_) (Lowercase prefix). Manually created 'Alias' rules with 'pfB_' in the
- description will be auto-removed by package when 'Auto' rules are defined.
]]>
+ description will be auto-removed by package when 'Auto' rules are defined.
]]>
actionselect
@@ -358,7 +359,7 @@
info
- Note: In general, Auto-Rules are created as follows:
+ Note: In general, Auto-Rules are created as follows:
Inbound - 'any' port, 'any' protocol and 'any' destination
Outbound - 'any' port, 'any' protocol and 'any' destination address in the lists
Configuring the Adv. Inbound Rule settings, will allow for more customization of the Inbound Auto-Rules.
@@ -370,20 +371,17 @@
Enable Custom Portcheckboxaliasports
- beginDefine Aliasaliasports
- Click Here to add/edit Aliases
- Do not manually enter port numbers. Do not use 'pfB_' in the Port Alias name.]]>
- 21aliasesport
-
-
+ Click Here to add/edit Aliases
+ Do not manually enter port numbers. Do not use 'pfB_' in the Port Alias name.]]>
+ end
@@ -409,9 +407,9 @@
Invertautonot
- Invert - Option to invert the sense of the match.
- ie - Not (!) Destination Address(es)]]>
-
+ Invert - Option to invert the sense of the match.
+ ie - Not (!) Destination Address(es)]]>
+ checkbox
@@ -438,37 +436,37 @@
info
- Note: Custom List can be used in ONE of two ways:
+ Note: Custom List can be used in ONE of two ways:
1. IPv4 addresses entered directly into the custom list, as per the required format.
2. Domain names or AS numbers, which will be converted into their respective IPv4 addresses.
]]>
whois_convert
- DO NOT mix IPs with Domains/ASs in this custom list.]]>
-
+
Enable Domain/AScheckboxCustom Address(es)custom
-
- Format IPv4:
- Network ranges: 172.16.1.0-172.16.1.255
+
+ Format IPv4:
+
Network ranges: 172.16.1.0-172.16.1.255
IP Address: 172.16.1.10
CIDR: 172.16.1.0/24
RFC 1918 addresses may be used in a custom list.
You may use "#" after any IP/CIDR/Range to add comments. ie: x.x.x.x # Safe IP Address
If you select the Domain/AS checkbox above, the custom list can only
- be used for Domain names/AS's.
- Format Domain/AS:
- One 'Domain' or 'AS' per line.
+ be used for Domain names/AS's.
+ Format Domain/AS:
+
One 'Domain' or 'AS' per line.
Domains and/or ASs can be used in the same list.
Conversion of Domains/ASs utilize Team CYMRU
and the RADb whois registry.
- Configure the 'update frequency', so that it does not abuse these free services.]]>
+ Configure the 'update frequency', so that it does not abuse these free services.
]]>
textarea50
@@ -506,4 +504,4 @@
sync_package_pfblockerng();
]]>
-
\ No newline at end of file
+
diff --git a/net/pfSense-pkg-pfBlockerNG/files/usr/local/pkg/pfblockerng/pfblockerng_v6lists.xml b/net/pfSense-pkg-pfBlockerNG/files/usr/local/pkg/pfblockerng/pfblockerng_v6lists.xml
index bc4c6bfa8ba7..d976dd626a17 100644
--- a/net/pfSense-pkg-pfBlockerNG/files/usr/local/pkg/pfblockerng/pfblockerng_v6lists.xml
+++ b/net/pfSense-pkg-pfBlockerNG/files/usr/local/pkg/pfblockerng/pfblockerng_v6lists.xml
@@ -161,23 +161,23 @@
info
- 'Format': Select the Format type.
- 'State': Select the run state.
+ 'Format': Select the Format type.
+ 'State': Select the run state. 'Source':
'URL': External link to source
- (ie: Blocklist.de)
-
'Local File': http(s)://127.0.0.1/filename
- or /var/db/pfblockerng/filename
-
'Country code': /usr/pbi/pfblockerng-amd64/share/GeoIP/cc/US_v6.txt
- (Change 'US' to required code)
-
'Whois': Domain name or AS (ie: facebook.com or AS13414)
+ (ie: Blocklist.de)
+
'Local File': http(s)://127.0.0.1/filename
+ or /var/db/pfblockerng/filename
+
'Country code': /usr/local/share/GeoIP/cc/US_v6.txt
+ (Change 'US' to required code)
'Header/Label': This field must be unique. This names the file and is referenced in the widget.
- (ie: Spamhaus_drop, Spamhaus_edrop)
]]>
+ (ie: Spamhaus_drop, Spamhaus_edrop)]]>
- IPv6 Lists]]>
+ IPv6'Format': Select the file format that URL will retrieve.
'auto' - Default parser
'regex' - 'Regex' style parsing (ie: html Lists)
@@ -231,7 +231,8 @@
List Action
- Default: Disabled
+ Default: Disabled
+
Select the Action for Firewall Rules on lists you have selected.
'Disabled' Rules: Disables selection and does nothing to selected Alias.
@@ -257,13 +258,13 @@
'Alias' Rules: 'Alias' rules create an alias for the list (and do nothing else).
This enables a pfBlockerNG list to be used by name, in any firewall rule or pfSense function, as desired.
-
Options - Alias Deny, Alias Permit, Alias Match, Alias Native
-
'Alias Deny' can use De-Duplication and Reputation Processes if configured.
-
'Alias Permit' and 'Alias Match' will be saved in the Same folder as the other Permit/Match Auto-Rules
+
Options - Alias Deny, Alias Permit, Alias Match, Alias Native
+
'Alias Deny' can use De-Duplication and Reputation Processes if configured.
+
'Alias Permit' and 'Alias Match' will be saved in the Same folder as the other Permit/Match Auto-Rules
'Alias Native' lists are kept in their Native format without any modifications.
Note:
When manually creating 'Alias' type firewall rules; Do not add (pfB_) to the
start of the rule description, use (pfb_) (Lowercase prefix). Manually created 'Alias' rules with 'pfB_' in the
- description will be auto-removed by package when 'Auto' rules are defined.
]]>
+ description will be auto-removed by package when 'Auto' rules are defined.
]]>
actionselect
@@ -352,7 +353,7 @@
info
- Note: In general, Auto-Rules are created as follows:
+ Note: In general, Auto-Rules are created as follows:
Inbound - 'any' port, 'any' protocol and 'any' destination
Outbound - 'any' port, 'any' protocol and 'any' destination address in the lists
Configuring the Adv. Inbound Rule settings, will allow for more customization of the Inbound Auto-Rules.
@@ -403,9 +404,9 @@
Invertautonot
- Invert - Option to invert the sense of the match.
- ie - Not (!) Destination Address(es)]]>
-
+ Invert - Option to invert the sense of the match.
+ ie - Not (!) Destination Address(es)]]>
+ checkbox
@@ -432,26 +433,26 @@
info
- Note: Custom List can be used in ONE of two ways:
+ Note: Custom List can be used in ONE of two ways:
1. IPv6 addresses entered directly into the custom list, as per the required format.
2. Domain names or AS numbers, which will be converted into their respective IPv6 addresses.
]]>
whois_convert
- DO NOT mix IPs with Domains/ASs in this custom list.]]>
-
+
Enable Domain/AScheckboxCustom Address(es)custom
-
- Format IPv6:
+
+ Format IPv6:
- Source of Regex and format descriptions: SpriteLink
+
Source of Regex and format descriptions: SpriteLink
fe80:0000:0000:0000:0204:61ff:fe9d:f156 // full form of IPv6
fe80:0:0:0:204:61ff:fe9d:f156 // drop leading zeroes
fe80::204:61ff:fe9d:f156 // collapse multiple zeroes to :: in the IPv6 address
@@ -469,13 +470,13 @@
Private IPv6 addresses may be used in a custom list.
You may use "#" after any IP/CIDR/Range to add comments. ie: x::x:x:x:x # Safe IP Address
If you select the Domain/AS checkbox above, the custom list can only
- be used for Domain names/AS's.
- Format Domain/AS:
- One 'Domain' or 'AS' per line.
+ be used for Domain names/AS's.
+ Format Domain/AS:
+
One 'Domain' or 'AS' per line.
Domains and/or ASs can be used in the same list.
Conversion of Domains/ASs utilize Team CYMRU
and the RADb whois registry.
- Configure the 'update frequency', so that it does not abuse these free services.]]>
+ Configure the 'update frequency', so that it does not abuse these free services.
]]>
textarea50
@@ -513,4 +514,4 @@
sync_package_pfblockerng();
]]>
-
\ No newline at end of file
+
diff --git a/net/pfSense-pkg-pfBlockerNG/files/usr/local/share/pfSense-pkg-pfBlockerNG/info.xml b/net/pfSense-pkg-pfBlockerNG/files/usr/local/share/pfSense-pkg-pfBlockerNG/info.xml
index 327873838b11..97047d25e9e9 100644
--- a/net/pfSense-pkg-pfBlockerNG/files/usr/local/share/pfSense-pkg-pfBlockerNG/info.xml
+++ b/net/pfSense-pkg-pfBlockerNG/files/usr/local/share/pfSense-pkg-pfBlockerNG/info.xml
@@ -10,20 +10,11 @@
Advanced Integration for Proofpoint ET IQRisk IP Reputation Threat Sources.<br />
Domain Name (DNSBL) blocking via Unbound DNS Resolver.]]>
Security
- https://forum.pfsense.org/index.php?topic=86212.0
- https://packages.pfsense.org/packages/config/pfblockerng/pfblockerng.xml
- 2.0.1
+ https://forum.pfsense.org/index.php?topic=102470.0
+ 2.0.2RELEASE
- 2.2
+ 2.3BBCan177@gmail.compfblockerng.xml
- bin/geoiplookup:net/GeoIP bin/grepcidr:net-mgmt/grepcidr bin/aggregate:net-mgmt/aggregate bin/mwhois:net/whois
- net
- pfblockerng-1.6.6-##ARCH##.pbi
-
- net/GeoIP
- net-mgmt/grepcidr net-mgmt/aggregate net/whois
- pfblockerng
-
diff --git a/net/pfSense-pkg-pfBlockerNG/files/usr/local/www/pfblockerng/pfblockerng.php b/net/pfSense-pkg-pfBlockerNG/files/usr/local/www/pfblockerng/pfblockerng.php
index d71fdff869e0..abf88c451e6b 100644
--- a/net/pfSense-pkg-pfBlockerNG/files/usr/local/www/pfblockerng/pfblockerng.php
+++ b/net/pfSense-pkg-pfBlockerNG/files/usr/local/www/pfblockerng/pfblockerng.php
@@ -108,7 +108,7 @@
}
// Skip Alexa update, if disabled
- if ($pfb['dnsbl_alexa'] == 'Disabled') {
+ if ($pfb['dnsbl_alexa'] != 'on') {
unset($pfb['extras'][5]);
}
@@ -450,8 +450,8 @@ function pfblockerng_uc_countries() {
pfb_logger("{$log}", 3);
$cont_array = array();
- if (($handle = fopen("{$maxmind_cont}", 'r')) !== FALSE) {
- while (($cc = fgetcsv($handle)) !== FALSE) {
+ if (($handle = @fopen("{$maxmind_cont}", 'r')) !== FALSE) {
+ while (($cc = @fgetcsv($handle)) !== FALSE) {
$cc_key = $cc[0];
$cont_key = $cc[1];
@@ -496,7 +496,7 @@ function pfblockerng_uc_countries() {
}
}
unset($cc);
- fclose($handle);
+ @fclose($handle);
// Add Maxmind Anonymous Proxy and Satellite Providers to array
$cont_array[6]['continent'] = 'Proxy and Satellite';
@@ -522,8 +522,8 @@ function pfblockerng_uc_countries() {
$iptype = "ip{$type}";
$filetype = "file{$type}";
- if (($handle = fopen("{$maxmind_cc}", 'r')) !== FALSE) {
- while (($cc = fgetcsv($handle)) !== FALSE) {
+ if (($handle = @fopen("{$maxmind_cc}", 'r')) !== FALSE) {
+ while (($cc = @fgetcsv($handle)) !== FALSE) {
$cc_key = $cc[4];
$country_key = $cc[5];
$a_cidr = implode(',', ip_range_to_subnet_array_temp($cc[0], $cc[1]));
@@ -537,7 +537,7 @@ function pfblockerng_uc_countries() {
}
}
unset($cc);
- fclose($handle);
+ @fclose($handle);
// Build Continent files
foreach ($cont_array as $key => $iso) {
@@ -846,7 +846,7 @@ function pfblockerng_get_countries() {
countries4
'Alias Native' lists are kept in their Native format without any modifications.
Note:
When manually creating 'Alias' type firewall rules; Do not add (pfB_) to the
start of the rule description, use (pfb_) (Lowercase prefix). Manually created 'Alias' rules with 'pfB_' in the
- description will be auto-removed by package when 'Auto' rules are defined.
]]>
+ description will be auto-removed by package when 'Auto' rules are defined.
]]>
actionselect
@@ -969,7 +970,7 @@ interfaces. Typical uses of 'Deny' rules are: info
- Note: In general, Auto-Rules are created as follows:
+ Note: In general, Auto-Rules are created as follows:
Inbound - 'any' port, 'any' protocol and 'any' destination
Outbound - 'any' port, 'any' protocol and 'any' destination address in the lists
Configuring the Adv. Inbound Rule settings, will allow for more customization of the Inbound Auto-Rules.
@@ -1020,9 +1021,9 @@ interfaces. Typical uses of 'Deny' rules are: Invertautonot
- Invert - Option to invert the sense of the match.
- ie - Not (!) Destination Address(es)]]>
-
+ Invert - Option to invert the sense of the match.
+ ie - Not (!) Destination Address(es)]]>
+ checkbox
@@ -1362,7 +1363,7 @@ interfaces. Typical uses of 'Deny' rules are: ccexclude
Exclude from the Reputation Process.
- Use CTRL + CLICK to select/unselect countries]]>
+ Use CTRL + CLICK to select/unselect countries]]>
select
@@ -1405,7 +1406,7 @@ interfaces. Typical uses of 'Deny' rules are: etblock
- Use CTRL + CLICK to select/unselect Categories
+ Use CTRL + CLICK to select/unselect Categories
Any Changes will take effect at the Next Scheduled CRON Task]]>
select
@@ -1454,7 +1455,7 @@ interfaces. Typical uses of 'Deny' rules are: etmatch
- Use CTRL + CLICK to select/unselect Categories
+ Use CTRL + CLICK to select/unselect Categories