CSF SSH Command [CSF Cheat sheet]

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

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