in Network, Windows, Windows Server

How to change the number of dynamic ports

To comply with Internet Assigned Numbers Authority (IANA) recommendations, Microsoft has increased the dynamic client port range for outgoing connections in Windows Vista and in Windows Server 2008. The new default start port is 49152, and the default end port is 65535. This is a change from the configuration of earlier versions of Windows that used a default port range of 1025 through 5000. This is known as MaxUserPort in Windows 2003.

However, this may not be enough for busy servers. To increase this number use this command:

netsh int ipv4 set dynamicportrange tcp start=16384 num=49151

Here we change the number of ports from the default 16.383 to 49.151. You can choose any number but make sure the end port (start + num) is not higher than 65535.

To show the current number of ports, use this command:

netsh int ipv4 show dynamicportrange tcp