CSF to lock the entire server specific country
Today I will explain how we can block access to our server from a particular country using the CSF. The whole should not take more than a minute, let's get started!
List of country codes is the most current blocking To use the option in the CSF must edit the file from the SSH:
1 | /etc/csf/csf.conf |
find the line:
1 | CC_DENY = "" |
codes and make it a country that we want to block:
1 | CC_DENY = "US,GB,DE" |
Then save and restart CSF:
1 | csf -r |