Thursday, June 9, 2016

Fuser, find who is using a specific TCP Port and kill it

Check who is using the tcp port 81234

Example:

Let's start using the port 81234
$ nc -l 81234

Let's check who are using

$ fuser -v -n tcp 81234

Let's kill who are using this port

$ fuser -k 81234/tcp

or
To ask the user to die, giving him the option answer yes or no

$ fuser -i -k 81234/tcp

No comments:

Blog Archive