Block Country in CSF firewall

CSF firewall can block all traffic from a country or list of countries using the GeoIP database.

To block a country, edit the file

Find

Replace with

Here is an example to block all traffic from China

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

Now restart CSF firewall with

See CSF firewall

Leave a Reply

Your email address will not be published. Required fields are marked *