Archive for July 7th, 2008

Windows TCP Local Ports

I just found out that by default the Windows 2003 Server sets the Maximum TCP Ports number to 5000. This is a problem if we have an application which needs to connect to remote system using a particular port number.

See the following URL:

http://msdn.microsoft.com/en-us/library/ms819739.aspx

The number of user-accessible ephemeral ports that can be used as sources for outbound connections can be configured using the MaxUserPorts registry value, also found under the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters key. By default, when an application requests any socket from the system to use for an outbound call, a port numbered between 1024 and 5000 is supplied. MaxUserPorts can be used to set the value of the uppermost port that the administrator chooses to allow for outbound connections.

So, bear in mind to increase the MaxUserPorts parameter to allow locally open up to a certain number ,ie. 65000.