• 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
  • Liutauras Vilda
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Devaka Cooray
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Tim Holloway
  • Claude Moore
  • Stephan van Hulst
Bartenders:
  • Winston Gutkowski
  • Carey Brown
  • Frits Walraven

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: 5288
143
  • 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.
 
Saloon Keeper
Posts: 20510
115
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.
 
A lot of people cry when they cut onions. The trick is not to form an emotional bond. This tiny ad told me:
ScroogeXHTML 8.2 - easy to use RTF to HTML converter library
https://coderanch.com/t/707504/ScroogeXHTML-RTF-HTML-XHTML-converter
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!