3 Replies Latest reply on Jun 21, 2008 2:44 PM by peterj

    Setting up JBoss to run on 127.0.0.1 with JBWeb on 0.0.0.0

    jonferguson

      Does it make sense to deploy JBWeb on 0.0.0.0 so that the web interface is available on the network and keep everything else explicitly running on localhost? For security etc.

      How would I go about this?

      Thanks

        • 1. Re: Setting up JBoss to run on 127.0.0.1 with JBWeb on 0.0.0
          peterj

          No, that is not possible. When you specify the bind address (0.0.0.0 or something else), all ports for all services are bound to that address.

          • 2. Re: Setting up JBoss to run on 127.0.0.1 with JBWeb on 0.0.0
            jonferguson

            That's a shame. I was under the assumption that this would be a way to keep things more secure.. only open JBWeb to the outside world.

            This causes a problem which effectively blows guaranteed delivery when using JBoss Messaging if you're running on 0.0.0.0 but not if on localhost. Pulling out a network plug results in a socket exception that affects the ability for my java based message producer from putting things on the queue.. even though it's on the same machine using localhost. I seem to be only able to get rid of this if messaging is bound to localhost only rather than 0.0.0.0.

            I'll look for a workaround.

            Cheers,
            Jon

            • 3. Re: Setting up JBoss to run on 127.0.0.1 with JBWeb on 0.0.0
              peterj

              One thought. The XML config files for each of the services that open ports usually use jboss.bind.address to define the IP address they will bind their ports to. For example, in jboss-web.deployer/server.xml, the address for the connector is defined as:

              <Connector port="8080" address="${jboss.bind.address}"
               maxThreads="250" maxHttpHeaderSize="8192"
               emptySessionPath="true" protocol="HTTP/1.1"
               enableLookups="false" redirectPort="8443" acceptCount="100"
               connectionTimeout="20000" disableUploadTimeout="true" />


              You could change it to:

              <Connector port="8080" address="${my.http.address}"
              . . .


              And then start JBossAS adding -Dmy.http.address=99.99.99.99 (or whatever IP address you want).

              You can do similar things to the remoting service XML file for messaging. Juts make sure that you catch ALL of the IP address for whatever service you are modifying.