Newsgroups : Borland : borland.public.delphi.internet.winsock : 2008 Jan : Re: FTP with port redirection

www.cryer.info
Managed Newsgroup Archive

Re: FTP with port redirection

Subject:Re: FTP with port redirection
Posted by:"Remy Lebeau (TeamB)" (no.spam@no.spam.com)
Date:Tue, 29 Jan 2008 10:14:33

"Mikael Lenfors" <mikael@lenfors.se> wrote in message
news:479ef9db$1@newsgroups.borland.com...

> This works fine for one unit, but hov can I communicate with two
> or more units connected to the same router?
> I assume I have to select another FTP port than 21 for the second
> unit so that I can forward eg. port 210 to 192.168.1.2 and port 21
> instead.

Yes.

> This works for the FTP login but when I try to transfer data (put / get /
> dir)
> it fails!  I assume the actual file transfer is done on some other port!?

FTP data transfers are not very friendly to routers because they are
performed on their own separate connections.

By default, the TIdFTP.Passive property is set to False, meaning that
transfers are performed in Active mode.  Each unit would have to establish
an outbound connection through the router to a server socket that TIdFTP
listens on internally.

If you set the TIdFTP.Passive property to True, then each unit would have to
listen on its own server socket that TIdFTP would connect to instead.  In
this scenerio, you need to set up additional port forwarding on the router,
and you would have to lock down the range of ports that each unit can use
for listening (assuming they have that option).


Gambit

Replies:

none

In response to:

www.cryer.info
Managed Newsgroup Archive