you could do that through a htaccess file.
Allow and enable access from certain IP (your server IP)
Say you have a permanent IP and you want to administer the site via /admin and protect the directory from the rest of the world once ‘n’ for all, then you will want the following .htaccess directives:
order deny, allow
deny from all
allow from 12.34.56.78
I think this is what you need
(
http://www.kavoir.com/2009/01/htacce...ry-access.html)