It is very easy to block countries on your server by using an csf (Config server firewall). There is an option on your csf to block IP range from different countries.
How to block countries in csf?
In your csf configuration file ‘/etc/csf/csf.conf‘ there is an option to block/allow access from an IP range by using country code.
For allowing a country to your server you can use the directive ‘CC_ALLOW‘ from the csf configuration file.
In your csf configuration file ‘/etc/csf/csf.conf‘ there is an option to block/allow access from an IP range by using country code.
For allowing a country to your server you can use the directive ‘CC_ALLOW‘ from the csf configuration file.
Similerly you can deny by using the directive ‘CC_DENY‘
Each option is a comma separated list of CC’s, e.g. “US,GB,DE”
You need to restart the csf service to get the changes to be worked. Run the following command for restarting the csf service.
Country codes:
0 comments:
Post a Comment