implementing-network-segmentation-with-firewall-zones
Design and implement network segmentation using firewall security zones, VLANs, ACLs, and microsegmentation policies to restrict lateral movement and enforce least-privilege network access.
What this skill does
# Implementing Network Segmentation with Firewall Zones
## Overview
Network segmentation divides a flat network into isolated security zones with firewall-enforced boundaries to contain breaches, restrict lateral movement, and enforce least-privilege access between workloads. Segmentation is a foundational control required by PCI DSS, HIPAA, NIST 800-53, and zero trust architectures. Modern segmentation combines traditional VLAN-based approaches with microsegmentation at the workload level for granular east-west traffic control. This skill covers designing zone architectures, configuring inter-zone firewall policies, implementing VLAN segmentation on switches, and deploying microsegmentation for dynamic environments.
## When to Use
- When deploying or configuring implementing network segmentation with firewall zones capabilities in your environment
- When establishing security controls aligned to compliance requirements
- When building or improving security architecture for this domain
- When conducting security assessments that require this implementation
## Prerequisites
- Network topology documentation with asset inventory
- Firewall supporting zone-based policies (Palo Alto, Fortinet, Cisco Firepower)
- Managed switches with VLAN support (802.1Q trunking)
- Traffic flow documentation or NetFlow data for baseline analysis
- Compliance requirements (PCI DSS scope, HIPAA ePHI boundaries)
## Core Concepts
### Zone Architecture Tiers
| Zone | Trust Level | Examples | Access Policy |
|------|-------------|----------|---------------|
| **Internet** | None | Public internet | Default deny inbound |
| **DMZ** | Low | Web servers, mail relays, DNS | Limited inbound, restricted outbound |
| **Guest** | Low | Guest WiFi, visitor network | Internet only, no internal access |
| **Corporate** | Medium | Employee workstations, printers | Controlled access to internal resources |
| **Server/Data Center** | High | Application servers, databases | Strict ACLs, limited admin access |
| **PCI CDE** | Critical | Payment systems, card data | PCI DSS compliant isolation |
| **Management** | Critical | Network devices, hypervisors, IPMI | Highly restricted, jump box only |
| **OT/SCADA** | Critical | Industrial control systems | Air-gapped or strictly firewalled |
### Segmentation Approaches
| Approach | Scope | Granularity | Use Case |
|----------|-------|-------------|----------|
| **VLAN Segmentation** | Layer 2 | Subnet-level | Department separation, guest isolation |
| **Firewall Zones** | Layer 3-7 | Zone-to-zone | Inter-zone policy enforcement |
| **ACLs on Routers** | Layer 3-4 | Subnet/port | Quick filtering at routing boundaries |
| **Microsegmentation** | Layer 3-7 | Workload-level | Zero trust, container environments |
| **SGT/TrustSec** | Layer 2-7 | Tag-based | Identity-based segmentation |
## Workflow
### Step 1: Map Traffic Flows and Define Zones
Before implementing segmentation, capture baseline traffic:
```bash
# Capture NetFlow data to understand existing traffic patterns
nfdump -R /var/cache/nfdump/ -s srcip/bytes -n 50
# Identify east-west traffic between subnets
nfdump -R /var/cache/nfdump/ -s record/bytes \
'src net 10.0.0.0/8 and dst net 10.0.0.0/8' -n 100
# Map application dependencies
# Document which servers need to communicate with which other servers
```
### Step 2: Configure VLANs on Switches
```
! Core switch VLAN configuration
vlan 10
name Management
vlan 20
name Corporate-Users
vlan 30
name Servers
vlan 40
name PCI-CDE
vlan 50
name Guest
vlan 60
name DMZ
vlan 99
name Native-Unused
! Trunk port to firewall
interface GigabitEthernet1/0/1
description Trunk-to-Firewall
switchport trunk encapsulation dot1q
switchport mode trunk
switchport trunk allowed vlan 10,20,30,40,50,60
switchport trunk native vlan 99
switchport nonegotiate
! Access port for corporate users
interface range GigabitEthernet1/0/2-24
switchport mode access
switchport access vlan 20
spanning-tree portfast
! Access port for servers
interface range GigabitEthernet1/0/25-36
switchport mode access
switchport access vlan 30
! Prevent VLAN hopping
interface range GigabitEthernet1/0/37-48
switchport mode access
switchport access vlan 99
shutdown
```
### Step 3: Configure Firewall Zone Policies
**Palo Alto zone-based policy:**
```
# Define zones on firewall sub-interfaces
set network interface ethernet ethernet1/1 layer3 units ethernet1/1.10 tag 10 ip 10.0.10.1/24
set network interface ethernet ethernet1/1 layer3 units ethernet1/1.20 tag 20 ip 10.0.20.1/24
set network interface ethernet ethernet1/1 layer3 units ethernet1/1.30 tag 30 ip 10.0.30.1/24
set network interface ethernet ethernet1/1 layer3 units ethernet1/1.40 tag 40 ip 10.0.40.1/24
set zone Management network layer3 ethernet1/1.10
set zone Corporate network layer3 ethernet1/1.20
set zone Servers network layer3 ethernet1/1.30
set zone PCI-CDE network layer3 ethernet1/1.40
# Inter-zone policies (deny by default, explicitly allow)
# Corporate -> Servers (only specific apps)
set rulebase security rules Corp-to-Servers from Corporate to Servers
set rulebase security rules Corp-to-Servers application [ web-browsing ssl dns smtp ]
set rulebase security rules Corp-to-Servers action allow
set rulebase security rules Corp-to-Servers profile-setting group Standard-Profiles
# Corporate -> PCI (DENY)
set rulebase security rules Corp-to-PCI from Corporate to PCI-CDE
set rulebase security rules Corp-to-PCI action deny log-end yes
# Servers -> PCI (only payment processing)
set rulebase security rules Servers-to-PCI from Servers to PCI-CDE
set rulebase security rules Servers-to-PCI source [ 10.0.30.10 ]
set rulebase security rules Servers-to-PCI destination [ 10.0.40.10 ]
set rulebase security rules Servers-to-PCI application [ ssl ]
set rulebase security rules Servers-to-PCI service service-https
set rulebase security rules Servers-to-PCI action allow
# Management -> All (admin access via jump box)
set rulebase security rules Mgmt-Admin from Management to [ Servers PCI-CDE ]
set rulebase security rules Mgmt-Admin source [ 10.0.10.50 ]
set rulebase security rules Mgmt-Admin application [ ssh rdp ]
set rulebase security rules Mgmt-Admin source-user [ admin-group ]
set rulebase security rules Mgmt-Admin action allow
# Intra-zone deny (prevent lateral movement within zone)
set rulebase security rules Deny-Intrazone from Corporate to Corporate
set rulebase security rules Deny-Intrazone action deny log-end yes
# Default deny all
set rulebase security rules Deny-All from any to any
set rulebase security rules Deny-All action deny log-end yes
```
### Step 4: Implement Inter-VLAN Routing ACLs
For additional layer 3 filtering on the router/L3 switch:
```
! ACL: Corporate can only reach specific server ports
ip access-list extended CORP-TO-SERVERS
permit tcp 10.0.20.0 0.0.0.255 10.0.30.0 0.0.0.255 eq 80
permit tcp 10.0.20.0 0.0.0.255 10.0.30.0 0.0.0.255 eq 443
permit tcp 10.0.20.0 0.0.0.255 10.0.30.0 0.0.0.255 eq 25
permit udp 10.0.20.0 0.0.0.255 10.0.30.10 0.0.0.0 eq 53
deny ip 10.0.20.0 0.0.0.255 10.0.30.0 0.0.0.255 log
! ACL: PCI CDE isolation
ip access-list extended PCI-ISOLATION
permit tcp host 10.0.30.10 host 10.0.40.10 eq 443
permit tcp 10.0.10.50 0.0.0.0 10.0.40.0 0.0.0.255 eq 22
deny ip any 10.0.40.0 0.0.0.255 log
! Apply ACLs to VLAN interfaces
interface Vlan20
ip address 10.0.20.1 255.255.255.0
ip access-group CORP-TO-SERVERS out
interface Vlan40
ip address 10.0.40.1 255.255.255.0
ip access-group PCI-ISOLATION in
```
### Step 5: Validate Segmentation
```python
#!/usr/bin/env python3
"""Network segmentation validation - tests connectivity between zones."""
import subprocess
import sys
import json
from datetime import datetime
class SegmentationValidator:
"""Test network segmentation controls between zones."""
def __init__(self):
self.results = []
def test_connectivity(self, src_desc: str, dst_ip: str, port: int,
Related in Design
contribute
IncludedLocal-only OSS contribution command center. Auto-refreshes the user's in-flight PR and issue state on invoke so conversations start with full context — no need to brief Claude on what's in flight. Helps the user find issues to contribute to on GitHub, builds per-repo dossiers of what each upstream expects (CLA, DCO, branch convention, AI policy, draft-first, review bots, issue templates), runs deterministic gates before any external action so AI-assisted contributions don't reach maintainers as slop. State is markdown-only: candidate files at ~/.contribute-system/candidates/, repo dossiers at ~/.contribute-system/research/, append-only event log at ~/.contribute-system/log.jsonl. No database, no cloud calls. Use when the user asks about their PRs / issues / contributions, wants to find new work to take on, claim an issue, build/refresh a repo's dossier, or draft a Design Issue or PR. Trigger with "/contribute", "what's my PR status", "find a contribution", "claim issue X", "draft a Design Issue for Y", "refresh dossier for Z".
architectural-analysis
IncludedUser-triggered deep architectural analysis of a codebase or scoped subtree across eight modes — information architecture, data flow, integration points, UI surfaces, interaction patterns, data model, control flow, and failure modes. This skill should be used when the user asks to "diagram this codebase," "map the architecture," "show the data flow," "give me an ERD," "trace control flow," "find the integration points," "verify the layout pattern," "audit the UX architecture," or any similar request whose primary deliverable is mermaid diagrams plus cited reports under docs/architecture/. Dispatches haiku/sonnet sub-agents in parallel for per-mode exploration, then verifies every citation mechanically before any node lands in a diagram. Not for one-off prose explanations of code (use code-explanation) or for high-level system design from scratch (use system-design).
mcp
IncludedModel Context Protocol (MCP) server development and tool management. Languages: Python, TypeScript. Capabilities: build MCP servers, integrate external APIs, discover/execute MCP tools, manage multi-server configs, design agent-centric tools. Actions: create, build, integrate, discover, execute, configure MCP servers/tools. Keywords: MCP, Model Context Protocol, MCP server, MCP tool, stdio transport, SSE transport, tool discovery, resource provider, prompt template, external API integration, Gemini CLI MCP, Claude MCP, agent tools, tool execution, server config. Use when: building MCP servers, integrating external APIs as MCP tools, discovering available MCP tools, executing MCP capabilities, configuring multi-server setups, designing tools for AI agents.
react-native-skia
IncludedDesign, build, debug, and optimise high-polish animated graphics in React Native or Expo using @shopify/react-native-skia, Reanimated, and Gesture Handler. Use when the user wants canvas-driven UI, shaders, paths, rich text, image filters, sprite fields, Skottie, video frames, snapshots, web CanvasKit setup, or performance tuning for custom motion-heavy elements such as loaders, hero art, cards, charts, progress indicators, particle systems, or gesture-driven surfaces. Also use when the user asks for fluid, glow, glass, blob, parallax, 60fps/120fps, or GPU-friendly animated effects in React Native, even if they do not explicitly say "Skia". Do not use for ordinary form/layout work with standard views.
plaid
IncludedProduct Led AI Development — guides founders from idea to launched product. Six capabilities: Idea (discover a product idea), Validate (pressure-test the idea against fatal flaws, problem reality, competition, and 2-week MVP feasibility), Plan (vision intake + document generation), Design (translate image references into a design.md spec), Launch (go-to-market strategy), and Build (roadmap execution). Use when someone says "PLAID", "plaid idea", "help me find an idea", "product idea", "idea from my business", "idea from my expertise", "plaid validate", "validate my idea", "pressure-test", "is this idea good", "find fatal flaws", "validate the problem", "plan a product", "define my vision", "generate a PRD", "product strategy", "plaid design", "design from image", "translate image to design", "create design.md", "extract design tokens", "plaid launch", "go-to-market", "launch plan", "GTM strategy", "launch playbook", "plaid build", "build the app", "start building", or "execute the roadmap".
nextjs-framer-motion-animations
IncludedAdds production-safe Motion for React or Framer Motion animations to Next.js apps, including reveal, hover and tap micro-interactions, whileInView, stagger, AnimatePresence, layout and layoutId transitions, reorder, scroll-linked UI, and lightweight route-content transitions. Use when the user asks to add, refactor, or debug Motion or Framer Motion in App Router or Pages Router codebases, especially around server/client boundaries, reduced motion, LazyMotion, bundle size, hydration, or route transitions. Avoid for GSAP-style timelines, WebGL or 3D scenes, heavy scroll storytelling, or CSS-only effects unless Motion is explicitly requested.