4 Replies Latest reply on Jul 3, 2007 2:41 PM by thenelson

    How do you set the source port for a client?

    thenelson

      My clients and servers will have a firewall between them, is it possible to lock the source port down to a specific port when the clients initiate communication to the server?

      thanks,
      Ian

        • 1. Re: How do you set the source port for a client?
          ron_sigal

          Hi Ian,

          Actually, in general it wouldn't make sense in Remoting to specify the local address of a connection because a single connection will typically use multiple sockets. For example, the socket transport will create a pool of sockets, and, presumably, HttpURLConnections, which are used by the Remoting http transport, do the same under the covers.

          However, you should take a look at the "bisocket" transport, which was created to work around firewall restrictions in the sense that all connections are created from the client to the server. In particular, if you have callbacks sent from the server to the client, the TCP connection is made from a client socket on the client to a server socket on the server.

          For more information, see Section 5.4.16 "Bisocket invoker" in the Remoting Guide (http://labs.jboss.com/jbossremoting/docs/guide/ch05.html#d0e2629).

          -Ron

          • 2. Re: How do you set the source port for a client?
            thenelson

            Yeah, that looks like what I want. Is it possible to lock down the source port with it?


            thanks,
            Ian

            • 3. Re: How do you set the source port for a client?
              ron_sigal

              Well, like I say, the socket transport client maintains a pool of connections, and the bisocket transport is derived from the socket transport code. In any case, there is currently no mechanism to restrict local ports.

              Just out of curiosity, do you have a client side firewall filtering outgoing packets by source port, or a a server side firewall filtering incoming packets by source port?

              If you like, you could create a JIRA issue at http://jira.jboss.com/jira/browse/JBREM, giving as much information as possible about your use case.

              • 4. Re: How do you set the source port for a client?
                thenelson

                 

                "ron.sigal@jboss.com" wrote:
                Well, like I say, the socket transport client maintains a pool of connections, and the bisocket transport is derived from the socket transport code. In any case, there is currently no mechanism to restrict local ports.

                Just out of curiosity, do you have a client side firewall filtering outgoing packets by source port, or a a server side firewall filtering incoming packets by source port?

                If you like, you could create a JIRA issue at http://jira.jboss.com/jira/browse/JBREM, giving as much information as possible about your use case.



                No client side firewall but the client machine will likely be in a DMZ type area and the network guys want to make the firewall rules back the to production environment as strict as possible.

                thanks,
                Ian