Prevent PHPMyAdmin Bruteforcing in DirectAdmin

It is quite common to see automated attempts to locate PHPMyAdmin URLs for the purpose of brute-forcing when perusing the webserver access logs and domain logs. You can eliminate the threat of attacker success by restricting access to PHPMyAdmin to the panel only. This will require that a user is already logged into the DirectAdmin panel before they can access PHPMyAdmin.

You can make /phpMyAdmin SSO-only (Single Sign On-only) accessible (no username/password login allowed) by using the following commands (which also ensures that PHPMyAdmin auto-login is enabled as well):

  cd /usr/local/directadmin/
  ./directadmin set one_click_pma_login 1 restart
  cd custombuild
  ./build update
  ./build set phpmyadmin_public no
  ./build phpmyadmin

Now, when any potential bruteforcer attempts to access the /phpMyAdmin URL, DirectAdmin would throw the following error and not allow them to attempt to log in:

Access to phpMyAdmin is only allowed from the control panel.

Threat averted! :)

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How to reinstall DirectAdmin in your web server?

Run the following commands to install: cd /usr/local/directadmin./directadmin i./directadmin p

How to install imagick with custombuild of DA?

Run the following command: cd /usr/local/directadmin/custombuild ./build update ./build...

The service ‘exim’ on server xxx is currently down

Rebuild your exim. cd /usr/local/directadmin/custombuild./build update./build set exim...

Change DA port to your choice where CSF installed

Here I will show you how to change the port from 2222 to 9999 in two steps. Step One:...

How to migrate cPanel account to DirectAdmin?

The cPanel conversion script currently only works for Admin Level restores. You must have to be...