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

1/etc/csf/csf.conf

Find

1CC_DENY=””

Replace with

1CC_DENY=”2_LETTER_COUNTRY_CODE”

Here is an example to block all traffic from China

1CC_DENY=”CN”

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

1CC_DENY=”CN,RU”

Now restart csf firewall with

1csf -r

Leave a Comment

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

Hire a server Expert to resolve the issue Now.

Hire a server Expert to resolve the issue Now.

Resolve this issue in just 5$ from https://serverexpert.io

 

You have Successfully Subscribed!

Open chat