Configuring Firewalls and Network Address Translating Routers for Shared Variables

You must configure firewalls and Network Address Translating (NAT) routers if you want to transmit network-published shared variables through them. If you do not correctly configure the firewall or router, network-published shared variables might not work.

Network-published shared variable servers use the TCP port 2343 and the UDP port 2343, in addition to one TCP port for each application that you run. The NI Publish-Subscribe Protocol (NI-PSP) protocol begins looking for available TCP ports at port 59110 and increments upward until it finds an available port. The number of available ports you need to configure depends on the number of applications you run. You manually can configure the range of TCP ports the NI-PSP protocol uses by creating a LogosXT.ini file and entering new values in the LogosXT_BasePort and LogosXT_NumPortsToCheck parameters. (Phar Lap ETS, VxWorks) For Phar Lap ETS and VxWorks targets, configure the range of TCP ports in the ni-rt.ini configuration file.

If possible, use TCP for transmitting network-published shared variables.

Note  (Optional) You can still use UDP ports for the network-published shared variables servers. In addition to the required UDP port 2343, the servers use a range of UDP ports beginning with port 6000. The number of ports above 6000 that the network-published shared variable servers use depends on the number of servers running on the computer. Network-published shared variable clients use a range of UDP ports beginning with port 5000. The number of ports above 5000 that the network-published shared variable clients use depends on the number of client applications running on the computer. To find out the number of ports the server or client uses, first use TCP without the firewall configured to find out how many ports you need.

Complete the following steps to allow clients outside a firewall to connect to a server inside the firewall. The exact steps for configuring the firewall depend on the specific firewall you use. Refer to the documentation for the firewall for specific instructions about opening ports.

  1. Open TCP port 2343 and UDP port 2343 for incoming packets, allowing server-discovery broadcasts.
  2. Starting at TCP port 59110, open one TCP port for each application you run.
  3. (Optional) Open the UDP port range from 6000 to 6010 for incoming packets.

You also can allow clients inside a firewall to connect to a server outside the firewall. Some firewalls automatically transmit incoming packets without any configuration. (Optional) If the firewall does not open the ports automatically, open the UDP port range from 5000 to 5010 for incoming packets.

Complete the following steps to allow clients outside a NAT router to connect to a server inside the router. The exact steps for configuring the router depend on the specific router you use. Refer to the documentation for the router for specific instructions about forwarding ports. Only one computer inside the router can function as a server.

  1. Forward TCP port 2343 and UDP port 2343 to the computer running the server.
  2. Starting at TCP port 59110, forward one TCP port for each application you run.
  3. (Optional) Forward the UDP port range from 6000 to 6010 to the computer running the server.

You also can allow clients inside a NAT router to connect to a server outside the router. Some routers automatically forward ports without any configuration. (Optional) If the router does not forward the ports automatically, forward the UDP port range from 5000 to 5010 to the computer running the client.

Note  If you deploy a network variable to a Windows machine with the Windows firewall enabled, you must add \National Instruments\Shared\Tagger\tagsrv.exe and (Windows 32-bit)\windows\system32\lkads.exe or (Windows 64-bit)\windows\SysWOW64\lkads.exe to the Windows firewall exception list in order to read or write to the variable hosted on the machine.