There is alot that can be done with an .htaccess file on an Apache HTTP Server server. Below are just some quick examples without much explanation outside of the comments I've left.
Side note: you can block out complete IP address blocks by leaving off the last digit of the IP address sequence. so if you wanted 12.34.56.1 all the way to 12.34.56.254 then you'd put 12.34.56
Order deny,allow
Deny from all
Allow from 12.34.56.78 # nobody but this ip is allowed.
Order allow,deny
Allow from all
Deny from 12.34.56.78 # everyone but this ip is blocked.
RewriteEngine On
RewriteBase / # Where does the installation reside? domain.com/ is different from domain.com/folder/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
Redirect 301 /blog/ http://domain.com/Blog/
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.example.org$ [NC]
RewriteRule ^(.*)$ http://example.org/$1 [L,R=301]