Secure WHM/Cpanel

Login to WHM on your server as root:

https://SERVERIP:2087

Under Domains
Prevent users from parking/adding on common internet domains. (ie hotmail.com, aol.com)

On "Server Setup" --------> "Tweak Settings"
- Check the following items...

On "Mail" section:
- Attempt to prevent pop3 connection floods
Default catch-all/default address behavior for new accounts - blackhole
(according to ELIX - set this to FAIL, which is what I am going to do to reduce server load)

"System" section:
Use jailshell as the default shell for all new accounts and modified accounts

On "Server Setup" --------> "Tweak Security"
- Enable php open_basedir Protection
- Enable mod_userdir Protection
- Disabled Compilers for unprivileged users.

"Server Setup" --------> "Manage Wheel Group Users"
- Remove all users except for root and your main account from the wheel group.

"Server Setup" --------> "Shell Fork Bomb Protection"
- Enable Shell Fork Bomb/Memory Protection

"Resellers" --------> "Reseller Center"
Privileges should be always disabled. Allow Creation of Packages with Shell Access and enable Never allow creation of accounts with shell access; under Root Access disable All Features.

"Service Configuration" --------> "FTP Configuration"
- Disable Anonymous FTP

"Account Functions" --------> "Manage Shell Access"
- Disable Shell Access for all users (except yourself)

"Mysql" section --------> "MySQL Root Password"
- Change root password for MySQL

3 Comments:

Anonymous said...

Thanks for these tips, they really came in handy.
They're very helpful for people who are not very familiar with WHM Security.

Anonymous said...

Thanks on the fellow tips, very helpful!

Aviator said...

these are the tweaks are really helpful. May I know if any one can help with attack break through and placing per scripts used for spamming.