TExcelTAD
Home › Wireless, IoT & Mobile Security › Network Segmentation for IoT

Network Segmentation for IoT

Some IoT devices will always be weak: a camera that stopped getting updates, a plug that only speaks WPA2-PSK, a building controller with a Telnet service nobody can remove. You can't fix every device, but you can decide what each one can reach. Segmentation puts IoT devices in their own zone and allows only the traffic each device actually needs, so a compromised camera can't reach the finance laptop, can't scan its neighbours, and can't join a botnet's Telnet scanning. This lesson applies the segmentation and microsegmentation ideas of Network Security to IoT, using a device profile to generate the allowed flows.

The zones

The course's lab network, now split (compare the flat network of Network Security's introduction):

Zone Range Contents May start connections to
staff 10.10.0.0/26 laptops, phones (Wi-Fi LabCorp) servers, Internet, IoT on HTTPS for local control
servers 10.10.0.64/27 DNS, NTP, file and mail servers as needed
IoT 10.10.0.128/26 hub (now 10.10.0.150), cameras, plugs (Wi-Fi LabNet-IoT) only what each device's profile lists
guest 10.10.0.192/26 visitors (LabNet-Guest) Internet only

Each zone is a VLAN with its own SSID mapped to it, and the firewall between VLANs enforces the rules (Zones, DMZs and Trust Boundaries, VLAN and ACL Design). Inside the IoT zone, client isolation on the AP and private VLANs on switches stop devices from talking to each other (Microsegmentation).

Device profiles: allow-lists that come from the vendor

An IoT device has a small, predictable set of destinations: its cloud broker, its update server, DNS and NTP. Manufacturer Usage Descriptions (MUD, RFC 8520) let a vendor publish exactly that as a signed profile, which network equipment turns into ACLs. Even without MUD support, writing the profile yourself from the vendor's documentation and a week of flow logs gives the same allow-list.

The program classifies flows seen at the IoT gateway (synthetic flow log) against the hub's profile:

python · try it yourself
import ipaddress as ip

ZONES = {"staff": ip.ip_network("10.10.0.0/26"), "servers": ip.ip_network("10.10.0.64/27"),
         "iot": ip.ip_network("10.10.0.128/26"), "guest": ip.ip_network("10.10.0.192/26")}
def zone(addr):
    a = ip.ip_address(addr)
    return next((z for z, net in ZONES.items() if a in net), "internet")

# What the hub needs, in the spirit of a MUD profile (RFC 8520): destinations, protocols, ports
MUD = {"iot": [("internet", "tcp", 8883, "mqtt.lab.test"), ("internet", "tcp", 443, "updates.lab.test"),
               ("servers", "udp", 53, "dns"), ("servers", "udp", 123, "ntp")]}
ALLOW_INTO_IOT = [("staff", "tcp", 443)]       # the phone app on the staff Wi-Fi controls hubs locally over HTTPS

flows = [  # a slice of the flow log at the IoT VLAN's gateway (synthetic): src, dst, proto, port, dst name
    ("10.10.0.150", "203.0.113.40", "tcp", 8883, "mqtt.lab.test"),
    ("10.10.0.150", "10.10.0.70", "udp", 53, "dns"),
    ("10.10.0.12", "10.10.0.150", "tcp", 443, ""),
    ("10.10.0.151", "10.10.0.12", "tcp", 445, ""),            # camera -> staff PC, SMB
    ("10.10.0.151", "198.51.100.66", "tcp", 23, ""),          # camera -> Internet, Telnet
    ("10.10.0.151", "10.10.0.152", "tcp", 23, ""),            # camera -> another IoT device, Telnet
    ("10.10.0.150", "192.0.2.80", "tcp", 443, "updates.lab.test"),
]
def decide(src, dst, proto, port, name):
    zs, zd = zone(src), zone(dst)
    if zs == "iot" and zd == "iot":
        return "DENY: IoT-to-IoT (client isolation)"
    if zs == "iot":
        ok = any(z == zd and p == proto and pt == port and (n == name or z == "servers") for z, p, pt, n in MUD["iot"])
        return "allow (in profile)" if ok else f"DENY + alert: not in the device profile ({zs} -> {zd} {proto}/{port})"
    if zd == "iot":
        return "allow" if (zs, proto, port) in ALLOW_INTO_IOT else "DENY"
    return "not IoT traffic"
