Blocking a country or a set of countries from accessing your websites and server using cPGuard is the quickest and easiest method on your cPanel/Plesk/DirectAdmin or any supported servers. You can do it quickly from the App Portal or using the CLI
1. Block a country from App Portal
To block a country from the app portal, go to Settings > Security Tools > IPDB Country Blacklist, and select the country that you wish to block. The setting will reflect within the next 1-2 minutes on the server

To remove the block, you can go to the same settings and simply remove the country name from the list.
2. Block a country using CLI
You can use the following command to block a country using CLI. Please note that you need to know the two-letter country code to do it in CLI. You can find the 2 letter country code here.
cpgcli ipdb --blacklist --add country-code
To remove the block, you can use the following command
cpgcli ipdb --blacklist --remove country-code