search
top

Reserved Ports on Windows 2008 R2

Sometimes you will run into an issue where an application requires a specific port(s) and another app or service will grab them and cause that app or service to fail.  In Windows 200 and 2003 you could resolve this issue by adding a Multi string registry entry in HKLM\SYSTEM\CurrentControlSet\services\tcpip\Parameters called ReservedPorts and add in the exceptions and reboot and all was well.

This is no longer supported with Windows 2008 R2. To enable this feature you will need to install a hotfix and reboot the system. To resolve this issue download hotfix http://support.microsoft.com/kb/2665809/en-us and install it.

Before inputting the exclusions you must stop the service or app using the port or the command will fail.

•To exclude a range of ports from a range of ephemeral ports, run the following Netshell command:

netsh int  Add excludedportrange [protocol=]tcp|udp [startport=] [numberofports=] [[store=]active|persistent]Notes

ex: netsh int ip add excludedportrange protocol=tcp startport=7050 numberofports=2

This command excludes consecutive blocks of ports. The range of ports that you want to exclude should be within the range of ephemeral ports. The maximum range of ports that can be reserved every time that you run this command is 2048.
The Store parameter is optional. By default, this parameter is persistent and active.

•To remove an exclusion from a range of ports, run the following Netshell command:

netsh int  delete excludedportrange [protocol=]tcp|udp [startport=] [numberofports=] [[store=]active|persistent]

ex: netsh int ip delete excludedportrange protocol=tcp startport=7050 numberofports=2

•To query the range of ports that is currently excluded, run the following Netshell command:

netsh int  show excludedportrange [protocol=]tcp|udp [[store=]active|persistent

ex: netsh int ip show excludedportrange protocol=tcp

Reboot the server and check the status of the ports.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

top