diff options
author | BBcan177 <bbcan177@gmail.com> | 2015-11-22 14:55:59 -0500 |
---|---|---|
committer | BBcan177 <bbcan177@gmail.com> | 2015-11-22 14:55:59 -0500 |
commit | 6ff520f5facb6097aeaf8905c74249f6c572bb92 (patch) | |
tree | a12f97659994d7e8db7783200a7bacde49616a92 | |
parent | 018d14b1df651ff100b92823c620205d26887374 (diff) | |
download | pfsense-packages-6ff520f5facb6097aeaf8905c74249f6c572bb92.tar.gz pfsense-packages-6ff520f5facb6097aeaf8905c74249f6c572bb92.tar.bz2 pfsense-packages-6ff520f5facb6097aeaf8905c74249f6c572bb92.zip |
pfBlockerNG - Improve download failure function
-rw-r--r-- | config/pfblockerng/pfblockerng.inc | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/config/pfblockerng/pfblockerng.inc b/config/pfblockerng/pfblockerng.inc index f1242ca3..9f550249 100644 --- a/config/pfblockerng/pfblockerng.inc +++ b/config/pfblockerng/pfblockerng.inc @@ -1315,8 +1315,8 @@ function pfb_download_failure($alias, $header, $pfbfolder, $vtype, $list_url) { $log = " Local File Failure\n"; pfb_logger("{$log}", 2); } else { - // Determine if Firewall/IDS is blocking download. - $ip = @gethostbyname($host); + // Determine if Firewall/IDS/DNSBL is blocking download. + $ip = @gethostbyname($host['host']); if (!empty($ip)) { // Query Firewall aliastables @@ -1327,6 +1327,13 @@ function pfb_download_failure($alias, $header, $pfbfolder, $vtype, $list_url) { $pfbfound = TRUE; } + // Determine if Host is listed in DNSBL + if ($ip == $pfb['dnsbl_vip']) { + $log = " [ {$host['host']} ] Domain listed in DNSBL\n"; + pfb_logger("{$log}", 2); + $pfbfound = TRUE; + } + // Query Snort/Suricata snort2c IP block table $result = exec("{$pfb['pfctl']} -t snort2c -T show | {$pfb['grep']} {$ip} 2>&1"); if (!empty($result)) { |