Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

an J2EE container agnostic way to restrict ips?  RSS feed

 
Joe Sal
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So I'm moving my application to another j2ee container, and I hit on an issue with how I'm currently restricting IP's. I currently use a resin specific way in my web.xml, and am wondering if there's a standard J2EE way to restricting IP's. A hour googling around didn't actually come up with anything (other than creating a simple ip restricting filter...which would be fine), but I'm somewhat surprised that there's no J2EE standard way to restrict ips. Anyone else have any experience with this?

Thanks.
 
Travis Hein
Ranch Hand
Posts: 161
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Other than the few other independently derived filters, like http://www.java2s.com/Code/Java/Servlets/IPFilter.htm i think there is no standard j2ee way to restrict IPs becase typically this is done with the core network or routing devices. Such as the firewall device in front of the site, or the gateway devices on the edge of the company's networks. possibly with apache allow / deny rules. the kind of yes no ip blacklisting is not really (classically) an application level (e.g. dynamic thing to do. ) - though frequently i wish there was a convenient standard way to do this in j233 frameworks as well.

Another theory I have why there is no j2ee standard framework is is the methods for how systems block IP addresses is different on every operating system platform, in the mode where the operating system level filtering is more efficient than having the packets delivered into the [java] application only to have them filtered out there. so since its not practical to come up with an abstract java wrapper that works well for all implementations.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!