I'm testing at the moment with a user:
$IPTABLES -t mangle -A OUTPUT -m owner --uid-owner 502 -j MARK --set-mark $TO_ETH2
I route based on the mark:
/sbin/ip rule add fwmark $TO_EH2 lookup eth2out
I snat the connection in postrouting:
$IPTABLES -t nat -A POSTROUTING -o $ETH2DEV -j SNAT --to $ETH2IP
the remote ftp server gets the connection (from the correct ip/interface)and passive connections work.
Active connections require that the server connect back to me, and that is where things break, the ftp server comes back to me on eth2 but my ftp client is listening on eth1.
Is there either a better way for me to redirect this local user or a way to recognise the incoming connection for what it is and get it to the ftp client?
Thanks
_____________________________________________________________ David Watson, Network Manager, Team17 Software Ltd. Phone: +44-1924-267776 Fax: +44-1924-267658 _____________________________________________________________