Possibility to filter valid remote hosts

tags/0.1.16_el6 0.1.16_el6
Daniel Berteaud 8 years ago
parent 5e941c60c9
commit f96b380bcb
  1. 8
      root/etc/e-smith/templates/etc/fail2ban/jail.conf/05IgnoreIP

@ -9,9 +9,11 @@ my $n = esmith::NetworksDB->open_ro() ||
my @ip = ("127.0.0.0/8", $LocalIP);
# Add hosts which can access the server-manager to the whitelist
foreach (split /[,;]/, (${'httpd-admin'}{'ValidFrom'} || '')){
my ($ip,$bits) = Net::IPv4Addr::ipv4_parse("$_");
push @ip, "$ip/$bits";
unless (($fail2ban{FilterValidRemoteHosts} || 'disabled') eq 'enabled'){
foreach (split /[,;]/, (${'httpd-admin'}{'ValidFrom'} || '')){
my ($ip,$bits) = Net::IPv4Addr::ipv4_parse("$_");
push @ip, "$ip/$bits" unless "$ip/$bits" eq '0.0.0.0/0';
}
}
unless (($fail2ban{FilterLocalNetworks} || 'disabled') eq 'enabled'){

Loading…
Cancel
Save