Netfilter-Devel Archive on lore.kernel.org
 help / color / Atom feed
* [iptables PATCH] doc: libxt_MARK: OUTPUT chain is fine, too
@ 2020-05-19 23:08 Phil Sutter
  2020-05-26 17:00 ` Pablo Neira Ayuso
  0 siblings, 1 reply; 4+ messages in thread
From: Phil Sutter @ 2020-05-19 23:08 UTC (permalink / raw)
  To: Pablo Neira Ayuso; +Cc: netfilter-devel

In order to route packets originating from the host itself based on
fwmark, mangle table's OUTPUT chain must be used. Mention this chain as
alternative to PREROUTING.

Fixes: c9be7f153f7bf ("doc: libxt_MARK: no longer restricted to mangle table")
Signed-off-by: Phil Sutter <phil@nwl.cc>
---
 extensions/libxt_MARK.man | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/extensions/libxt_MARK.man b/extensions/libxt_MARK.man
index 712fb76f7340c..b2408597e98f1 100644
--- a/extensions/libxt_MARK.man
+++ b/extensions/libxt_MARK.man
@@ -1,7 +1,7 @@
 This target is used to set the Netfilter mark value associated with the packet.
 It can, for example, be used in conjunction with routing based on fwmark (needs
-iproute2). If you plan on doing so, note that the mark needs to be set in the
-PREROUTING chain of the mangle table to affect routing.
+iproute2). If you plan on doing so, note that the mark needs to be set in
+either the PREROUTING or the OUTPUT chain of the mangle table to affect routing.
 The mark field is 32 bits wide.
 .TP
 \fB\-\-set\-xmark\fP \fIvalue\fP[\fB/\fP\fImask\fP]
-- 
2.26.2


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [iptables PATCH] doc: libxt_MARK: OUTPUT chain is fine, too
  2020-05-19 23:08 [iptables PATCH] doc: libxt_MARK: OUTPUT chain is fine, too Phil Sutter
@ 2020-05-26 17:00 ` Pablo Neira Ayuso
  2020-05-26 17:05   ` Pablo Neira Ayuso
  0 siblings, 1 reply; 4+ messages in thread
From: Pablo Neira Ayuso @ 2020-05-26 17:00 UTC (permalink / raw)
  To: Phil Sutter; +Cc: netfilter-devel

On Wed, May 20, 2020 at 01:08:22AM +0200, Phil Sutter wrote:
> In order to route packets originating from the host itself based on
> fwmark, mangle table's OUTPUT chain must be used. Mention this chain as
> alternative to PREROUTING.
> 
> Fixes: c9be7f153f7bf ("doc: libxt_MARK: no longer restricted to mangle table")
> Signed-off-by: Phil Sutter <phil@nwl.cc>
> ---
>  extensions/libxt_MARK.man | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/extensions/libxt_MARK.man b/extensions/libxt_MARK.man
> index 712fb76f7340c..b2408597e98f1 100644
> --- a/extensions/libxt_MARK.man
> +++ b/extensions/libxt_MARK.man
> @@ -1,7 +1,7 @@
>  This target is used to set the Netfilter mark value associated with the packet.
>  It can, for example, be used in conjunction with routing based on fwmark (needs
> -iproute2). If you plan on doing so, note that the mark needs to be set in the
> -PREROUTING chain of the mangle table to affect routing.
> +iproute2). If you plan on doing so, note that the mark needs to be set in
> +either the PREROUTING or the OUTPUT chain of the mangle table to affect routing.

You have two choices:

* Set the mark in filter OUTPUT chain => it does not affect routing.
* Set the mark in the mangle OUTPUT chain => it _does_ affect routing.

Are we on the same page?

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [iptables PATCH] doc: libxt_MARK: OUTPUT chain is fine, too
  2020-05-26 17:00 ` Pablo Neira Ayuso
@ 2020-05-26 17:05   ` Pablo Neira Ayuso
  2020-05-27 15:17     ` Phil Sutter
  0 siblings, 1 reply; 4+ messages in thread
From: Pablo Neira Ayuso @ 2020-05-26 17:05 UTC (permalink / raw)
  To: Phil Sutter; +Cc: netfilter-devel

