Imunify360's firewall feature allows for the blocking of countries and IPs to prevent them from connecting to your server. Be warned, however, that excessive use of filter rules can cause performance issues.
The Firewall interface can be accessed via the Imunify360 plugin in WHM. Click on the Firewall Tab > Blacklist > Add to block a specific IP or Country.
On the Firewall tab, see the top right corner for the Add button.
You can block an IP address:
Or change the option to country:
Further instructions are provided by Imunify360 in their documentation.