aboutsummaryrefslogtreecommitdiffstats
path: root/config/pfblockerng/pfblockerng_alerts.php
diff options
context:
space:
mode:
authorBBcan177 <bbcan177@gmail.com>2015-02-17 08:15:30 -0500
committerBBcan177 <bbcan177@gmail.com>2015-02-17 08:15:30 -0500
commit399d1ea90173aa7ce0983a8d849caa7feffa08e0 (patch)
treec80b2106904e744e8f3e3f56eeec0a65cfdc9e7c /config/pfblockerng/pfblockerng_alerts.php
parentb9d81c4f46607ef54c62925b3cccb9e3479a6fa4 (diff)
downloadpfsense-packages-399d1ea90173aa7ce0983a8d849caa7feffa08e0.tar.gz
pfsense-packages-399d1ea90173aa7ce0983a8d849caa7feffa08e0.tar.bz2
pfsense-packages-399d1ea90173aa7ce0983a8d849caa7feffa08e0.zip
pfBlockerNG - Mods to Alerts tab for IPv6
Diffstat (limited to 'config/pfblockerng/pfblockerng_alerts.php')
-rw-r--r--config/pfblockerng/pfblockerng_alerts.php42
1 files changed, 23 insertions, 19 deletions
diff --git a/config/pfblockerng/pfblockerng_alerts.php b/config/pfblockerng/pfblockerng_alerts.php
index cb892187..22464207 100644
--- a/config/pfblockerng/pfblockerng_alerts.php
+++ b/config/pfblockerng/pfblockerng_alerts.php
@@ -326,26 +326,30 @@ function conv_log_filter_lite($logfile, $nentries, $tail, $pfbdenycnt, $pfbpermi
if (!in_array($pfbalert[0], $rule_list['id']))
continue;
- $pfbalert[1] = $rule_data[4]; // Realint
- $pfbalert[3] = $rule_data[6]; // Act
- $pfbalert[4] = $rule_data[8]; // Version
+ $pfbalert[1] = $rule_data[4]; // Realint
+ $pfbalert[3] = $rule_data[6]; // Act
+ $pfbalert[4] = $rule_data[8]; // Version
if ($pfbalert[4] == "4") {
- $pfbalert[5] = $rule_data[15]; // Protocol ID
- $pfbalert[6] = $rule_data[16]; // Protocol
- $pfbalert[7] = $rule_data[18]; // SRC IP
- $pfbalert[8] = $rule_data[19]; // DST IP
+ $pfbalert[5] = $rule_data[15]; // Protocol ID
+ $pfbalert[6] = $rule_data[16]; // Protocol
+ $pfbalert[7] = $rule_data[18]; // SRC IP
+ $pfbalert[8] = $rule_data[19]; // DST IP
+ $pfbalert[9] = $rule_data[20]; // SRC Port
+ $pfbalert[10] = $rule_data[21]; // DST Port
+ $pfbalert[11] = $rule_data[23]; // TCP Flags
} else {
- $pfbalert[5] = $rule_data[14]; // Protocol ID
- $pfbalert[6] = $rule_data[13]; // Protocol
- $pfbalert[7] = $rule_data[15]; // SRC IP
- $pfbalert[8] = $rule_data[16]; // DST IP
+ $pfbalert[5] = $rule_data[13]; // Protocol ID
+ $pfbalert[6] = $rule_data[12]; // Protocol
+ $pfbalert[7] = "[" . $rule_data[15] . "]"; // SRC IP
+ $pfbalert[8] = "[" . $rule_data[16] . "]"; // DST IP
+ $pfbalert[9] = $rule_data[17]; // SRC Port
+ $pfbalert[10] = $rule_data[18]; // DST Port
+ $pfbalert[11] = $rule_data[20]; // TCP Flags
}
if ($pfbalert[5] == "6" || $pfbalert[5] == "17") {
- $pfbalert[9] = $rule_data[20]; // SRC Port
- $pfbalert[10] = $rule_data[21]; // DST Port
- $pfbalert[11] = $rule_data[23]; // TCP Flags
+ // skip
} else {
$pfbalert[9] = "";
$pfbalert[10] = "";
@@ -628,12 +632,12 @@ if (!empty($fields_array[$type]) && !empty($rule_list)) {
$proto = str_replace("TCP", "TCP-", $fields[6]) . $fields[11];
// Cleanup Port Output
- if ($fields[6] == "ICMP") {
- $srcport = "";
- $dstport = "";
+ if ($fields[6] == "ICMP" || $fields[6] == "ICMPV6") {
+ $srcport = "";
+ $dstport = "";
} else {
- $srcport = " :" . $fields[9];
- $dstport = " :" . $fields[10];
+ $srcport = ":" . $fields[9];
+ $dstport = ":" . $fields[10];
}
// Don't add Suppress Icon to Country Block Lines