Skip to contentSkip to conversation

MARK?

DISCUSSION Drew Einhorn 2 participants 2 messages Jan 18, 2003 – Jan 20, 2003

lore
Share & tools
lore
#0 lore raw

Hi,

Oskar Andreasson's Iptables Tutorial 1.1.9 lead me to believe that MARK is capable of doing what I want, but does not give enough details. On further reading I decided maybe not.

What I to do is MARK a packet's stream. I want to be able to match ESTABLISHED packets to determine if they belong to a MARKed stream.

Is this possible?

Thanks,

#1 lore raw
Quoted 2 lines

What I to do is MARK a packet's stream. I want to be able to match ESTABLISHED packets to determine if they belong to a MARKed stream.

How about:
Well, just mark the packets and then match the marked that are belong to ESTABLISHED, like so:

example:
iptables -A PREROUTING -t mangle -p tcp --dport 80 -j MARK --set-mark 3

iptables -A FORWARD -m state --state ESTABLISHED -m mark --mark 3 -j LOG

Regards,
Maciej Soltysiak