Linux Netfilter discussions
 help / color / mirror / Atom feed
* detect original chain after jump?
@ 2004-03-27 13:38 Richard Hector
  2004-03-27 13:51 ` Antony Stone
  0 siblings, 1 reply; 7+ messages in thread
From: Richard Hector @ 2004-03-27 13:38 UTC (permalink / raw)
  To: netfilter

Hi,

Mostly, people seem to write their filter chains splitting first by
interface and/or address, then by protocol/port.

I'm experimenting with doing it the other way round: I want to process
all the ssh traffic in one chain, then all the smtp in another etc.

This means that early on, I have something like:

iptables -A INPUT -j protocol
iptables -A FORWARD -j protocol

iptables -A protocol -p tcp --dport 22 -j ssh

But then I get a bit stuck. I need to then do different things depending
on the source and destination - which includes whether this packet is
arriving locally or being forwarded. Therefore it would be useful to
know whether this packet started out in the INPUT or FORWARD chain - but
that info seems to have been lost with the jump.

Is there any way to regain that?

Many thanks,

Richard



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

end of thread, other threads:[~2004-03-29  1:27 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-03-27 13:38 detect original chain after jump? Richard Hector
2004-03-27 13:51 ` Antony Stone
2004-03-27 14:20   ` Richard Hector
2004-03-27 14:28     ` Antony Stone
2004-03-27 15:07       ` rrecaba
2004-03-27 15:14         ` Antony Stone
2004-03-29  1:27           ` Double Match or jump (was Re: detect original chain after jump?) rrecaba

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox