All of lore.kernel.org
 help / color / mirror / Atom feed
* [LARTC] ftp proxy /ftp direct over an interface
@ 2003-03-11 18:26 David Watson
  0 siblings, 0 replies; only message in thread
From: David Watson @ 2003-03-11 18:26 UTC (permalink / raw)
  To: lartc


	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
_____________________________________________________________

_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-03-11 18:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-03-11 18:26 [LARTC] ftp proxy /ftp direct over an interface David Watson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.