Protecting cpanel with htaccess

MrTall

Member
Aug 18, 2013
11
0
1
cPanel Access Level
Website Owner
Hello,

I seem to be getting a lot of "attempted" logins on my cpanel. To enhance the security further is it possible to use .htaccess to protect the cpanel login page; this obviously will make me login twice to get into cpanel but it will restrict the chances of someone succeeding a login by chance?

Does anyone know if it's possible and if so what directory shall I add the .htaccess to? It's on a dedicated server and I have full control of the server so I shouldn't have any restrictions adding this in.

Any help welcomed, thanks for your time.

MrTall :)
 

GIANT_CRAB

Well-Known Member
Mar 23, 2012
89
0
56
cPanel Access Level
Root Administrator
No. This is not possible as cPanel perl scripts do not rely on Apache.

However, you can enhance server security by installing CSF, fail2ban or enable cPHulk.

Whitelist your static IP on CSF and cPHulk and make access to cPanel possible by your static IP.

This should secure it a lot.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,203
363
Hello :)

The following feature request may be of interest to you:

Two Factor Authentication

You can also ensure the following option is enabled for added security to cPanel/WHM login attempts:

"WHM Home » Security Center » cPHulk Brute Force Protection"

You can restrict access to specific services such as cPanel/WHM using Host Access Control:

"WHM Home » Security Center » Host Access Control"

Thank you.
 

MrTall

Member
Aug 18, 2013
11
0
1
cPanel Access Level
Website Owner
Thank you for the responses, I thought this may be the case. The two-factor authentication looks like a good option, let hope it gets developed. :)