No Clean Feed - Stop Internet Censorship in Australia

Blocking IP Addresses in Apache

A common question I see being asked on various lists is “How do I block an IP address from accessing my site?”

This should *not* be treated as a robust security measure, there are many ways this could be bypassed. Use at your own risk.

Copy and paste the text below into a file and name it .htaccess. Then upload it to your web server.

order deny,allow
deny from nnn.nnn.nnn.nnn

(replace nnn’s with the IP address you wish to deny)

These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • Technorati
This entry was posted in Articles. Bookmark the permalink. Comments are closed, but you can leave a trackback: Trackback URL.