I am using cPanel and the Config Server Firewall (CSF), and I need to provide remote access to an MySQL database on the server. I have properly configured a user to connect from a remote location, but I can not get access to MySQL. When reviewing, it appears that the firewall is blocking access. When I run:
netstat -tulp | grep 3306
I do not get any results, which lead me to think that port 3306 is not open. However, in CSF I have set the port to be open in
UDP_OUT. (I believe I only need
TCP_IN, but activated all to be sure. After restarting CSF I effectively see these lines:
ACCEPT tcp opt -- in * out !lo 0.0.0.0/0 -> 0.0.0.0/0 state NEW tcp dpt:3306 ACCEPT tcp opt -- in !lo out * 0.0.0.0/0 -> 0.0.0.0/0 state NEW tcp dpt:3306 ACCEPT udp opt -- in !lo out * 0.0.0.0/0 -> 0.0.0.0/0 state NEW udp dpt:3306 ACCEPT udp opt -- in * out !lo 0.0.0.0/0 -> 0.0.0.0/0 state NEW udp dpt:3306
What am I missing? Is there some other configuration required to allow remote MySQL access?