Learn the CSF command line options

Rob —  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 = […]

  • LFD: Excessive resource usageLFD: Excessive resource usage If you run the CSF/LFD firewall on your server then you’ve no doubt seen the emails complaining about high resource usage for various accounts. This small tutorial will show you how to […]
  • Search previous commands typedSearch previous commands typed If you want to see a collection of your previous commands used in Linux, you can always type ‘history’ for a listing of them. You can even search through history by grepping for the […]
  • 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 […]

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