d0ppy - Thanks. It will be Apache, and I'll stress the point about keeping it up to date, as well as validating any user input that could be used maliciously (especially when PHP and SQL databases are being used - and if they are, separate points about making them more secure than out-of-the-box).
Quote:
Originally posted here by gore
How about permissions? How about /etc/securetty being set to only /dev/tty1 so root can only log in from the first console and isn't allowed to use X ?
Thanks - I didn't know about that.
Quote:
Running chkrootkit every 6 hours on a machine you're using as a server is going to REALLY make a load to high. That one I'd say switch to maybe every 12 hours.
Ok - 12 hours it is. I wasn't sure how heavy chkrootkit is on the system (which is why I put 6 hours) - I usually leave my chkrootkit'ing to the night :D
Quote:
As for the firewall, most distros come with something to set up IPTables in an easier manner.
Like guarddog, Firestarter, etc.. So you would recommend using one of those rather than setting up iptables manually?
Quote:
SUSE has a module for that too where you can set easy, secure, or paranoid.
Sudo is only needed when you don't want to run as root, or use su. You type sudo, a command, and then it asks for the root password.
Quite a few of the popular distros bring security level configuration, I think. And I knew about sudo - I just thought that maybe I should remove the server user from sudoers because then even if the box was compromised, the cracker wouldn't be able to get root without some form of privilege escalation (although that's probably what they'd do anyway).
Quote:
Linux gives you source code for the whole system. Hire a Kernel programmer to hack a web server right into the Kernel and discard ANYTHING that doesn't have anything to do with web traffic. All traffic not in the web server criteria is discarded.
[..]
That costs quite a lot though - I'm not sure that most of the readers of my tutorial would go for this option, but I'll propose it in case they are interested. :)
Quote:
In addition to modifying a file's permissions, a user can modify a file's attributes. These are changed with the chattr command and you can list them with lsattr.
[..]
Advanced file system attributes liuke -i which is immutable, prevents a file from being modified, deleted, renamed, or linked. And when you do a back up and you don't want it there.... Well -s makes it so the thing is forced to be deleted / whiped when it's deleted. And if you worry about power outtages, -S (Capitol S) makes it so this file is written to disk immediatley instead of being put in a buffer.
chattr is the one 'ch-' command I've never understood the purpose of - although now I realise its importance. Thank you.
Quote:
And you don't want to back these up with dump. Dump backs it up, but you'd then be able to take the media and read what's on it.
If there another machine on the same network as it, I might implement the backing up process described here: click and click.
Quote:
Oh and you may want to make services run on another port. Like Web traffic not running on port 80 and so on. And chroot services you DO have.
Got the first bit - any particular reason why? I know it will not be expected.. 'chroot services you DO have' - as in creating a chroot 'jail', in a sense? Any specific place you recommend, or will a '. ' directory in the home folder do fine?
Quote:
TURN OFF THE SUID AND SGID BIT
My memory fails me - is that done by adding 'nosuid' and 'nosgid' parameters to the partition's mount line in /etc/fstab?
Quote:
SUSE comes with stackgaurd.
Read up on :
http://www.immunix.org/formatguard.html
I'm not sure that link works right now because Novell bought that too and guess what product it's being put into?
Oh and for bastille, check out SUSE again for "harden_suse".
Aye - Immunix is down. I'll look into it as soon as it's up though. I'm guessing it's something to be excited about, so I'm glad it's being incorporated into SUSE. Hehe.. harden_suse sounds very interesting - would I use it in conjunction with Bastille or not?
Quote:
Next, and very important. Set up logging to be more aggressive than by default, and you may want it to be emailed to you each night.
On this box SUSE has a prog on the DVD that does it for you. Each night security scripts are ran and the results + log files get emailed to you at any email accountt hat you want.
Ok. Do you mean kernel message logging, Apache logging, or in general? Also - is that SUSE Pro (if so which version?) or OpenSUSE which brings the log emailing inbuilt?
I was also wondering whether the server should run a minimal WM like Fluxbox, or whether it should all be done via the CLI. Which do you suggest?
Wow - that was a lot of info ;)
Cheers,
-jk