IMD SolutionComputing LibraryShop main store

How-to

Configure OpenVPN on a Cosy 131 through comcfg.txt

Remote access and virtualization Published 7 min read By IMD Solution engineering team

Short answer

The Cosy 131 has no OpenVPN menu, so you set the connection parameters in comcfg.txt, one pilot unit at a time, against an OpenVPN 2.6.0 server on Windows Azure. Talk2M keeps the fleet visible in eCatcher, a /24 tunnel subnet fits 254 clients, and the 100-unit expansion is gated on a 24-hour load test with defined pass numbers.

On this page
  1. Why does a Cosy 131 need comcfg.txt for OpenVPN instead of a menu?
  2. Will editing comcfg.txt drop the Cosy 131 out of eCatcher?
  3. How do you set the OpenVPN parameters on the Cosy 131?
  4. What goes on the OpenVPN 2.6.0 server on Windows Azure?
  5. What tunnel addressing fits six Cosy units now and 100 later?
  6. How do you prove one unit before touching the other five?
  7. Is OpenVPN 2.6.0 on one Azure VM enough for 100 Cosy units?
  8. Do Talk2M and the OpenVPN tunnel run side by side?
  9. Questions asked

You configure OpenVPN on a Cosy 131 through the unit's configuration parameters in comcfg.txt, because the firmware exposes no OpenVPN menu. Export the unit's configuration first, edit only the VPN connection entries, pilot one of the six units, and confirm both the tunnel and the eCatcher status before you roll the change out to the rest. On the server side, run OpenVPN 2.6.0 on the Windows Azure VM in server mode, with one client certificate and one fixed tunnel address per Cosy. A /24 tunnel subnet such as 10.8.0.0/24 carries 254 usable client addresses, enough for the six units now and the roughly 100 planned. The sections below give the parameter path, the server settings, the addressing arithmetic, the pilot checks and the load-test numbers that gate the 100-unit fleet.

Why does a Cosy 131 need comcfg.txt for OpenVPN instead of a menu? #

Because the Cosy 131 firmware offers no OpenVPN configuration menu: the client settings live in the unit's configuration parameters, which you edit through the comcfg.txt file, while the Quick Launch wizard from first setup only covers the Talk2M connection that eCatcher reports. The Cosy 131 is built as a Talk2M remote access gateway: its Quick Launch wizard walks you through connecting the unit to Talk2M on first setup, and that Talk2M link is what eCatcher reports from. A custom OpenVPN endpoint never got a page in that setup, so its settings are reached the way every other advanced setting is, through the configuration parameters that export to and import from comcfg.txt. The export and import procedure itself is in the Cosy 131 user manual, document um_0004_00. Take the VPN parameter names from the vendor's own Cosy 131 OpenVPN guide: the guides written for a Flexy use different parameter keys, and copying them into a Cosy edits nothing or breaks the configuration.

Will editing comcfg.txt drop the Cosy 131 out of eCatcher? #

No — eCatcher follows the Cosy 131 over Talk2M, which is a separate management path from the OpenVPN tunnel, so editing only the VPN connection parameters leaves the eCatcher status alone as long as the file stays well-formed. The Talk2M credentials and connection are separate parameters from the ones you change. The real risk is a malformed file breaking the unit's startup configuration, and that is why the rollback export comes first in the procedure: if the unit drops offline in eCatcher after a reboot, you reload the exported file and the unit comes back. If a Cosy 131 does vanish from eCatcher after a change, the guide on why a Cosy 131 goes offline in eCatcher covers the reset behaviour behind that symptom. Verify eCatcher explicitly on the pilot unit before you treat the template as safe for the other five.

How do you set the OpenVPN parameters on the Cosy 131? #

You edit the VPN connection parameters in comcfg.txt on one pilot unit, load the file back, reboot, and confirm both the tunnel and the eCatcher status before you touch unit two.

  1. Export the running configuration of pilot unit one and keep the file for rollback.
  2. Take the VPN parameter names from the Cosy 131 OpenVPN documentation; a Flexy guide's keys do not transfer.
  3. In comcfg.txt, point the VPN client entries at the Azure VM: the server's public address, the agreed tunnel port such as UDP 1194, the TLS and cipher settings the server requires, and the client certificate and private key issued for this one unit.
  4. Load the file back to the unit and let it reboot.
  5. From the server, ping the unit's new tunnel address; from a client on the remote machine LAN, ping back through the tunnel.
  6. Confirm eCatcher still reports the unit online, then repeat the same parameter set for units two through six from the recorded template.

The server-side half, from certificate authority to server configuration file, is written up step by step in the article on pointing a Cosy at a custom OpenVPN server.

What goes on the OpenVPN 2.6.0 server on Windows Azure? #

Run OpenVPN 2.6.0 in server mode on the Azure VM with a certificate authority, one client certificate per Cosy, a client-config entry that pins each unit's tunnel address, and an Azure network security group rule admitting the tunnel port from each site's public address. Concretely: sign one client certificate per Cosy, with each certificate's common name naming its unit; add a client-config entry per common name that pins that unit's tunnel address from the plan below; add a route line per remote machine LAN so the server knows where each site's traffic lives; and scope the network security group to each site's public source address rather than the whole internet. On the receiving side, each site's router needs a static route pointing its local clients back through the Cosy's tunnel address. Keep client-to-client forwarding disabled unless two sites genuinely need to talk to each other.

What tunnel addressing fits six Cosy units now and 100 later? #

A /24 tunnel subnet such as 10.8.0.0/24 carries 254 usable client addresses, which covers the six units in service today and the roughly 100 planned, with more than 150 addresses to spare. Take 10.8.0.0/24 and do the arithmetic once: 2 raised to the power of 32 minus 24 gives 256 total addresses; minus the network address 10.8.0.0 and the broadcast address 10.8.0.255, that leaves 254 usable client addresses. Assign 10.8.0.10 through 10.8.0.109 to the first 100 Cosy units, so the six in service today take 10.8.0.10 through 10.8.0.15 and 154 addresses stay spare. Each site's machine LAN must not overlap the tunnel subnet or any other site's LAN; where it does, renumber the site or NAT at the Cosy. The routing side, one route per machine LAN advertised from one box, follows the same pattern as several machine LANs behind one VPN router. That per-site isolation is also your safety line: a tunnel that reaches only its own machine LAN cannot turn one compromised site into a path into the others.

How do you prove one unit before touching the other five? #

Change one Cosy 131 and accept it against four checks — tunnel established, access limited to the intended remote LAN, eCatcher still online, and a clean reconnect after a power cycle — before you touch the other five. Run them in order on the pilot:

  • The tunnel establishes and stays up: ping the unit's tunnel address continuously for ten minutes from the server.
  • Access stays inside the intended remote LAN: from behind the Cosy, reach the machine LAN and confirm nothing beyond it answers.
  • eCatcher still reports the unit online.
  • The unit reconnects cleanly: power-cycle the Cosy and time the tunnel coming back.

Any failure sends you back to the exported configuration and the parameter document, not forward to unit two. Only a pilot that passes all four turns the comcfg.txt edit into a rollout template.

Is OpenVPN 2.6.0 on one Azure VM enough for 100 Cosy units? #

Addresses and protocol scale to 100; server load does not come from a datasheet, so approve the 100-unit fleet only after a 24-hour test in which 100 tunnels hold, every reconnect completes inside 60 seconds, and the Azure VM CPU averages below 70 percent. No document publishes a client-count rating for OpenVPN 2.6.0, and none for the Cosy 131 either; what binds at this scale is the VM's CPU during TLS handshakes and reconnect storms, its network throughput, and the address plan you already fixed. Run the test on a staging copy of the server: generate 100 client connections using certificates from the same authority, hold all tunnels for 24 hours, force all 100 to reconnect at once at least once during the run, and record CPU, memory and reconnection times. The decision: if the CPU average stays below 70 percent and every tunnel re-establishes within 60 seconds of the mass reconnect, run the fleet on one server; if either check fails, split the fleet across two server instances or move to a larger VM size before rollout.

