How to Open specific port to specific IP in CSF

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 ?
[the_ad id=”11935″]

Or another port to communicate between your payment gateway ?  Here is the tip.

If you need to open the port XXXX to the ip , Add the following lines to  /etc/csf/csf.allow

and restart csf

csf -r

So to open the mysql port to IP , add the following lines. 



This Post Has One Comment

  1. Is it possible to allow a specific port with an IPv6 in this way? I’ve tried replacing ipv4 address with ipv6, it’s not working. I need that. Please help me.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Close Menu