various fixes in jail.conf templates

tags/0.0.1
Daniel Berteaud 12 years ago
parent 0b90b27eb8
commit df3190298d
  1. 12
      root/etc/e-smith/templates/etc/fail2ban/jail.conf/05IgnoreIP

@ -4,15 +4,15 @@ use esmith::NetworksDB;
my $n = esmith::NetworksDB->open_ro() || my $n = esmith::NetworksDB->open_ro() ||
die "Couldn't open networks DB\n"; die "Couldn't open networks DB\n";
my @ip = (127.0.0.1); my @ip = ("127.0.0.1");
# Add hosts which can access the server-manager to the whitelist # Add hosts which can access the server-manager to the whitelist
push @ip, " $_" foreach (split /[,;], (${'httpd-admin'}{'ValidFrom'} || '')); push @ip, $_ foreach (split /[,;]/, (${'httpd-admin'}{'ValidFrom'} || ''));
if (($fail2ban{FilterLocalNetworks} || 'disabled' eq 'enabled' ){ if (($fail2ban{FilterLocalNetworks} || 'disabled') eq 'enabled'){
foreach my $network ($n->networks){ foreach my $net ($n->networks){
my $key = $network->key; my $key = $net->key;
my $mask = $network->prop('Mask); my $mask = $net->prop('Mask');
push @ip, "$key/$mask"; push @ip, "$key/$mask";
} }
} }

Loading…
Cancel
Save