9.8.3. Configure Network Firewalls to Work with JBoss Enterprise Application Platform 6
Most production environments use firewalls as part of an overall network security strategy. If you need multiple server instances to communicate with each other or with external services such as web servers or databases, your firewall needs to take this into account. A well-managed firewall only opens the ports which are necessary to operation, and limits access to the ports to specific IP addresses, subnets, and network protocols.
- Determine the ports you need to open. Refer to Section 9.8.4, “Network Ports Used By JBoss Enterprise Application Platform 6” to determine the list of ports for your situation.
- An understanding of your firewall software is required. This procedure uses the
system-config-firewallcommand in Red Hat Enterprise Linux 6. Microsoft Windows Server includes a built-in firewall, and several third-party firewall solutions are available for each platform.
This procedure configures a firewall in an environment with the following assumptions:
- The operating system is Red Hat Enterprise Linux 6.
- JBoss Enterprise Application Platform 6 runs on host
10.1.1.2. Optionally, the server has its own firewall.
- The network firewall server runs on host
eth0, and has an external interface
- You want traffic on port 5445 (a port used by JMS) forwarded to JBoss Enterprise Application Platform 6. No other traffic should be allowed through the network firewall.
Procedure 9.8. Task
Log into the Management Console.Log into the Management Console. By default, it runs on http://localhost:9990/console/.
Managed Domain: Determine the socket binding group your server group uses.Each server group uses a socket binding group, which is a collection of socket bindings. A socket binding is a name-value pair of port name and number.To determine which socket binding group your server groups, click the Server Groups label at the top right side of the screen. Then click the name of your server group in the Available server group configurations table. The Server attributes area at the bottom of the screen is populated with the profile and socket binding group used by the server group.
Determine the socket bindings used by the socket binding group.Click the Profiles label at the top right of the Management Console. At the left-hand side of the screen, a series of menus is shown. The bottom menu heading is General Configuration. Click the Socket Binding Groups item below this heading. The Socket Binding Declarations screen appears. Initially, the
standard-socketsgroup is shown. You can choose a different group by selecting it from the combo box on the right-hand side.
NoteIf you use a standalone server, it has only one socket binding group.The list of socket names and ports is shown, six values per page. You can go through the pages by using the arrow navigation below the table.
Determine the ports you need to open.Depending on the function of the particular port and the needs of your environment, some of the ports may need to be accessible across your firewall. If you are unsure of the purpose of a socket binding, refer to Section 9.8.4, “Network Ports Used By JBoss Enterprise Application Platform 6” for a list of the default socket bindings and their purposes.
Configure your firewall to forward traffic to JBoss Enterprise Application Platform 6.Perform these steps to configure your network firewall to allow traffic on the desired port.
- Log into your firewall machine and access a command prompt, as the root user.
- Issue the command
system-config-firewallto launch the firewall configuration utility. A GUI or command-line utility launches, depending on the way you are logged into the firewall system. This task makes the assumption that you are logged in via SSH and using the command-line interface.
- Use the TAB key on your keyboard to navigate to the button, and press the ENTER key. The Trusted Services screen appears.
- Do not change any values, but use the TAB key to navigate to the button, and press ENTER to advanced to the next screen. The Other Ports screen appears.
- Use the TAB key to navigate to the <Add> button, and press ENTER. The Port and Protocol screen appears.
5445in the Port / Port Range field, then use the TAB key to move to the Protocol field, and enter
tcp. Use the TAB key to navigate to the button, and press ENTER.
- Use the TAB key to navigate to the button until you reach the Port Forwarding screen.
- Use the TAB key to navigate to the <Add> button, and press the ENTER key.
- Fill in the following values to set up port forwarding for port 5445.
Use the TAB key to navigate to the button, and press ENTER.
- Source interface: eth1
- Protocol: tcp
- Port / Port Range: 5445
- Destination IP address: 10.1.1.2
- Port / Port Range: 5445
- Use the TAB key to navigate to the button, and press ENTER.
- Use the TAB key to navigate to the button, and press ENTER. To apply the changes, read the warning and click .
Configure a firewall on your JBoss Enterprise Application Platform 6 host.Some organizations choose to configure a firewall on the JBoss Enterprise Application Platform 6 server itself, and close all ports that are not necessary for its operation. Consult Section 9.8.4, “Network Ports Used By JBoss Enterprise Application Platform 6” and determine which ports to open, then close the rest. The default configuration of Red Hat Enterprise Linux 6 closes all ports except 22 (used for Secure Shell (SSH) and 5353 (used for multicast DNS). While you are configuring ports, make sure you have physical access to your server so that you do not inadvertently lock yourself out.
Your firewall is configured to forward traffic to your internal JBoss Enterprise Application Platform 6 server in the way you specified in your firewall configuration. If you chose to enable a firewall on your server, all ports are closed except the ones needed to run your applications.