How can you kill an established TCP connection on Linux?
2 Answers
There's a tool called tcpkill. You can usually get it by installing dsniff.
[root@fresh ~]# tcpkill -i eth0 tcp port 22
tcpkill: listening on eth0 [tcp port 22]
tcpkill is the command to research, let's you kill connections to / from a specified host, network or port.
For example, to prevent any connections to the host use this command:
/usr/sbin/tcpkill −9 host