CSF SSH Command [CSF Cheat sheet]

This article covers some useful CSF SSH Command Line Commands in a “cheat sheet” format.

csf -s Start the firewall rules [email protected][~]#csf -s
csf -f Flush/Stop firewall rules (note: lfd may restart csf)
[email protected][~]#csf -f
csf -r Restart the firewall rules [email protected][~]#csf -r
csf -a [IP.add.re.ss] [comment] Allow an IP and add to /etc/csf/csf.allow
[email protected][~]#csf -a Home IP Address
csf -tr [IP.add.re.ss] Remove an IP from the temporary IP ban or allow list.
[email protected][~]#csf -tr
csf -tf Flush all IPs from the temporary IP entries
[email protected][~]#csf -tf
csf -d [IP.add.re.ss] [comment] Deny an IP and add to /etc/csf/csf.deny [email protected][~]#csf -d Blocked This Guy
csf -dr [IP.add.re.ss] Unblock an IP and remove from /etc/csf/csf.deny [email protected][~]#csf -dr
csf -df Remove and unblock all entries in /etc/csf/csf.deny [email protected][~]#csf -df
csf -g [IP.add.re.ss] Search the iptables and ip6tables rules for a match (e.g. IP, CIDR, Port Number) [email protected][~]#csf -g
csf -t  Displays the current list of temporary allow and deny IP entries with their TTL and comment  [email protected][~]#csf -t

Source from: https://www.hostdime.com/resources/csf-ssh-command-line-commands/
  • CSF SSH Command, CSF Command, CSF
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Clamscan Various SSH Commands

To Scan your hosting account with following common SSH Commands,...

Maldet SSH Commands

A lot of switches and options are available with Maldet. let us check all the switches/options of...

Find files and folders using SSH Command and even delete them.

Lets Say, You want to find the file name "testfile.php" then use command line below mentione and...

Backup & Restore with SSH Command

Here is how you take individual and All Backup with SSH Command, To take the individual cPanel...