Celebrate Our 22nd Anniversary with Huge Savings! Up to 70% Off

How to whitelist/blacklist IP addresses using command line and GUI in CSF firewall?

CSF or ConfigServer security and firewall inside WHM allows you to whitelist or blacklist IP addresses and ports to your Linux servers. Here, we have mentioned how you can perform an IP address whitelist and blacklist using CSF CLI and GUI.

How to blacklist IP address using GUI in CSF?

1.Log in to your WHM panel using the root user.

2. Inside the plugin, click on the configserver security and firewall.

CSF Firewall

3. Click on the Firewall Deny IPs button and enter the IP address that you want to blacklist.

firewall-deny-ip

4. After adding the IP address, click on the change button.

5. Finally, restart the firewall using the Restart csf+lfd button.

Restart csf+lfd


How to whitelist IP address using GUI in CSF?

1. Log in to your WHM panel using the root user.

2. Inside the plugin, click on the configserver security and firewall.

csf-firewall

3. Click the Firewall Allow IPs button and enter the IP address you want to blacklist.

firewall-allow-ip

4. After adding the IP address, click on the change button.

5. Finally, restart the firewall using the Restart csf+lfd button.

restart-csf-lfd

How to blacklist IP address using CLI in CSF?

1. Log in to your Linux server using root or sudo user.

2. Go to the path /etc/csf/.

3. Inside the CSF directory, edit the file called csf.deny. You can use your favorite editor to edit the file.

4. Add the IP address to the list you want to blacklist. Save the file.

5. Restart the firewall after adding the IP address. Run the below command to restart the firewall.

csf-r

How to whitelist IP address using CLI in CSF?

1. Log in to your Linux server using root or sudo user.

2. Go to the path /etc/csf/.

3. Inside the CSF directory, edit the file called csf.allow.

4. Add the IP address which you want to whitelist. Save the file.

5. Restart the firewall after adding the IP address. Run the below command to restart the firewall.

csf-r



Was this answer helpful?

« Back