Hi, last time i ordered a new server i found here a VERY GOOD server hardening guide.
It showed instructions in how to secure the /tmp directory, how to disable root login, send an email when someone used the root account, install a firewall, even instructions in how to install chkrootkit.
I have tried hard to find it with no luck, any of you guys know where can i find a complete server hardening guide?
to secure /tmp
to disable root login
but look you must add a user to wheel group
to use root from running "su"
to get a warning message when someone enter the server using root Access!
echo 'ALERT - Root Shell Access (Alm4host) on:' `date` `who` | mail -s "Alert: Root Access from `who | cut -d"(" -f2 | cut -d")" -f1`" [email protected]
Change my email to your own email
then save the file
I saw following error when I login to server root :
[email protected]'s password:
Last login: Fri Sep 14 13:14:07 2007 from XX.XXX.XX.XXX
mail: option requires an argument -- s
Usage: mail [-iInv] [-s subject] [-c cc-addr] [-b bcc-addr] to-addr ...
[- sendmail-options ...]
mail [-iInNv] -f [name]
mail [-iInNv] [-u user]
-bash: Alert: Root Access from XX.XXX.XX.XXX: command not found
-bash: [email protected]: command not found
client$ ssh [email protected]
Last login: Fri Sep 14 14:22:18 2007 from 192.168.0.1
Copyright (c) 1980, 1983, 1986, 1988, 1990, 1991, 1993, 1994
The Regents of the University of California. All rights reserved.