Hello,

I'm trying to configure both iptables and iproute2 to use two WAN
interfaces on a Linux Box (debian/sparc64).

Root rayleigh:[~] > route
Table de routage IP du noyau
Destination Passerelle Genmask Indic Metric Ref Use
Iface
192.168.0.128 * 255.255.255.0 U 0 0 0 eth0
192.168.253.0 * 255.255.255.0 U 0 0 0 eth2
192.168.254.0 * 255.255.255.0 U 0 0 0 eth1
default 192.168.254.254 0.0.0.0 UG 0 0 0 eth1
Root rayleigh:[~] >

This server is a gateway for my LAN (eth0) and I can send packets
from LAN workstations to eth1 or eth2. I have written some iptables
rules to dispatch traffic between eth1 and eth2 :

ip rule add from 192.168.253.1 lookup backup priority 100
ip rule add fwmark 0x01 table backup priority 101
ip route add default via 192.168.253.254 dev eth2 table backup
ip route flush cache
echo 0 > /proc/sys/net/ipv4/conf/eth2/rp_filter

Root rayleigh:[~] > iptables -L -t mangle
Chain PREROUTING (policy ACCEPT)
target prot opt source destination
MARK tcp -- 192.168.0.84 anywhere tcp
dpt:smtp MARK set 0x1

Thus, all smtp traffic that comes from 192.168.0.84 (a LAN workstation)
goes to WAN by eth2 and not by default route eth1.

Problem : I want to configure the gateway itself to send locally
generated packet by eth2. Why ? I have tried to write some iptables
rules without any success...

Thanks in advance,

JKB