Thursday, October 04, 2012

Securing Your Server by Closing Unnecessary Ports

I am getting rid of Rails Cookbook dead tree copy I bought in 2007. Notes that are valid for any Rails version.

$ netstat -an

will list all network daemons and the ports they are listening on. This will not show you the service name. To find out do:

$ less /etc/services

This will list the service name and the port number it is running. Diable the service based on your Linux flavor and reboot server to make sure it does not get restarted automatically on reboot.