Securing the /etc/services file

Secure the /etc/services file to prevent unauthorized editing. If this file is editable, crackers can use it to enable ports on your machine you have otherwise closed. To secure this file, type the following commands as root:

# chown root.root /etc/services
# chmod 0644 /etc/services
# chattr +i /etc/services

This prevents the file from being renamed, deleted or having links made to it.

Comments are closed.