06Mar

Apache: Deny or Block IP using htaccess directives

Apache

Its very simple to deny certain ip’s or domain names from htaccess. For example if from various reasons you dont want some persons accessing your site anymore you just need to add the following to you htaccess file:
order allow,deny
deny from 1.1.1.3
deny from 2.2.2.
allow from all
This will allow access from anyone except “1.1.1.3″ and “2.2.2.*”. [...]

No comments | read more »
27Feb

Apache - Restrict access to certain directory by IP

Apache, Debian, Hacks

You can use this method to allow certain ip’s to access certain directories or to deny certain ip’s to access certain directories, its up to you how you want to protect that directory. In this example im gonna show you how to restrict access to a directory named “restricted” to a single ip, so when [...]

No comments | read more »