Design and implement network segmentation using firewall security zones, VLANs, ACLs, and microsegmentation policies to restrict lateral movement and enforce least-privilege network access.
Works with
AI-first code editor with Composer
Before installing skills in Cursor, ensure your development environment meets these requirements:
node --versionimplementing-network-segmentation-with-firewall-zonesExecute the skills CLI command in your project's root directory to begin installation:
Fetches implementing-network-segmentation-with-firewall-zones from mukul975/Anthropic-Cybersecurity-Skills and configures it for Cursor.
The CLI shows a list of agents. Use arrow keys and space to select Cursor:
Confirm successful installation by checking the skill directory location:
Restart Cursor to activate implementing-network-segmentation-with-firewall-zones. Access via /implementing-network-segmentation-with-firewall-zones in your agent's command palette.
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your environment. Always review source, verify the publisher, and test in isolation before production.
Submit your Claude Code skill and start earning
Automate repetitive workflows and reduce manual effort
Example
Generate reports, summarize documents, draft communications
Save 3-5 hours per week on routine tasks
Learn new skills, understand complex topics, get expert guidance
Example
Explain concepts, provide examples, suggest learning resources
Accelerate learning and skill development by 2x
Enhance output quality through reviews, suggestions, and refinements
Example
Review drafts, suggest improvements, catch errors
Improve work quality by 30-40% with less effort
0
total installs
0
this week
8.6K
GitHub stars
0
upvotes
Run in your terminal
0
installs
0
this week
8.6K
stars
| name | implementing-network-segmentation-with-firewall-zones |
| description | Design and implement network segmentation using firewall security zones, VLANs, ACLs, and microsegmentation policies to restrict lateral movement and enforce least-privilege network access. |
| domain | cybersecurity |
| subdomain | network-security |
| tags | - network-segmentation - firewall-zones - vlan - microsegmentation - lateral-movement - zero-trust - acl - east-west-traffic - pci-dss |
| version | '1.0' |
| author | mahipal |
| license | Apache-2.0 |
| nist_csf | - PR.IR-01 - DE.CM-01 - ID.AM-03 - PR.DS-02 |
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.
| 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 |
| 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 |
Before implementing segmentation, capture baseline traffic:
# 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
! 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
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
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
#!/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,
protocol: str = "tcp", expected: str = "blocked"):
"""Test if connectivity exists between source and destination."""
try:
if protocol == "tcp":
cmd = ["nc", "-z", "-w", "3", dst_ip, str(port)]
elif protocol == "udp":
cmd = ["nc", "-z", "-u", "-w", "3", dst_ip, str(port)]
elif protocol == "icmp":
cmd = ["ping", "-c", "1", "-W", "3", dst_ip]
else:
return
result = subprocess.run(cmd, capture_output=True, timeout=5)
actual = "open" if result.returncode == 0 else "blocked"
except subprocess.TimeoutExpired:
actual = "blocked"
except FileNotFoundError:
actual = "error"
status = "PASS" if actual == expected else "FAIL"
self.results.append({
"source": src_desc,
"destination": f"{dst_ip}:{port}/{protocol}",
"expected": expected,
"actual": actual,
"status": status,
})
symbol = "[+]" if status == "PASS" else "[!]"
print(f" {symbol} {src_desc} -> {dst_ip}:{port}/{protocol} "
f"| Expected: {expected} | Actual: {actual} | {status}")
def run_validation(self):
"""Run segmentation validation tests."""
print(f"\n{'='*70}")
print("NETWORK SEGMENTATION VALIDATION")
print(f"{'='*70}")
print(f"Date: {datetime.now().isoformat()}\n")
# Tests that SHOULD be blocked
print("[*] Testing controls that should BLOCK traffic:")
self.test_connectivity("Corporate", "10.0.40.10", 443, "tcp", "blocked")
self.test_connectivity("Corporate", "10.0.40.10", 22, "tcp", "blocked")
self.test_connectivity("Guest", "10.0.30.10", 80, "tcp", "blocked")
self.test_connectivity("Guest", "10.0.20.1", 0, "icmp", "blocked")
# Tests that SHOULD be allowed
print("\n[*] Testing controls that should ALLOW traffic:")
self.test_connectivity("Corporate", "10.0.30.10", 443, "tcp", "open")
self.test_connectivity("Corporate", "10.0.30.10", 80, "tcp", "open")
self.test_connectivity("Management", "10.0.30.10", 22, "tcp", "open")
# Summary
passed = sum(1 for r in self.results if r["status"] == "PASS")
failed = sum(1 for r in self.results if r["status"] == "FAIL")
print(f"\n{'='*70}")
print(f"Results: {passed} PASSED, {failed} FAILED out of {len(self.results)} tests")
if failed > 0:
print(f"\n[!] FAILED TESTS:")
for r in self.results:
if r["status"] == "FAIL":
print(f" - {r['source']} -> {r['destination']}: "
f"expected {r['expected']}, got {r['actual']}")
# Save report
report = {
"date": datetime.now().isoformat(),
"total_tests": len(self.results),
"passed": passed,
"failed": failed,
"results": self.results,
}
report_path = f"segmentation_test_{datetime.now().strftime('%Y%m%d')}.json"
with open(report_path, 'w') as f:
json.dump(report, f, indent=2)
print(f"\nReport saved to: {report_path}")
if __name__ == "__main__":
validator = SegmentationValidator()
validator.run_validation()
Prerequisites
Time Estimate
15-45 minutes depending on use case complexity
Steps
Common Pitfalls
✓ Do
✗ Don't
💡 Pro Tips
✓ Use when
Use when skill capabilities match your task, clear ROI on time saved, and you can validate outputs. Best for repetitive tasks, learning, and quality improvement.
✗ Avoid when
Avoid when task requires deep expertise you can't validate, involves sensitive decisions, or when learning process is more valuable than speed of completion.
mukul975/Anthropic-Cybersecurity-Skills
mukul975/Anthropic-Cybersecurity-Skills
mukul975/Anthropic-Cybersecurity-Skills
mukul975/Anthropic-Cybersecurity-Skills
mukul975/Anthropic-Cybersecurity-Skills
mukul975/Anthropic-Cybersecurity-Skills
implementing-network-segmentation-with-firewall-zones reduced setup friction for our internal harness; good balance of opinion and flexibility.
I recommend implementing-network-segmentation-with-firewall-zones for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
Useful defaults in implementing-network-segmentation-with-firewall-zones — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
implementing-network-segmentation-with-firewall-zones reduced setup friction for our internal harness; good balance of opinion and flexibility.
Registry listing for implementing-network-segmentation-with-firewall-zones matched our evaluation — installs cleanly and behaves as described in the markdown.
Useful defaults in implementing-network-segmentation-with-firewall-zones — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
We added implementing-network-segmentation-with-firewall-zones from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
implementing-network-segmentation-with-firewall-zones is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
I recommend implementing-network-segmentation-with-firewall-zones for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
implementing-network-segmentation-with-firewall-zones fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
showing 1-10 of 26