Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section Web Server
  • Search

[HowTo] Secure phpMyAdmin From Brute Force Attack on VestaCP Centos with Google recaptcha

Questions regarding the Web Server
Apache + Nginx, Nginx + PHP5-FPM
Post Reply
  • Print view
Advanced search
1 post • Page 1 of 1
xorro
Posts: 87
Joined: Sun Nov 13, 2016 3:11 pm
Contact:
Contact xorro
Website Skype

Os: CentOS 6x
Web: apache + nginx
[HowTo] Secure phpMyAdmin From Brute Force Attack on VestaCP Centos with Google recaptcha
  • Quote

Post by xorro » Tue Sep 11, 2018 8:15 pm

Go to google recaptcha page GOOGLE RECAPTCHA in order to retrieve site key and secret key:

Add/Register a new site :
Image

Enter the server ip or hostname, domain you want to access the phpmyadmin with, then hit Register button, now you will see site key and secrect key copy this keys we’ll need this in step 2 :

you can go to Advanced Settings >> Domain Name Validation >>> uncheck Verify the origin of reCAPTCHA solutions for wildcard permission i.e. you can access phpmyadmin with any domain and ip which are in the server, this is useful if you’ve many domains and IP hosted on the server and want to access phpmyadmin from all of them.

Image

After that edit the config.inc.php file and add the lines below mentioned :

Code: Select all

nano /usr/share/phpMyAdmin/libraries/config.default.php
now search this line and add site key and secrect key which you’ll be retrieving from step 2 :

Code: Select all

$cfg['CaptchaLoginPublicKey'] = 'Site Key';
$cfg['CaptchaLoginPrivateKey'] = 'Secret Key';
where :

Code: Select all

$cfg[‘CaptchaLoginPublicKey’] = ‘Site key’
$cfg[‘CaptchaLoginPrivateKey’] = ‘Secret key’
eg :

Code: Select all

/**
 * if reCaptcha is enabled it needs public key to connect with the service
 *
 * @global string $cfg['CaptchaLoginPublicKey']
 */
$cfg['CaptchaLoginPublicKey'] = 'Site Key';

/**
 * if reCaptcha is enabled it needs private key to connect with the service
 *
 * @global string $cfg['CaptchaLoginPrivateKey']
 */
$cfg['CaptchaLoginPrivateKey'] = 'Secret Key';
Top


Post Reply
  • Print view
1 post • Page 1 of 1

Return to “Web Server”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password