Table of Contents
In this Dedicated Hosting tutorial, we will cover basic CSF commands. The basic commands include Restarting Services, Allowing IPs, Blocking IPs, and Unblocking IPs, among others. After explaining what the command does, we will show you an example of the CSF Command.
Service Control Commands
Service CSF commands:
Here is a breakdown of the csf service commands:
Below is an example of the command you can run, highlighted in red:
IPtables Commands:
The iptables may also need to be restarted for ‘hung’ rules. If you ever need to restart iptables, make sure you restart CSF afterward to apply the firewall rules. Below is a breakdown of iptables commands:
Below is an example of a command you can run, highlighted in red:
CSF Commands
Block an IP address (permanently):
Below is an example of the command you can run, highlighted in red:
Block an IP address (temporarily):
Below is an example of the command you can run, highlighted in red:
Allow an IP Address:
Below is an example of the command you can run, highlighted in red:
Temporarily Allow an IP Address:
Below is an example of the command you can run, highlighted in red:
Unblock an IP (permanent block):
Below is an example of the command you can run, highlighted in red:
Unblock an IP (temporary block):
Below is an example of the command you can run, highlighted in red:
List temporary blocked IPs and block durations:
Below is an example of the command you can run, highlighted in red:
Remove all temporary IP blocks:
Below is an example of the command you can run, highlighted in red:
Log all SYN packets from an IP:
Below is an example of the command you can run, highlighted in red:
Congratulations, now you are familiar with the basic CSF commands for Restarting Services, Allowing IP’s, Blocking IP’s, and Unblocking IP’s, among others!