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 firewall with

See CSF firewall

Leave a Reply

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