cerrar conexiones TCP / killing tcp connections


Si alguna vez tuvimos un servidor bajo ataque, seguramente hemos tenido la necesidad de cerrar o matar determinadas conexiones a nuestro servidor. Con un netstat, vemos la conexión, pero no tenemos opción de matarla.

Para ello, podemos utilizar el comando tcpkill, que viene en el paquete dsniff, junto con otras utilidades de línea de comandos.

Así que si no lo tenemos, primero, lo instalamos:

$ sudo yum install dsniff

Luego, podremos utilizar el tcpkill de diferentes maneras, por ejemplo:

# tcpkill −9 host www.gmail.com
# tcpkill −9 192.168.0.1
# tcpkill −9 host hvivani.com.ar and host www.google.com

Se sienten mas tranquilos ahora ?

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s