Binding JBoss AS 7 to all interfaces

Edit standalone/configuration/standalone.xml and insert the tag any-address instead of inet-address bound to 127.0.0.1 - Example:

<interfaces>
    <interface name="management">
        <inet-address value="127.0.0.1"/>
    </interface>
    <interface name="public">
        <any-address/>
    </interface>
</interfaces>

In the public interface, I've changed the original inet-address with any-address. After restarting, you'll be able to browse JBoss port 8080 over the network.


Thanks for the tip above, FYI I discover that using <any-address/> might lead to

10:31:22,605 ERROR [org.apache.catalina.core.StandardService] (MSC service thread 1-2) Connector.start: LifecycleException:  service.getName(): "jboss.web";  Protocol handler start failed: java.net.SocketException: Protocol family not supported
    at org.apache.catalina.connector.Connector.start(Connector.java:1058)

cf. http://community.jboss.org/thread/168789?tstart=120

You might workaround it by replacing it by <any-ipv4-address/>

that gives you :

<interfaces>
    <interface name="management">
        <inet-address value="127.0.0.1"/>
    </interface>
    <interface name="public">
        <any-ipv4-address/>
    </interface>
</interfaces>

We just added support for -b in 7.0.2.


You can also do the following:

<interfaces>
    <interface name="management">
        <inet-address value="127.0.0.1"/>
    </interface>
    <interface name="public">
        <inet-address value="0.0.0.0"/>
    </interface>
</interfaces>

or if you want to bind to a particular address, replace 0.0.0.0 with the ip.