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. From there, you can add either an IP or a Country to your blacklist.
Further instructions are provided by Imunify360 in their documentation.