我正在尝试从JBOSS AS 7远程访问管理控制台。我已经将管理接口配置为我的IP,但在我尝试访问该地址后,它被转换为我在/ etc / hosts中的任何内容。我该如何改变这种行为?我希望它只能通过IP访问。
谢谢, 菲利普
答案 0 :(得分:2)
JBoss AS7社区文档中有一节关于Securing The Management Interfaces。这是进入管理界面安全主题的良好资源。
听起来您已经设置了management-interfaces
来控制管理控制台和管理CLI的界面和端口设置。定义此接口的特定IP和端口设置通常会排除localhost访问。
<强>问题强>
管理界面设置存在于以下任一实例的配置文件中。您需要将相对运行时令牌更改为特定的IP地址和端口。
独立配置文件为standalone.xml
。
<interfaces>
<interface name="management">
<!-- Declare a specific IP address for this management interface -->
<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>
<socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">
<socket-binding name="management-native" interface="management" port="${jboss.management.native.port:9999}"/>
<!-- Declare a specific port for the management-native interface -->
<socket-binding name="management-http" interface="management" port="${jboss.management.http.port:9990}"/>
<socket-binding name="management-https" interface="management" port="${jboss.management.https.port:9443}"/>
您可以管理每个主机控制器,因此配置文件不是domain.xml
的主域控制器,而是host.xml
中特定主机的配置。您希望以与独立实例类似的方式保护native-interface
。如果您的域配置正确,您可以通过域控制器远程连接到域,管理控制台或管理CLI(特别是在该界面上)。
<management>
<security-realms>
<security-realm name="ManagementRealm">
<authentication>
<properties path="mgmt-users.properties" relative-to="jboss.domain.config.dir"/>
</authentication>
</security-realm>
<security-realm name="ApplicationRealm">
<authentication>
<properties path="application-users.properties" relative-to="jboss.domain.config.dir" />
</authentication>
</security-realm>
</security-realms>
<management-interfaces>
<native-interface security-realm="ManagementRealm">
<socket interface="management" port="${jboss.management.native.port:9999}"/>
</native-interface>
<http-interface security-realm="ManagementRealm">
<socket interface="management" port="${jboss.management.http.port:9990}"/>
</http-interface>
</management-interfaces>
</management>
<domain-controller>
<local/>
<!-- Alternative remote domain controller configuration with a host and port -->
<!-- <remote host="${jboss.domain.master.address}" port="${jboss.domain.master.port:9999}" security-realm="ManagementRealm"/> -->
</domain-controller>
<interfaces>
<interface name="management">
<inet-address value="${jboss.bind.address:127.0.0.1}"/>
</interface>
<interface name="public">
<inet-address value="${jboss.bind.address:127.0.0.1}"/>
</interface>
<interface name="unsecure">
<!-- Used for IIOP sockets in the standard configuration.
To secure JacORB you need to setup SSL -->
<inet-address value="${jboss.bind.address.unsecure:127.0.0.1}"/>
</interface>
</interfaces>
如果您对远程连接有疑问,请阅读Middleware Magic上的4 ways to connect JBoss AS 7 using CLI。
答案 1 :(得分:0)
在standlone.xml
<interfaces>
<interface name="management">
<!-- Declare a specific IP address for this management interface -->
<inet-address value="your-hostname/>
</interface>
<interface name="public">
<inet-address value="your-hostname"/>
</interface>
<interface name="unsecure">
<inet-address value="your-hostname"/>
</interface>
</interfaces