Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Open port 3306 on the server

Discussion in 'Database Discussion' started by mr.seooom, Feb 19, 2017.

Tags:
  1. mr.seooom

    mr.seooom Registered

    Joined:
    Feb 19, 2017
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    iran
    cPanel Access Level:
    Root Administrator
    I'm going to open port 3306 if you would instruct the server Hetzner
    I Plums in port csf but signals an error

    Signals an error
    please guide me
     
    #1 mr.seooom, Feb 19, 2017
    Last edited by a moderator: Feb 19, 2017
  2. Jcats

    Jcats Well-Known Member

    Joined:
    May 25, 2011
    Messages:
    682
    Likes Received:
    110
    Trophy Points:
    168
    Location:
    New Jersey
    cPanel Access Level:
    DataCenter Provider
    I'd recommend not opening up 3306, and just whitelisting the IP's you want to connect from in CSF this way the port stays closed, but your remote whitelisted IP's can access it.

    If you are using CSF its very easy, you can do:

    Code:
    # csf -a 111.222.333.444
    This will allow the IP the ability to access any port regardless if its closed, you can also open only 3306 for a specific IP if you prefer not to allow the IP access to ALL closed ports:

    You would have to modify the file: /etc/csf/csf.allow

    and add:

    Code:
    tcp|in|d=3306|s=111.222.333.444
    make sure to restart CSF:

    Code:
    # csf -ra
    otherwise, if you are sure you want to open the port up for ALL, you would modify the file: /etc/csf/csf.conf

    and add the port 3306 to the line: TCP_IN

    example:

    Code:
    TCP_IN = "20,21,22,25,26,53,80,110,143,443,465,587,993,995,111,2049,2077,2078,2082,2083,2086,2087,2095,2096,3306"
    then restart CSF:

    Code:
    # csf -ra
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,617
    Likes Received:
    1,787
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Let us know if you encounter any trouble using the steps in the previous post.

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice