Illustrated title card for the guide: Transparent Layer 2 Stealth Firewall for PLC and OT Cabinets
STP Setup

Transparent Layer 2 Stealth Firewall for PLC and OT Cabinets

Set up an mGuard firewall in a legacy PLC cabinet while keeping existing IP settings. Configure Modbus TCP rules and filter Ethernet traffic.

By DIN Rail Router Guide Editorial 4 min read

Put a transparent Layer 2 firewall inline between the plant switch and the legacy PLC cabinet. The PLCs keep their existing IP addresses and gateways while the firewall filters traffic that crosses the cabinet uplink. Phoenix Contact calls this Stealth mode. The setup below uses the FL MGUARD 4305. Cisco transparent firewall mode · mGuard Network menu

For a PLC and a human-machine interface (HMI) behind a cabinet switch, use this layout. On the FL MGUARD 4305, XF1 is the WAN port and XF2 is a LAN port. mGuard Network menu

Plant switch ── XF1 (WAN) [mGuard] XF2 (LAN) ── Cabinet switch ── PLC and HMI

Set Stealth mode and management access

Start in the mGuard web interface. Before changing settings, open Management > Configuration Profiles. Enter a name under Save current configuration to profile, click Save, and use Download profile to keep a copy. mGuard Management menu

In Network > Interfaces > General, set Network mode to Stealth and choose a Stealth configuration below. mGuard Network menu

Stealth configurationWhen to use it
Multiple clientsThe LAN side contains a cabinet switch serving multiple devices.
AutodetectOne protected device initiates traffic through the firewall. The mGuard learns the device’s IP and MAC addresses from outgoing traffic. The client needs a default gateway configured.
StaticOne protected device only responds to requests. Enter its IP address in Client’s IP address. Enter its MAC address or use 0:0:0:0:0:0 to have the mGuard learn it via ARP.

With Multiple clients, remote administration requires a management IP. In Network > Interfaces > Stealth, set IP address and Netmask under Stealth Management for the approved management path. Use the Save icon to apply the settings, then confirm web access at the management address before cutover. mGuard Network menu · mGuard Configuration help

Allow the required Modbus TCP connection

In this IPv4 example, a plant-side HMI is the only device that needs to initiate a connection across the uplink, and the cabinet PLC listens for Modbus TCP on port 502. Use your approved endpoint addresses and the PLC’s configured port. mGuard Network Security menu

Open Network Security > Packet Filter > Incoming Rules and select Use the firewall ruleset below. Use Insert Row to enter the rules in this order. Select External as the interface if the field is shown. The first matching rule takes effect. mGuard Network Security menu · mGuard Configuration help

OrderProtocolFrom IPFrom portTo IPTo portActionLog
FirstTCPPlant HMI IPanyCabinet PLC IP502AcceptOn
LastAll0.0.0.0/00.0.0.0/0DropOn

Open Outgoing Rules as well. The default allows outgoing connections. For this example, select Drop all connections because no required connection starts on the cabinet side. The stateful packet filter allows replies on the incoming connection. Click Save. For function-code filtering, see the rule records under Network Security > Deep Packet Inspection > Modbus TCP. mGuard Network Security menu · mGuard Configuration help

Check Ethernet traffic separately

With an empty MAC Filtering table, the MAC filter allows ARP and IP to reach the next stage of processing. For rules that match Ethernet frames, open Network Security > Packet Filter > MAC Filtering. The filter is stateless, takes priority over IP packet rules, and has no logging. mGuard Network Security menu

TableFrames matchedFields to fill for a required Ethernet flow
IncomingFrames arriving at WANUse the plant-side sender in Source MAC, the actual receiver in Destination MAC, and the frame’s Ethernet protocol. Set Action to Accept.
OutgoingFrames arriving at LANEnter the source, destination and Ethernet protocol for the required return frames. Set Action to Accept.

Before applying MAC rules, account for ARP and any other required Ethernet frames in both directions. For a broadcast ARP request, the Destination MAC is ff:ff:ff:ff:ff:ff. The manual lists ARP and IPv4 as accepted protocol labels. Verify required frames in both directions after saving. mGuard Network Security menu · mGuard Configuration help

Verify the cutover and prepare rollback

  • Start a fresh session from the approved HMI and confirm its normal PLC readings update. When Abort existing connections upon firewall reconfiguration is disabled, existing connections can survive rule changes. mGuard Network Security menu
  • From an approved test endpoint on the plant side, try the same connection with the source outside the allow rule. Confirm the drop under Logging > Browse Local Logs, with Network Security selected. mGuard Network Security menu · mGuard Logging menu
  • Check the required Ethernet flows in both directions and confirm the management path still works. mGuard Network menu · mGuard Network Security menu

To undo a rules change on an already installed mGuard, choose Restore profile beside the known-good profile. The profile takes effect immediately. mGuard Management menu

Evidence and limits. The procedure is based on Phoenix Contact’s mGuard firmware 10.6 reference manual and Cisco’s transparent firewall documentation. Documentation was checked on November 27, 2026. The setup was not run on hardware.

Sources

  1. Phoenix Contact mGuard 10.6 Network menu
  2. Phoenix Contact mGuard 10.6 Network Security menu
  3. Phoenix Contact mGuard 10.6 Management menu
  4. Phoenix Contact mGuard 10.6 Logging menu
  5. Cisco transparent firewall mode
  6. Phoenix Contact mGuard 10.6 Configuration help

Related guides