aboutsummaryrefslogtreecommitdiffstats
path: root/config/pf-blocker/pfblocker.inc
diff options
context:
space:
mode:
authormarcelloc <marcellocoutinho@gmail.com>2011-10-28 11:32:36 -0200
committermarcelloc <marcellocoutinho@gmail.com>2011-10-28 11:32:36 -0200
commit94d57a9f85b242766f272c4e9a1dbee7d1694b8f (patch)
tree4fc4af69495d2be47550ceccfae5910d4ed185dc /config/pf-blocker/pfblocker.inc
parent9a75216ac2ec2e992ce1050a3556f86340027d85 (diff)
downloadpfsense-packages-94d57a9f85b242766f272c4e9a1dbee7d1694b8f.tar.gz
pfsense-packages-94d57a9f85b242766f272c4e9a1dbee7d1694b8f.tar.bz2
pfsense-packages-94d57a9f85b242766f272c4e9a1dbee7d1694b8f.zip
pfBlocker - more improvements
Diffstat (limited to 'config/pf-blocker/pfblocker.inc')
-rwxr-xr-xconfig/pf-blocker/pfblocker.inc12
1 files changed, 7 insertions, 5 deletions
diff --git a/config/pf-blocker/pfblocker.inc b/config/pf-blocker/pfblocker.inc
index 11a2b30a..57c24c2d 100755
--- a/config/pf-blocker/pfblocker.inc
+++ b/config/pf-blocker/pfblocker.inc
@@ -178,7 +178,7 @@ function sync_package_pfblocker() {
#print "<pre>";
$new_aliases=array();
$pfBlockerInbound='/var/db/aliastables/pfBlockerInbound.txt';
- if ($ips_in != ""){
+ if ($ips_in != "" && $config['installedpackages']['pfblocker']['config'][0]['enable_cb'] == "on"){
#create or reaply alias
$new_aliases[]=array("name"=> 'pfBlockerInbound',
"url"=> $web_local.'?pfb=in',
@@ -197,7 +197,7 @@ function sync_package_pfblocker() {
unlink($pfBlockerInbound);
}
$pfBlockerOutbound='/var/db/aliastables/pfBlockerOutbound.txt';
- if ($ips_out != ""){
+ if ($ips_out != "" && $config['installedpackages']['pfblocker']['config'][0]['enable_cb'] == "on"){
#create or reaply alias
$new_aliases[]=array("name"=> 'pfBlockerOutbound',
"url"=> $web_local.'?pfb=out',
@@ -217,7 +217,7 @@ function sync_package_pfblocker() {
}
$pfblockerWL='/var/db/aliastables/pfBlockerWL.txt';
- if ($whitelist != ""){
+ if ($whitelist != "" && $config['installedpackages']['pfblocker']['config'][0]['enable_cb'] == "on"){
#create or reaply alias
$new_aliases[]=array("name"=> 'pfBlockerWL',
"url"=> $web_local.'?pfb=white',
@@ -267,8 +267,9 @@ function sync_package_pfblocker() {
${$iface}[0]["log"]="";
}
if ($ips_in != ""){
+ $action=($pfblocker_config['inbound_deny_action']!= ""?$pfblocker_config['inbound_deny_action']:"block");
${$iface}[1]=array( "id" => "",
- "type"=>"block",
+ "type"=>$action,
"tag"=> "",
"interface" => $iface,
"tagged"=> "",
@@ -309,8 +310,9 @@ function sync_package_pfblocker() {
${$iface}[2]["log"]="";
}
if ($ips_out != ""){
+ $action=($pfblocker_config['outbound_deny_action']!= ""?$pfblocker_config['outbound_deny_action']:"block");
${$iface}[3]= array("id" => "",
- "type"=>"block",
+ "type"=>$action,
"tag"=> "",
"interface" => $iface,
"tagged"=> "",