Commit b9e0b4e8 authored by Steve Kemp's avatar Steve Kemp
Browse files

Remove active blacklist entries for IPs which are subsequently

  whitelisted.
parent cc65198f
......@@ -496,11 +496,13 @@ sub expireBlacklist
{
#
# Changed anythign?
# Changed anything?
#
my $changed = 0;
#
# Remove any auto-added file which is older than our threshold.
#
foreach my $file ( sort( glob("$CONFIG{'blacklist'}/*.auto") ) )
{
my $age = -M $file;
......@@ -515,6 +517,32 @@ sub expireBlacklist
}
#
# Remove any blacklisted IP which is now on our whitelist.
#
foreach my $file ( sort ( glob( "$CONFIG{'whitelist'}/*" ) ) )
{
#
# Get the IP
#
my $ip = $file;
if ( $ip =~ /(.*)\/(.*)$/ )
{
$ip = $2;
}
#
# If that IP was whitelisted after blocking then remove it.
#
if ( -e $CONFIG{'whitelist'} . "/$ip" )
{
$CONFIG{ 'verbose' } && print "Removing file: $file due to it being whitelisted.\n";
unlink( $file );
$changed += 1;
}
}
return ($changed);
}
......
bytemark-vhost-firewall (20090812162548) stable; urgency=low
* Remove active blacklist entries for IPs which are subsequently
whitelisted.
-- Steve Kemp <steve@bytemark.co.uk> Wed, 12 Aug 2009 16:25:48 +0000
bytemark-vhost-firewall (20090731104804) stable; urgency=low
* If the firewall-blacklist program is disabled then reload the
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment