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.

mysql remote access rectriction

Discussion in 'Database Discussions' started by rahulk98, Nov 14, 2006.

  1. rahulk98

    rahulk98 Registered

    Joined:
    Sep 29, 2006
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    I want to restict Mysql remote access to my server. i want to allow only specific IPs which i want to.
    Iam using WHM. how can i do this through WHM (cpanel) and through shell. Please let me know how i can do this.
     
  2. brianoz

    brianoz Well-Known Member

    Joined:
    Mar 13, 2004
    Messages:
    1,146
    Likes Received:
    6
    Trophy Points:
    38
    Location:
    Melbourne, Australia
    cPanel Access Level:
    Root Administrator
    The simplest and easiest way to do this is to run MySQL external access on a separate non-standard port number. That way people can get access from outside easily if they know the port number.

    Another alternative is to use something like csf or apf that allow you to whitelist connections to certain ports from certain IPs.
     
  3. rahulk98

    rahulk98 Registered

    Joined:
    Sep 29, 2006
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Iam using APF. How can i restrict the remote access fro APF and allow only some externa IPs to access mysql database.
     
  4. Fernis

    Fernis Well-Known Member

    Joined:
    Oct 28, 2006
    Messages:
    192
    Likes Received:
    1
    Trophy Points:
    18
    You can perform this level of filtering with the allow_hosts.rules file using the advanced rules format. Try adding the following, with modified IP to the /etc/apf/allow_hosts.rules file then restart apf (/etc/init.d/apf restart or apf -r):

    in:d=3306:s=10.2.3.11
     
Loading...

Share This Page