Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; SPOSTARBUST_Widget_Class has a deprecated constructor in /home2/cptech/public_html/wp-content/plugins/spostarbust/index.php on line 386

Deprecated: Function create_function() is deprecated in /home2/cptech/public_html/wp-content/plugins/spostarbust/index.php on line 611

Notice: The called constructor method for WP_Widget in SPOSTARBUST_Widget_Class is deprecated since version 4.3.0! Use
__construct()
instead. in /home2/cptech/public_html/wp-includes/functions.php on line 4514
How to Open specific port to specific IP in CSF

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 aa.bb.cc.dd , Add the following lines to  /etc/csf/csf.allow

tcp:in:d=XXXX:d=aa.bb.cc.dd
tcp:out:d=XXXX:d=aa.bb.cc.dd

and restart csf

csf -r

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

tcp:in:d=3306:d=11.22.33.44
tcp:out:d:3306:d=11.22.33.44


 

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