agentleFS
XData-siXData-si/xdata-agenthub/skills/network-segmentation/SKILL.md

network-segmentation

Skill1 starsChanged 33 days agoMITView on GitHub

Design and review network segmentation and firewall rules — zones, allowed flows, management access, east-west traffic, Kubernetes network policies, VPN and zero-trust access — with verification from outside and inside. Use when planning network layout, reviewing firewall or security-group rules, or containing lateral movement after an incident.

2 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Only intended flows are possible between zones, administrative interfaces are reachable only through controlled paths, and a compromised …

    line 10
  2. Distinctive:

    East-west control: default-deny between application services where feasible (Kubernetes NetworkPolicies, security groups referencing groups …

    line 19
  3. Very specific:

    Review rules: remove any/any, duplicate and shadowed rules.

    line 22

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Network Segmentation

Goal

Only intended flows are possible between zones, administrative interfaces are reachable only through controlled paths, and a compromised host cannot reach everything else.

Inputs

  • Network diagram, zones and subnets, firewall rules and security groups, VPN or zero-trust access, Kubernetes network policies, inventory of services and their ports.

Procedure

  1. Define zones by trust and function: internet edge, DMZ or ingress, application, data, management, CI/runners, office or user networks.
  2. Write the flow matrix: source zone → destination zone → port/protocol → purpose → owner. Everything not in the matrix is denied.
  3. Management plane: SSH, RDP, hypervisor, database and admin UIs reachable only from a bastion, VPN or zero-trust proxy with MFA; never from the internet.
  4. East-west control: default-deny between application services where feasible (Kubernetes NetworkPolicies, security groups referencing groups instead of CIDRs).
  5. Egress control: restrict outbound internet from servers and CI to required destinations or through a proxy — this limits data exfiltration and malware callbacks.
  6. Container hosts: remember that Docker-published ports bypass host firewalls; filter in the DOCKER-USER chain or bind to private addresses (see linux-server-hardening).
  7. Review rules: remove any/any, duplicate and shadowed rules; each rule has an owner and a ticket; review annually.
  8. Verify from outside (authorized port scan of public IPs) and from inside each zone (attempt forbidden connections); compare with the matrix.

Example fixture

Rule 14: allow 0.0.0.0/0 → 10.0.2.0/24 tcp/5432 "temporary for migration" (created 2024-02).

Expected finding: database open to the internet via an expired temporary rule; remove and restrict to the application zone.

Acceptance checks

  • A flow matrix exists and every firewall rule maps to a line in it.
  • External scan shows only intended public ports; internal tests show forbidden zone-to-zone connections fail.
  • Negative case: from a test host in the application zone, management ports of other zones are unreachable.

Output

Zone diagram, flow matrix, rule changes with owners, verification results.

Safety

Firewall changes can cut off access, including your own: keep an out-of-band console, apply in maintenance windows with approval, and stage changes. Scan only networks you are authorized to test.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.