Wednesday, July 8, 2015

How to open access to public in JBoss?

Ever wonder why I can only access my web application from localhost in JBoss? Why I could not access it from other devices, such as mobile phone, tablet, and even other PC? I think this is due to the default configuration when JBoss was first setup:
    < 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>
        <interface name="unsecure">
            <inet-address value="${jboss.bind.address.unsecure:127.0.0.1}"/>
        </interface>
    </interfaces>
A minor change is require to open access from public. What I did was to replace the <inet-address ... /> with <any-ipv4-address> in <interface name="public">.
    <interfaces>
        <interface name="management">
            &lt inet-address value="${jboss.bind.address.management:127.0.0.1}"/>
        </interface>
        <interface name="public">
            <any-ipv4-address/>
        </interface>
        <interface name="unsecure">
            <inet-address value="${jboss.bind.address.unsecure:127.0.0.1}"/>
        </interface>
    </interfaces>
Hey! What is unsecure by the way? Feeling uncomfortable with the word.

No comments: