You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Joe Pearse <jo...@hotmail.com> on 2001/09/08 00:53:33 UTC

Specify outbound port on tomcat

Hi List-
  I'd like to specify what outbound ports are chosen when running my
application.  Currently, I can specify the inbound port for SSL (443) to
receive a message.  When my application responds, it (seemingly)arbitrarily 
picks a port between 1024 and (about) 5000 to send out the reply.
  My client refuses to open up their firewall between 1024 and 5000, even 
though it is for the outbound traffic only, I must specify (restrict) the 
ports used for outbound traffic.  Is anyone aware if this is something that 
I could configure in Tomcat (or Apache), and if so, what is it?  (If that is 
not possible to configure, please let me know also.)  Thanks for the help.


_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


Re: Specify outbound port on tomcat

Posted by Pier Fumagalli <pi...@betaversion.org>.
"Tim O'Neil" <to...@xythos.com> wrote:

>> Tomcat (or Apache, or any other TCP based server) sends responses back on
>> the same port that it received your request on (in fact, on the exact same
>> connection).  Is your application itself generating outbound TCP
>> connections (for example, to connect to a database)?  Or is the arbitrary
>> port possibly the one created by your *browser* running on the same
>> machine and connecting to Tomcat?
> 
> Not true in some cases. HTTP sends its response info on the same port,
> protos like ftp open another port. (Which is the reason for http being
> a stateless protocol, you need to open a second port to do things like
> random stream access.)

Correct... Based on HTTP, for example, there's RTSP (Real Time Streaming
Protocol) which use a more-or-less stateless TCP connection for
"controlling" the other UDP-based streams carrying the actual data.

> But that his application is wanting to open another
> port has nothing to do with tomcat, or at least I doubt it. Is your app
> a CORBA or JNI app by chance Joe?

Joe's scenario looked a lot like a EbXML, RosettaNET, BizTalk or similar
transaction, where the "action" is decoupled from the request-response model
of the transport (HTTP in this case), as, as I told before, that might
involve long transaction processing, human intervention,
name-your-favourite...

Can be solved, though! :) java.net sucks but not THAT badly! :)

    Pier


Re: Specify outbound port on tomcat

Posted by Tim O'Neil <to...@xythos.com>.
At 04:05 PM 9/7/2001, you wrote:
>On Fri, 7 Sep 2001, Joe Pearse wrote:
>
> > Date: Fri, 07 Sep 2001 15:53:33 -0700
> > From: Joe Pearse <jo...@hotmail.com>
> > Reply-To: tomcat-user@jakarta.apache.org
> > To: tomcat-user@jakarta.apache.org
> > Subject: Specify outbound port on tomcat
> >
> > Hi List-
> >   I'd like to specify what outbound ports are chosen when running my
> > application.  Currently, I can specify the inbound port for SSL (443) to
> > receive a message.  When my application responds, it (seemingly)arbitrarily
> > picks a port between 1024 and (about) 5000 to send out the reply.
> >   My client refuses to open up their firewall between 1024 and 5000, even
> > though it is for the outbound traffic only, I must specify (restrict) the
> > ports used for outbound traffic.  Is anyone aware if this is something that
> > I could configure in Tomcat (or Apache), and if so, what is it?  (If 
> that is
> > not possible to configure, please let me know also.)  Thanks for the help.
> >
>
>Tomcat (or Apache, or any other TCP based server) sends responses back on
>the same port that it received your request on (in fact, on the exact same
>connection).  Is your application itself generating outbound TCP
>connections (for example, to connect to a database)?  Or is the arbitrary
>port possibly the one created by your *browser* running on the same
>machine and connecting to Tomcat?
>
>Craig McClanahan

Not true in some cases. HTTP sends its response info on the same port,
protos like ftp open another port. (Which is the reason for http being
a stateless protocol, you need to open a second port to do things like
random stream access.) But that his application is wanting to open another
port has nothing to do with tomcat, or at least I doubt it. Is your app
a CORBA or JNI app by chance Joe?


Re: Specify outbound port on tomcat

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Fri, 7 Sep 2001, Joe Pearse wrote:

> Date: Fri, 07 Sep 2001 15:53:33 -0700
> From: Joe Pearse <jo...@hotmail.com>
> Reply-To: tomcat-user@jakarta.apache.org
> To: tomcat-user@jakarta.apache.org
> Subject: Specify outbound port on tomcat
>
> Hi List-
>   I'd like to specify what outbound ports are chosen when running my
> application.  Currently, I can specify the inbound port for SSL (443) to
> receive a message.  When my application responds, it (seemingly)arbitrarily
> picks a port between 1024 and (about) 5000 to send out the reply.
>   My client refuses to open up their firewall between 1024 and 5000, even
> though it is for the outbound traffic only, I must specify (restrict) the
> ports used for outbound traffic.  Is anyone aware if this is something that
> I could configure in Tomcat (or Apache), and if so, what is it?  (If that is
> not possible to configure, please let me know also.)  Thanks for the help.
>

Tomcat (or Apache, or any other TCP based server) sends responses back on
the same port that it received your request on (in fact, on the exact same
connection).  Is your application itself generating outbound TCP
connections (for example, to connect to a database)?  Or is the arbitrary
port possibly the one created by your *browser* running on the same
machine and connecting to Tomcat?

Craig McClanahan