I am goofing around in Metasploitable and trying some commands.

Whenever I kill a process using fuser -k 23/tcp to close the port, I get other processes also killed by the process and their ports closed such as vsFTPD process on port 21.

Are they linked and is there a way to kill the one without killing the other?

Also, there are processes that are being automatically started once I kill them such as the processes that run on ports 3306 mysql or 8180 unknown.

Any ideas are highly appreciated.

  • What does fuser 23/tcp list, and what do those PIDs correspond to? – Gilles 'SO- stop being evil' Dec 2 '16 at 20:59
  • it gives back 4958 which is for xinetd , but I can't relate with port 21 also gets turned off. – tony9099 Dec 3 '16 at 17:37

xinetd is a service dispatcher: it listens on many ports, and when it detects an incoming connection, it starts the appropriate program to deal with it.

If you want your machine not to have an FTP service, then configure xinetd not to have a service on port 23. Edit either /etc/xinetd.conf or the appropriate file under /etc/xinetd.d to comment out the FTP service, then run service xinetd reload to make it reload the configuration.

You can run an FTP daemon from inetd/xinetd or separately (but obviously not both at the same time).

In general, don't kill a process to stop a service. Most system services are started by a monitoring program that restarts the service if it's supposed to run, and starts a new instance if the daemon process dies. Most distributions provide a tool called service to start and stop a service.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.