All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Watson <David.Watson@team17.com>
To: lartc@vger.kernel.org
Subject: [LARTC] ftp proxy /ftp direct over an interface
Date: Tue, 11 Mar 2003 18:26:48 +0000	[thread overview]
Message-ID: <marc-lartc-104740748410938@msgid-missing> (raw)


	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/

                 reply	other threads:[~2003-03-11 18:26 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=marc-lartc-104740748410938@msgid-missing \
    --to=david.watson@team17.com \
    --cc=lartc@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.