The Difference Between VLANs and Real Network Security

Does splitting VLANs make a network secure? Not if routing between VLANs isn’t filtered. Four complementary controls that turn separation into access control.
Technical summary
Technology
IEEE 802.1Q, firewall, 802.1X
Topic
Network segmentation
Level
Start
In this article3 sections

“We’ve split our network into VLANs, segmentation’s done” is something often heard in security assessments. Looking at the core switch, though, you usually find all the VLAN interfaces on the same device, routed without filtering. VLANs are a valuable tool for network management; but on their own they don’t form a security boundary. Below we explain the difference and the complementary controls needed for real network security.

What does a VLAN do, and what doesn’t it do?

IEEE 802.1Q VLANs divide the same physical switch infrastructure into logical broadcast domains. Devices in different VLANs can’t reach each other directly over Layer 2; communication requires routing. The problem is this: in most organizations, inter-VLAN routing is done on the core switch without any filtering. In that case all the VLANs are completely open to each other.

Verifying this doesn’t require a complicated test. From a computer in the user VLAN, try connecting to a server’s management port in the server VLAN, an NVR in the camera VLAN, or an iDRAC interface on the management network. If the connection opens, segmentation exists only on paper. The network is flat for lateral movement.

Don’t underestimate the benefits VLANs provide either: they limit broadcast traffic, narrow the failure domain, organize addressing and create clean boundaries for writing security policy. In other words, a VLAN is a prerequisite for security. It isn’t security itself.

Structure What does it provide? Security boundary?
VLAN + unfiltered L3 routing Broadcast domain separation, ease of management No
VLAN + switch ACL Stateless basic filtering Partly
VLAN + firewall (stateful) Session tracking, application- and user-based rules, logging Yes
VLAN + firewall + NAC Control over which device joins which VLAN Yes, stronger

Four complementary controls for real separation

1. Inspect traffic between segments

Inter-VLAN routing should be done through a firewall or at least restricted with switch ACLs. The default stance should be “deny, allow what’s needed”; every allowed flow should be documented.

The difference between switch ACLs and a firewall isn’t only performance. Stateless ACLs require you to allow return traffic separately; that’s why in practice wide port ranges get opened and the rule set quickly becomes riddled with holes. ACLs also don’t produce detailed logs on most switches. If there’s no answer to “who talked between these two segments, and when?” during an incident, there’s no control either.

A common mistake in the migration is moving the VLAN interfaces from the core switch to the firewall in one go. First observe traffic on the firewall with permissive but logging rules, map the real flows, then narrow segment by segment. During this process, size the firewall’s capacity for inter-segment traffic; especially if backup and virtualization traffic will pass through the firewall, throughput can become a bottleneck.

2. Control access to the network

If a device plugged into an empty port lands in the user VLAN, segmentation loses much of its meaning. With 802.1X or MAC-based authentication (NAC), devices are placed in the right VLAN according to their identity; unrecognized devices land in a guest or quarantine network.

MAC-based authentication (MAB) is a practical solution for devices that don’t support 802.1X, such as printers and cameras, but MAC addresses can be spoofed. That’s why you should put devices admitted with MAB in a narrow segment just sufficient for their function. When rolling out 802.1X, start in monitor mode first; don’t let a meeting room lose its connection because of a device without a certificate.

The wireless network is subject to the same rule. Connecting the guest SSID to a separate VLAN isn’t enough; all traffic from this VLAN to the internal network should be blocked on the firewall, and only internet egress allowed. On the corporate SSID, using 802.1X instead of a shared password (PSK) prevents a departed employee or a visitor who wrote the password down somewhere from continuing to get on the network. A shared password is a shared door key.

3. Switch settings against Layer 2 attacks

  • Shut down unused ports and assign them to an unused VLAN.
  • Allow only the required VLANs on trunk ports; don’t use the native VLAN for user traffic (this reduces VLAN hopping risk).
  • Consider features such as DHCP snooping, Dynamic ARP Inspection and port security.

Disabling trunk negotiation (DTP on Cisco) on access ports and explicitly setting the port to access mode is an often-skipped setting. If an end-user port can automatically become a trunk, an attacker can reach all VLANs through switch spoofing. DHCP snooping, in turn, prevents a rogue DHCP server (often a home-grade modem brought to someone’s desk) from directing an entire floor to the wrong gateway. Because Dynamic ARP Inspection relies on the DHCP snooping binding table, the two should be planned together.

4. Separate the management network

Switch, firewall, hypervisor and server management cards (iDRAC/iLO) should be in a separate management segment and accessible only from management workstations.

When management interfaces are compromised, all other controls become meaningless for the attacker: firewall rules are changed, virtual machines are shut down through the hypervisor, backups are deleted. Grant access to the management segment not from the user VLAN but from a jump host protected by MFA. Management cards left with default passwords and reachable from the user network are a common audit finding.

Example: camera and IoT network

IP cameras and printers are generally devices that can’t receive updates and have weak management interfaces. Moving them to a separate VLAN is the first step; the real protection is a policy that allows traffic from this VLAN only to the recording server (NVR) and blocks internet egress.

The policy can be set up like this: from the camera VLAN to the NVR, only the required streaming protocols; from the NVR to the cameras, management access; from viewing clients to the NVR, viewing access. Traffic between cameras, and from cameras to the user network and the internet, is blocked. If a connection to the vendor’s cloud service is required, that egress is limited to specific destinations. A compromised camera is then a nuisance. It doesn’t turn into a network breach.

Before you start implementing, see the current state with a short checklist:

  • Where is inter-VLAN routing done, and is there a filter?
  • Can management interfaces be reached from the user VLAN?
  • Which VLAN does a device plugged into an empty wall socket land in?
  • Is an allowed VLAN list defined on trunk ports?
  • Is traffic between segments logged and read?

For setting up the VLAN and routing infrastructure, see the Eretek Network VLAN, Routing and Network Segmentation service; for security policies and access control between segments, see our Network Security and Segmentation and Firewall Rule Management pages.

Support

Contact us for support or a discovery session on this topic.

Contact form
[email protected]

Eretek Cybersecurity

Firewall, VPN, endpoint security and threat prevention. We reduce the attack surface and measure and report the risks.

Knowledge Center

Other articles