Do Talk2M and the OpenVPN tunnel run side by side? #

Keep both: Talk2M stays the management path that shows the fleet in eCatcher, and the OpenVPN tunnels carry the machine-access traffic, so an outage on your own server never blinds you to a unit's health. That coexistence is the design, not a compromise. Talk2M carries status, alarms and the eCatcher fleet view; the OpenVPN tunnels carry the day-to-day machine access over your own server, at whatever scale the load test approved. Which traffic belongs on which path, and when a fleet outgrows the eCatcher-only model, is worked through in the guide on selecting a remote access design between OpenVPN and eCatcher. For this deployment the decision is set: register all units on Talk2M as the management plane, configure the comcfg.txt VPN parameters as the data plane, deploy the six units behind the passed pilot, and hold the 100-unit expansion until the 24-hour test passes on those same numbers.

Questions asked

Where exactly are the OpenVPN settings on a Cosy 131?

In the unit's configuration parameters, edited in the comcfg.txt file. The Quick Launch wizard and the web setup cover Talk2M only. Export the running configuration first, change the VPN client entries in the file, and load it back to the unit as the Cosy 131 user manual describes. Parameter names written for a Flexy do not transfer; take them from the Cosy 131 OpenVPN guide.

Does one tunnel subnet really cover 100 Cosy units?

Yes on addresses. 10.8.0.0/24 holds 256 addresses; subtracting the network and broadcast addresses leaves 254 usable client addresses, so 100 Cosy units fit with 154 spare. The address count is never the binding constraint at that scale, the server load is, and that is what the 24-hour test at 100 concurrent tunnels decides.

What must the 100-tunnel load test pass?

Hold 100 client tunnels for 24 hours with the Azure VM's CPU averaging below 70 percent, zero certificate or authentication failures, and every tunnel re-established within 60 seconds after a forced mass reconnect. Also confirm route isolation: each client reaches only its own machine LAN. If any check fails, split the fleet across two server instances or move to a larger VM before rollout.

Can I keep using eCatcher after the comcfg.txt change?

Yes. Talk2M, which eCatcher reports from, is a parameter set separate from the OpenVPN entries you edit, so a well-formed file leaves eCatcher untouched. Export the configuration before editing so a malformed file can be rolled back, and check the eCatcher status explicitly on the pilot unit before rolling the same change out to the rest of the fleet.

Keep reading

  • How-to

    Point an eWon Cosy at a custom OpenVPN server

    SSH does not exist on the Ewon Cosy or Flexy, so the way to a custom OpenVPN server is the comcfg parameter VPNCfgFile pointing at a text config stored in /usr — documented for the Flexy and Cosy 131. Everything is applied through the built-in web server, and the tunnel is verified against your server, not Talk2M.

    Remote access and virtualization

  • Explainer

    Remote PLC access through HMI transparent mode

    Yes, when the HMI's transparent mode passes the PLC programming protocol unchanged between its Ethernet side and its serial RS-422 side, and you carry that serial stream over the remote gateway's virtual COM port end to end. A cyclic data exchange through a second PLC proves only data transfer; it is not programming access, which only a completed online connection through the full route proves.

    Remote access and virtualization

  • Troubleshooting

    Why a VPN-connected Flexy gets an address but cannot be pinged

    The tunnel address proves only that the Flexy's OpenVPN session reached your server. Because a client-to-client ping passes while the server's own ping to the Flexy fails, the inter-client setting is not the cause; the fault sits at the Flexy end. Capture on the server's tunnel interface, then test from the Flexy outward, to see whether echo replies leave through the tunnel at all.

    Remote access and virtualization