homelab-vlan-segmentation
What it does
This guide teaches you how to split your home network into 'VLANs,' which are like separate virtual networks within the same physical network. This helps improve security by isolating devices like smart cameras and guest networks so they can't access your computers or servers.
When to use it
- βWhen setting up a home network for the first time.
- βTo isolate 'Internet of Things' (IoT) devices.
- βTo create a separate Wi-Fi network for guests.
Skill link
https://github.com/affaan-m/ECC/blob/main/skills/homelab-vlan-segmentation/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
Example of what to ask your AI
βHow can I segment my home network so IoT devices can't access my computers?β
5 new skills a week. 1 minute to read.
How it works
It explains how to create different virtual networks (VLANs) and set up firewall rules to control which device can talk to which. This is done on network equipment like UniFi, pfSense/OPNsense, or MikroTik.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Homelab VLAN Segmentation
How to split a home network into isolated VLANs so IoT devices, guests, and your main PCs cannot talk to each other. The most impactful security upgrade for a home network.
All firewall rules shown here add isolation between segments β they do not remove existing protections. Apply changes in a maintenance window and verify connectivity between segments after each step before moving on.
When to Use
- Setting up VLANs on a home network for the first time
- Isolating IoT devices (smart bulbs, cameras, TVs) from trusted devices
- Creating a guest Wi-Fi network that cannot reach home devices
- Explaining how VLANs work to someone unfamiliar with the concept
- Configuring trunk ports, access ports, and SSID-to-VLAN mapping
- Troubleshooting inter-VLAN routing or firewall rule issues on pfSense/OPNsense/UniFi
How It Works
Without VLANs β flat network:
All devices on 192.168.1.0/24
Smart TV (potential malware) β can reach your NAS, PCs, everything
With VLANs:
VLAN 10 β Trusted 192.168.10.0/24 (PCs, phones, laptops)
VLAN 20 β IoT 192.168.20.0/24 (smart TV, bulbs, cameras)
VLAN 30 β Servers 192.168.30.0/24 (NAS, Pi, VMs)
VLAN 40 β Guest 192.168.40.0/24 (visitor Wi-Fi)
VLAN 99 β Management 192.168.99.0/24 (switch/AP web UIs)
Smart TV β blocked from reaching 192.168.10.0/24 and 192.168.30.0/24
Guests β internet only, cannot see any home devices
VLAN Design Template
VLAN Name Subnet Gateway Purpose
10 trusted 192.168.10.0/24 192.168.10.1 PCs, phones, laptops
20 iot 192.168.20.0/24 192.168.20.1 Smart home devices
30 servers 192.168.30.0/24 192.168.30.1 NAS, Pi, self-hosted
40 guest 192.168.40.0/24 192.168.40.1 Visitor Wi-Fi
99 management 192.168.99.0/24 192.168.99.1 Network gear web UIs
Examples
Typical homelab with UniFi AP and managed switch:
Scenario: 3-bedroom house, UniFi Dream Machine + UniFi 8-port switch + 2 APs
VLAN 10 β Trusted 192.168.10.0/24 MacBook, iPhones, iPad
VLAN 20 β IoT 192.168.20.0/24 Nest thermostat, Philips Hue, Ring doorbell, smart TVs
VLAN 30 β Servers 192.168.30.0/24 Synology NAS (192.168.30.10), Pi-hole (192.168.30.2)
VLAN 40 β Guest 192.168.40.0/24 Visitor Wi-Fi β internet only
SSID β VLAN mapping:
"Home" β VLAN 10 (WPA2, strong password, trusted devices only)
"IoT" β VLAN 20 (WPA2, separate password, printed on router for setup)
"Guest" β VLAN 40 (WPA2, simple password you can share freely)
Switch port behavior:
Port 1 β trunk to router (tagged VLANs 10,20,30,40,99)
Port 2 β trunk to APs (tagged VLANs 10,20,40; AP handles per-SSID tagging)
Port 3 β access VLAN 30 (NAS β untagged, no VLAN awareness needed)
Port 4 β access VLAN 30 (Pi-hole β untagged)
Port 5β8 β access VLAN 10 (wired workstations)
Firewall rules applied (all rules add isolation, none remove existing protections):
IoT β Trusted: BLOCK
IoT β Servers: BLOCK except 192.168.30.2:53 (Pi-hole DNS allowed)
IoT β Internet: ALLOW
Guest β Local networks: BLOCK
Guest β Internet: ALLOW
Trusted β everywhere: ALLOW
UniFi Configuration
Create Networks in UniFi Controller
Settings β Networks β Create New Network
For each VLAN:
Name: IoT
Purpose: Corporate (gives DHCP + routing)
VLAN ID: 20
Network: 192.168.20.0/24
Gateway IP: 192.168.20.1
DHCP: Enable
DHCP Range: 192.168.20.100 β 192.168.20.254
Map SSIDs to VLANs (UniFi)
Settings β WiFi β Create New WiFi
Name: IoT-Network
Password: <separate password>
Network: IoT β select your VLAN here
# All devices connecting to this SSID land in VLAN 20
Name: Guest
Password: <guest password>
Network: Guest
Guest Policy: Enable β isolates guests from each other too
UniFi Firewall Rules (Traffic Rules)
Settings β Traffic & Security β Traffic Rules
# Block IoT from reaching Trusted VLAN
Action: Block
Category: Local Network
Source: IoT (192.168.20.0/24)
Destination: Trusted (192.168.10.0/24)
# Allow IoT to reach internet only
Action: Allow
Source: IoT
Destination: Internet
# Block Guest from all local networks
Action: Block
Source: Guest
Destination: Local Networks
pfSense / OPNsense Configuration
Create VLANs
Interfaces β Assignments β VLANs β Add
Parent Interface: em1 (your LAN NIC)
VLAN Tag: 20
β¦
FAQ
What is a VLAN?
A VLAN (Virtual Local Area Network) is like creating multiple smaller, isolated networks within a single physical network. It helps organize and secure your devices.
Why should I use VLANs?
VLANs enhance security by preventing less trusted devices (like smart cameras or guest devices) from accessing your computers or important data.
Do I need special equipment to use VLANs?
Yes, you generally need a router and switches that support VLANs, such as those mentioned in the guide (UniFi, pfSense/OPNsense, MikroTik).
Details
Original description by the author
Segmenting home networks into VLANs for IoT, guest, trusted, and server traffic using UniFi, pfSense/OPNsense, and MikroTik β including switch trunk config, firewall rules, and wireless SSID mapping. Use when splitting a home network into IoT, guest, trusted, and server VLANs on UniFi, pfSense/OPNsense, or MikroTik.
repo: affaan-m/ECC
Popularity
- GitHub stars
- 280k
- Ranking position
- #334
- License
- MIT
- Updated
- 10/15/2026
Comments
- β¦
More skills from this repository
accessibility
280kHelps your agent create interfaces that everyone can use. Ensures websites and apps work well for people with disabilities, like those who are blind or have reduced mobility.
agent-architecture-audit
280kMakes your agent check if everything is working correctly. It finds and fixes problems in AI systems, ensuring they perform as expected.
agent-eval
280kHelps your agent compare different AI coding tools. It measures which one is faster, cheaper, and more reliable for specific tasks.
agent-harness-construction
280kMakes your agent better understand how to perform tasks. It optimizes the tools and instructions the agent uses to increase its chances of success.
Similar skills
openclaw-update
394kHelps your agent update an existing OpenClaw Gateway, choosing the update method that fits how it was installed and keeping your session working.
diagnose-gateway
394kHelps your agent find out why your OpenClaw Gateway is failing by checking settings, channels, and ports without changing anything.
crabbox-apps
394kHelps your agent open and run an app on a temporary cloud machine, then show its view in your chat side panel.