We help IT Professionals succeed at work.

Kill TCP socket connection

oggiemc
oggiemc asked
on
Hello all,

Can someone tell me quickly how to kill a TCP connection from the command line (windows)?

Thanks
Comment
Watch Question

Commented:


Dear oggiemc,

I would like to help you in a best intentions. But I have to say one thing - only in Windows program you can see all TCP connection in an evidently way and kill TCP connection.

Does it worth if I offer to you a FREEWARE program that was made by SYSinternals and finally Microsoft has bought it and it is free to download?

TCPView v3.05 is the best for your purpose and very small EXE program without installation.

You can download it from:

http://technet.microsoft.com/en-us/sysinternals/bb897437

regards

Nrisimha
Commented:

But, I have to be honest - there is a really one sweet CMD program that is called wkillcx.

It really kill TCP connections from CMD line.

Download:
http://wkillcx.sourceforge.net/

best regards

Nrisimha




Commented:
You have to end the task that is using the connection.

So for example you could use "netstat -o" to display list of connections and their associated Process ID. Then use "taskkill /PID ####" to terminate the process you want to close the connection for (where #### is the PID number).