How to allow remote MySql connection to only one IP?

There may be a case in which one of the cPanel user request you to provide access to Mysql remotely. You probably can't open MySql port 3306 on the server because that would lead to security risks. So in such case follow below steps -
Step 1:
Login to cPanel >> Remote Mysql >> Add remote server's IP address under Add access host >> Click Add host.

Step 2 :
Open mysql port for the remote IP address. To do this update below csf file (firewall) -

nano /etc/csf/csf.allow
tcp|in|d=3306|s=x.x.x.x (Replace x.x.x.x with remote server IP)

Now, remote IP x.x.x.x will be able to access Mysql on your server.
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How to reset SSH port back to default port 22?

In some situations most of us may come across a problem that we are able to log into the WHM but...

How to setup the root login alert notification email?

Its very important to keep a check on your servers and who logs into the server, From security...

How to enable Open SSL on WHM?

Before enabling open SSL, you can check whether it is already enabled on your server. Please fire...

How to install mod_pagespeed on WHM?

'mod_pagespeed' is module of Apache which is nothing but plugin which is used for compressing the...

How to enable Hot Link Protection in cPanel?

To avoid other sites to use your website's bandwidth, you can enable the hot link protection....

Powered by WHMCompleteSolution