4 Replies Latest reply on Jul 22, 2019 9:46 AM by arkadyz

    Bind Wildfly 11 to 2 network interfaces

    arkadyz

      Hello, team

       

      I have a Wildfly11 machine with 3 network interfaces, let's say IP1, IP2, and IP3.

      All IPs are visible to my client machines.

       

      Is there a way to configure my Wildfly to answer ejb/jms requests to the IP1 and IP2 but not to IP3 ?

      I tried with "-b" option but didn't find a way to put list of IPs.  0.0.0.0 is not good for me.

       

      May be it is possible via changing standalone.xml ?

       

      Any help is appreciated.

       

      Thanks,

      Arkady

        • 1. Re: Bind Wildfly 11 to 2 network interfaces
          jewellgm

          If you haven't modified the standalone.xml, there's a section towards the very bottom that defines the different interfaces that can be used to access either the "public" or "management" functions of wildfly.  It looks like this:

           

          <interfaces>
              
          <interface name="management">
                  
          <inet-address value="${jboss.bind.address.management:127.0.0.1}"/>
              
          </interface>
              
          <interface name="public">
                  
          <inet-address value="${jboss.bind.address:127.0.0.1}"/>
              
          </interface>
          
          </interfaces>
          
          

           

          According to the schema "wildfly-config_5_0.xsd", it looks like you can insert multiple "inet-address" elements into each interface.  in this case, since you are wanting allow multiple interfaces to handle ejb and jms requests, you would update the "public" interface to be something like:

           

          <interface name="public">
              <inet-address value="ip1"/>
              <inet-address value="ip2"/>
          </interface>

           

          The "${jboss.bind.address:127.0.0.1}" syntax in the default means to use the value of the jboss.bind.address system parameter if it's defined, otherwise use localhost.

          • 2. Re: Bind Wildfly 11 to 2 network interfaces
            arkadyz

            Hi, Greg

             

            It doesn't work. Wildfly takes only one of IPs.

            • 3. Re: Bind Wildfly 11 to 2 network interfaces
              simkam

              I think you need something like

               

              <interface name="public">

                  <any>

                      <inet-address value="ip1"/>

                      <inet-address value="ip2"/>

                  </any>

              </interface>

               

              Edit: actually trying above I'm not sure if it's possible to bind to two ip addresses. You can bind to single ip or all. Perhaps you can bridge interfaces together.

              • 4. Re: Bind Wildfly 11 to 2 network interfaces
                arkadyz

                Hi, Martin

                 

                This is also not working. May be you are right, it is impossible.

                 

                Thanks,

                Arkady