KNOWNHOST WIKI

User Tools

Site Tools


control-panels:directadmin:prevent-phpmyadmin-bruteforcing

Prevent PHPMyAdmin Bruteforcing in DirectAdmin By Restricting Its Access to the Panel Only


It is quite common to see automated attempts to locate PHPMyAdmin URLs for the purpose of bruteforcing 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 login:

Access to phpMyAdmin is only allowed from control panel.

Threat averted! :)

control-panels/directadmin/prevent-phpmyadmin-bruteforcing.txt · Last modified: 2020/06/01 10:57 by Karson N.