netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* MARK extension
@ 2010-03-08 16:08 Thomas Woerner
  2010-03-08 16:18 ` Patrick McHardy
  0 siblings, 1 reply; 2+ messages in thread
From: Thomas Woerner @ 2010-03-08 16:08 UTC (permalink / raw)
  To: Netfilter Development Mailinglist

Hello,

according to the man page MARK "can only be used in the mangle table". 
But this is not correct. It is possible to use it also in the nat table.

Is this a documentation problem?

Working example:

*nat
:PREROUTING ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
:POSTROUTING ACCEPT [0:0]
-A PREROUTING -i eth+ -p tcp --dport 4711 -j MARK --set-mark 0x65
-A PREROUTING -i eth+ -p tcp --dport 4711 -m mark --mark 0x65 -j DNAT 
--to-destination :80
COMMIT

*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -i eth+ -m state --state NEW -m tcp -p tcp --dport 80 -m mark 
--mark 0x65 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMIT

Thanks,
Thomas

-- 
Thomas Woerner
Software Engineer            Phone: +49-711-96437-310
Red Hat GmbH                 Fax  : +49-711-96437-111
Hauptstaetterstr. 58         Email: Thomas Woerner <twoerner@redhat.com>
D-70178 Stuttgart            Web  : http://www.redhat.de/

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

* Re: MARK extension
  2010-03-08 16:08 MARK extension Thomas Woerner
@ 2010-03-08 16:18 ` Patrick McHardy
  0 siblings, 0 replies; 2+ messages in thread
From: Patrick McHardy @ 2010-03-08 16:18 UTC (permalink / raw)
  To: Thomas Woerner; +Cc: Netfilter Development Mailinglist

Thomas Woerner wrote:
> Hello,
> 
> according to the man page MARK "can only be used in the mangle table".
> But this is not correct. It is possible to use it also in the nat table.
> 
> Is this a documentation problem?

It seems that way. It probably should state "MARK can only be used
for output routing in the mangle table".

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

end of thread, other threads:[~2010-03-08 16:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-08 16:08 MARK extension Thomas Woerner
2010-03-08 16:18 ` Patrick McHardy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).