Gentoo Archives: gentoo-user

From: Grant <emailgrant@×××××.com>
To: Gentoo mailing list <gentoo-user@l.g.o>
Subject: Re: [gentoo-user] Restrict certain web users by IP
Date: Thu, 29 Nov 2012 04:12:08
Message-Id: CAN0CFw0WcXX4U+VavobdgCYZ-gzL+WBqeu78hUn5qG=+7zqW1w@mail.gmail.com
In Reply to: Re: [gentoo-user] Restrict certain web users by IP by Joseph
1 >> I use apache2 authentication for web users and I would like to require
2 >> logins from certain users to be from a certain IP address. I
3 >> experimented with Allow and Require but couldn't find a way to restrict
4 >> only certain users. Can this be done via apache2 authentication or
5 >> should I use another method?
6 >>
7 >> - Grant
8 >
9 >
10 > very simple via .htaccess
11 >
12 > <Limit GET POST>
13 > order deny,allow
14 > deny from all
15 > allow from IP_address
16 > </Limit>
17 >
18 > AuthName "restricted stuff"
19 > AuthType Basic
20 > AuthUserFile /etc/apache2/users
21 > require user webmaster
22
23 I think that will require any usernames specified to come from IP_address.
24 I'm trying to allow certain usernames to come from any IP, and restrict
25 other usernames to a certain IP. Can that be done via .htaccess?
26
27 - Grant

Replies

Subject Author
Re: [gentoo-user] Restrict certain web users by IP Joseph <syscon780@×××××.com>