This article only applies to the 64-bit versions of Windows 7 and Windows 2008 R2.  Microsoft has removed the ability to exclude ephemeral ports in Windows 8 and Server 2012.

 

Question

How can I reserve ports used by PRTK/DNA so that they are not taken by other programs?

 

Answer

  1. Install the attached Windows Hotfix and reboot your PC
  2. Make sure ElasticSearch and PRTK/DNA are stopped
  3. Open a Command Prompt (as Administrator)
  4. Run the following command:
    netsh int ipv4 Add excludedportrange protocol=tcp startport=49170 numberofports=30
  5. Reboot

 

Overview

These steps will prevent programs requesting dynamic/ephemeral ports from being assigned ports that may interfere with PRTK/DNA usage.  Namely, this reserves TCP ports 49170-49199.  Please note that this will not prevent applications using hard-coded port numbers from using these ports.

 

Note

To reverse this setting, use the following command:
netsh int ipv4 delete excludedportrange protocol=tcp startport=49170 numberofports=30