Serghey Rodin 10 rokov pred
rodič
commit
98e6fec795
1 zmenil súbory, kde vykonal 2 pridanie a 1 odobranie
  1. 2 1
      bin/v-delete-firewall-ban

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

@@ -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