iptables: marking packets question

iptables: marking packets question

Post by Dale Went » Sat, 08 Dec 2001 04:41:17

If I mark a packet in prerouting, should I be able to see it as it goes
out the interface.

I added these 2 lines

iptables -t mangle -I PREROUTEING -i eth3 -j MARK --set-mark 2

iptables -A OUTPUT -m mark --mark2 -j LOG --log-level info --log-prefix

I am not seeing the packets as they go out.
The port that they are going out is masqueraded with a -J MASQERADE

        Dale Wentz


1. multiple marks for a single packet, using iptables MANGLE chains.

Is it possible to issue the command:

iptables -t mangle ... -j mark --set-mark <fwmark>

multiple times, with distinct <fwmark> values OR'ed together, at
different chain location of mangle table?

I'm using mangle table mark for two different purposes:

(1). PREROUTING mangle mark for policy-based routing, and
(2). FORWARD mangle mark for tc Queue filtering.

It seems impossible to implement both using iptables MANGLE chains on
the same IP packet.

Any suggestions?

--- Jeffrey

2. LinuxPPC2k on iMacDV

3. Looking for iptables applications code (iptables.c) to run some rules to forward packets

4. configure sio for 3rd port

5. iptables 1.2.1a question - packets not reaching tunx.

6. installing a new hard disk under SunOS 5.4

7. Question on an INPUT packet log from IPTABLES

8. architecture

9. Question: on iptables and opening a port for incoming tcp/udp packets

10. HTB/CBQ and iptables MARK problem

11. ipchains & packet marking

12. IP Chains rules relating to fragments and marking a packet

13. Enabling Netfilters to Mark packets in Red-Hat