mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-09 18:45:54 +02:00
rules.pl: Destroy all ipset lists on rule reload.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org> Reviewed-by: Peter Müller <peter.mueller@ipfire.org>
This commit is contained in:
committed by
Peter Müller
parent
bbeb2a5067
commit
3d88688075
@@ -31,6 +31,7 @@ require "${General::swroot}/location-functions.pl";
|
||||
my $DEBUG = 0;
|
||||
|
||||
my $IPTABLES = "iptables --wait";
|
||||
my $IPSET = "ipset";
|
||||
|
||||
# iptables chains
|
||||
my $CHAIN_INPUT = "INPUTFW";
|
||||
@@ -114,6 +115,9 @@ sub main {
|
||||
# Flush all chains.
|
||||
&flush();
|
||||
|
||||
# Destroy all existing ipsets.
|
||||
run("$IPSET destroy");
|
||||
|
||||
# Prepare firewall rules.
|
||||
if (! -z "${General::swroot}/firewall/input"){
|
||||
&buildrules(\%configinputfw);
|
||||
|
||||
Reference in New Issue
Block a user