Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with redirect port

Status
Not open for further replies.

bluedragon2

IS-IT--Management
Jan 24, 2003
2,642
US
I have Tomcat installed on a server that is behind a NAT router. The server resides on a 192.x.x.x network and the browser is on a 209.x.x.x network. I can browes to the server using the NAT'ed address, but when the server tries to redirect to the SSL connection port, it has the browser looking for a 192.x.x.x:443 address which it does not know. For example:

I put in 209.x.x.x in my browser, it sees the NAT'ed server, but then the server redirects it to a SSL connection on port 443 and the browser is looking for 192.x.x.x:443.

The following is an excerpt from my server.xml file:

<Service name="Tomcat-NetworkPilot">

<!-- Define a non-SSL Coyote HTTP/1.1 Connector on port 80.
The Micromuse extension that starts Tomcat will automatically
add a connector on the port number configured in ems.xml if
no other connectors are configured; however, we want to also
configure an SSL connector so this has to be done here. -->

<Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
port="80" minProcessors="5" maxProcessors="75"
enableLookups="true" redirectPort="443"
acceptCount="100" debug="0" connectionTimeout="20000"
useURIValidationHack="false" disableUploadTimeout="true" />


<!-- Note : To disable connection timeouts, set connectionTimeout value to -1 -->


<!-- Define a SSL Coyote HTTP/1.1 Connector on the standard https
port. -->

<Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
port="443" minProcessors="5" maxProcessors="75"
enableLookups="true"
acceptCount="100" debug="0" scheme="https" secure="true"
useURIValidationHack="false" disableUploadTimeout="true">
<Factory className="org.apache.coyote.tomcat4.CoyoteServerSocketFactory"
keystoreFile=".keystore" keystorePass="changeit"
clientAuth="false" protocol="TLS" />
</Connector>


Is there anything I can do to remedy this?



[Blue]Blue[/Blue] [Dragon]

If I wasn't Blue, I would just be a Dragon...
 
Are you redirecting *all* connections to the SSL port, or only some of them? Also, are you using apache as your front end or just tomcat?
 
Just tomcat and the front end of the web application starts with port 80 and then is redirected to port 443.

[Blue]Blue[/Blue] [Dragon]

If I wasn't Blue, I would just be a Dragon...
 
I don't know how to make Tomcat redirect to a different IP address than it knows itself to be, I use apache as my front end since it's so much more capable at these things.

You could, however, use your NAT box to redirect port 80 accesses to port 443. The SSL link is established during the HTTP negotiations, port number is not important. Or, for that matter, you could just enable SSL on port 80.

In any case, sorry I can't help with the tomcat configuration.
 
That is what I was afraid of, the tomcat comes as part of an application installation and I am not very familiar with it.


[Blue]Blue[/Blue] [Dragon]

If I wasn't Blue, I would just be a Dragon...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top