How to Configure Passive Port Range for the FTP Service in IIS



The PASV dynamic port range for FTP service in IIS Web Server base on Windows dynamic port setting.

You can query default port range setting follow this command :

netsh int ipv4 show dynamicport tcp

or

netsh int ipv4 show dynamicport udp



If your windows is early then windows server 2008 or windows vista , the range will be 1025 - 65535

You can change this dynamic port range follow this command :

nsetsh int ipv4 set dynamicport tcp start=50000 num=10000

if  you need keep this setting then add persistent command :

nsetsh int ipv4 set dynamicport tcp start=50000 num=10000 persistent

or keep until next boot(default) :

nsetsh int ipv4 set dynamicport tcp start=50000 num=10000 active

and query again:




Now , your FTP PASV port range will be limit in 50000-59999.

Note : Change this range maybe limit other windows service dynamic port  at same time.


Reference :

The default dynamic port range for TCP/IP has changed since Windows Vista and in Windows Server 2008.

Service Name and Transport Protocol Port Number Registry

WIN10查詢及設定Dynamic Port Range(Source Port Range)

How to Configure Passive Port Range for the FTP Service in IIS?

TCP連線時動態埠的相關問題說明


留言

這個網誌中的熱門文章

【研究】列印的條碼為什麼很難刷(掃描)

統一發票列印小程式

C# 使用 Process.Start 執行外部程式