[CentOS] Port Closing Question..

Fri Aug 1 21:56:09 UTC 2008
NiftyClusters Mitch <niftycluster at niftyegg.com>

On Thu, Jul 31, 2008 at 2:06 PM, Ryan Nichols <rnichols430 at gmail.com> wrote:
> Is there a software avail or a process that will monitor two ports and if
> there is no traffic close them so the program that is using them can reuse
> them?  I talked to the vendor and they told me I needed to do this on the
> NAT/Firewall , but I dont see anything like that on my router. So any
> suggestions ideas?
>
> thanks,
> Ryan Nichols

Do some historic searching on WEB server mailing lists.
Web servers have a classic problem where the "close" of a socket
is a multiple step process involving both ends of the socket.
Killing the process (kill -9) or even disconnecting from a wireless hot spot
can leave the server system with an open socket that could last for days....
In the old days web servers would have to be rebooted to clear this.
There is now a way to drop connections after a timer expires.  It
is a kernel param and some think it violates the TCP/IP specification ;-)
so the default is off or very long.

Slightly different are NFS, ssh and rsh links that hang out until  the
far system
comes back.  But both are a failure for the cooperative shut down of the link.

I am not sure a common simple firewall/ NAT box can help this....
Cisco and others have some good documents on line...

see  also CLOSE_WAIT and FIN.... in the TCP/IP specification...
and look for related Linux network flags



-- 
 NiftyCluster
 T o m M i t c h e l l