Skip to content
Skillpedia
Deploy & cloud (DevOps)35k · #5893

implementing-ics-firewall-with-tofino

Implements Tofino industrial firewalls to protect SCADA systems. Uses deep packet inspection of OT protocols to control access between ICS zones.

What it does

This feature configures an industrial firewall called Tofino to protect control systems (like those in factories) and equipment like PLCs. It inspects network traffic to ensure only authorized communications occur, especially for industrial protocols.

When to use it

  • ✓When deploying firewall protection near PLCs or RTUs.
  • ✓When needing to inspect the content of industrial protocol packets.
  • ✓When creating security boundaries between different parts of an industrial network.

Example of what to ask your AI

“Configure the Tofino firewall to protect the PLCs in the reactor control area, allowing only engineering and operational communication from the engineering workstation and HMI server.”

Want more? Open the sections below.

How to use

The easiest way: copy the message below and paste it into Claude, ChatGPT, Cursor or any AI. It reads the skill and follows the instructions.

Skill link

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/implementing-ics-firewall-with-tofino/SKILL.md

Ready-to-paste message

Use this skill to help me: https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/implementing-ics-firewall-with-tofino/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
How it works

The Tofino firewall is set up with specific rules that understand industrial protocols. It analyzes the data passing through and blocks anything that doesn't match the defined rules, ensuring security.

Installation

Easiest way: copy the skill link and paste it into Claude, ChatGPT or Cursor asking it to follow the instructions.

In the terminal (Claude Code, Codex, Cursor), in your project folder:

npx skills add mukul975/Anthropic-Cybersecurity-Skills --skill implementing-ics-firewall-with-tofino

Or download just the file:

curl -L https://raw.githubusercontent.com/mukul975/Anthropic-Cybersecurity-Skills/main/skills/implementing-ics-firewall-with-tofino/SKILL.md -o SKILL.md
Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

Implementing ICS Firewall with Tofino

When to Use

  • When deploying zone-level firewall protection directly in front of critical PLCs or RTUs
  • When requiring deep packet inspection of industrial protocols (Modbus, EtherNet/IP, OPC, S7comm)
  • When implementing IEC 62443 zone and conduit boundaries with protocol-aware enforcement
  • When protecting legacy PLCs that cannot be patched and need compensating controls
  • When segmenting control network zones without disrupting existing industrial communications

Do not use for enterprise IT firewall deployment, for perimeter firewall between IT and OT (use Palo Alto/Fortinet at the DMZ), or for environments using only IP-based protocols without OT-specific DPI needs.

Prerequisites

  • Tofino Xenon appliance or Tofino virtual appliance with appropriate license
  • Tofino Central Management Platform (CMP) for centralized policy management
  • Network topology map showing PLC/RTU placement and communication requirements
  • Baseline of OT protocol communications (Modbus function codes, EtherNet/IP CIP services)
  • Change management approval for inline deployment between network zones

Workflow

Step 1: Design Tofino Deployment Architecture

# Tofino ICS Firewall Deployment Architecture
# Zone-level protection using deep packet inspection

deployment_zones:
  zone_1_reactor_control:
    tofino_appliance: "TOFINO-XN-001"
    deployment_mode: "inline_bridge"
    protected_assets:
      - name: "PLC-REACTOR-01"
        ip: "10.10.1.10"
        vendor: "Siemens S7-1500"
        protocols: ["S7comm/102", "Profinet"]
      - name: "PLC-REACTOR-02"
        ip: "10.10.1.11"
        vendor: "Siemens S7-1500"
        protocols: ["S7comm/102", "Profinet"]
    authorized_communications:
      - source: "10.10.2.50"  # Engineering workstation
        dest: "10.10.1.0/24"
        protocols: ["S7comm"]
        access_type: "engineering"
      - source: "10.10.2.10"  # HMI server
        dest: "10.10.1.0/24"
        protocols: ["S7comm"]
        access_type: "operational"

  zone_2_packaging:
    tofino_appliance: "TOFINO-XN-002"
    deployment_mode: "inline_bridge"
    protected_assets:
      - name: "PLC-PACK-01"
        ip: "10.10.3.10"
        vendor: "Rockwell ControlLogix"
        protocols: ["EtherNet-IP/44818", "CIP"]
    authorized_communications:
      - source: "10.10.2.20"  # HMI
        dest: "10.10.3.0/24"
        protocols: ["EtherNet-IP"]
        access_type: "operational"

  zone_3_utilities:
    tofino_appliance: "TOFINO-XN-003"
    deployment_mode: "inline_bridge"
    protected_assets:
      - name: "RTU-BOILER-01"
        ip: "10.10.4.10"
        vendor: "Schneider M340"
        protocols: ["Modbus-TCP/502"]
    authorized_communications:
      - source: "10.10.2.30"  # SCADA server
        dest: "10.10.4.0/24"
        protocols: ["Modbus-TCP"]
        allowed_function_codes: [1, 2, 3, 4]  # Read only from SCADA

Step 2: Configure Deep Packet Inspection Rules

#!/usr/bin/env python3
"""Tofino ICS Firewall Rule Generator.

Generates Tofino firewall rules with deep packet inspection for
industrial protocols based on communication baseline analysis.
"""

import json
import sys
from datetime import datetime
from typing import Dict, List


class TofinoRuleGenerator:
    """Generates Tofino ICS firewall DPI rules."""

    def __init__(self):
        self.rules = []
        self.rule_id = 1000

    def add_modbus_rule(self, src: str, dst: str, allowed_funcs: List[int],
                        allowed_registers: List[dict] = None, description: str = ""):
        """Generate Modbus DPI rule."""
        func_names = {
            1: "read_coils", 2: "read_discrete_inputs",
            3: "read_holding_registers", 4: "read_input_registers",
            5: "write_single_coil", 6: "write_single_register",
            15: "write_multiple_coils", 16: "write_multiple_registers",
        }

        rule = {
            "rule_id": self.rule_id,
            "protocol": "Modbus-TCP",
            "action": "ALLOW",
            "source": src,
            "destination": dst,
            "port": 502,
            "dpi_policy": {
                "allowed_function_codes": [
                    {"code": fc, "name": func_names.get(fc, f"FC{fc}")}
                    for fc in allowed_funcs
                ],
                "blocked_function_codes": [
                    fc for fc in range(1, 128) if fc not in allowed_funcs
                ],
            },

…
FAQ

What are PLCs and RTUs?

PLCs (Programmable Logic Controllers) and RTUs (Remote Terminal Units) are devices used to control and monitor industrial processes.

What is deep packet inspection (DPI)?

It's a technique that allows the firewall to examine the content of data packets, not just the source and destination addresses, to understand and control specific protocols.

Can I use this to protect my office network?

No, this firewall is specifically designed for industrial networks and specific protocols. For office networks, other types of firewalls are more suitable.

Details

Original description by the author

Deploys and configures Tofino industrial firewalls (Belden/Hirschmann) to protect SCADA systems and PLCs, using deep packet inspection of OT protocols (Modbus, EtherNet/IP, OPC, S7comm) to enforce access control between ICS zones. Use when deploying zone-level firewall protection in front of PLCs/RTUs, enforcing IEC 62443 zone/conduit boundaries, or adding compensating controls for unpatchable leg

repo: mukul975/Anthropic-Cybersecurity-Skills

Popularity

GitHub stars
35k
Ranking position
#5893
License
Apache-2.0
Updated
8/31/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills