diff --git a/root/etc/e-smith/templates/etc/fail2ban/jail.conf/05IgnoreIP b/root/etc/e-smith/templates/etc/fail2ban/jail.conf/05IgnoreIP index 15519b6..876935b 100644 --- a/root/etc/e-smith/templates/etc/fail2ban/jail.conf/05IgnoreIP +++ b/root/etc/e-smith/templates/etc/fail2ban/jail.conf/05IgnoreIP @@ -25,7 +25,9 @@ unless (($fail2ban{FilterLocalNetworks} || 'disabled') eq 'enabled'){ # Add a local whitelist foreach (split /[,;]/, ($fail2ban{'IgnoreIP'} || '')){ - my ($ip,$bits) = Net::IPv4Addr::ipv4_parse("$_"); + my $addr = $_; + $addr .= '/32' unless ($addr =~ m/\/\d{1,2}$/); + my ($ip,$bits) = Net::IPv4Addr::ipv4_parse("$addr"); push @ip, "$ip/$bits"; }