Here is some .htaccess example, if you want to allow access to the site only from certain IPs range and block all others:
Order Deny,Allow Deny from all Allow from 123. Allow from 234.123. Allow from 127.0.0.1
this .htaccess example will allow acces from IP-range:
- and 127.0.0.1.
and it blocks everything else!