3 ms·
I always wondered why there is no standard unix tool to accomplish this. Also useful would be a tool to close a TCP connection, regardless of the processes tha
by amelius 12y ago
I always wondered why there is no standard unix tool to accomplish this.
Also useful would be a tool to close a TCP connection, regardless of the processes that have handles to it.
- tankenmate 12y agoYou can achieve this for TCP by faking an RST (reset) packet that purports to be from the other end of the connection. [EDIT] These tools are a reasonable starting point. http://linuxpoison.blogspot.co.uk/2008/10/tools-for-creating-tcpip-packets.html http://linuxpoison.blogspot.co.uk/2008/10/tools-for-creating...
- mortenlarsen 12y agoThis sort of does what you want. But there must be some traffic even if it just keep alive. sudo tcpkill -9 -i eth0 host 1.2.3.4 and port 80 It is part of dsniff.
- agwa 12y agoI've had much better luck with killcx: http://killcx.sourceforge.net/ http://killcx.sourceforge.net/ In particular, it sends a spoofed SYN packet to induce an ACK packet containing the sequence numbers necessary to send the RST. That means it doesn't rely on there being traffic already.
- Freaky 12y agoBSD's have tcpdrop(8): If a connection to httpd(8) is causing congestion on a network link, one can drop the TCP session in charge: # sockstat -c | grep httpd www httpd 16525 3 tcp4 \ 192.168.5.41:80 192.168.5.1:26747 The following command will drop the connection: # tcpdrop 192.168.5.41 80 192.168.5.1 26747
- deleted 12y ago[deleted]