fix for netmask

This commit is contained in:
Serghey Rodin 2015-11-03 01:01:27 +02:00
commit 98e6fec795

View file

@ -45,7 +45,8 @@ if [ -z "$check_ip" ]; then
fi
# Deleting ip from banlist
sed -i "/IP='$ip' CHAIN='$chain'/d" $conf
sip=$(echo "$ip"| sed "s|/|\\\/|g")
sed -i "/IP='$sip' CHAIN='$chain'/d" $conf
b=$($iptables -L fail2ban-$chain --line-number -n|grep $ip|awk '{print $1}')
$iptables -D fail2ban-$chain $b 2>/dev/null