Kill Established Tcp Connection on Linux

Kill Established Tcp Connection on Linux

How can you kill an established TCP connection on Linux?

1

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]
3

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 

Your Answer

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

Maya Lin-Takahashi
Author

Maya Lin-Takahashi

Maya is a hardware enthusiast who tests and reviews smart home devices, smartphones, wearables, and audio gear. She focuses on practical consumer value and build quality.