EldoS | Feel safer!

Software components for data protection, secure storage and transfer

How is port selected based on DataSocketBinding configuration

Also by EldoS: CallbackRegistry
A component to monitor and control Windows registry access and create virtual registry keys.
#21407
Posted: 09/11/2012 06:58:25
by Niklas Kjellander (Standard support level)
Joined: 09/30/2008
Posts: 49

Hi,

Every time i configure the DataSocketBinding of the ftp client with a range, it seems like the value specified in PortRangeTo is sent in the PORT command to the ftp server (within the same session).

I've run the program a couple of times and this happens every time. Is it just a coincidence or is there a bug in the selection algorithm or is there something else that makes impact on the selection of port that I'm not aware of?

I understand that some ftp servers may not accept the same port twice unless a period of time has elapsed since last connection to that port. If that is the case this could be a problem if the value of PortRangeTo always get sent in the PORT command.

I'm currently using the .Net libraries of SecureBlackbox version 9.1.215.0. The ftp client mentioned above is the TElSimpleFTPSClient.

Best regards,

Niklas Kjellander
#21408
Posted: 09/11/2012 07:06:29
by Eugene Mayevski (EldoS Corp.)

PortRange is used to choose a consequent port number if the given port is not available. The port is not chosen in random order, but consequently from higher to lower value.


Sincerely yours
Eugene Mayevski
#21409
Posted: 09/11/2012 07:34:00
by Eugene Mayevski (EldoS Corp.)

There was a bug in version 9 (in .NET edition) - it started counting up from higher bound. Now it starts counting up from lower one.


Sincerely yours
Eugene Mayevski
#21411
Posted: 09/11/2012 07:48:16
by Niklas Kjellander (Standard support level)
Joined: 09/30/2008
Posts: 49

As I mentioned there may be ftp servers that does not support connection to the samt port twice. I found this in the documentation of the third party component that we are currently using for ftp purposes:

Quote
it is recommended to specify a range of ports if at all possible because many FTP servers do not allow connections to a port unless a period of time has elapsed since the last connection to this port


So what would happen with the simple ftp client in a scenario where the ftp server does not accept connections to the same port and there is a range of ports configured on the DataSocketBinding property?

/Niklas
#21412
Posted: 09/11/2012 07:50:25
by Niklas Kjellander (Standard support level)
Joined: 09/30/2008
Posts: 49

There was a bug... Is the bug fix released?

/Niklas
#21413
Posted: 09/11/2012 08:05:05
by Mykola Olshevsky (Basic support level)
Joined: 07/07/2005
Posts: 450

Hi. Server chooses the first free port from assigned port range, starting from the lower one.
In the latest SBB 10 build, available on site, this bug should be fixed.
#21437
Posted: 09/12/2012 03:19:42
by Niklas Kjellander (Standard support level)
Joined: 09/30/2008
Posts: 49

I see, but the server component was not the really topic here, rather the ftp client component. Is behaviour of how the client chooses port from configured range also changed in th latest build of SBB 10?
#21439
Posted: 09/12/2012 04:02:57
by Mykola Olshevsky (Basic support level)
Joined: 07/07/2005
Posts: 450

Sorry, misunderstood you. The bug was in the socket component itself, so FTP client will have the same port choosing behavior.
Also by EldoS: Callback File System
Create virtual file systems and disks, expose and manage remote data as if they were files on the local disk.

Reply

Statistics

Topic viewed 613 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!