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   - 

2 Answers 2


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

  • 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. Jun 15, 2012 at 13:38
  • @akostadinov, those connections are already terminated.
    – poige
    Jun 15, 2012 at 14:19

You can use killcx(http://killcx.sourceforge.net/) perl command, it will do the job

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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