Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get port in FTP protocol from passive mode?

People also ask

How many ports are needed for passive FTP?

It really depends on your traffic. I had a low traffic site, and never had any problems with only 30 ports open. If you have a moderately busy site you'll probably need a few hundred. Start out with a small number, see if you have problems, and if you do, add more.


the last two are: p1 and p2 from RFC of ftp: http://www.faqs.org/rfcs/rfc959.html

to get port, use:

p1 * 256 + p2, then connect to this port


the port number is a 16-bit value between 0 and 65535 due to some constraints the authors have decided that all numbers between commas should be 8-bit (between 0 and 255). Thus, the 16-bit port number is represented with 2 8-bit numbers.

In your case the port number will be 230 * 256 + 205 = 59085