[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7D9HT1GPEDT15915XKRCQPW":3,"skill-same:01M7D9HT1GPEDT15915XKRCQPW":89},{"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":16,"sourceHtmlUrl":17,"categories":18,"keywords":19,"publishedAt":20,"linkOnly":21,"markdownContent":22,"markdownBody":23,"frontMatter":24,"refName":50,"commitSha":51,"skillDirectory":52,"forksCount":53,"repositoryHtmlUrl":54,"repositoryHomepageUrl":6,"ownerHtmlUrl":55,"ownerBlogUrl":56,"ownerDescription":57,"updatedAt":58,"install":59,"resources":72},"01M7D9HT1GPEDT15915XKRCQPW","implementing-ics-firewall-with-tofino",null,"Deploys and configures Tofino industrial firewalls (Belden\u002FHirschmann) to protect SCADA systems and PLCs, using deep packet inspection of OT protocols (Modbus, EtherNet\u002FIP, OPC, S7comm) to enforce access control between ICS zones. Use when deploying zone-level firewall protection in front of PLCs\u002FRTUs, enforcing IEC 62443 zone\u002Fconduit boundaries, or adding compensating controls for unpatchable legacy PLCs.","SaiVatsal\u002FSkills-I-Use","SaiVatsal","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F242597752?v=4","01M7D5YM1T4VXW9203M0GFAHZ1","SaiVatsalPolimera","01M7D5YM2D61ST39XVR2V7B7ZJ",3,"Apache-2.0","https:\u002F\u002Fgithub.com\u002FSaiVatsal\u002FSkills-I-Use\u002Fblob\u002Fmain\u002FAnthropic-Cybersecurity-Skills-main\u002Fskills\u002Fimplementing-ics-firewall-with-tofino\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FSaiVatsal\u002FSkills-I-Use\u002Fblob\u002Fmain\u002FAnthropic-Cybersecurity-Skills-main\u002Fskills\u002Fimplementing-ics-firewall-with-tofino\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: implementing-ics-firewall-with-tofino\ndescription: 'Deploys and configures Tofino industrial firewalls (Belden\u002FHirschmann)\n  to protect SCADA systems and PLCs, using deep packet inspection of OT protocols\n  (Modbus, EtherNet\u002FIP, OPC, S7comm) to enforce access control between ICS zones.\n  Use when deploying zone-level firewall protection in front of PLCs\u002FRTUs, enforcing\n  IEC 62443 zone\u002Fconduit boundaries, or adding compensating controls for unpatchable\n  legacy PLCs.\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":25,"author":34,"domain":35,"license":15,"version":36,"nist_csf":37,"subdomain":42,"description":43,"mitre_attack":44},[26,27,28,29,30,31,32,33],"ot-security","ics","firewall","tofino","belden","deep-packet-inspection","network-security","scada","mahipal","cybersecurity","1.0",[38,39,40,41],"PR.IR-01","DE.CM-01","ID.AM-05","GV.OC-02","ot-ics-security","Deploys and configures Tofino industrial firewalls (Belden\u002FHirschmann) to protect SCADA systems and PLCs, using deep packet inspection of OT protocols (Modbus, EtherNet\u002FIP, OPC, S7comm) to enforce access control between ICS zones. Use when deploying zone-level firewall protection in front of PLCs\u002FRTUs, enforcing IEC 62443 zone\u002Fconduit boundaries, or adding compensating controls for unpatchable legacy PLCs.\n",[45,46,47,48,49],"T1078","T1190","T1059","T0816","T0836","main","8a3b3de73262a4c4db64523949360f3c599c2fb1","Anthropic-Cybersecurity-Skills-main\u002Fskills\u002Fimplementing-ics-firewall-with-tofino",0,"https:\u002F\u002Fgithub.com\u002FSaiVatsal\u002FSkills-I-Use","https:\u002F\u002Fgithub.com\u002FSaiVatsal","https:\u002F\u002Fsaivatsal.github.io\u002FPortfolio\u002F","The Longer It Takes The Stronger It Becomes ","2026-09-21 22:45:58",{"source":8,"skillName":5,"commands":60,"prompt":70,"zipAvailable":71},[61,64,67],{"tool":62,"command":63},"npx","npx skills add SaiVatsal\u002FSkills-I-Use --skill implementing-ics-firewall-with-tofino",{"tool":65,"command":66},"bunx","bunx skills add SaiVatsal\u002FSkills-I-Use --skill implementing-ics-firewall-with-tofino",{"tool":68,"command":69},"pnpm","pnpm dlx skills add SaiVatsal\u002FSkills-I-Use --skill implementing-ics-firewall-with-tofino","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FSaiVatsal\u002FSkills-I-Use\u002Fblob\u002Fmain\u002FAnthropic-Cybersecurity-Skills-main\u002Fskills\u002Fimplementing-ics-firewall-with-tofino\u002FSKILL.md",true,[73,77,83],{"path":74,"resourceType":74,"resourceTypeDesc":75,"sizeBytes":76,"sourceHtmlUrl":16},"LICENSE","许可证",11255,{"path":78,"resourceType":79,"resourceTypeDesc":80,"sizeBytes":81,"sourceHtmlUrl":82},"references\u002Fapi-reference.md","REFERENCE","参考文档",1565,"https:\u002F\u002Fgithub.com\u002FSaiVatsal\u002FSkills-I-Use\u002Fblob\u002Fmain\u002FAnthropic-Cybersecurity-Skills-main\u002Fskills\u002Fimplementing-ics-firewall-with-tofino\u002Freferences\u002Fapi-reference.md",{"path":84,"resourceType":85,"resourceTypeDesc":86,"sizeBytes":87,"sourceHtmlUrl":88},"scripts\u002Fagent.py","SCRIPT","脚本",8206,"https:\u002F\u002Fgithub.com\u002FSaiVatsal\u002FSkills-I-Use\u002Fblob\u002Fmain\u002FAnthropic-Cybersecurity-Skills-main\u002Fskills\u002Fimplementing-ics-firewall-with-tofino\u002Fscripts\u002Fagent.py",[90,98,106,115,122,129],{"skillNo":91,"name":92,"nameZh":6,"description":93,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":94,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":20},"01M7DJZP6E6KMBQV4CZSDPZEZ8","webapp-testing","Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.","https:\u002F\u002Fgithub.com\u002FSaiVatsal\u002FSkills-I-Use\u002Fblob\u002Fmain\u002Fwebapp-testing\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002FSaiVatsal\u002FSkills-I-Use\u002Fblob\u002Fmain\u002Fwebapp-testing\u002FSKILL.md",[],[],{"skillNo":99,"name":100,"nameZh":6,"description":101,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":102,"sourceHtmlUrl":103,"categories":104,"keywords":105,"publishedAt":20},"01M7DJZFTS5TS06K2TV3MDTE67","web-artifacts-builder","Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn\u002Fui). Use for complex artifacts requiring state management, routing, or shadcn\u002Fui components - not for simple single-file HTML\u002FJSX artifacts.","https:\u002F\u002Fgithub.com\u002FSaiVatsal\u002FSkills-I-Use\u002Fblob\u002Fmain\u002Fweb-artifacts-builder\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002FSaiVatsal\u002FSkills-I-Use\u002Fblob\u002Fmain\u002Fweb-artifacts-builder\u002FSKILL.md",[],[],{"skillNo":107,"name":108,"nameZh":6,"description":109,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":110,"licenseFileUrl":111,"sourceHtmlUrl":112,"categories":113,"keywords":114,"publishedAt":20},"01M7DJRK4SRQ908F2TJM6EZ7EV","ui-styling","Create beautiful, accessible user interfaces with shadcn\u002Fui components (built on Radix UI + Tailwind), Tailwind CSS utility-first styling, and canvas-based visual designs. Use when building user interfaces, implementing design systems, creating responsive layouts, adding accessible components (dialogs, dropdowns, forms, tables), customizing themes and colors, implementing dark mode, generating visual designs and posters, or establishing consistent styling patterns across applications.","MIT","https:\u002F\u002Fgithub.com\u002FSaiVatsal\u002FSkills-I-Use\u002Fblob\u002Fmain\u002Fui-ux-pro-max-skill-main\u002Fcli\u002Fassets\u002Fskills\u002Fui-styling\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002FSaiVatsal\u002FSkills-I-Use\u002Fblob\u002Fmain\u002Fui-ux-pro-max-skill-main\u002Fcli\u002Fassets\u002Fskills\u002Fui-styling\u002FSKILL.md",[],[],{"skillNo":116,"name":117,"nameZh":6,"description":118,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":110,"licenseFileUrl":6,"sourceHtmlUrl":119,"categories":120,"keywords":121,"publishedAt":20},"01M7DJR902059VEQP23PVM2WA0","design","Comprehensive design skill: brand identity, design tokens, UI styling, logo generation (55 styles, Gemini AI), corporate identity program (50 deliverables, CIP mockups), HTML presentations (Chart.js), banner design (22 styles, social\u002Fads\u002Fweb\u002Fprint), icon design (15 styles, SVG, Gemini 3.1 Pro), social photos (HTML→screenshot, multi-platform). Actions: design logo, create CIP, generate mockups, build slides, design banner, generate icon, create social photos, social media images, brand identity, design system. Platforms: Facebook, Twitter, LinkedIn, YouTube, Instagram, Pinterest, TikTok, Threads, Google Ads.","https:\u002F\u002Fgithub.com\u002FSaiVatsal\u002FSkills-I-Use\u002Fblob\u002Fmain\u002Fui-ux-pro-max-skill-main\u002Fcli\u002Fassets\u002Fskills\u002Fdesign\u002FSKILL.md",[],[],{"skillNo":123,"name":124,"nameZh":6,"description":125,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":110,"licenseFileUrl":6,"sourceHtmlUrl":126,"categories":127,"keywords":128,"publishedAt":20},"01M7DJR56QF5N6XYTCPCFHFMNP","design-system","Token architecture, component specifications, and slide generation. Three-layer tokens (primitive→semantic→component), CSS variables, spacing\u002Ftypography scales, component specs, strategic slide creation. Use for design tokens, systematic design, brand-compliant presentations.","https:\u002F\u002Fgithub.com\u002FSaiVatsal\u002FSkills-I-Use\u002Fblob\u002Fmain\u002Fui-ux-pro-max-skill-main\u002Fcli\u002Fassets\u002Fskills\u002Fdesign-system\u002FSKILL.md",[],[],{"skillNo":130,"name":131,"nameZh":6,"description":132,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":110,"licenseFileUrl":6,"sourceHtmlUrl":133,"categories":134,"keywords":135,"publishedAt":20},"01M7DJQXB6M0SFF7NX8J5N01AH","banner-design","Design banners for social media, ads, website heroes, creative assets, and print. Multiple art direction options with AI-generated visuals. Actions: design, create, generate banner. Platforms: Facebook, Twitter\u002FX, LinkedIn, YouTube, Instagram, Google Display, website hero, print. Styles: minimalist, gradient, bold typography, photo-based, illustrated, geometric, retro, glassmorphism, 3D, neon, duotone, editorial, collage. Uses ui-ux-pro-max, frontend-design, ai-artist, ai-multimodal skills.","https:\u002F\u002Fgithub.com\u002FSaiVatsal\u002FSkills-I-Use\u002Fblob\u002Fmain\u002Fui-ux-pro-max-skill-main\u002Fcli\u002Fassets\u002Fskills\u002Fbanner-design\u002FSKILL.md",[],[]]