Skip to contentSkip to conversation

know if packets are marked

LARTC Roberto Pereyra 3 participants 3 messages Jan 24, 2007

lore
Share & tools
lore
#0 lore raw

Hi !!

I marking packets in a bridge:

Mark outbound www packets from clients:

/usr/local/sbin/iptables -A PREROUTING -t mangle -m physdev --physdev-in eth1 -p tcp --dport 80 -j MARK --set-mark 2

How I can know if this packets are marked ?

roberto

Signature · 8 lines
Ing. Roberto Pereyra
ContenidosOnline
Looking for Linux Virtual Private Servers ? Click here:
http://www.spry.com/hosting-affiliate/scripts/t.php?a_aidB6&a_bidV
_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
#1 lore raw
Quoted 4 lines · Roberto Pereyra

/usr/local/sbin/iptables -A PREROUTING -t mangle -m physdev --physdev-in eth1 -p tcp --dport 80 -j MARK --set-mark 2

How I can know if this packets are marked ?

On the same machine (your bridge), you can match the mark later with

iptables ... -m mark --mark value[/mask] ...

and there is a classifier for tc, too, I think.

The mark doesn't stay on the packets once they leave your bridge, though, so you can't match them on other boxes.

Regards,
Torsten

_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

#2 lore raw
In reply to Roberto Pereyra

Also connection tracking (cat /proc/net/ip_conntrack) if loaded will show up the mark id (mark=).

Andreas

Quoted 4 lines · Roberto Pereyra

Hi !!

I marking packets in a bridge:

Quoted 9 lines

Mark outbound www packets from clients:

/usr/local/sbin/iptables -A PREROUTING -t mangle -m physdev --physdev-in eth1 -p tcp --dport 80 -j MARK --set-mark 2

How I can know if this packets are marked ?

roberto

_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc