Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there anyway to kill those TIME_WAIT sockets immediately ? e.g output of netstat:

tcp        0      0         TIME_WAIT   -                   
tcp        0      0         TIME_WAIT   - 
share|improve this question
up vote 3 down vote accepted

Need not, they're there by reason — «… The purpose of TIME-WAIT is to prevent delayed packets from one connection being accepted by a later connection …»

Linux also has net.ipv4.tcp_tw_recycle and net.ipv4.tcp_tw_reuse which can be helpful. Another tool to mention is linux-tcp-drop

share|improve this answer
There is also a small utility called cutter to terminate TCP connections. It does not require building a kernel module. Included in some linux distributions. I've also seen a perl script to do the same but can't find it now. – akostadinov Jun 15 '12 at 13:38
@akostadinov, those connections are already terminated. – poige Jun 15 '12 at 14:19

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.