mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-08-19 21:04:06 -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
|
# Deleting vesta chain
|
||||||
echo "$iptables -X vesta" >> $tmp
|
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
|
# Applying rules
|
||||||
bash $tmp 2>/dev/null
|
bash $tmp 2>/dev/null
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue