|
How can I block IPs and IP areas from accessing my site?
1.) Blocking a single IP:
a. Create a new file with the name .htaccess (using Text Editor for example)
b. Write the following commands:
order allow,deny
deny from <ENTER IP HERE>
allow from all
c. Load the file onto your disc space in the directory you would like to protect from the IP you have listed. Remember that all following sub directories will also follow this command, so you do not have to create a .htaccess file for each one.
2.) Blocking IP areas:
a. Create a .htaccess file (using the text editor for example)
b. Write the following commands into the file:
RewriteEngine on
RewriteCond %{REMOTE_ADDR} ^123.45.(67[0-9]). [OR]
# Blocks the IP range 123.45.670.* bis 123.45.679.*
RewriteRule ^.* - [F]
# Forbidden (403 Fehler) will be generated
(Notice: The IP´s used above are examples. the numbers were chosen randomly.)
c. Load the file onto your disc space in the directory you would like to protect. 
|