Opening ports and closing ports in CSF is easy. But it can be a bit tricky to open a port to a specific IP in CSF.
What if we need to open the MySQL port only to your home IP ?
Or another port to communicate between your payment gateway ? Here is the tip.
If you need to open the port XXXX to the ip aa.bb.cc.dd , Add the following lines to /etc/csf/csf.allow
and restart csf
csf -r So to open the mysql port to IP 220.127.116.11 , add the following lines. tcp:in:d=3306:d=18.104.22.168 tcp:out:d:3306:d=22.214.171.124