Block Country in CSF firewall

CSF firewall can block all traffic from a country or list of counrty using GeoIP database. To block a country, edit file

Find

Replace with

Here is an example to block all traffic from China

If you want to block another counrt, you can add it like

Now restart csf […]

Read More…

How to Block a Country in CSF firewall

To block all traffic from a country in CSF Firewall edit file /etc/csf/csf.conf

Find the line

In this line, you can add 2 Letter country code. For example to block China and Russia, add

Now you need to restart firewall with command

[…]

Read More…

Unban an IP from CSF Firewall

To unban an IP from CSF firewall, run

Here i have an IP blocked in firewall.

To see if CSF is blocking the IP, run

Example This command also give reason for why the IP is blocked. Lets unban the IP address with command

Now IP should not be listed in […]

Read More…