Skip to content

Instantly share code, notes, and snippets.

@bloatfan
Forked from vdw/gist:09efee4f264bb2630345
Last active May 26, 2021 15:12
Show Gist options
  • Select an option

  • Save bloatfan/b68b35aaf76a4d01b579e0718242c57c to your computer and use it in GitHub Desktop.

Select an option

Save bloatfan/b68b35aaf76a4d01b579e0718242c57c to your computer and use it in GitHub Desktop.
Kill tcp connection with tcpkill on CentOS

Install tcpkill
yum -y install dsniff --enablerepo=epel

View connections netstat -tnpa | grep ESTABLISHED.*sshd.

Block with ip tables
iptables -A INPUT -s IP-ADDRESS -j DROP

Kill connection
tcpkill -i eth0 -9 port 50185

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment