06Mar

Apache: Deny or Block IP using htaccess directives

Apache

Hide Apache Version info from footer for a more secured webserver

Its very simple to deny certain ip’s or domain names from . For example if from various reasons you dont want some persons accessing your site anymore you just need to add the following to you 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.*”. You can also use domain names instead of ip’s for example if you add deny from *.provider.net no one with that host name will be able to access your website.

Thats it simple short tutorial on how to Deny certain IP using file

Share This:
  • StumbleUpon
  • del.icio.us
  • Technorati
  • Reddit
  • Digg
  • Live
  • Google
Tags: , ,

Related posts

No comments

Thursday, March 6th, 2008 at 4:35 pm and is filed under Apache. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a reply