Re: proxy and desitnation on the same host

Marius Tomaschewski <[email protected]> Thu, 31 Jul 2003 13:33:30 +0200
Newsgroups gmane.linux.suse.proxy-suite
Organization SuSE Product Developement
Message-ID <[email protected]>
On Wed, Jul 30, 2003 at 08:41:20PM +0200, Atif Ghaffar wrote:
> Hi,

Hi!

> I am trying to setup ftp-proxy on multiple hosts on port 21
> The main ftp server (pure-ftpd) is also running on the same hosts on 
> port 211
> 
> The idea is that the user may connect to any ftp server and get proxied 
> to the correct one via LDAP lookups. The destination server may or may 
> not be publicly reachable.
> 
> 
> All is working fine if
> 
> user's destination is serverY and he connected to serverX
> 
> but if
> 
> user's destination is server Y and he connects to serverY
> the login is ok, but the user cannot see no data
> Gets an "425 Can't open data connection." message

FTP servers defaults to bind to port 20 for data transfers
(server:20 --> client:random, where as far I remember, the
client "random" port defaults to the client's control port).

If you run multiple servers (with active transfers) on one
host, you have to change the port to be different for each
server - this may be not configureable on the server.

The proxy is using port 20 as well (proxy:20 -> client)
if it runs with uid 0 or a random port while uid != 0.
See the User, Group, ServerRoot config options and the
sample init-script as well.
You can also specify an active port (range), the proxy has
to use via ActiveMinDataPort / ActiveMaxDataPort options.
You may set the "SockBindRand yes" option as well.

Further you can configure the proxy to use passive transfers
to the server via "DestinationTransferMode passive", so the
server does not need to use active connections at all
(except it is connected/recheable directly by clients).

Kind regards,
 Marius Tomaschewski <[email protected]>
--
 SuSE Linux AG, Nürnberg  --   Product Developement
 PGP public key on:   http://www.suse.de/~mt/mt.pgp
 DF17 271A AD15 006A 5BB9  6C96 CA2F F3F7 373A 1CC0

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]