Can I mark a packet on the client's
OUTPUT chain and add an iproute policy on the router to route them via a specific gateway? This what I tried to do, but it isn't working.
My client's mangle table dump:
Chain OUTPUT (policy ACCEPT 13884 packets, 2327K bytes) pkts bytes target prot opt in out source destination 13917 2330K MARK all -- * * 0.0.0.0/0 0.0.0.0/0 MARK set 0x2 Chain POSTROUTING (policy ACCEPT 13889 packets, 2328K bytes) pkts bytes target prot opt in out source destination 13889 2328K LOG all -- * * 0.0.0.0/0 0.0.0.0/0 mark match 0x2 LOG flags 0 level 4
iptables mangle table's INPUT chain dump on the router:
Chain INPUT (policy DROP 0 packets, 0 bytes) pkts bytes target prot opt in out source destination 0 0 LOG all -- * * 0.0.0.0/0 0.0.0.0/0 mark match 0x2 LOG flags 0 level 4 2074 196K ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED 88 14890 ACCEPT all -- ethint * 0.0.0.0/0 0.0.0.0/0 0 0 ACCEPT all -- eth0 * 0.0.0.0/0 0.0.0.0/0
After some moments and sending test packets (pings from a client connected to the router via wifi, sent to a host outside the intranet), the LOG counter on the router remains equal to zero.
- What's happened to my packets?
- Where my packets lose their marks?