Browse Source

Fix incorrect ip match in v-delete-firewall-ban

- Relates to issue: #585
Robert Zollner 6 years ago
parent
commit
f5e67e2e64
1 changed files with 1 additions and 1 deletions
  1. 1 1
      bin/v-delete-firewall-ban

+ 1 - 1
bin/v-delete-firewall-ban

@@ -50,7 +50,7 @@ fi
 # Deleting ip from banlist
 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}')
+b=$($iptables -L fail2ban-$chain --line-number -n|grep -w $ip|awk '{print $1}')
 $iptables -D fail2ban-$chain $b 2>/dev/null
 
 # Changing permissions