How to enable Mysql 3306 port for a particular IP and deny for all?
If you want to disable the Mysql Access for all IPs except your ip then follow the below steps :
root@server[#] vi /etc/csf/csf.conf
Then search for the line :
# Allow incoming TCP ports
and the remove the port : 3306
and also search for the line :
# Allow outgoing TCP ports
and remove the port : 3306
Save and Quit.
then open the csf.allow file
root@server[#] vi /etc/csf/csf.allow
and add the entry as :
tcp:in:d=3306:s=10.10.10.10
And then restart the CSF service
root@server[#] csf -r
Note : Replace 10.10.10.10 with the IP for which you want to Allow access.
That’s all you are done.
0 Comment:
Post a Comment