The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Allow only remote mysql ip address

Discussion in 'Security' started by KV Karia, Feb 24, 2017.

Tags:
  1. KV Karia

    KV Karia Registered

    Joined:
    Jul 3, 2015
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Rajkot
    cPanel Access Level:
    Root Administrator
    I want to setup whm to allow only those remote ip addresses other than localhost to connect mysql who added in cpanel by user in Remote Mysql

    TCP-IN Port 3306 allowed in Firewall but TCP-OUT is blocked.

    But currently, all IPs can able to connect mysql database even not added in Remote MySQL in cpanel.

    If I add bind-address=127.0.0.1 in my.cnf than connection not allowed by any ip even added in cPanel Remote MySQL
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,064
    Likes Received:
    1,287
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Could you verify the steps you are taking to reproduce this?

    Thank you.
     
  3. iserversupport

    iserversupport Well-Known Member

    Joined:
    Nov 4, 2013
    Messages:
    92
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    India
    cPanel Access Level:
    Root Administrator
    You can achieve this by closing mysql port in csf conf and allow only necessary IP's using the command

    csf -a "tcp|in|d=3306|s=IP.IP.IP.IP"
     
Loading...

Share This Page