Easy way to Enable/Disable CSF installed on the server via command line

It is a simple topic, but these are very frequently using command line options for enabling/disabling CSF. I already created a lot of topics on the firewall management tool, CSF. Here I am writing a quick command-line option to enable/disable CSF from the command-line. You can find out the basics from the previous posts. You can see the installation steps from here..

How to enable CSF from command line?

You can use the switch ‘e‘ along with the command “csf” to enable the firewall from command line.


csf -e

How to disable CSF from command line?

Use the switch ‘x‘ to disable CSF.


csf -x

To restart the CSF, you can use the ‘r’ switch.


csf -r

That’s it.

Yeah, it’s really simple, right? This is very important to know these commands to manage the firewall manager CSF simply via command line interface. Go ahead! and let me know if you need any assistance on it.

Related posts

1, Install and configure csf on CentOS
2, Easy way to uninstall CSF from server
3, CSF commands for Unix/Linux servers
4, How to find whether the IP address is blacklisted or not in CSF
5, How to block countries from server by using csf
6, Process tracking with the help of csf

, ,

Post navigation

Arunlal A

Senior System Developer at Zeta. Linux lover. Traveller. Let's connect! Whether you're a seasoned DevOps pro or just starting your journey, I'm always eager to engage with like-minded individuals. Follow my blog for regular updates, connect on social media, and let's embark on this DevOps adventure together! Happy coding and deploying!

2 thoughts on “Easy way to Enable/Disable CSF installed on the server via command line

  1. Thanks for this post. This saved me a lot of time… I had been trying with “service csf” and it wasn’t working!

Leave a Reply

Your email address will not be published. Required fields are marked *