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.

Open port 3306 on the server

Discussion in 'Database Discussions' 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:
    588
    Likes Received:
    88
    Trophy Points:
    153
    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
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,029
    Likes Received:
    1,277
    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.
     
Loading...

Share This Page