If you want to block an IP Address, you can add the below lines to your htaccess file.
order allow, deny
deny from IP-ADDRESS
allow from all
Replace IP-ADDRESS with the IP you want to block.
You can lock a directory with a password using the cPanel's Directory...
For security purposes, you should disable directory browsing on your website...
You can prevent unauthorized access to your htaccess file by adding this rule...
Security is important for our data safety. We recommend you to enable the...
Follow this instruction to remove two-factor authentication from your cPanel...