[LARTC] ftp proxy /ftp direct over an interface

Linux Advanced Routing and Traffic Control

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

 



I'm trying to direct ftp traffic from one external interface (eth1) to anonther (eth2)

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
_____________________________________________________________



[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux