[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6EV7MXQMATDVJ5C9XCADEC7":3,"skill-same:01M6EV7MXQMATDVJ5C9XCADEC7":104},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":23,"publishedAt":44,"linkOnly":45,"markdownContent":46,"markdownBody":47,"frontMatter":48,"refName":65,"commitSha":66,"skillDirectory":67,"forksCount":14,"repositoryHtmlUrl":68,"repositoryHomepageUrl":69,"ownerHtmlUrl":70,"ownerBlogUrl":6,"ownerDescription":71,"updatedAt":72,"install":73,"resources":86},"01M6EV7MXQMATDVJ5C9XCADEC7","implementing-ics-firewall-with-tofino",null,"Deploy and configure Tofino industrial firewalls from Belden\u002FHirschmann to protect SCADA systems and PLCs using deep packet inspection for OT protocols including Modbus, EtherNet\u002FIP, OPC, and S7comm, enforcing granular access control between ICS security zones.","henriquescastilho\u002Fmy-claude","henriquescastilho","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F153296945?v=4","01M6ESH7EXPXTH9CVQ4K16SRG8","Henrique Scheer","01M6ESH7JHEK2PTNNH4HEH787Z",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fhenriquescastilho\u002Fmy-claude\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fimplementing-ics-firewall-with-tofino\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43],"with","firewall","ics","tofino","implementing ics firewall with tofino","belden","ip","Access Control","deep","cm","configure","access","deep-packet-inspection","cybersecurity","t1059","scada","ot-security","network-security","protocols","pr","2026-11-10 10:12:30",false,"---\nname: implementing-ics-firewall-with-tofino\ndescription: 'Deploy and configure Tofino industrial firewalls from Belden\u002FHirschmann\n  to protect SCADA systems and PLCs using deep packet inspection for OT protocols\n  including Modbus, EtherNet\u002FIP, OPC, and S7comm, enforcing granular access control\n  between ICS security zones.\n\n  '\ndomain: cybersecurity\nsubdomain: ot-ics-security\ntags:\n- ot-security\n- ics\n- firewall\n- tofino\n- belden\n- deep-packet-inspection\n- network-security\n- scada\nversion: '1.0'\nauthor: mahipal\nlicense: Apache-2.0\nnist_csf:\n- PR.IR-01\n- DE.CM-01\n- ID.AM-05\n- GV.OC-02\nmitre_attack:\n- T1078\n- T1190\n- T1059\n- T0816\n- T0836\n---\n\n# Implementing ICS Firewall with Tofino\n\n## When to Use\n\n- When deploying zone-level firewall protection directly in front of critical PLCs or RTUs\n- When requiring deep packet inspection of industrial protocols (Modbus, EtherNet\u002FIP, OPC, S7comm)\n- When implementing IEC 62443 zone and conduit boundaries with protocol-aware enforcement\n- When protecting legacy PLCs that cannot be patched and need compensating controls\n- When segmenting control network zones without disrupting existing industrial communications\n\n**Do not use** for enterprise IT firewall deployment, for perimeter firewall between IT and OT (use Palo Alto\u002FFortinet at the DMZ), or for environments using only IP-based protocols without OT-specific DPI needs.\n\n## Prerequisites\n\n- Tofino Xenon appliance or Tofino virtual appliance with appropriate license\n- Tofino Central Management Platform (CMP) for centralized policy management\n- Network topology map showing PLC\u002FRTU placement and communication requirements\n- Baseline of OT protocol communications (Modbus function codes, EtherNet\u002FIP CIP services)\n- Change management approval for inline deployment between network zones\n\n## Workflow\n\n### Step 1: Design Tofino Deployment Architecture\n\n```yaml\n# Tofino ICS Firewall Deployment Architecture\n# Zone-level protection using deep packet inspection\n\ndeployment_zones:\n  zone_1_reactor_control:\n    tofino_appliance: \"TOFINO-XN-001\"\n    deployment_mode: \"inline_bridge\"\n    protected_assets:\n      - name: \"PLC-REACTOR-01\"\n        ip: \"10.10.1.10\"\n        vendor: \"Siemens S7-1500\"\n        protocols: [\"S7comm\u002F102\", \"Profinet\"]\n      - name: \"PLC-REACTOR-02\"\n        ip: \"10.10.1.11\"\n        vendor: \"Siemens S7-1500\"\n        protocols: [\"S7comm\u002F102\", \"Profinet\"]\n    authorized_communications:\n      - source: \"10.10.2.50\"  # Engineering workstation\n        dest: \"10.10.1.0\u002F24\"\n        protocols: [\"S7comm\"]\n        access_type: \"engineering\"\n      - source: \"10.10.2.10\"  # HMI server\n        dest: \"10.10.1.0\u002F24\"\n        protocols: [\"S7comm\"]\n        access_type: \"operational\"\n\n  zone_2_packaging:\n    tofino_appliance: \"TOFINO-XN-002\"\n    deployment_mode: \"inline_bridge\"\n    protected_assets:\n      - name: \"PLC-PACK-01\"\n        ip: \"10.10.3.10\"\n        vendor: \"Rockwell ControlLogix\"\n        protocols: [\"EtherNet-IP\u002F44818\", \"CIP\"]\n    authorized_communications:\n      - source: \"10.10.2.20\"  # HMI\n        dest: \"10.10.3.0\u002F24\"\n        protocols: [\"EtherNet-IP\"]\n        access_type: \"operational\"\n\n  zone_3_utilities:\n    tofino_appliance: \"TOFINO-XN-003\"\n    deployment_mode: \"inline_bridge\"\n    protected_assets:\n      - name: \"RTU-BOILER-01\"\n        ip: \"10.10.4.10\"\n        vendor: \"Schneider M340\"\n        protocols: [\"Modbus-TCP\u002F502\"]\n    authorized_communications:\n      - source: \"10.10.2.30\"  # SCADA server\n        dest: \"10.10.4.0\u002F24\"\n        protocols: [\"Modbus-TCP\"]\n        allowed_function_codes: [1, 2, 3, 4]  # Read only from SCADA\n```\n\n### Step 2: Configure Deep Packet Inspection Rules\n\n```python\n#!\u002Fusr\u002Fbin\u002Fenv python3\n\"\"\"Tofino ICS Firewall Rule Generator.\n\nGenerates Tofino firewall rules with deep packet inspection for\nindustrial protocols based on communication baseline analysis.\n\"\"\"\n\nimport json\nimport sys\nfrom datetime import datetime\nfrom typing import Dict, List\n\n\nclass TofinoRuleGenerator:\n    \"\"\"Generates Tofino ICS firewall DPI rules.\"\"\"\n\n    def __init__(self):\n        self.rules = []\n        self.rule_id = 1000\n\n    def add_modbus_rule(self, src: str, dst: str, allowed_funcs: List[int],\n                        allowed_registers: List[dict] = None, description: str = \"\"):\n        \"\"\"Generate Modbus DPI rule.\"\"\"\n        func_names = {\n            1: \"read_coils\", 2: \"read_discrete_inputs\",\n            3: \"read_holding_registers\", 4: \"read_input_registers\",\n            5: \"write_single_coil\", 6: \"write_single_register\",\n            15: \"write_multiple_coils\", 16: \"write_multiple_registers\",\n        }\n\n        rule = {\n            \"rule_id\": self.rule_id,\n            \"protocol\": \"Modbus-TCP\",\n            \"action\": \"ALLOW\",\n            \"source\": src,\n            \"destination\": dst,\n            \"port\": 502,\n            \"dpi_policy\": {\n                \"allowed_function_codes\": [\n                    {\"code\": fc, \"name\": func_names.get(fc, f\"FC{fc}\")}\n                    for fc in allowed_funcs\n                ],\n                \"blocked_function_codes\": [\n                    fc for fc in range(1, 128) if fc not in allowed_funcs\n                ],\n            },\n            \"description\": description,\n            \"log\": True,\n        }\n\n        if allowed_registers:\n            rule[\"dpi_policy\"][\"allowed_register_ranges\"] = allowed_registers\n\n        self.rules.append(rule)\n        self.rule_id += 1\n        return rule\n\n    def add_s7comm_rule(self, src: str, dst: str, allowed_operations: List[str],\n                        description: str = \"\"):\n        \"\"\"Generate S7comm DPI rule.\"\"\"\n        operation_map = {\n            \"read\": {\"function\": 0x04, \"name\": \"Read Variable\"},\n            \"write\": {\"function\": 0x05, \"name\": \"Write Variable\"},\n            \"setup\": {\"function\": 0xF0, \"name\": \"Setup Communication\"},\n            \"download\": {\"function\": 0x1A, \"name\": \"Request Download\"},\n            \"upload\": {\"function\": 0x1D, \"name\": \"Start Upload\"},\n            \"cpu_stop\": {\"function\": 0x29, \"name\": \"PLC Stop\"},\n            \"cpu_start\": {\"function\": 0x28, \"name\": \"PI Service (Start)\"},\n        }\n\n        rule = {\n            \"rule_id\": self.rule_id,\n            \"protocol\": \"S7comm\",\n            \"action\": \"ALLOW\",\n            \"source\": src,\n            \"destination\": dst,\n            \"port\": 102,\n            \"dpi_policy\": {\n                \"allowed_operations\": [\n                    operation_map[op] for op in allowed_operations if op in operation_map\n                ],\n                \"block_cpu_stop\": \"cpu_stop\" not in allowed_operations,\n                \"block_program_download\": \"download\" not in allowed_operations,\n            },\n            \"description\": description,\n            \"log\": True,\n        }\n\n        self.rules.append(rule)\n        self.rule_id += 1\n        return rule\n\n    def add_ethernet_ip_rule(self, src: str, dst: str, allowed_services: List[str],\n                              description: str = \"\"):\n        \"\"\"Generate EtherNet\u002FIP CIP DPI rule.\"\"\"\n        rule = {\n            \"rule_id\": self.rule_id,\n            \"protocol\": \"EtherNet-IP\",\n            \"action\": \"ALLOW\",\n            \"source\": src,\n            \"destination\": dst,\n            \"port\": 44818,\n            \"dpi_policy\": {\n                \"allowed_cip_services\": allowed_services,\n                \"block_firmware_flash\": True,\n                \"block_program_download\": \"program_download\" not in allowed_services,\n            },\n            \"description\": description,\n            \"log\": True,\n        }\n\n        self.rules.append(rule)\n        self.rule_id += 1\n        return rule\n\n    def add_default_deny(self):\n        \"\"\"Add default deny rule at the end.\"\"\"\n        self.rules.append({\n            \"rule_id\": 9999,\n            \"protocol\": \"ANY\",\n            \"action\": \"DENY\",\n            \"source\": \"ANY\",\n            \"destination\": \"ANY\",\n            \"port\": \"ANY\",\n            \"description\": \"Default deny - block all unmatched traffic\",\n            \"log\": True,\n        })\n\n    def generate_config(self) -> str:\n        \"\"\"Generate complete Tofino firewall configuration.\"\"\"\n        config = {\n            \"tofino_configuration\": {\n                \"generated\": datetime.now().isoformat(),\n                \"appliance_model\": \"Tofino Xenon\",\n                \"firmware_version\": \"4.2\",\n                \"mode\": \"inline_bridge\",\n                \"failsafe\": \"fail_open\",\n                \"rules\": self.rules,\n            }\n        }\n        return json.dumps(config, indent=2)\n\n    def print_summary(self):\n        \"\"\"Print rule summary.\"\"\"\n        print(f\"\\n{'='*65}\")\n        print(\"TOFINO ICS FIREWALL RULE SUMMARY\")\n        print(f\"{'='*65}\")\n        print(f\"Generated: {datetime.now().isoformat()}\")\n        print(f\"Total Rules: {len(self.rules)}\")\n\n        for rule in self.rules:\n            action_icon = \"+\" if rule[\"action\"] == \"ALLOW\" else \"X\"\n            print(f\"\\n  [{action_icon}] Rule {rule['rule_id']}: {rule.get('description', '')}\")\n            print(f\"      {rule['source']} -> {rule['destination']}:{rule['port']}\")\n            print(f\"      Protocol: {rule['protocol']}\")\n            if \"dpi_policy\" in rule:\n                dpi = rule[\"dpi_policy\"]\n                if \"allowed_function_codes\" in dpi:\n                    funcs = [f[\"name\"] for f in dpi[\"allowed_function_codes\"]]\n                    print(f\"      DPI - Allowed Modbus FCs: {', '.join(funcs)}\")\n                if \"allowed_operations\" in dpi:\n                    ops = [o[\"name\"] for o in dpi[\"allowed_operations\"]]\n                    print(f\"      DPI - Allowed S7 Ops: {', '.join(ops)}\")\n\n\nif __name__ == \"__main__\":\n    gen = TofinoRuleGenerator()\n\n    # SCADA server to Modbus RTUs: read-only\n    gen.add_modbus_rule(\n        src=\"10.10.2.30\",\n        dst=\"10.10.4.0\u002F24\",\n        allowed_funcs=[1, 2, 3, 4],\n        description=\"SCADA to utilities RTUs - read only\",\n    )\n\n    # Engineering workstation to Siemens PLCs: full access\n    gen.add_s7comm_rule(\n        src=\"10.10.2.50\",\n        dst=\"10.10.1.0\u002F24\",\n        allowed_operations=[\"read\", \"write\", \"setup\", \"download\", \"upload\"],\n        description=\"Engineering WS to reactor PLCs - full engineering access\",\n    )\n\n    # HMI to Siemens PLCs: read + write only (no program download)\n    gen.add_s7comm_rule(\n        src=\"10.10.2.10\",\n        dst=\"10.10.1.0\u002F24\",\n        allowed_operations=[\"read\", \"write\", \"setup\"],\n        description=\"HMI to reactor PLCs - operational access only\",\n    )\n\n    # HMI to Rockwell PLCs: operational access\n    gen.add_ethernet_ip_rule(\n        src=\"10.10.2.20\",\n        dst=\"10.10.3.0\u002F24\",\n        allowed_services=[\"read_tag\", \"write_tag\", \"get_attribute\"],\n        description=\"HMI to packaging PLCs - operational access\",\n    )\n\n    gen.add_default_deny()\n    gen.print_summary()\n```\n\n## Key Concepts\n\n| Term | Definition |\n|------|------------|\n| Tofino Xenon | Belden\u002FHirschmann industrial firewall appliance with deep packet inspection for OT protocols |\n| Deep Packet Inspection (DPI) | Examining message payload content beyond headers to enforce fine-grained rules on industrial protocol operations |\n| Inline Bridge Mode | Transparent deployment mode where the firewall sits between network segments without requiring IP changes |\n| Fail-Open | Safety mode where firewall passes all traffic if the appliance fails, maintaining process availability |\n| Loadable Security Module (LSM) | Tofino plugin module providing protocol-specific DPI for Modbus, EtherNet\u002FIP, OPC, or other protocols |\n| Central Management Platform (CMP) | Tofino centralized management server for deploying and managing policies across multiple Tofino appliances |\n\n## Output Format\n\n```\nTOFINO DEPLOYMENT REPORT\n===========================\nDate: YYYY-MM-DD\nAppliances Deployed: [count]\n\nPER-APPLIANCE SUMMARY:\n  [Appliance ID]:\n    Mode: Inline Bridge\n    Failsafe: Fail-Open\n    Protected Assets: [count]\n    Rules: [count]\n    DPI Protocols: [list]\n\nRULE SUMMARY:\n  Allow Rules: [count]\n  Deny Rules: [count]\n  DPI-Enforced Rules: [count]\n\nMONITORING:\n  Blocked Packets (24h): [count]\n  DPI Violations (24h): [count]\n```\n","# Implementing ICS Firewall with Tofino\n\n## When to Use\n\n- When deploying zone-level firewall protection directly in front of critical PLCs or RTUs\n- When requiring deep packet inspection of industrial protocols (Modbus, EtherNet\u002FIP, OPC, S7comm)\n- When implementing IEC 62443 zone and conduit boundaries with protocol-aware enforcement\n- When protecting legacy PLCs that cannot be patched and need compensating controls\n- When segmenting control network zones without disrupting existing industrial communications\n\n**Do not use** for enterprise IT firewall deployment, for perimeter firewall between IT and OT (use Palo Alto\u002FFortinet at the DMZ), or for environments using only IP-based protocols without OT-specific DPI needs.\n\n## Prerequisites\n\n- Tofino Xenon appliance or Tofino virtual appliance with appropriate license\n- Tofino Central Management Platform (CMP) for centralized policy management\n- Network topology map showing PLC\u002FRTU placement and communication requirements\n- Baseline of OT protocol communications (Modbus function codes, EtherNet\u002FIP CIP services)\n- Change management approval for inline deployment between network zones\n\n## Workflow\n\n### Step 1: Design Tofino Deployment Architecture\n\n```yaml\n# Tofino ICS Firewall Deployment Architecture\n# Zone-level protection using deep packet inspection\n\ndeployment_zones:\n  zone_1_reactor_control:\n    tofino_appliance: \"TOFINO-XN-001\"\n    deployment_mode: \"inline_bridge\"\n    protected_assets:\n      - name: \"PLC-REACTOR-01\"\n        ip: \"10.10.1.10\"\n        vendor: \"Siemens S7-1500\"\n        protocols: [\"S7comm\u002F102\", \"Profinet\"]\n      - name: \"PLC-REACTOR-02\"\n        ip: \"10.10.1.11\"\n        vendor: \"Siemens S7-1500\"\n        protocols: [\"S7comm\u002F102\", \"Profinet\"]\n    authorized_communications:\n      - source: \"10.10.2.50\"  # Engineering workstation\n        dest: \"10.10.1.0\u002F24\"\n        protocols: [\"S7comm\"]\n        access_type: \"engineering\"\n      - source: \"10.10.2.10\"  # HMI server\n        dest: \"10.10.1.0\u002F24\"\n        protocols: [\"S7comm\"]\n        access_type: \"operational\"\n\n  zone_2_packaging:\n    tofino_appliance: \"TOFINO-XN-002\"\n    deployment_mode: \"inline_bridge\"\n    protected_assets:\n      - name: \"PLC-PACK-01\"\n        ip: \"10.10.3.10\"\n        vendor: \"Rockwell ControlLogix\"\n        protocols: [\"EtherNet-IP\u002F44818\", \"CIP\"]\n    authorized_communications:\n      - source: \"10.10.2.20\"  # HMI\n        dest: \"10.10.3.0\u002F24\"\n        protocols: [\"EtherNet-IP\"]\n        access_type: \"operational\"\n\n  zone_3_utilities:\n    tofino_appliance: \"TOFINO-XN-003\"\n    deployment_mode: \"inline_bridge\"\n    protected_assets:\n      - name: \"RTU-BOILER-01\"\n        ip: \"10.10.4.10\"\n        vendor: \"Schneider M340\"\n        protocols: [\"Modbus-TCP\u002F502\"]\n    authorized_communications:\n      - source: \"10.10.2.30\"  # SCADA server\n        dest: \"10.10.4.0\u002F24\"\n        protocols: [\"Modbus-TCP\"]\n        allowed_function_codes: [1, 2, 3, 4]  # Read only from SCADA\n```\n\n### Step 2: Configure Deep Packet Inspection Rules\n\n```python\n#!\u002Fusr\u002Fbin\u002Fenv python3\n\"\"\"Tofino ICS Firewall Rule Generator.\n\nGenerates Tofino firewall rules with deep packet inspection for\nindustrial protocols based on communication baseline analysis.\n\"\"\"\n\nimport json\nimport sys\nfrom datetime import datetime\nfrom typing import Dict, List\n\n\nclass TofinoRuleGenerator:\n    \"\"\"Generates Tofino ICS firewall DPI rules.\"\"\"\n\n    def __init__(self):\n        self.rules = []\n        self.rule_id = 1000\n\n    def add_modbus_rule(self, src: str, dst: str, allowed_funcs: List[int],\n                        allowed_registers: List[dict] = None, description: str = \"\"):\n        \"\"\"Generate Modbus DPI rule.\"\"\"\n        func_names = {\n            1: \"read_coils\", 2: \"read_discrete_inputs\",\n            3: \"read_holding_registers\", 4: \"read_input_registers\",\n            5: \"write_single_coil\", 6: \"write_single_register\",\n            15: \"write_multiple_coils\", 16: \"write_multiple_registers\",\n        }\n\n        rule = {\n            \"rule_id\": self.rule_id,\n            \"protocol\": \"Modbus-TCP\",\n            \"action\": \"ALLOW\",\n            \"source\": src,\n            \"destination\": dst,\n            \"port\": 502,\n            \"dpi_policy\": {\n                \"allowed_function_codes\": [\n                    {\"code\": fc, \"name\": func_names.get(fc, f\"FC{fc}\")}\n                    for fc in allowed_funcs\n                ],\n                \"blocked_function_codes\": [\n                    fc for fc in range(1, 128) if fc not in allowed_funcs\n                ],\n            },\n            \"description\": description,\n            \"log\": True,\n        }\n\n        if allowed_registers:\n            rule[\"dpi_policy\"][\"allowed_register_ranges\"] = allowed_registers\n\n        self.rules.append(rule)\n        self.rule_id += 1\n        return rule\n\n    def add_s7comm_rule(self, src: str, dst: str, allowed_operations: List[str],\n                        description: str = \"\"):\n        \"\"\"Generate S7comm DPI rule.\"\"\"\n        operation_map = {\n            \"read\": {\"function\": 0x04, \"name\": \"Read Variable\"},\n            \"write\": {\"function\": 0x05, \"name\": \"Write Variable\"},\n            \"setup\": {\"function\": 0xF0, \"name\": \"Setup Communication\"},\n            \"download\": {\"function\": 0x1A, \"name\": \"Request Download\"},\n            \"upload\": {\"function\": 0x1D, \"name\": \"Start Upload\"},\n            \"cpu_stop\": {\"function\": 0x29, \"name\": \"PLC Stop\"},\n            \"cpu_start\": {\"function\": 0x28, \"name\": \"PI Service (Start)\"},\n        }\n\n        rule = {\n            \"rule_id\": self.rule_id,\n            \"protocol\": \"S7comm\",\n            \"action\": \"ALLOW\",\n            \"source\": src,\n            \"destination\": dst,\n            \"port\": 102,\n            \"dpi_policy\": {\n                \"allowed_operations\": [\n                    operation_map[op] for op in allowed_operations if op in operation_map\n                ],\n                \"block_cpu_stop\": \"cpu_stop\" not in allowed_operations,\n                \"block_program_download\": \"download\" not in allowed_operations,\n            },\n            \"description\": description,\n            \"log\": True,\n        }\n\n        self.rules.append(rule)\n        self.rule_id += 1\n        return rule\n\n    def add_ethernet_ip_rule(self, src: str, dst: str, allowed_services: List[str],\n                              description: str = \"\"):\n        \"\"\"Generate EtherNet\u002FIP CIP DPI rule.\"\"\"\n        rule = {\n            \"rule_id\": self.rule_id,\n            \"protocol\": \"EtherNet-IP\",\n            \"action\": \"ALLOW\",\n            \"source\": src,\n            \"destination\": dst,\n            \"port\": 44818,\n            \"dpi_policy\": {\n                \"allowed_cip_services\": allowed_services,\n                \"block_firmware_flash\": True,\n                \"block_program_download\": \"program_download\" not in allowed_services,\n            },\n            \"description\": description,\n            \"log\": True,\n        }\n\n        self.rules.append(rule)\n        self.rule_id += 1\n        return rule\n\n    def add_default_deny(self):\n        \"\"\"Add default deny rule at the end.\"\"\"\n        self.rules.append({\n            \"rule_id\": 9999,\n            \"protocol\": \"ANY\",\n            \"action\": \"DENY\",\n            \"source\": \"ANY\",\n            \"destination\": \"ANY\",\n            \"port\": \"ANY\",\n            \"description\": \"Default deny - block all unmatched traffic\",\n            \"log\": True,\n        })\n\n    def generate_config(self) -> str:\n        \"\"\"Generate complete Tofino firewall configuration.\"\"\"\n        config = {\n            \"tofino_configuration\": {\n                \"generated\": datetime.now().isoformat(),\n                \"appliance_model\": \"Tofino Xenon\",\n                \"firmware_version\": \"4.2\",\n                \"mode\": \"inline_bridge\",\n                \"failsafe\": \"fail_open\",\n                \"rules\": self.rules,\n            }\n        }\n        return json.dumps(config, indent=2)\n\n    def print_summary(self):\n        \"\"\"Print rule summary.\"\"\"\n        print(f\"\\n{'='*65}\")\n        print(\"TOFINO ICS FIREWALL RULE SUMMARY\")\n        print(f\"{'='*65}\")\n        print(f\"Generated: {datetime.now().isoformat()}\")\n        print(f\"Total Rules: {len(self.rules)}\")\n\n        for rule in self.rules:\n            action_icon = \"+\" if rule[\"action\"] == \"ALLOW\" else \"X\"\n            print(f\"\\n  [{action_icon}] Rule {rule['rule_id']}: {rule.get('description', '')}\")\n            print(f\"      {rule['source']} -> {rule['destination']}:{rule['port']}\")\n            print(f\"      Protocol: {rule['protocol']}\")\n            if \"dpi_policy\" in rule:\n                dpi = rule[\"dpi_policy\"]\n                if \"allowed_function_codes\" in dpi:\n                    funcs = [f[\"name\"] for f in dpi[\"allowed_function_codes\"]]\n                    print(f\"      DPI - Allowed Modbus FCs: {', '.join(funcs)}\")\n                if \"allowed_operations\" in dpi:\n                    ops = [o[\"name\"] for o in dpi[\"allowed_operations\"]]\n                    print(f\"      DPI - Allowed S7 Ops: {', '.join(ops)}\")\n\n\nif __name__ == \"__main__\":\n    gen = TofinoRuleGenerator()\n\n    # SCADA server to Modbus RTUs: read-only\n    gen.add_modbus_rule(\n        src=\"10.10.2.30\",\n        dst=\"10.10.4.0\u002F24\",\n        allowed_funcs=[1, 2, 3, 4],\n        description=\"SCADA to utilities RTUs - read only\",\n    )\n\n    # Engineering workstation to Siemens PLCs: full access\n    gen.add_s7comm_rule(\n        src=\"10.10.2.50\",\n        dst=\"10.10.1.0\u002F24\",\n        allowed_operations=[\"read\", \"write\", \"setup\", \"download\", \"upload\"],\n        description=\"Engineering WS to reactor PLCs - full engineering access\",\n    )\n\n    # HMI to Siemens PLCs: read + write only (no program download)\n    gen.add_s7comm_rule(\n        src=\"10.10.2.10\",\n        dst=\"10.10.1.0\u002F24\",\n        allowed_operations=[\"read\", \"write\", \"setup\"],\n        description=\"HMI to reactor PLCs - operational access only\",\n    )\n\n    # HMI to Rockwell PLCs: operational access\n    gen.add_ethernet_ip_rule(\n        src=\"10.10.2.20\",\n        dst=\"10.10.3.0\u002F24\",\n        allowed_services=[\"read_tag\", \"write_tag\", \"get_attribute\"],\n        description=\"HMI to packaging PLCs - operational access\",\n    )\n\n    gen.add_default_deny()\n    gen.print_summary()\n```\n\n## Key Concepts\n\n| Term | Definition |\n|------|------------|\n| Tofino Xenon | Belden\u002FHirschmann industrial firewall appliance with deep packet inspection for OT protocols |\n| Deep Packet Inspection (DPI) | Examining message payload content beyond headers to enforce fine-grained rules on industrial protocol operations |\n| Inline Bridge Mode | Transparent deployment mode where the firewall sits between network segments without requiring IP changes |\n| Fail-Open | Safety mode where firewall passes all traffic if the appliance fails, maintaining process availability |\n| Loadable Security Module (LSM) | Tofino plugin module providing protocol-specific DPI for Modbus, EtherNet\u002FIP, OPC, or other protocols |\n| Central Management Platform (CMP) | Tofino centralized management server for deploying and managing policies across multiple Tofino appliances |\n\n## Output Format\n\n```\nTOFINO DEPLOYMENT REPORT\n===========================\nDate: YYYY-MM-DD\nAppliances Deployed: [count]\n\nPER-APPLIANCE SUMMARY:\n  [Appliance ID]:\n    Mode: Inline Bridge\n    Failsafe: Fail-Open\n    Protected Assets: [count]\n    Rules: [count]\n    DPI Protocols: [list]\n\nRULE SUMMARY:\n  Allow Rules: [count]\n  Deny Rules: [count]\n  DPI-Enforced Rules: [count]\n\nMONITORING:\n  Blocked Packets (24h): [count]\n  DPI Violations (24h): [count]\n```\n",{"name":5,"tags":49,"author":50,"domain":37,"license":15,"version":51,"nist_csf":52,"subdomain":57,"description":58,"mitre_attack":59},[40,26,25,27,29,36,41,39],"mahipal","1.0",[53,54,55,56],"PR.IR-01","DE.CM-01","ID.AM-05","GV.OC-02","ot-ics-security","Deploy and configure Tofino industrial firewalls from Belden\u002FHirschmann to protect SCADA systems and PLCs using deep packet inspection for OT protocols including Modbus, EtherNet\u002FIP, OPC, and S7comm, enforcing granular access control between ICS security zones.\n",[60,61,62,63,64],"T1078","T1190","T1059","T0816","T0836","main","7925716f065257435fdb12e97f7e52842147d5ad",".claude\u002Fskills\u002Fimplementing-ics-firewall-with-tofino","https:\u002F\u002Fgithub.com\u002Fhenriquescastilho\u002Fmy-claude","https:\u002F\u002Fclaude.com\u002Fclaude-code","https:\u002F\u002Fgithub.com\u002Fhenriquescastilho","Software · Applied AI · Quantitative Modeling · Building with Claude.","2026-06-10 12:24:46",{"source":8,"skillName":5,"commands":74,"prompt":84,"zipAvailable":85},[75,78,81],{"tool":76,"command":77},"npx","npx skills add henriquescastilho\u002Fmy-claude --skill implementing-ics-firewall-with-tofino",{"tool":79,"command":80},"bunx","bunx skills add henriquescastilho\u002Fmy-claude --skill implementing-ics-firewall-with-tofino",{"tool":82,"command":83},"pnpm","pnpm dlx skills add henriquescastilho\u002Fmy-claude --skill implementing-ics-firewall-with-tofino","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fhenriquescastilho\u002Fmy-claude\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fimplementing-ics-firewall-with-tofino\u002FSKILL.md",true,[87,92,98],{"path":88,"resourceType":88,"resourceTypeDesc":89,"sizeBytes":90,"sourceHtmlUrl":91},"LICENSE","许可证",11255,"https:\u002F\u002Fgithub.com\u002Fhenriquescastilho\u002Fmy-claude\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fimplementing-ics-firewall-with-tofino\u002FLICENSE",{"path":93,"resourceType":94,"resourceTypeDesc":95,"sizeBytes":96,"sourceHtmlUrl":97},"references\u002Fapi-reference.md","REFERENCE","参考文档",1565,"https:\u002F\u002Fgithub.com\u002Fhenriquescastilho\u002Fmy-claude\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fimplementing-ics-firewall-with-tofino\u002Freferences\u002Fapi-reference.md",{"path":99,"resourceType":100,"resourceTypeDesc":101,"sizeBytes":102,"sourceHtmlUrl":103},"scripts\u002Fagent.py","SCRIPT","脚本",8206,"https:\u002F\u002Fgithub.com\u002Fhenriquescastilho\u002Fmy-claude\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fimplementing-ics-firewall-with-tofino\u002Fscripts\u002Fagent.py",[105,145,154,163,185,211],{"skillNo":106,"name":107,"nameZh":6,"description":108,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":109,"licenseFileUrl":6,"sourceHtmlUrl":110,"categories":111,"keywords":126,"publishedAt":44},"01M6F0B6XPQ65AX2X0DWK8KT3E","markitdown","Convert files and office documents to Markdown. Supports PDF, DOCX, PPTX, XLSX, images (with OCR), audio (with transcription), HTML, CSV, JSON, XML, ZIP, YouTube URLs, EPubs and more.","MIT","https:\u002F\u002Fgithub.com\u002Fhenriquescastilho\u002Fmy-claude\u002Fblob\u002Fmain\u002F.codex\u002Fvendor_imports\u002Fclaude\u002Fmarketplaces\u002Fclaude-scientific-writer\u002Fskills\u002Fmarkitdown\u002FSKILL.md",[112,115,118,121],{"categoryNo":113,"categoryName":114,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000002","文档处理",{"categoryNo":116,"categoryName":117,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000003","演示文稿",{"categoryNo":119,"categoryName":120,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000004","电子表格",{"categoryNo":122,"categoryName":123,"taxonomyType":124,"taxonomyTypeDesc":125},"01JBSEEDCAT000000000000034","行政与办公人员","PROFESSION","适用职业",[107,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,24],"docx","PDF","pptx","xlsx","documents","csv","ocr","Audio","Bash","markdown","convert","read","write","edit","html","images","files","youtube",{"skillNo":146,"name":107,"nameZh":6,"description":108,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":109,"licenseFileUrl":6,"sourceHtmlUrl":147,"categories":148,"keywords":153,"publishedAt":44},"01M6F06SBHR9F0SDWE282Y8075","https:\u002F\u002Fgithub.com\u002Fhenriquescastilho\u002Fmy-claude\u002Fblob\u002Fmain\u002F.codex\u002Fvendor_imports\u002Fclaude\u002Fmarketplaces\u002Fclaude-scientific-writer\u002Fscientific_writer\u002F.claude\u002Fskills\u002Fmarkitdown\u002FSKILL.md",[149,150,151,152],{"categoryNo":113,"categoryName":114,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":116,"categoryName":117,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":119,"categoryName":120,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":122,"categoryName":123,"taxonomyType":124,"taxonomyTypeDesc":125},[107,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,24],{"skillNo":155,"name":107,"nameZh":6,"description":108,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":109,"licenseFileUrl":6,"sourceHtmlUrl":156,"categories":157,"keywords":162,"publishedAt":44},"01M6F02D4R14EJAPBWVDF9J9VQ","https:\u002F\u002Fgithub.com\u002Fhenriquescastilho\u002Fmy-claude\u002Fblob\u002Fmain\u002F.codex\u002Fvendor_imports\u002Fclaude\u002Fmarketplaces\u002Fclaude-scientific-writer\u002F.claude\u002Fskills\u002Fmarkitdown\u002FSKILL.md",[158,159,160,161],{"categoryNo":113,"categoryName":114,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":116,"categoryName":117,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":119,"categoryName":120,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":122,"categoryName":123,"taxonomyType":124,"taxonomyTypeDesc":125},[107,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,24],{"skillNo":164,"name":165,"nameZh":6,"description":166,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":109,"licenseFileUrl":6,"sourceHtmlUrl":167,"categories":168,"keywords":169,"publishedAt":44},"01M6F000KS6YB4MKS774G4R8ND","zarr-python","Chunked N-D arrays for cloud storage. Compressed arrays, parallel I\u002FO, S3\u002FGCS integration, NumPy\u002FDask\u002FXarray compatible, for large-scale scientific computing pipelines.","https:\u002F\u002Fgithub.com\u002Fhenriquescastilho\u002Fmy-claude\u002Fblob\u002Fmain\u002F.codex\u002Fvendor_imports\u002Fclaude\u002Fmarketplaces\u002Fclaude-scientific-skills\u002Fscientific-skills\u002Fzarr-python\u002FSKILL.md",[],[170,171,172,173,174,175,176,177,178,179,180,181,182,183,184],"python","zarr python","storage","integration","s3","gcs","cloud","dask","parallel","pipelines","arrays","numpy","scientific computing","scale","scientific",{"skillNo":186,"name":187,"nameZh":6,"description":188,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":109,"licenseFileUrl":6,"sourceHtmlUrl":189,"categories":190,"keywords":192,"publishedAt":44},"01M6EZZJWFXM1GR78KTW6J0DN8","what-if-oracle","Run structured What-If scenario analysis with multi-branch possibility exploration. Use this skill when the user asks speculative questions like \"what if...\", \"what would happen if...\", \"what are the possibilities\", \"explore scenarios\", \"scenario analysis\", \"possibility space\", \"what could go wrong\", \"best case \u002F worst case\", \"risk analysis\", \"contingency planning\", \"strategic options\", or any question about uncertain futures. Also trigger when the user faces a fork-in-the-road decision, wants to stress-test an idea, or needs to think through consequences before committing.","https:\u002F\u002Fgithub.com\u002Fhenriquescastilho\u002Fmy-claude\u002Fblob\u002Fmain\u002F.codex\u002Fvendor_imports\u002Fclaude\u002Fmarketplaces\u002Fclaude-scientific-skills\u002Fscientific-skills\u002Fwhat-if-oracle\u002FSKILL.md",[191],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[193,194,195,196,197,198,199,200,201,202,203,138,139,204,205,206,207,208,209,210],"oracle","what if oracle","go","run","ux","futures","analysis","explore","decision","branch","question","idea","exploration","options","stress-test","strategies","scenario","stress",{"skillNo":212,"name":213,"nameZh":6,"description":214,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":109,"licenseFileUrl":6,"sourceHtmlUrl":215,"categories":216,"keywords":227,"publishedAt":44},"01M6EZZCXAEB49RXGQCJX5E8GB","venue-templates","Access comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.","https:\u002F\u002Fgithub.com\u002Fhenriquescastilho\u002Fmy-claude\u002Fblob\u002Fmain\u002F.codex\u002Fvendor_imports\u002Fclaude\u002Fmarketplaces\u002Fclaude-scientific-skills\u002Fscientific-skills\u002Fvenue-templates\u002FSKILL.md",[217,220,223,224],{"categoryNo":218,"categoryName":219,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000018","写作与文案",{"categoryNo":221,"categoryName":222,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000021","资料检索与研究",{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":225,"categoryName":226,"taxonomyType":124,"taxonomyTypeDesc":125},"01JBSEEDCAT000000000000036","内容创作者",[228,229,230,231,232,233,234,235,135,35,138,139,140,236,237,238,239,240,184,241],"templates","venue templates","research","guidelines","NeurIPS","ICML","LaTeX","science","proposals","Academic","requirements","formatting","journal","chi"]