How to Block a Country in CSF firewall
To block all traffic from a country in CSF Firewall edit file /etc/csf/csf.conf
1 |
vi /etc/csf/csf.conf |
Find the line
1 |
CC_DENY = "" |
In this line, you can add 2 Letter country code. For example to block China and Russia, add
1 |
CC_DENY = "CN,RU" |
Now you need to restart firewall with command
1 2 |
systemctl restart lfd csf -r |