From: Stefan Schantl <stefan.schantl@ipfire.org>
To: development@lists.ipfire.org
Subject: Re: [PATCHv2] suricata: Do not create silly forward rules.
Date: Fri, 06 May 2022 18:30:14 +0200 [thread overview]
Message-ID: <7708d798cc57ecbe71c28c40d7bddd1c87d0a84f.camel@ipfire.org> (raw)
In-Reply-To: <306198F4-002A-4741-9F0C-D6D719238321@ipfire.org>
[-- Attachment #1: Type: text/plain, Size: 2300 bytes --]
For the records,
I had a short talk with Michael on the phone about that topic.
My intension of the patch was, if there are no packets which have the
same input and output device, these rules are not needed.
He answered that there are some reasons, why this could happened. In
case you are using DNAT, SNAT or some kind of asynchronous routing etc.
So the iptables rules are required to pass such traffic to the IDS/IPS
and the patch can be ignored.
Best regards,
-Stefan
> Why do you think these rules are not needed?
>
> > On 6 Apr 2022, at 20:23, Stefan Schantl <stefan.schantl(a)ipfire.org>
> > wrote:
> >
> > Skip creating forward rules if the input and the output device are
> > the
> > same.
> >
> > Signed-off-by: Stefan Schantl <stefan.schantl(a)ipfire.org>
> > ---
> > src/initscripts/system/suricata | 5 +++++
> > 1 file changed, 5 insertions(+)
> >
> > diff --git a/src/initscripts/system/suricata
> > b/src/initscripts/system/suricata
> > index 5ede405ce..79c105c23 100644
> > --- a/src/initscripts/system/suricata
> > +++ b/src/initscripts/system/suricata
> > @@ -171,6 +171,11 @@ function generate_fw_rules {
> >
> > # Create rules which are required to handle
> > forwarded traffic.
> > for enabled_ips_zone_forward in
> > "${enabled_ips_zones[@]}"; do
> > + # Skip loop iteration if both zones
> > are the same.
> > + if [ "$enabled_ips_zone" ==
> > "$enabled_ips_zone_forward" ]; then
> > + continue
> > + fi
> > +
> > # Check if the whetelist file is
> > not empty.
> > if [ -s "$WHITELIST_FILE" ]; then
> > # Create rules to handle
> > whitelisted hosts.
> > --
> > 2.30.2
> >
>
prev parent reply other threads:[~2022-05-06 16:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-06 19:23 Stefan Schantl
2022-04-07 8:55 ` Michael Tremer
2022-05-06 16:30 ` Stefan Schantl [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7708d798cc57ecbe71c28c40d7bddd1c87d0a84f.camel@ipfire.org \
--to=stefan.schantl@ipfire.org \
--cc=development@lists.ipfire.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox