Create single-port CSF rule via SSH Login to SSH. Open /etc/csf/csf.allow in your preferred text editor. For the sake of this tutorial I'll be using VIM. Add your rules to this file, one per line. We'll be adding lines in the same format as tcp/udp|in/out|s/d=port|s/d=ip . Example: 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 For example if we want to create a rule to allow inbound MySQL connections from IP 67.222.0.1 it would look like this: tcp|in|d=3306|s=67.222.0.1 Save the file. If you're in nano, use ^X (Ctrl+X) and tell it "Y" to overwrite the file. Restart CSF using csf -r . Open Port in CSF Firewall through SSH Login to your Linux machine through SSH. Open csf.conf file using any text editor. /etc/csf/csf.conf Add the port you wish to open and restart CSF firewall for the changes to take into effect. # Allow incoming ...