logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: configuring IP blocking?
Author
limeyogurt



Joined: 06 Apr 2014
Posts: 3
Location: USA

PostPosted: Mon 07 Apr '14 2:12    Post subject: configuring IP blocking? Reply with quote

I've been trying to figure out some IP blocking with no success. The environment is UNIX and Apache version is 2.2.22-14.

The site is on a hosted solution and doesn't have a firewall due to the virtualization software limitations. I've tried setting something similar to the following:

Code:

<Directory /home/username/mysite.com>
#IP Blocks
Deny from 1.2.3.1/24
Deny from 1.2.4.5
etc..


but with no success. I've also tried it in the <Location> tag with no success.

The way I'm testing this is editing the conf and then bouncing the apache server.

Any thoughts on whether it's a syntax error or whether I'm just doing this completely wrong?
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Tue 08 Apr '14 12:01    Post subject: Reply with quote

You forgot the

Order Allow,Deny
Back to top
limeyogurt



Joined: 06 Apr 2014
Posts: 3
Location: USA

PostPosted: Wed 09 Apr '14 6:31    Post subject: Reply with quote

is it required for the Deny from to function properly?
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Wed 09 Apr '14 16:18    Post subject: Reply with quote

Whoops. I read the docs and not it isn't. However which auth* modules do you load?

you may also test with httpd -S to verify the syntax.
Back to top
limeyogurt



Joined: 06 Apr 2014
Posts: 3
Location: USA

PostPosted: Sat 12 Apr '14 1:20    Post subject: Reply with quote

I'm using authz_host_module. I haven't had a chance to test this the past few days so I'll report back after I have a chance.
Back to top


Reply to topic   Topic: configuring IP blocking? View previous topic :: View next topic
Post new topic   Forum Index -> Apache