FlexLMForwarding

Forewarding FlexLM
Forwarding FlexLM connections is a hassle, but can be a useful trick if you need to run an application from a remote location. The difficulty comes from the need for forwarding more than one port a time.

A FlexLM daemon uses two processes, and two ports. The first daemon is, and acts as a director to the other daemon(s) on the server. It usually binds to port 27000. The second daemon is supplied by the vendor, and is specific to whatever application is being licensed. The port it binds to is also vendor-specific. For example, Matlab usually uses port 1970.

Both of these ports can be altered in the license.dat file, and both--whatever they are--must be forwarded properly.

The Test Setup
The test configuration is as follows:

Three computers:
 * 1) Aubrey -- the "client" on which we want to run our program
 * 2) Babbington -- Our proxy host, and the far end of the tunnel
 * 3) Coleman -- The FlexLM license server

We need to forwards ports  and   from Aubrey, through Babbington, and ultimately to Coleman. This command should work:

ssh -N -v -L 27000:coleman:27000 -L 1970:coleman:1970 babbington

Obviously, alter the ports to match your vendor daemon.

This command will create two tunnels that connect ports 27000 on the aubrey to a tunnel that ends at babbington. Babbington will then try to connect to port 27000 on coleman. The same then happens with port 1970.

The last step is to alter your LM_LICENSE_FILE envrionment variable to use the local--forwarded!--port. Here, we use matlab as an example: LM_LICENSE_FILE=27000@localhost matlab

Matlab should now start...