From: Eric Leblond <eric@regit.org>
To: "W. Michael Petullo" <mike@flyn.org>, netfilter@vger.kernel.org
Subject: Re: Modifying NFQUEUE rules in flight
Date: Tue, 14 Mar 2017 09:08:15 +0100 [thread overview]
Message-ID: <1489478895.15907.6.camel@regit.org> (raw)
In-Reply-To: <20170314011838.GA9432@imp.flyn.org>
Hi,
On Mon, 2017-03-13 at 21:18 -0400, W. Michael Petullo wrote:
> I have a question about the use of NFQUEUE from userspace.
>
> Imagine two firewall rules:
>
> (A): NFQUEUE tcp -- imp x.x.x.x tcp dpt:http NFQUEUE num 0
>
> and
>
> (B): NFQUEUE tcp -- imp x.x.x.x tcp dpt:http NFQUEUE num 1
>
> I am interested in making the callback associated with rule
> (A)/NFQUEUE 0
> remove rule (B) and replace it (usng firewalld/dbus in my case)
> with another, more specific rule. For example, perhaps the callback
> for
> NFQUEUE 0 would rewrite rule (B) to include a source port. I am
> further
> interested in having this new rule apply to the packet being
> processed.
I don't think you can do this. What you could do a push a packet mark
at verdict time on rule A. With a filter on mark on rule B, it will
only match when rule A wants it to match.
BR,
--
Eric Leblond <eric@regit.org>
prev parent reply other threads:[~2017-03-14 8:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-14 1:18 Modifying NFQUEUE rules in flight W. Michael Petullo
2017-03-14 8:08 ` Eric Leblond [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=1489478895.15907.6.camel@regit.org \
--to=eric@regit.org \
--cc=mike@flyn.org \
--cc=netfilter@vger.kernel.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