Try OpenEdge Now
skip to main content
WebSpeed Essentials
Running and Deploying WebSpeed Applications : Firewall configuration and debugging : Firewall configuration

Firewall configuration

Using a firewall poses additional configuration issues because you must configure the firewall to allow communications between the OpenEdge server host machines on particular ports using TCP or UDP protocols. In OpenEdge Application Server: Developing WebSpeed Applications, the entire round-trip request is shown. All of these messages must go through the firewall.
The following figure illustrates which ports must be open and what protocols the messages use.
Figure 19. Firewall configuration
Note: The firewall fire2 has two network cards, one for the Demilitarized Zone (DMZ) and one for the Internal network. Each of these has its own IP address, as shown.
In the following sections the hosts file is mentioned. On UNIX or Linux, this is located at /etc/hosts and in Windows NT and later at C:\WINDOWS\system32\drivers\etc\hosts.
The WebSpeed Messenger file must have the minNSClientPort and maxNSClientPort settings modified in the [WebSpeed.Messengers] configuration, as shown below. The port range must be big enough to cope with all the potential simultaneous requests from the Internet. In this case, there are 20 ports available. You can make this range bigger if needed. Also, you must change the setting for the NameServer to point to the correct host.

Configuring file for firewall

You must configure the following:
*Between the Internet and Web server webserv1, allow inbound and outbound traffic from the Internet on port 80 (the default for HTTP) to the Web server. This is a standard configuration on most firewalls. If you are using HTTP/S (HTTP over SSL), then the default port is 443.
*Between the Web server (Messenger) and NameServer, allow:
*UDP from IP Address to on port 5678. This is the inbound NameServer request traffic.
*UDP from IP Address to on ports 5680 to 5699 inclusive (assuming the above settings in the file). This is the outbound NameServer response traffic as specified in the Messenger's file on the Web server.
*Between the Web server (Messenger) and WebSpeed broker, allow:
*TCP from IP Address to on port 7800 for the inbound request.
*TCP from IP Address to on port 7800 for the outbound reply.
*Between the Web server (Messenger) and WebSpeed agents, allow:
*TCP from IP Address to on ports 7801 to 7805 inclusive for the inbound request.
*TCP from IP Address to on port 7801 to 7805 inclusive for the outbound reply.
Most firewalls accomplish this by using "port forwarding." This means that when the firewall receives a request from a host on a certain port in the DMZ, it is passed through to a particular host on the internal network. When the webserv1 machine makes a request to the NameServer, it cannot see IP address directly, and it has to pass the request to the firewall machine fire2. The firewall then makes the request on the internal network to IP address on its behalf. When the response comes back from the NameServer to the firewall, the firewall will send it on to the Messenger on the DMZ network. As an analogy, think of the firewall as a language interpreter where the WebSpeed Messenger speaks English and the NameServer speaks German. The Messenger needs to talk to the NameServer but cannot do so directly, so it forwards the request to the interpreter who, in turn, makes a request to the NameServer on the Messenger's behalf. The response is given to the interpreter by the NameServer, who then forwards it to the Messenger.
This is achieved by setting the hosts file on webserv1 to have the host inet_ns set to, as shown below. When the Messenger looks for host inet_ns, it uses the IP address, which is the firewall host fire2, as shown: localhost inet_ns
Note: You do not must have an entry for fire2 in the hosts file as the DMZ machines never communicate with it by name; DMZ machines believe that communication with other machines never travels beyond the internal network.
Similarly, the Messenger cannot communicate directly to the WebSpeed server host webspeed1 at IP address either. So, another entry needs to be made in the hosts file to make the Messenger communicate with the firewall instead of the "real" host, as shown: localhost inet_ns webspeed1
Because of this, you cannot use the default setting for the WebSpeed broker's registration mode. The default is to use the broker host IP Address. If you do this, the NameServer will tell the Messenger to try to contact the broker on IP address, which is not a valid IP address in the DMZ, and it will appear as if the broker has not responded. You must set the broker to register using a defined host name, in this case webspeed1. When the NameServer responds this time, it tells the Messenger to try to connect using the host name webspeed1. The Messenger asks the operating system on its host for the IP address of webspeed1. Since the address set in the hosts file is, the Messenger uses that address when it is returned. The firewall then gets the request and passes it through.
Note: The NameServer and WebSpeed server hosts do not need the firewall IP address in their hosts file because they only respond to requests and do not make them.