Hi,

    This is the whole information I have. 

It is right that in the active mode the local port
should be 20. In this case, the uniqe identifier is
the full combination of source ip, source port, dest
ip, dest port.  As long as any one of those is
different between 2 different connections it's all
good. 

For example, my localhost IP is 127.0.0.1 and the DHCP
IP is
xxx.xxx.xxx.xxx

If I try to open two connections (same local port)
using 127.0.0.1, it will invariably fail. But if I use
different IPs (127.0.0.1, xxx.xxx.xxx.xxx), it will be
fine. In your case, you are testing the ftp data
connections from the same machine. So all the 4
parameters are same at the same time. So it is
failing.

Due to this reason, we have not used fixed local port
(20) in active data connection. The parallel
connection testing becomes really difficult. 

Instead of using the active mode, you can use the
passive mode which is firewall friendly. Or if you
really really want to use active mode connection with
local port 20, we can start thinking about
implementing it.

Thanks,
Rana Bhattacharyya


--- "Schmolzi, Christian"
<[EMAIL PROTECTED]> wrote:

> Hi,
> 
> When using the server in active mode, is it possible
> to restrict it to
> using local port 20 (standard ftp-data)? As far as I
> can see, it uses
> local ports > 1024 which makes it impossible to get
> through our
> firewall.
> 
> I tried to change the code in FtpDataConnection from
> 
>     m_dataSoc = new Socket(m_address, m_port);
> 
> to 
> 
>     m_dataSoc = new Socket(m_address, m_port,
> InetAddress.getLocalHost(), 20);
> 
> but that led to BindExceptions when several clients
> tried to connect. 
> 
> Do you have any ideas how to resolve this problem?
> 
> Regards,
> Chris
> 
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Reply via email to