From cc2a4b293daac055301c0d5e5c4b4e8a0c65b460 Mon Sep 17 00:00:00 2001 From: BBcan177 Date: Sun, 13 Dec 2015 16:17:48 -0500 Subject: pfBlockerNG - Mods --- config/pfblockerng/pfblockerng.inc | 15 +++++++++------ config/pfblockerng/pfblockerng.php | 6 +++--- config/pfblockerng/pfblockerng_install.inc | 9 +++++---- config/pfblockerng/pfblockerng_top20.xml | 3 ++- pkg_config.10.xml | 2 +- 5 files changed, 20 insertions(+), 15 deletions(-) diff --git a/config/pfblockerng/pfblockerng.inc b/config/pfblockerng/pfblockerng.inc index c0e81b27..af57cc90 100644 --- a/config/pfblockerng/pfblockerng.inc +++ b/config/pfblockerng/pfblockerng.inc @@ -198,9 +198,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_alexa'] = $pfb['dnsblconfig']['alexa_enable']; // Alexa whitelist + $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'; @@ -236,6 +236,7 @@ pfb_global(); // DNSBL Lighttpd HTTPS Daemon (Scans Lighttpd dnsbl_error.log for requested https domain names) if ($argv[1] == 'dnsbl') { + set_time_limit(0); pfb_livetail($pfb['dnserrlog'], 'dnsbl'); exit; } @@ -1778,7 +1779,7 @@ function sync_package_pfblockerng($cron='') { log_error('[pfBlockerNG] Sync terminated during boot process.'); return; } - syslog(LOG_NOTICE, '[pfBlockerNG] Starting sync process.'); + syslog(LOG_NOTICE, '[pfBlockerNG] Starting cron process.'); // Reloads existing lists without downloading new lists when defined 'on' $pfb['reuse'] = $pfb['config']['pfb_reuse']; @@ -4119,7 +4120,8 @@ function sync_package_pfblockerng($cron='') { $log = "\n===[ Aliastables / Rules ]================================\n\n"; pfb_logger("{$log}", 1); - $log = "Firewall Rule Changes found, Applying Filter Reload\n"; + $log = "Firewall rule changes found, applying Filter Reload\n"; + syslog(LOG_NOTICE, "[pfBlockerNG] {$log}"); pfb_logger("{$log}", 1); } @@ -4142,7 +4144,8 @@ function sync_package_pfblockerng($cron='') { $log = "\n\n===[ Aliastables / Rules ]==========================================\n\n"; pfb_logger("{$log}", 1); - $log = "No Changes to Firewall Rules, Skipping Filter Reload\n"; + $log = "No changes to Firewall rules, skipping Filter Reload\n"; + syslog(LOG_NOTICE, "[pfBlockerNG] {$log}"); pfb_logger("{$log}", 1); // Only Save Aliases that have been updated. diff --git a/config/pfblockerng/pfblockerng.php b/config/pfblockerng/pfblockerng.php index 8a368d2e..c88e85a5 100644 --- a/config/pfblockerng/pfblockerng.php +++ b/config/pfblockerng/pfblockerng.php @@ -47,7 +47,7 @@ require_once('services.inc'); require_once('/usr/local/pkg/pfblockerng/pfblockerng.inc'); require_once('/usr/local/pkg/pfblockerng/pfblockerng_extra.inc'); // 'include functions' not yet merged into pfSense -global $config, $pfb; +global $config, $g, $pfb; // Extras - MaxMind/Alexa Download URLs/filenames/settings $pfb['extras'][0]['url'] = 'http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz'; @@ -406,7 +406,7 @@ function pfblockerng_sync_cron() { // Function to process the downloaded MaxMind database and format into Continent txt files. function pfblockerng_uc_countries() { - global $pfb; + global $g, $pfb; $maxmind_cont = "{$pfb['geoipshare']}/country_continent.csv"; $maxmind_cc4 = "{$pfb['geoipshare']}/GeoIPCountryWhois.csv"; @@ -564,7 +564,7 @@ function pfblockerng_uc_countries() { // Function to process Continent txt files and create Country ISO files and to Generate GUI XML files. function pfblockerng_get_countries() { - global $pfb; + global $g, $pfb; $files = array ( 'Africa' => "{$pfb['ccdir']}/Africa_v4.txt", 'Asia' => "{$pfb['ccdir']}/Asia_v4.txt", diff --git a/config/pfblockerng/pfblockerng_install.inc b/config/pfblockerng/pfblockerng_install.inc index 5f4a6986..54d0c374 100644 --- a/config/pfblockerng/pfblockerng_install.inc +++ b/config/pfblockerng/pfblockerng_install.inc @@ -34,7 +34,7 @@ require_once('/usr/local/pkg/pfblockerng/pfblockerng.inc'); require_once('/usr/local/www/pfblockerng/pfblockerng.php'); -global $config, $pfb, $static_output; +global $config, $g, $pfb, $static_output; pfb_global(); function update_static_output($text) { @@ -184,6 +184,7 @@ unlink_if_exists('/usr/local/sbin/lighttpd_pfb'); link('/usr/local/sbin/lighttpd', '/usr/local/sbin/lighttpd_pfb'); update_static_output(" done.\nCreating DNSBL web server start-up script..."); +$pfb['dnsbl_conf'] = '/var/unbound/pfb_dnsbl_lighty.conf'; $rc = array(); $rc['file'] = 'dnsbl.sh'; $rc['start'] = << \ No newline at end of file +?> diff --git a/config/pfblockerng/pfblockerng_top20.xml b/config/pfblockerng/pfblockerng_top20.xml index 6200a6a9..ed3354f1 100644 --- a/config/pfblockerng/pfblockerng_top20.xml +++ b/config/pfblockerng/pfblockerng_top20.xml @@ -282,6 +282,7 @@ + @@ -394,4 +395,4 @@ sync_package_pfblockerng(); ]]> - \ No newline at end of file + diff --git a/pkg_config.10.xml b/pkg_config.10.xml index 40760f23..2a87a220 100644 --- a/pkg_config.10.xml +++ b/pkg_config.10.xml @@ -118,7 +118,7 @@ Security https://forum.pfsense.org/index.php?topic=86212.0 https://packages.pfsense.org/packages/config/pfblockerng/pfblockerng.xml - 2.0.2 + 2.0.3 RELEASE 2.2 BBCan177@gmail.com -- cgit v1.2.3 From 4939d54bb30757e6274ce73324dd9adf546b3541 Mon Sep 17 00:00:00 2001 From: BBcan177 Date: Sun, 13 Dec 2015 16:33:23 -0500 Subject: Update pfblockerng.xml --- config/pfblockerng/pfblockerng.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/pfblockerng/pfblockerng.xml b/config/pfblockerng/pfblockerng.xml index c7f2c068..9e371e9b 100644 --- a/config/pfblockerng/pfblockerng.xml +++ b/config/pfblockerng/pfblockerng.xml @@ -48,7 +48,7 @@ Describe your package requirements here Currently there are no FAQ items provided. pfblockerng - 2.0 + 2.0.3 pfBlockerNG: General Settings /usr/local/pkg/pfblockerng/pfblockerng.inc pfBlockerNG: Save General Settings -- cgit v1.2.3