Learn the CSF command line options

July 23, 2013 — 3 Comments

You have CSF installed and use the GUI to do most things.  (If you don’t have it installed yet, you can read our article on how to install csf).  BUT – knowing the csf (ConfigServer Firewall) flags will help you to quickly get things done via command line – instead of loading up the GUI every single time.

Here are some of the ones I use all the time.

csf -r (Restart CSF)
csf -d (quick deny an ip: csf -d xxx.xxx.xxx.xxx)
csf -a (quick allow / whitelist an ip: csf -a xxx.xxx.xxx.xxx)
csf -dr (unblock an ip and remove from the deny list: csf -dr xxx.xxx.xxx.xxx)

Here are all of them:

Related posts from Linux Brigade!

  • Import MySQL database from command lineImport MySQL database from command line You’ll need to import a database via command line from time to time – I’ll normally opt for this anyway. After seeing how easy it is, you’ll probably end up using the command line instead […]
  • Enable statistics in Configserver Firewall (CSF)Enable statistics in Configserver Firewall (CSF) I’ve noticed recently that a new install of CSF won’t have statistics enabled by default.  Here’s how to enable them…

    Edit your /etc/csf/csf.conf file and change:

    ST_ENABLE = […]

  • Install CSF/LFD Firewall on your Linux ServerInstall CSF/LFD Firewall on your Linux Server The first thing on your mind when setting up a new Linux server (dedicated or VPS) is how you can increase security.  One of the best tools in your bag of tricks should be the CSF […]
  • cPanel / CSF: Fix 500 internal server error or 404 for the CSF GUIcPanel / CSF: Fix 500 internal server error or 404 for the CSF GUI I’ve run into this a couple times – where I’ll spin up a CentOS/cPanel machine, then run a cpupdate (/scripts/upcp) to get cpanel up to date.  I’ll then go into the configserver firewall […]
  • Migrating from Plesk to cPanel via commandlineMigrating from Plesk to cPanel via commandline If you’re anything like me, you prefer to do things via command line (CLI) rather than relying on a GUI to do most things in Linux. You also realize that while some of us don’t like to use […]

3 responses to Learn the CSF command line options

  1. Thank you for the very informative article. I’m a bit of a newbie with Linux and your articles provide valuable help and information. Just like mentioned in the article I used to load up the GUI every time but now I can do things much simpler and faster. Keep the good articles coming.

  2. Phew, this has saved me a lot of time waiting for my GUI to load during syn_ack attack

Trackbacks and Pingbacks:

  1. Learn the CSF command line options | Webmaster Brigade - July 23, 2013

    [...] Knowing the csf (ConfigServer Firewall) flags will help you to quickly get things done via command line – instead of loading up the GUI every single time. You can read the full article on our Linux blog: CSF Command Line [...]

Leave a Reply