TcpTimedWaitDelay
in the Windows registry editor to the minimum value of 30 seconds (0x1E). see http://technet.microsoft.com/en-us/library/cc938217.aspx
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\TcpTimedWaitDelay Value Name: TcpTimedWaitDelay Data type: REG_DWORD Range: 0x1E 0x12C ( 30–300 seconds ) Default value: 0xF0 ( 240 seconds = 4 minutes )
To increase the number of available ports: increase value for
MaxUserPort
see http://support.microsoft.com/kb/196271
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\MaxUserPort Value Name: MaxUserPort Value Type: DWORD Value data: 65534 Valid Range: 5000-65534 (decimal) Default: 0x1388 (5000 decimal)