Knowledgebase

Portal Home > Knowledgebase > Articles Database > how can i let certain ip can connect my mysql under cpanel and csf ?


how can i let certain ip can connect my mysql under cpanel and csf ?




Posted by ttgt, 11-15-2009, 01:41 AM
Hi, my server is installed centos with cpanel and csf, now,i want to let particular user can connect their mysql from particular ip, is any way i can set it ? thanx

Posted by madaboutlinux, 11-15-2009, 02:53 AM
Hi, Yes, you can allow particular IPs to connect to the Mysql port. First of all, remove the mysql port 3306 from the list of TCPIN ports in the CSF configuration file and restart csf. This will ensure, all incoming connections to port 3306 are blocked. Now, edit the file /etc/csf/csf.allow and place the following line: tcp:in:d=3306:s=ClientIP where, ClientIP is the IP you want to allow the connection to. You can allow as many IPs you wish with the similar syntax. Save the file and restart CSF. Lastly, grant access to those IPs from cPanel >> "Access Hosts" list.

Posted by LVPSHosting, 11-15-2009, 07:43 AM
Also, you can do the same with iptables. Allow/deny any IP address you want, to any port you want.

Posted by ttgt, 11-15-2009, 08:20 AM
Hi, i check my csf setting, about the TCP_IN,there is no 3306, do it mean if i add 3306 on it, all people would connect mysql from public directly with their mysql username and pasword? thanx

Posted by ttgt, 11-15-2009, 09:48 AM
Hi, it seems i need check/set two part, the first one is firewall,let the user can access the post 3306 from client's IP. and the 2nd one is i need to add the ip in WMM's "Additional MySQL Access Hosts". correct? thanx



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
Ram Problem (Views: 539)
JSP support (Views: 540)


Language:

Contact us