aboutsummaryrefslogtreecommitdiffstats
path: root/config/pfblockerng/pfblockerng_alerts.php
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2015-04-23 08:36:05 -0300
committerRenato Botelho <garga@FreeBSD.org>2015-04-23 08:36:05 -0300
commit3def54fa50ce6050c0bb2e12e7c4a115266c4018 (patch)
tree123e21583ccfc10e57fbdc63916a9c7ccad2a904 /config/pfblockerng/pfblockerng_alerts.php
parent799a01526591806f344e56556e21106130ec01df (diff)
downloadpfsense-packages-3def54fa50ce6050c0bb2e12e7c4a115266c4018.tar.gz
pfsense-packages-3def54fa50ce6050c0bb2e12e7c4a115266c4018.tar.bz2
pfsense-packages-3def54fa50ce6050c0bb2e12e7c4a115266c4018.zip
Add run_depends and port_category to pfBlockerNG, also teach it to deal with non-PBI paths
Diffstat (limited to 'config/pfblockerng/pfblockerng_alerts.php')
-rw-r--r--config/pfblockerng/pfblockerng_alerts.php18
1 files changed, 13 insertions, 5 deletions
diff --git a/config/pfblockerng/pfblockerng_alerts.php b/config/pfblockerng/pfblockerng_alerts.php
index c67420b9..0b251295 100644
--- a/config/pfblockerng/pfblockerng_alerts.php
+++ b/config/pfblockerng/pfblockerng_alerts.php
@@ -60,14 +60,22 @@ require_once("/usr/local/pkg/pfblockerng/pfblockerng.inc");
global $rule_list;
pfb_global();
+$pfs_version = substr(trim(file_get_contents("/etc/version")),0,3);
+
+if ($pfs_version == "2.2") {
+ $prefix = "/usr/pbi/pfblockerng-" . php_uname("m");
+} else {
+ $prefix = "/usr/local";
+}
+
// Application Paths
-$pathgeoip = "/usr/pbi/pfblockerng-" . php_uname("m") . "/bin/geoiplookup";
-$pathgeoip6 = "/usr/pbi/pfblockerng-" . php_uname("m") . "/bin/geoiplookup6";
+$pathgeoip = $prefix . "/bin/geoiplookup";
+$pathgeoip6 = $prefix . "/bin/geoiplookup6";
// Define File Locations
$filter_logfile = "{$g['varlog_path']}/filter.log";
-$pathgeoipdat = "/usr/pbi/pfblockerng-" . php_uname("m") . "/share/GeoIP/GeoIP.dat";
-$pathgeoipdat6 = "/usr/pbi/pfblockerng-" . php_uname("m") . "/share/GeoIP/GeoIPv6.dat";
+$pathgeoipdat = $prefix . "/share/GeoIP/GeoIP.dat";
+$pathgeoipdat6 = $prefix . "/share/GeoIP/GeoIPv6.dat";
// Define Alerts Log filter Rollup window variable. (Alert Filtering Code adapted from B.Meeks - Snort Package)
$pfb['filterlogentries'] = FALSE;
@@ -1006,4 +1014,4 @@ function enable_hideFilter() {
<?php include("fend.inc"); ?>
</form>
</body>
-</html> \ No newline at end of file
+</html>