Apache config file issue with IP restriction

Alles, was den Apache betrifft, kann hier besprochen werden.

Apache config file issue with IP restriction

Postby skitzoboy » 04. December 2013 01:13

Hi Guys,

I am trying to restrict access to part of my site which serves up the admin interface.

mysite.com/administration

I have added the following information to the .conf file for the apache virtual, and am having issues with getting access from the IP addresses we are 'allowing' access from.

<LocationMatch /administration>
Order Allow,Deny
Allow from 10.0.0.0/8
</LocationMatch>

The IP addresses we are hitting the site from are in the 10.0.0.0/8 range, and we have confirmed in the log files that the IP recorded is in that range (10.10.1.28 and 10.20.15.6 are some examples)

We have also tried
Allow from 10
Allow from 10.10.1.28
Allow from 10.10.0.0/16
Allow from 10.10.1.0/24

Each time the URL gets blocked successfully for external users, but also gets blocked for all internal machines in the 10.x.x.x range.

ANy help would be greatly appreciated.

Cheers,

SB
skitzoboy
 
Posts: 1
Joined: 04. December 2013 00:55
Operating System: Debian

Re: Apache config file issue with IP restriction

Postby Nobbie » 04. December 2013 12:25

Your Order Clause is wrong (simply read the documentation!), it must be vice verse. A complete working example looks this way:

Order Deny,Allow
Deny from all
Allow from 10.0.0.0/8
Nobbie
 
Posts: 8775
Joined: 09. March 2008 13:04


Return to Apache

Who is online

Users browsing this forum: No registered users and 3 guests