for f in flows:
    print(f"{f[0]:>12} -> {f[1]:<13} {f[2]}/{f[3]:<5} {decide(*f)}")
 10.10.0.150 -> 203.0.113.40  tcp/8883  allow (in profile)
 10.10.0.150 -> 10.10.0.70    udp/53    allow (in profile)
  10.10.0.12 -> 10.10.0.150   tcp/443   allow
 10.10.0.151 -> 10.10.0.12    tcp/445   DENY + alert: not in the device profile (iot -> staff tcp/445)
 10.10.0.151 -> 198.51.100.66 tcp/23    DENY + alert: not in the device profile (iot -> internet tcp/23)
 10.10.0.151 -> 10.10.0.152   tcp/23    DENY: IoT-to-IoT (client isolation)
 10.10.0.150 -> 192.0.2.80    tcp/443   allow (in profile)

The hub's own flows match its profile. The camera at .151 does three things no camera should: SMB to a staff PC, Telnet to the Internet, and Telnet to a neighbouring IoT device. That is the behaviour of an infected device spreading, and segmentation stops all three while the alerts name the device to isolate and investigate.

Practical problems and their answers

  • Discovery protocols: phones find casting devices and printers with mDNS (Bonjour) and SSDP, which don't cross VLANs. Use an mDNS gateway or reflector that forwards only selected service types from IoT to staff, not a bridge of everything.
  • Local control: apps that talk to devices directly need a narrow staff→IoT rule (HTTPS to the hub only), never IoT→staff.
  • Smart-home standards: Matter devices over Wi-Fi or Thread use IPv6 and a border router; plan IPv6 rules too, or the IPv4 segmentation is bypassed.
  • Cloud dependencies change with firmware updates: alerts on profile violations are also how you notice that a vendor added a destination. Review them; don't just widen the rule.
  • Wired IoT (cameras, building controllers) needs 802.1X or MAC-based port authentication with a VLAN assignment, so a device plugged into a staff port doesn't land in the staff zone.

How segmentation failures are detected

  • Flow logs and IDS at the IoT gateway: every denied flow from IoT is a signal; IoT devices initiating SMB, RDP, SSH or Telnet, scanning, or talking to new countries are high-priority alerts (IDS basics, Zeek logs).
  • Reachability tests from a test device placed in the IoT VLAN in your lab: it must not reach staff or servers beyond DNS and NTP.
  • Inventory drift: unknown MAC addresses in the IoT VLAN, IoT devices appearing on the staff SSID (users "fixing" connectivity by joining the wrong network).
  • Firewall rule review: broad iot → any rules added as a quick fix (firewall misconfiguration).

How it is fixed

  • Separate SSID and VLAN for IoT, with WPA3 or the best the devices support, PMF where possible.
  • Default deny between zones; per-device or per-type allow-lists, from MUD profiles or your own.
  • Client isolation inside the IoT zone; no IoT-initiated connections to staff.
  • Egress filtering for IoT: only the profile's destinations, DNS through your resolver (so lookups are logged), no direct Telnet/SSH outbound.
  • Monitor and respond: denied flows become alerts; a device that violates its profile is quarantined to a VLAN with no access while it is examined.

Pitfalls

  • One "IoT VLAN" that allows iot → any outbound: segmentation without egress control still lets a botnet scan the Internet from your address.
  • Forgetting IPv6, or Wi-Fi Direct and Bluetooth paths that bypass the network entirely.
  • Putting the IoT management interfaces (hub admin pages) on the IoT VLAN with no restriction on who can reach them.

Practice

1. Add the flow ("10.10.0.150", "10.10.0.70", "udp", 123, "ntp"). What does the program decide and why?

"allow (in profile)": the hub's profile allows UDP 123 to the servers zone, and 10.10.0.70 is in 10.10.0.64/27.

2. A user complains that the phone app can't find the hub since segmentation. What do you change, and what do you not change?

Add an mDNS gateway rule that forwards the hub's service type from the IoT VLAN to the staff VLAN, and keep the narrow staff→hub HTTPS rule. Don't bridge the VLANs or allow IoT→staff connections.

3. Why is "deny IoT-to-IoT" important even though all IoT devices are equally untrusted?

A compromised device would otherwise attack its neighbours, often older and weaker, and spread through the zone; Mirai-style malware scans the local network first. Isolation keeps each compromise to one device.

Test yourself

What does a MUD profile (RFC 8520) describe?

  1. A device's firmware version
  2. The network access a device needs, published by its manufacturer
  3. A Wi-Fi password
  4. The user's location

Which flow from the camera most clearly indicates compromise?

  1. DNS to the internal resolver
  2. Telnet to another IoT device and to the Internet
  3. MQTT over TLS to the broker
  4. NTP

How should phones discover devices across the IoT/staff boundary?

  1. Bridge the two VLANs
  2. Through an mDNS gateway that forwards only selected services
  3. Put the phones on the IoT VLAN
  4. Disable segmentation

Why is egress filtering needed in the IoT zone?

  1. To speed up updates
  2. So compromised devices can't reach arbitrary Internet hosts (scanning, C2, DDoS)
  3. It isn't needed
  4. To save IP addresses