How Can We Help?
< All Topics
Print

Block countries from accessing your websites and server

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
Was this article helpful?
5 out of 5 stars

1 rating

5 Stars 100%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
5
How can we improve this article?
Please submit the reason for your vote so that we can improve the article.
Table of Contents