You can use the IP Blocker tool in cPanel to stop malicious IP addresses from accessing your website.
Before using this tool you may want to check these guides:
Step 1 - Log in to cPanel (click here for a guide) and click on the IP Blocker tool
Step 2 - Type in the IP address and click Add
That's it! The changes should take effect instantly.
You can view the list of blocked IP's on the bottom of the page. To remove an IP block simply click on Delete