On Tue, May 26, 2020 at 07:00:50PM +0200, Pablo Neira Ayuso wrote:
> On Wed, May 20, 2020 at 01:08:22AM +0200, Phil Sutter wrote:
> > In order to route packets originating from the host itself based on
> > fwmark, mangle table's OUTPUT chain must be used. Mention this chain as
> > alternative to PREROUTING.
> > 
> > Fixes: c9be7f153f7bf ("doc: libxt_MARK: no longer restricted to mangle table")
> > Signed-off-by: Phil Sutter <phil@nwl.cc>
> > ---
> >  extensions/libxt_MARK.man | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/extensions/libxt_MARK.man b/extensions/libxt_MARK.man
> > index 712fb76f7340c..b2408597e98f1 100644
> > --- a/extensions/libxt_MARK.man
> > +++ b/extensions/libxt_MARK.man
> > @@ -1,7 +1,7 @@
> >  This target is used to set the Netfilter mark value associated with the packet.
> >  It can, for example, be used in conjunction with routing based on fwmark (needs
> > -iproute2). If you plan on doing so, note that the mark needs to be set in the
> > -PREROUTING chain of the mangle table to affect routing.
> > +iproute2). If you plan on doing so, note that the mark needs to be set in
> > +either the PREROUTING or the OUTPUT chain of the mangle table to affect routing.
> 
> You have two choices:
> 
> * Set the mark in filter OUTPUT chain => it does not affect routing.
> * Set the mark in the mangle OUTPUT chain => it _does_ affect routing.
> 
> Are we on the same page?

Ah, I right I just re-read and it looks fine.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [iptables PATCH] doc: libxt_MARK: OUTPUT chain is fine, too
  2020-05-26 17:05   ` Pablo Neira Ayuso
@ 2020-05-27 15:17     ` Phil Sutter
  0 siblings, 0 replies; 4+ messages in thread
From: Phil Sutter @ 2020-05-27 15:17 UTC (permalink / raw)
  To: Pablo Neira Ayuso; +Cc: netfilter-devel

On Tue, May 26, 2020 at 07:05:31PM +0200, Pablo Neira Ayuso wrote:
> On Tue, May 26, 2020 at 07:00:50PM +0200, Pablo Neira Ayuso wrote:
> > On Wed, May 20, 2020 at 01:08:22AM +0200, Phil Sutter wrote:
> > > In order to route packets originating from the host itself based on
> > > fwmark, mangle table's OUTPUT chain must be used. Mention this chain as
> > > alternative to PREROUTING.
> > > 
> > > Fixes: c9be7f153f7bf ("doc: libxt_MARK: no longer restricted to mangle table")
> > > Signed-off-by: Phil Sutter <phil@nwl.cc>
> > > ---
> > >  extensions/libxt_MARK.man | 4 ++--
> > >  1 file changed, 2 insertions(+), 2 deletions(-)
> > > 
> > > diff --git a/extensions/libxt_MARK.man b/extensions/libxt_MARK.man
> > > index 712fb76f7340c..b2408597e98f1 100644
> > > --- a/extensions/libxt_MARK.man
> > > +++ b/extensions/libxt_MARK.man
> > > @@ -1,7 +1,7 @@
> > >  This target is used to set the Netfilter mark value associated with the packet.
> > >  It can, for example, be used in conjunction with routing based on fwmark (needs
> > > -iproute2). If you plan on doing so, note that the mark needs to be set in the
> > > -PREROUTING chain of the mangle table to affect routing.
> > > +iproute2). If you plan on doing so, note that the mark needs to be set in
> > > +either the PREROUTING or the OUTPUT chain of the mangle table to affect routing.
> > 
> > You have two choices:
> > 
> > * Set the mark in filter OUTPUT chain => it does not affect routing.
> > * Set the mark in the mangle OUTPUT chain => it _does_ affect routing.
> > 
> > Are we on the same page?
> 
> Ah, I right I just re-read and it looks fine.

OK. :)

Thanks, Phil

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, back to index

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-19 23:08 [iptables PATCH] doc: libxt_MARK: OUTPUT chain is fine, too Phil Sutter
2020-05-26 17:00 ` Pablo Neira Ayuso
2020-05-26 17:05   ` Pablo Neira Ayuso
2020-05-27 15:17     ` Phil Sutter

Netfilter-Devel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/netfilter-devel/0 netfilter-devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 netfilter-devel netfilter-devel/ https://lore.kernel.org/netfilter-devel \
		netfilter-devel@vger.kernel.org
	public-inbox-index netfilter-devel

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.netfilter-devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git