order of mangle rules ?

Hi

Which is the right order of mangle rules.
Specifically for conn mark and packet mark.

Do I have to place ALL Connection Mark first, and then Packet Mark.

Or I have to place it like, one Connection Markthen one Packet mark for that conection and so on . . .

Or it depend which chain Im using.

Forward, preroutin postrouting.

it does not matter
you can first mark all connections, then mark each connections’ packets, or you can mark connections1, then it’s packets, then connections2, then connections2’s packets and so on. as you like

Thanks for answer,

Whem Im in preroutin chain, marking all connections first and then their packets doesnt work, it works only in forward chain, or am I doing something wrong :slight_smile:

titius, I do marking in prerouting, all works fine. Post here the result of

ip firewall mangle print

it works fine I was a little bit confused :frowning: .