Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Question on ftp daemons and port 21

Status
Not open for further replies.

cdlvj

MIS
Nov 18, 2003
678
US
I have a ftp server that totally takes over port 21, Does this not violate rfc rules. Win-2k3

On Unix, the ftp daemon listens on port 21, and I can use many and numerous program to ftp as a client out.

If I am running the ftp server mentioned about, I cannot get any connections, Bring the server down, I can connect.

Thanks in advance.
 
Usually (in my experience), client programs choose random ports to connect with, regardless of the server port they're connecting to.

For instance, I just had a CGI page print out $ENV{REMOTE_PORT}, and:

Code:
$ENV{REMOTE_PORT} = 35468

The HTTP server running this script was on port 80, but my computer used port 35468 to access it. This would also be how you can load multiple web pages at the same time. If all web browsers used port 80 to access port 80, then this wouldn't be possible.

Are you writing a custom program to connect to the FTP server, or is it a downloaded client program? If it's your own code, post it here and we can take a look at it and see any potential issues. If it's a downloaded client, look into its settings to see if you can configure the local port used to connect to servers.
 
An ftp server on port 21 will take over the port, including *nix variants. In fact, any "listening" server, ftp, telnet, http, takes over the port when the 'accept' method is called.

Normal ftp clients use a random outbound port and connect to specified port 21 on remote box.

If your app is trying to use port 21 for other than accepting ftp connections it is in violation of the Well Known Ports standards.

Jeb
\0
 
Do believe that I have some firewall issues using Net::ftp on my machine.

I have Globalscape EFT server, and hoping that I can use perl scripts to ftp to other servers on this same machine.

Looks like it should work without any problems.

Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top