Simple Server Security

0

COMMENTS

I am sure many of you will be thinking that it is our job to secure your servers and you are right, but much of this you need to know and it will do no harm in you knowing. So if you don’t feel like you can do anything here, just open a ticket and we will do it for you. Everything here is pretty simple, and this will be good for anyone who wants to learn, and be slightly more independent.

This guide is mainly for WHM and cPanel as the things are made much easier with cPanel and WHM however we can do them even if you don’t have it.

1. Shell Limits

You should enable shell resource limits to prevent users from consuming all the server resources. DDOS exploits typically do this. A quick way to set this for people using WHM is in the root WHM reseller go to Shell Fork Bomb Protection

2. Background Process Killer (People using WHM)

In WHM enable each item in WHM -> Background Process Killer, to remove any IRCs or other malicious bots

3. Apache

In Apache RLimitCPU and RLimitMEM should be set to stop any spammers or DDOSers using all the processes on your server. You can do this in WHM in the Modify Apache Memory Usage page.

You should also make sure that mod_userdir is disabled apart from one main domain, or just make sure its disabled totally, otherwise hacks may use it to try and hide their activities.

You should also enable SUEXEC to reduce the risk of hackers accessing all your sites if the server is compromised.

4. PHP

In the php ini (you can find the location via a php info file) you should change enable_dl to Off. This prevents users from loading php modules that effect everyone on the server. Note: IF you use dynamic libs like ioncube you will have to load them directly from the php.ini

You should also change the disable functions to
disable_functions = show_source, system, shell_exec, passthru, exec, phpinfo, popen, proc_open
Some webscripts break with these so you may have to remove a few, but these scripts are dangerous

You need to make sure PHP open_basedir is enabled. In WHM you can do this via WHM -> Tweak Security -> php open_basedir tweak. This prevents PHP scripts from straying outside of their account.

PHPSuExec can reduce the risks of hackers accessing all the sites on the server via a compromised PHP web script. There are some side effects of this, but this is a much safer method. If your server is full I would not recommend it, but on
brand new servers this is the best thing to do as its safer.

5. Control Panel

Make sure your control panel is updated to the latest stable version regularly.

Make sure that SSL login is forced, ie the secure ports. In WHM you can do this via WHM -> Tweak Settings -> Always Redirect users to the ssl/tls ports when visiting /cpanel, /webmil etc.

Make sure boxtrapper is DISABLED. The reason for this is that if its enabled you can easily be listed in an RBL and usually has the effect of increasing overall spam load not reducing it.

Make sure you have some sort of limit of emails sent per hour.

Make sure users CAN NOT reset passwords via email.

Post a comment or leave a trackback: Trackback URL.

The Blog begins…

0

COMMENTS

Welcome to the SeeksAdmin blog, I decided to recreate my blog today in WordPress, as its in general a better and more secure solution.

The reason I have decided to create the blog was that I run my company in a more personal manner than most people, I prefer to get to know my clients, to find out what they want and what they need. That is why I have decided to create this blog so the people could get to know me as a person and about how I run the company. After all if you know the management of the company is like you are going to know a bit about the service you will receive.

Another reason for it is that I believe I can help my clients learn through the articles I post, whether that is learn about the solutions we offer or learn a little system administration, either way we want you to learn something along the way so you can share the enjoyment we have in doing this job.

I am not sure what else I can say so I will leave it at this point, and as I mentioned I will try to keep this updated on a almost daily basis.

Post a comment or leave a trackback: Trackback URL.