It should be possible to run the network license manager inside a firewall with MATLAB clients outside of the firewall, however the MathWorks has not officially tested the full-time use of the network license manager through a firewall. Thus this configuration is not fully supported.
The network license manager operates using two TCP ports. In order to use a firewall with FLEXnet, you will need to configure your license to use static ports and then open these in the firewall. To do so, follow the steps below:
The first port the license manager uses is specified as the last argument of the SERVER line in the license file. This port is used for the initial connection to the license server. For example this line below:
SERVER license-server-1 0011aabbcc22 27000
shows that the license manager is using port 27000. If you do not have a port number on the end of this line, you will need to specify a port. By default MathWorks uses port 27000 upon installation, however you can specify any open port on the machine.
To verify which ports are in use on your system, you can use the "netstat" utility. This utility is called from the DOS prompt for Windows, or through a terminal window on Linux/Unix/Mac. To use the utility, execute the following command:
The other license manager port is specified in DAEMON line of the license file. By default, the vendor DAEMON (MLM) uses a random open port. In order to use a firewall, you must specify an open port on your system for MLM. This specification is done in the license file by adding the flag 'port=' to the end of the DAEMON line. For example:
DAEMON MLM "C:\Program Files\etc\win32\mlm.exe" port=1711
In this example, MLM is tied to port 1711. Again, this must be a free port on the machine. If a port number which is already in use is chosen, a "port in use" error message will be generated when the license manager is restarted.
If you changed the ports, you will need to restart the license manager for the changes to take effect. Once the license manager is started successfully with the changes, you will need to open the ports in the firewall. Once open, you should be able to check out a license through a firewall.
NOTE: If client machines have a firewall, you will need to open the two ports on the client firewall as well.
Best Answer