Hello, Pokotilenko Kostik a écrit :
I'm trying to settle routing with iptables. I have a router with 2 Inet connections, and I need routing decision upon source IP. # iptables -A PREROUTING -t mangle -s 10.0.0.0/8 -j ROUTE --oif eth0 iptables: No chain/target/match by that name # So, what's wrong? # uname -a Linux casper 2.6.8-2-686 #1 Thu May 19 17:53:30 JST 2005 i686 GNU/Linux
ROUTE is not a standard target included in the mainstream kernel. It is an extension from the patch-o-matic-ng. Is your kernel compiled with the ROUTE patch from the patch-o-matic-ng ?
It's Debian Sarge.
So I guess iptables version is 1.2.11 which includes support for the ROUTE target (but not for the --tee option).
However, I wonder why you want to use iptables' ROUTE instead of classic advanced routing (ip rule + alternate routing table) :
ip rule add from 10.0.0.0/8 lookup <alt_table_number_or_name> ip route add default dev eth0 table <alt_table_number_or_name> Phil :Why are you talking about a built-in target ? Many standard targets are not built-in but extensions : REJECT, LOG, MARK, DNAT, SNAT... By the way, REJECT is not a built-in target.
Stanislav :AFAIK the ROUTE target has never been included in the mainstream kernel sources yet.