mirror of
https://github.com/myvesta/vesta
synced 2025-08-14 18:49:21 -07:00
fix for fail2ban ip removal
This commit is contained in:
parent
92d7044c59
commit
d79be2ca68
1 changed files with 2 additions and 2 deletions
|
@ -46,8 +46,8 @@ fi
|
|||
|
||||
# Deleting ip from banlist
|
||||
sed -i "/IP='$ip' CHAIN='$chain'/d" $conf
|
||||
$iptables -D fail2ban-$chain -s $ip \
|
||||
-j REJECT --reject-with icmp-port-unreachable 2>/dev/null
|
||||
b=$($iptables -L fail2ban-$chain --line-number -n|grep $ip|awk '{print $1}')
|
||||
$iptables -D fail2ban-$chain $b 2>/dev/null
|
||||
|
||||
# Changing permissions
|
||||
chmod 660 $conf
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue