I've got a nice laptop that i'm using as a router and i'm trying to configure it to route certain traffic to different gateways, but I'm having trouble with iptables
Code:
iptables -t mangle -A PREROUTING -i eth0.2 -j MARK --set-mark 1
iptables: No chain/target/match by that name.
But when I check, PREROUTING is a valid chain
Code:
iptables -t mangle -S
-P PREROUTING ACCEPT
-P INPUT ACCEPT
-P FORWARD ACCEPT
-P OUTPUT ACCEPT
-P POSTROUTING ACCEPT
In fact, I tried it with a different action (replaced MARK with ACCEPT) and it worked. It only fails when I want to MARK the packet
I recompiled the kernel and made sure I had fwmark support (CONFIG_NET_CLS_FW=y .. or is this the wrong config?)