From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter =?utf-8?q?M=C3=BCller?= To: development@lists.ipfire.org Subject: Re: [PATCH 06/12] rules.pl: Move to ipset based data for LOCATIONBLOCK feature. Date: Mon, 14 Feb 2022 21:03:28 +0000 Message-ID: <631d16b9-ed55-5657-fb1e-95a14c3f43d9@ipfire.org> In-Reply-To: <20220214184257.2406-6-stefan.schantl@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2242485012635204867==" List-Id: --===============2242485012635204867== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Reviewed-by: Peter M=C3=BCller > Signed-off-by: Stefan Schantl > --- > config/firewall/rules.pl | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) >=20 > diff --git a/config/firewall/rules.pl b/config/firewall/rules.pl > index 5b1153b08..e009c1838 100644 > --- a/config/firewall/rules.pl > +++ b/config/firewall/rules.pl > @@ -671,7 +671,11 @@ sub locationblock { > # is enabled. > foreach my $location (@locations) { > if(exists $locationsettings{$location} && $locationsettings{$location} e= q "on") { > - run("$IPTABLES -A LOCATIONBLOCK -m geoip --src-cc $location -j DROP"); > + # Call function to load the networks list for this country. > + &ipset_restore($location); > + > + # Call iptables and create rule to use the loaded ipset list. > + run("$IPTABLES -A LOCATIONBLOCK -m set --match-set CC_$location src -j = DROP"); > } > } > } --===============2242485012635204867==--