iptable marking and iproute2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I have a question on iptable marking and iproute2.
For testing I created the following script.
What I expect is when removing the default route on my client (route del
default gw 192.168.4.1), http request would still work using the gateway
defined at the routing table TEST.

This is not working.
I only get debug messages before I remove the default gateway.
After removing the default gateway it is not possible to access http
servers and no debug messages are added to the messages file.

What am I missing here?

-----------------------------------------------------------------
CHAIN=PREROUTING

iptables -A $CHAIN -t mangle -p tcp --dport 80  -j MARK --set-mark 1

iptables -t mangle -A $CHAIN -m mark --mark 1 -j LOG --log-level DEBUG
--log-prefix "fwmark 1:"

ip rule add fwmark 1 table TEST
ip route add default via 192.168.4.1 table TEST
--------------------------------------------------------------------



[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux