0

We have a page, gateway.school.edu, where users have to fill out a recaptcha before being directed forward to our password reset. I would like any internal traffic, any user agent on our network with a 10., 172. or 192.* IP, to get passed through without having to fill out the recaptcha. So an internal user would navigate to gateway.school.edu, where apache would check for an internal IP, then send them on to reset.school.edu. External users would have to fill out the captcha before being sent to reset.school.edu

Is this possible using {REMOTE_ADDR} in apache? Something like:

#gateway.school.edu virtual host
RewriteCond %{REMOTE_ADDR} ^192.*
RewriteRule .* reset.school.edu

Is there another approach I could take to accomplish this, or would a rewrite be the best way? Syntactically, how do I define the IP ranges?

2
  • Can user go to reset.school.edu directly and bypass the recaptcha by themselves?
    – gtirloni
    Oct 1, 2014 at 17:29
  • No, reset.school.edu handles that through IIS. Different team though, so I'm not sure how they're handling that. Oct 1, 2014 at 19:17

1 Answer 1

0

The answer for this specific question:

#gateway.school.edu virtual host
RewriteCond %{REMOTE_ADDR} ^10\.(.*)$ [OR]
RewriteCond %{REMOTE_ADDR} ^172\.(.*)$ [OR]
RewriteCond %{REMOTE_ADDR} ^192\.(.*)$
RewriteRule .* reset.school.edu [R=301,L]

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .