You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Nick Torenvliet <ni...@fieldstonesolutions.com> on 2003/01/07 04:25:12 UTC

Re: limiting access by IP address

I don't know of any documentation on the subject, but one way I've seen
it done was to search though the http header for the sender of the
request.  This will (if I remember right) always be an ip address.
You can then do a regex check on the ip and if it checks out let it
through your gateway action or not.  

I believe the java.net packages have what you need.  If you down load
the project at http://sourceforge.net/projects/oscarmcmaster or at   
http://www.oscarhome.org/  .The login java files there have a working
open source example.  The oscar web app allows intranet and internet
users to login, but it requires a pin number(second password) from
someone who is making a request from a non-intranet ip.

Just ask questions on the sourceforge forum or at the forum on
www.oscarhome.org if you would like some help wading through the files. 

~/nick

On Mon, 2003-01-06 at 22:45, icewind wrote:
> Could anyone tell me how to limit access to a
> particular servlet by IP address or hostname?
> 
> Any pointer to documentation that cover this topic
> would be appreciated.
> 
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
> http://mailplus.yahoo.com
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>