There is delay from when these services close their last connection to when the firewall disables the port. By default, this delay is 4 minutes, but it can be minimized by modifying the following registry key.
Value Name: TcpTimedWaitDelay
Data Type: REG_DWORD (DWORD Value)
Value Data: 30-300 seconds (decimal)
Default: 0xF0 (240 decimal)
On some systems you will need to create this key, as it does not exist by default on all operating systems. Also, you will need to reboot before changes made to this key take effect.
Note: this registry key is not specific to the MKS
rexecd services. Changes to this key will also effect other TCP connections.