how to block ip ....

hi,

how to block ip 123.123.123.123 from accesing my web site...

straight using apache (access.conf) , or ?

If using access.conf , what should i do?

Thanx
bsh
bsherAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
samriConnect With a Mentor Commented:
bsher,
   You need to restart apache for the configuration to be active.  A simple kill -HUP <pid of apache> or /path/to/apache/bin/aapchectl restart

samri
0
 
samriCommented:
Bsher,
    Edit the file httpd.conf, by default it will be /usr/local/apache/conf and look for the following parts (some comments are removed).

   Right after the line Allow from all, add a line

   Deny from ip.address.  The format can be an ip address (1.2.3.4), or a subnet notation(10.0.0.0/255.0.0.0)



<Directory "/usr/local/apache/htdocs">
    Options Indexes FollowSymLinks
    AllowOverride None          
    Order allow,deny
    Allow from all
    Deny from 123.123.123.123   <------- this is the line to be added
</Directory>          


good luck.

samri
0
 
bsherAuthor Commented:
by the way,

how can we trace the IP which come from a proxy server ?

i found someone try to DoS attack my server,
many of the request come from 123.123.123.123 ,

and i checked the 123.123.123.123 is a proxy server ,

 so i would like to verify the guy behind the proxy which is requesting the most..


Thanx
0
 
tfewsterCommented:
samri, I suggest you lock this question as a) you've answered the original question, b) bsher has asked the DoS question seperately and c) bsher has a poor record of grading questions - you'll get an autograde eventually!
0
 
samriCommented:
tfewster,

thanks for the reminder, and yes a bad grade indeed.. a "C".

Thanks a lot.  I bet I'll be more careful next time.

samri.
0
All Courses

From novice to tech pro — start learning today.