Open port 3306 on the server

mr.seooom

Registered
Feb 19, 2017
1
0
1
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
 
Last edited by a moderator:

Jcats

Well-Known Member
PartnerNOC
May 25, 2011
807
160
168
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
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,884
2,245
463
Hello,

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

Thank you.