Enable outgoing remote MySQL access 1

Enable outgoing remote MySQL access

[root@server #] nano /etc/csf/csf.allow
---
tcp:out:d=3306:s=127.0.0.0

Here is what the above code is Doing:
1. We’re allowing the port 3306 to be used by the server.
2. We’re allowing the port 3306 to be used by the server only if the source IP is 127.0.0.0.

Now, we need to restart the CSF firewall for the changes to take effect.

[root@server #] csf -r

Now, you can try to connect to the MySQL server from the remote server.

[root@server #] mysql -h 192.168.0.1 -u root -p

If you’re able to connect to the MySQL server, then you’ve successfully configured the CSF firewall to allow remote connections to the MySQL server.

Similar Posts