Windows server passive port range

Really quick one.

To set Windows server passive port range you should use adsutil.vbs which is one of the administration scripts located usually at: C:>\Inetpub\AdminScripts . I am saying usually as the Windows server installation could be on a different drive.

The issue with the Windows passive port range is that the default firewall (firewall.cpl) does not have option or field to open port range, and often when you setup FTP on your Windows server an try to connect with FTP client it may appear with error similar to this one bellow.

 

directory listing denied because of missing opened passive port range

 

As you can see from the log, you can connect to the server using FTP, but when you try to do something like listing directory content or copying files it times our. The reason is because the FTP client is trying to connect trough any opened port above 1024 one. (The usual default range is a big one. For example between 40000 and 45000)

You can add several ports manually, but if you have many FTP users, their FTP clients may exceed the port range number and will face the same issue as above. Try using this for testing purposes only (to make sure the issue is because passive port range is not set).

Manual setup of passive port range on windows firewall

 

To set passive FTP port range on a Windows server the command should be executed via the command line. So go to Start -> Run… type cmd and then:

 

The result should be similar to this one:

Passive port range sring

Once executed you should not have further issues with Passive mode using your FTP client.
 

Another method to enable Passive Port Range on Windows 2008 is to execute the following command:

 
It should return one big ‘OK’, and passive FTP access will be possible.

Filed Under: WindowsWindows 2003 ServerWindows 2008 ServerWindows 7Windows VistaWindows XP

Anthony Gee About the Author: Anthony G. is an IT specialist with more than 9 years of solid working experience in the Web Hosting industry. Currently works as server support administrator, involved in consultative discussions about Web Hosting and server administration. One of the first writers in the Onlinehowto.net website, now writing for Free Tutorials community - he is publishing tutorials and articles for the wide public, as well as specific technical solutions.

Leave a Reply