仅在Jboss 7上限制对本地IP的访问

时间:2013-04-23 14:46:33

标签: jboss jboss7.x

Jboss 7.0(默认情况下)配置为通过在standalone.xml中定义来限制对本地IP的访问:

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

我知道我可以通过以下方式更改它以便向所有ips公开:

<interfaces>
    <interface name="public">
        <any-address/>
    </interface>
</interfaces

但是我怎样才能将此限制为仅限本地IP,例如所有以10.x.x.x开头的IP地址?

1 个答案:

答案 0 :(得分:5)

我认为这有助于:https://docs.jboss.org/author/display/AS71/Interfaces+and+ports

<interface name="default">
   <!-- Match any interface/address on the right subnet -->
   <subnet-match value="192.168.0.0/16"/>
</interface>

通过这种方式,您可以匹配给定子网中的所有地址。

相关问题