If you are using a Linux server for your website and if you are looking for information on how to whitelist the IP address in CSF, here is the solution.

CSF stands for Config server Security And Firewall which is most commonly used in advanced firewall in Linux based servers. CSF is basically used as it simplifies managing your server’s base firewall settings. This CSF is used to detect intrusion or login, for suspicious file reporting, to block excessive connections, for SSH login notifications, for Stateful Packet Inspection (SPI), blocking and permitting IP addresses, and restricting access by port number.

CSF Configuration Options and Usage:

All the configuration files of csf are located under /etc/csf directory. If you modify any of the following files you will need to restart the csf service to apply changes.

  • csf.conf : The main configuration file for controlling CSF.
  • csf.allow : The list of allowed IP addresses and CIDR addresses on the firewall.
  • csf.deny : The list of denied IP addresses and CIDR addresses on the firewall.
  • csf.ignore : The list of ignored IP addresses and CIDR addresses on the firewall.
  • csf.*ignore : The list of various ignore files of users, IP addresses.

Follow the below steps to enable the IP in CSF:

Step 1: Log in to your SSH

Step 2: Insert the command “ csf -a < IP address >” in place of <IP address> insert your public IP address. Example csf -a 10.10.10.10  >> Click on enter to execute the command

Step 3: After you have executed the above command you need to restart the firewall. You can restart the firewall using csf -r

The other  csf command options:

>>csf -d < IP address > —>Block an IP address with CSF (replace the IP address with your public IP address)

>>csf -s – Start firewall rule

>>csf -f – Flush/stop firewall rules

>>csf -r – Restart firewall rules

>>csf -x – Disable CSF

>>csf -e – Enable CSF

Get Free cPanel Knowledge Base

Thank you for subscribing.

Something went wrong.

0.00 avg. rating (0% score) - 0 votes