Skip to content

Commit f5e67e2

Browse files
committed
Fix incorrect ip match in v-delete-firewall-ban
- Relates to issue: hestiacp#585
1 parent 0c33826 commit f5e67e2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bin/v-delete-firewall-ban

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ fi
5050
# Deleting ip from banlist
5151
sip=$(echo "$ip"| sed "s|/|\\\/|g")
5252
sed -i "/IP='$sip' CHAIN='$chain'/d" $conf
53-
b=$($iptables -L fail2ban-$chain --line-number -n|grep $ip|awk '{print $1}')
53+
b=$($iptables -L fail2ban-$chain --line-number -n|grep -w $ip|awk '{print $1}')
5454
$iptables -D fail2ban-$chain $b 2>/dev/null
5555

5656
# Changing permissions

0 commit comments

Comments
 (0)