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?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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
samriCommented:
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Unix OS

From novice to tech pro — start learning today.