APPLICABLE PRODUCTS
Anybus Defender Series 4000 and up
Ewon Cosy+
Ewon Flexy
VERSIONS USED IN THIS ARTICLE
- Anybus Defender 2.5.2-2025111723
Connect a PLC to Talk2M Through an Ewon Using the Same LAN/WAN Subnet
This guide explains how to remotely access a PLC through an Ewon and Talk2M when the Ewon WAN network and PLC network must use the same IP subnet.
The working topology uses:
- Anybus Defender
- Ewon connected through its WAN port
- PLC connected to the same Defender as the Ewon WAN
- eCatcher and Talk2M for remote access
- A virtual machine connected through the host PC running eCatcher
This configuration uses the Ewon same-subnet workaround with KillLAN=1.
Important limitation
This is a workaround for situations where the Ewon WAN and PLC must remain in the same subnet.
When KillLAN=1 is enabled:
- The Ewon LAN interface is disabled.
- The configured Ewon LAN IP becomes a dummy routing address.
The Ewon LAN IP will normally not respond to ping.
Instructions
1. IP addressing
| Device/Interface | IP address |
|---|---|
| Defender WAN | 10.10.10.81/24 |
| Defender LAN | 192.168.200.1/24 |
| Defender LAN2 | 192.168.100.1/24 |
| Cosy+ WAN | 192.168.100.2/24 |
| Cosy+ dummy LAN | 192.168.100.3/24 |
| Siemens PLC | 192.168.200.30/24 |
The Cosy+ WAN gateway is 192.168.200.1.
The PLC gateway (if possible) is 192.168.200.1
The dummy LAN address is used by the Ewon workaround and is not a physically accessible interface.
2. Configure Defender interfaces
Open the Defender web interface and navigate to Interfaces.
WAN
Configure:
IP Address: 10.10.10.81
Subnet Mask: 255.255.255.0
Gateway: Use the actual upstream router gateway.LAN
Configure:
IP Address: 192.168.200.1
Subnet Mask 255.255.255.0LAN2
Configure:
IP Address: 192.168.100.1
Subnet Mask: 255.255.255.0Save and apply all changes.
3. Configure the Cosy+ Internet Wizard
Initially, configure the Cosy+ through its LAN port.
Navigate to:
Setup -> Wizards -> Internet
Select Ethernet INTERNET connection and then Static on the next screen.
Configure:
| Setting | Value |
|---|---|
| IP address | 192.168.100.2 |
| Subnet mask | 255.255.255.0 |
| Primary DNS | 8.8.8.8 |
| Secondary | 1.1.1.1 |
Save the WAN configuration.
The final Internet Wizard connection will be performed after configuring the Defender firewall and NAT.
4. Configure LAN2 → WAN firewall rules
Navigate to:
Firewall -> Rules -> LAN2
Create the rules below.
For all rules, unless otherwise stated, use:
Action: Pass
Interface: LAN2
Source: 192.168.100.1/324.1 Allow DNS
The Cosy+ uses two DNS servers:
- Primary: 8.8.8.8
- Secondary 1.1.1.1
Create four firewall rules.
| Protocol | Destination | Destination port | Description |
|---|---|---|---|
| TCP/UDP | 8.8.8.8/32 | 53 | Allow Ewon DNS Primary |
| TCP/UDP | 1.1.1.1/32 | 53 | Allow Ewon DNS Secondary |
These rule prevent the Cosy+ from suing other DNS servers.
4.2 Allow HTTPS to Talk2M
The Cosy+ requires HTTPS access to the Talk2M services.
Create four rules.
| Protocol | Destination | Destination port | Description |
|---|---|---|---|
| TCP | 3.66.21.78/32 | 443 | Allow Ewon Talk2M Device |
| TCP | 92.52.111.215/32 | 443 | Allow Ewon Talk2M Device Backup |
| TCP | 35.157.135.117/32 | 443 | Allow Ewon Talk2M API |
| TCP | 92.52.111.213/32 | 443 | Allow Ewon Talk2M API Backup |
The endpoint groups are:
device.talk2m.com
3.66.21.78
92.52.111.215
device.api.talk2m.com
35.157.135.117
92.52.111.213
Because the rules use fixed IP addresses rather than domain-based filtering, the allowed addresses must be reviewed whenever HMS updates its endpoint list.
4.3 Allow NTP
The Cosy+ needs to synchronize its internal clock.
Its default NTP service uses:
ntp.talk2m.com
This hostname resolve to different public NTP servers.
Create:
| Setting | Value |
|---|---|
| Protocol | UDP |
| Source | 182.168.100.2/32 |
| Destination | Any |
| Destination port | 123 |
| Description | Allow Ewon NTP |
Destination Any is retained because the default NTP server uses a dynamic pool.
The rule remains restricted to the Cosy+ source IP and UDP port 123
4.4 Allow Talk2M VPN
The Cosy+ establishes its Talk2M VPN connection using OpenVPN.
Create:
| Setting | Value |
|---|---|
| Protocol | UDP |
| Source | 192.168.100.2/32 |
| Destination | Any |
| Destination port | 1194 |
| Description | Allow Ewon Talk2M VPN |
Destination Any is retained because the VPN server used a dynamic pool.
4.5 Allow HTTP for Internet Wizard
The Cosy+ internet Wizard may use HTTP for its external connectivity test.
Create:
| Setting | Value |
|---|---|
| Protocol | TCP |
| Source | 192.168.100.2/32 |
| Destination | Any |
| Destination port | 80 |
| Description | Allow Ewon Internet HTTP |
This rule can be disabled after HTTP access is no longer required.
Verify that internet connectivity and Talk2M continue to operate before removing it.
4.6 Allow ICMP for Internet Wizard
Create:
| Setting | Value |
|---|---|
| Protocol | ICMP |
| Source | 192.168.100.2/32 |
| Destination | Any |
| Description | Allow Ewon Internet Ping |
This permits the Internet Wizard to test external reachability.
The destination can later be restricted to confirmed test targets, such as 8.8.8.8/32, or the rule can be disabled when ICMP is no longer required.
4.7 Apply the rules
Save and apply all LAN2 rules.
Position the specific rules above any general block rule.
4.8 Recommended LAN2 → WAN rule summary
| Protocol | Destination | Port |
|---|---|---|
| TCP/UDP | 8.8.8.8 | 53 |
| TCP/UDP | 1.1.1.1 | 53 |
| TCP | 3.66.21.78 | 443 |
| TCP | 92.52.111.215 | 443 |
| TCP | 35.157.135.117 | 443 |
| TCP | 92.52.111.213 | 443 |
| UDP | Any | 123 |
| UDP | Any | 1194 |
| TCP | Any | 80 |
| ICMP | Any |
Every rules uses source 192.168.100.2/32.
The HTTP and ICMP rules are for commissioning and internet connectivity tests.
5. Configure Defender outbound NAT
Navigate to:
Firewall -> NAT -> Outbound
When the Defender WAN has a valid default gateway, automatic outbound NAT normally handles LAN2 traffic.
Verify that the LAN2 subnet is covered.
Manual outbound NAT when required
If automatic NAT does not cover LAN2, select Hybrid Outbound NAT and create:
| Setting | Value |
|---|---|
| Interface | WAN |
| Protocol | Any |
| Source | 192.168.100.2/32 |
| Destination | Any |
| Translation | Interface address |
| Description | Ewon Internet Outbound NAT |
Using 192.168.100.2/32 restricts the NAT rule to the Cosy+ rather than translating the entire LAN2 subnet.
Save and apply the configuration.
Do not create duplicate manual NAT rules if automatic outbound NAT already handles this connection.
6. Verify Internet and Talk2M connectivity
Connect the Cosy+ WAN with the appropriate Talk2M activation method.
Complete the wizard and verify that the Cosy+ appears online in eCatcher.
Confirm that you can connect to the Cosy+ through Talk2M and access its management interface over the VPN.
7. Configure the Ewon COM parameters
Navigate to:
Setup -> System -> Storage -> Tabular edition -> Edit COM cfg
Configure the following parameters:
| Parameter | Value | Description |
|---|---|---|
| KillLAN | 1 | Disables the Ewon LAN interface |
| WANItfProt | 2 | Controls WAN protection and access behavior |
| FwrToWAN | 1 | Enables forwarding towards WAN |
| NATItf | 2 | Enables NAT and transparent forwarding on WAN |
Save the settings and restart the Cosy+ so they take effect.
Once the Cosy+ reconnects to Talk2M, access its web interface through the VPN and proceed to step 8.
Important: With KillLAN=1, the physical LAN interface is disabled.
Firmware 23.1s3PR also prevents access to the Cosy+ web configuration server through its WAN interface, even with WANItfProt=2.
Therefore, an operational Talk2M management connection is required to continue configuration after this step. Without another supported access method, recovery may require a factory reset.
8. Configure the Cosy+ dummy LAN address
Navigate to:
Setup -> System -> Communication -> General -> Eth1 LAN/Local
Change the LAN address to:
IP Address: 192.168.100.3
Subnet Mask: 255.255.255.0This creates a dummy LAN address in the same subnet as the Cosy+ WAN interface.
Save the configuration and restart the Cosy+.
Reconnect through eCatcher.
9. Configure restrictive LAN2 → LAN firewall rules
The Defender must allow only authorized remote machine communication.
The Siemens PLC is:
PLC IP Address: 192.168.200.30
Protocol: Siemens S7
TCP Port: 102Navigate to:
Firewall -> Rules - LAN2
Rule 1 - Allow Siemens S7 communication
| Setting | Value |
|---|---|
| Action | Pass |
| Interface | LAN2 |
| Protocol | TCP |
| Source | 192.168.100.2/32 |
| Source Port | Any |
| Destination | 192.168.200.30/32 |
| Destination Port | 102 |
| Description | Allow Ewon Siemens PLC S7 |
Rule 2 - Allow ICMP to Siemens PLC
| Setting | Value |
|---|---|
| Action | Pass |
| Interface | LAN2 |
| Protocol | ICMP |
| Source | 192.168.100.2/32 |
| Destination | 192.168.200.30/32 |
| Description | Allow Ewon Siemens PLC Ping |
Final LAN2 -> LAN rule order
| Order | Action | Protocol | Destination | Port |
|---|---|---|---|---|
| 1 | Pass | TCP | 192.168.200.30/32 | 102 |
| 2 | Pass | ICMP | 192.168.200.30/32 | Any |
10. Configure the Siemens PLC
Configure the Siemens PLC:
IP Address: 192.168.200.30 Subnet Mask: 255.255.255.0 Default Gateway: 192.168.200.1 (If possible)
The PLC uses the Defender LAN address as its default gateway.
The Defender routes permitted traffic between LAN2 and LAN.
Optional LAN-side NAT
If the PLC does not support a default gateway, source NAT can be used.
Navigate to:
Firewall -> NAT -> Outbound
Use Hybrid Outbound NAT mode.
Create:
| Setting | Value |
|---|---|
| Interface | LAN |
| Protocol | TCP |
| Source | 192.168.100.2/32 |
| Destination | 192.168.200.30/32 |
| Destination Port | 102 |
| Translation | Interface address |
| Description | Ewon to Siemens PLC NAT |
The source is translated to 192.168.200.1 as the packet leaves the Defender LAN interface.
This allows the PLC to reply directly to the Defender.
Use this optional NAT only if required, and ensure the source matches the actual traffic observed on LAN2.
11. Connect through Talk2M
Open eCatcher and connect to the Cosy+.
The PLC is located on a different subnet behind the Defender.
The remote engineering computer must have a route toward:
192.168.200.0/24
Where the Ewon VPN configuration supports access to this separate subnet, a route can be added on the Windows engineering PC.
Open Command Prompt as administrator.
Use:
route add 192.168.200.0 mask 255.255.255.0 <Ewon-VPN-IP>
Replace the placeholder with the Ewon VPN address displayed by eCatcher.
Also configure the Talk2M LAN-device access permissions for:
Device: Siemens PLC IP Address: 192.168.200.30 Protocol: TCP Port: 102
The Ewon must forward the traffic from its VPN connection toward the Defender through its WAN interface.
12. Verify remote machine communication
Establish a Talk2M connection using eCatcher.
From the remote engineering computer, test:
ping 192.168.200.30
Then test Siemens S7 communication:
Test-NetConnection 192.168.200.30 -Port 102
Open TIA Portal and connect directly to:
192.168.200.30
Verify the following on the Defender:
- Remote access packets arrive on LAN2.
- Only the allowed PLC protocols are permitted.
- Permitted traffic exits LAN toward 192.168.200.30.
- Replies are returned through the established connection.
- Other communication to the machine network is blocked.
13. Final firewall configuration
The complete LAN2 ruleset consists of the following rules.
Machine access rules — top of list
| Protocol | Source | Destination | Port | Action |
|---|---|---|---|---|
| TCP | 192.168.100.2 | 192.168.200.30 | 102 | Pass |
| ICMP | 192.168.100.2 | 192.168.200.30 | — | Pass |
Internet and Talk2M rules
| Protocol | Source | Destination | Port | Action |
|---|---|---|---|---|
| TCP/UDP | 192.168.100.2 | 8.8.8.8 | 53 | Pass |
| TCP/UDP | 192.168.100.2 | 1.1.1.1 | 53 | Pass |
| TCP | 192.168.100.2 | 3.66.21.78 | 443 | Pass |
| TCP | 192.168.100.2 | 92.52.111.215 | 443 | Pass |
| TCP | 192.168.100.2 | 35.157.135.117 | 443 | Pass |
| TCP | 192.168.100.2 | 92.52.111.213 | 443 | Pass |
| UDP | 192.168.100.2 | Any | 123 | Pass |
| UDP | 192.168.100.2 | Any | 1194 | Pass |
| TCP | 192.168.100.2 | Any | 80 | Pass |
| ICMP | 192.168.100.2 | Any | — | Pass |
The last two rules may be disabled or further restricted after commissioning, provided the Cosy+ continues to operate correctly.
© HMS Networks AB 2026