From: Bruno L. F. C. <br...@op...> - 2004-10-26 17:44:42
|
Hi there I can shape p2p traffic using iptables-p2p 0.3.0a on linux kernel 2.4.27 patched with connmark using the following snippet iptables -t mangle -F iptables -t mangle -A PREROUTING -i eth1 -m p2p --p2p all \ -j CONNMARK --set-mark 10 iptables -t mangle -A PREROUTING -m connmark --mark 10 \ -j CONNMARK --restore-mark and cbq.init v0.7.3 like DEVICE=eth1,100Mbit,10Mbit RATE=10000Kbit WEIGHT=1000Kbit PRIO=7 MARK=10 now, instead of shaping, I want to redirect this traffic to another link I tried the following (IP=new gateway for traffic and ethX is its ethernet) on my gateway ip route add default via IP dev ethX table 200 # new default route ip rule add fwmark 10 table 200 # route traffic marked to new table but the traffic isn't being redirected. if I switch the ip rule with i.e. ip rule add from one.single.ip.address/32 table 200 this one.single.ip.address IP traffic will go to the new link, as it should I supposed the iproute2 routing stuff would go after the mangle table being processed by netfilter, but it seems not being so. any help/hints/pointers would be greatelly appreciated. Cheers Bruno |