Useful CSF Commands
CSF is the most popular software firewall in use on Linux VPS Servers around the world. From monitoring login attempts to locking down unused ports CSF is an essential bit of kit to protect your server. After installing CSF you will need some useful CSF commands to effectively manage CSF. This is especially true if you are using CSF without any sort of GUI like you have inside cPanel.
Basic CSF Commands
CSF Configuration Files
When you add IPs to deny lists you add those IPs to the following files. These files are searched by CSF and the appropiriate action is taken;
/etc/csf/csf.deny
When you add an IP to the allow list that IP is placed in the below file and CSF searchs this file for any IPs
/etc/csf/csf.allow
How to permanently whitelist an IP in CSF
To make an IP permanent first enable the option IGNORE_ALLOW in the /etc/csf/csf.conf file by changing the value from “0” to “1” then restart CSF. Now add the IP to the file /etc/csf/csf.ignore file and CSF will ignore any events from this IP.
How was this article? Useful CSF Firewall Commands
You might also like
More from All About Linux
Install Ioncube Loaders In Ubuntu, Debian, CentOS and AlmaLinux
Ioncube Loaders are a piece of software that is used to protect the underlying code in PHP applications. Its aim …
How to install FTP and configure FTP on an Ubuntu 22 LTS instance
If you need to upload files to your NVMe VPS you have a couple of options. You can use a …
How to install a Cloudflare Origin SSL Certificate – NGINX
An SSL Certificate is vital to encrypt data between you and your clients. SSLs can be complicated things. If they …