• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Ganesh Patekar
  • Frits Walraven
  • Tim Moores
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Stephan van Hulst
  • salvin francis
  • Tim Holloway

Tomcat multiple connectors for one application with IP restriction  RSS feed

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need to create configuration for app, that will have two connectors (HTTP and HTTPS) and restrict access to HTTP connector by IP. Is it possible?
 
Saloon Keeper
Posts: 5046
134
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think this is possible using the remote address valve and its addConnectorPort attribute.

It is definitely possible using the rewrite valve.
 
Bartender
Posts: 19993
95
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, the Tomcat Valve subsystem is where you can log and filter stuff like that.

However, as a general rule, limiting access by source IP address is something better done using the machine's firewall. It blocks earlier in the pipeline and can limit access to all servers on the machine, not just Tomcat (for example, Apache).

It should be noted that HTTP is no longer the recommended protocol in many cases. A lot of servers will immediately flip you over to HTTPS.

Also, I hope you're not trying to restrict access for for users based on their source IP address. That's an extremely unreliable means of identification.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!