Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 06 Mar 2006 04:52:21 -0800
From:      Glenn Dawson <glenn@antimatter.net>
To:        Scott Sipe <cscotts@mindspring.com>, questions@freebsd.org
Subject:   Re: Apache auth question
Message-ID:  <7.0.1.0.2.20060306044151.08607410@antimatter.net>
In-Reply-To: <013B73DF-99AA-4B20-BFB7-0A1130EBE780@mindspring.com>
References:  <013B73DF-99AA-4B20-BFB7-0A1130EBE780@mindspring.com>

next in thread | previous in thread | raw e-mail | index | archive | help
At 03:56 AM 3/6/2006, Scott Sipe wrote:

>I am dealing with a company LAN that lives behind an OpenBSD based
>firewall+NAT machine. All internal machines have 10.x.x.x addresses.
>
>One of the internal machines acts as an intranet webserver. Everyone
>in the building should be able to access it.
>
>I would ALSO like to expose it to the outside, and have outside
>requests authenticate. So everyone with a 10.x.x.x still has no
>limits, and external addresses after authenticating with a username/ 
>password have full access. Is this possible to do with apache2 config
>files?

Something like this should do what you want:

<Directory /docroot>
     AuthType basic
     AuthName "foo"
     AuthUserFile /path/to/htpasswds
     Order Deny,Allow
     Deny from all
     Require valid-user
     Allow from 10.0.0.0/16
     Satisfy any
</Directory>



>Scott
>_______________________________________________
>freebsd-questions@freebsd.org mailing 
>listhttp://lists.freebsd.org/mailman/listinfo/freebsd-questions
>To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7.0.1.0.2.20060306044151.08607410>