mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-08-14 18:49:17 -07:00
Delete chains on firewall stop
This commit is contained in:
parent
8eaa1b743c
commit
b6c152a258
1 changed files with 9 additions and 0 deletions
|
@ -40,6 +40,15 @@ echo "$iptables -F INPUT" >> $tmp
|
|||
# Deleting vesta chain
|
||||
echo "$iptables -X vesta" >> $tmp
|
||||
|
||||
# Deleting custom chains
|
||||
chains=$(cat $VESTA/data/firewall/chains.conf 2>/dev/null)
|
||||
IFS=$'\n'
|
||||
for chain in $chains; do
|
||||
eval $chain
|
||||
echo "$iptables -F fail2ban-$CHAIN" >> $tmp
|
||||
echo "$iptables -X fail2ban-$CHAIN" >> $tmp
|
||||
done
|
||||
|
||||
# Applying rules
|
||||
bash $tmp 2>/dev/null
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue