Hello,
Thank you for your question regarding only allowing access to whitelisted IP addresses. You can accomplish this using .htaccess rules, they discuss possible solutions in a forum post I found via online search here:
Deny all, allow only one IP through htaccess
Alternately, you can password protect the website from cPanel.
Thank you,
John-Paul