LW IT Solutions
« Blog Overview /IT & Networks / UniFi Zone Matrix: Policy States for Server,...
This post in other languages:

UniFi Zone Matrix: Policy States for Server, CCTV and IoT Networks

Mastering the UniFi Zone Matrix: Visual Firewall for Smart Homes and Servers

Managing firewall rules using traditional LAN IN / LAN OUT lists can be a nightmare, especially when a network grows to include IoT devices, cameras, and private servers. Ubiquiti has revolutionized this process in their UniFi ecosystem with the Zone Matrix, a visual representation of the firewall policies.

UniFi Zone Matrix: a table of source and destination zones whose cells read Allow All, Allow Return or Block All

As the referenced screenshot shows, the Zone Matrix provides a grid where the Y-axis represents the Source (where the traffic originates) and the X-axis represents the Destination (where the traffic is going).

Diagram for the article: Understanding the Policy States, Scenario 1: Securing a Server Network, Scenario 2: Isolating CCTV and Smart Home
The sequence from the article in 3 steps: Understanding the Policy States, Scenario 1: Securing a Server Network, Scenario 2: Isolating CCTV and Smart Home.

Understanding the Policy States

The matrix uses color-coded blocks to define routing behavior:

  • Allow All (Green): The Source can freely initiate connections to the Destination.
  • Allow Return (Blue): The Source cannot initiate new connections to the Destination. It can only send data back if the Destination initiated the connection first (stateful inspection).
  • Block All (Red): Absolute isolation. No traffic can pass from Source to Destination.

Scenario 1: Securing a Server Network

A common security best practice is allowing internal trusted devices to access a local server (like a NAS or Home Assistant), while preventing that server from actively scanning or connecting to private devices if it gets compromised.

The screenshot at the top of this post shows exactly how:

  1. Set the policy from Source: Internal to Destination: Server Network as Allow All (Green). This lets the laptop access the server.
  2. Set the policy from Source: Server Network to Destination: Internal as Allow Return (Blue). This configuration ensures the server can reply to the laptop’s requests but is physically incapable of initiating a new connection to the internal network.

Scenario 2: Isolating CCTV and Smart Home (IoT)

Smart home devices and IP cameras are notoriously vulnerable to hacking. They should never have free access to the main trusted network. The Zone Matrix makes a “bulletproof” IoT isolation possible:

  1. Assign the cameras and smart home devices to a dedicated VLAN and map it to a specific Zone (the DMZ or Hotspot zone works, as does a custom “IoT” zone).
  2. Set Source: Internal to Destination: IoT Zone as Allow All. This allows a smartphone on the main Wi-Fi to view camera feeds or control smart lights locally.
  3. Set Source: IoT Zone to Destination: Internal as Allow Return (or Block All if no local control is needed and everything goes through the cloud).
  4. To prevent cameras from accessing the internet, set Source: IoT Zone to Destination: External as Block All.
Lukas Wojcik

Lukas Wojcik

Systems architect and technology enthusiast specializing in scalable tracking solutions, GMP Stack (GA4 & GTM), and robust backend architectures. Advocate for clean code and privacy-first design.

Get in Touch

Briefly describe your project or inquiry for a tailored response. This site is protected by reCAPTCHA.

2 comments

  1. Callan Hughes

    colour-coding the intent rather than the packet flow is what makes this readable six months later — the old rule lists always needed a mental replay of the rotuing chain.

    One case I cannot place in the matrix: remote access. Do VPN clients inherit the internal zone, or do they arrive as something of their own?

    1. Lukas Wojcik Author

      Something of their own. The VPN network is a network like any other and gets assigned to a zone; it does not inherit anything from the internal one, and expecting it to is the most common surprise when the matrix is introduced.

      That is worth treating as a feature rather than an inconvenience. Remote access in its own zone can be granted exactly what it needs — the home automation interface on one port, the NAS on another — while the rest of the internal network stays out of reach for a device that is, by definition, somewhere else and possibly not fully trusted.

      Two cells then deserve a deliberate answer instead of a default. VPN to Internal is the one that carries the actual access, so it belongs narrowed to hosts and ports. And Internal to VPN is usually not needed at all: a laptop at home rarely has to open a connection into a remote client, and leaving that cell open is a quiet way of undoing the separation the setup just created.

Write a comment

The email address is not published. Required fields are marked with an asterisk.

ALL ARTICLES & CATEGORIES

CCTV

Follow this category by RSS

Cloud & AI

Follow this category by RSS

Data Privacy

All 11 articles in this category Follow this category by RSS

Digital Analytics

All 44 articles in this category Follow this category by RSS

Digital Marketing

All 25 articles in this category Follow this category by RSS

IT & Networks

All 15 articles in this category Follow this category by RSS

Raspberry PI

Follow this category by RSS

Smart Home

All 11 articles in this category Follow this category by RSS

Web Development

Follow this category by RSS

WordPress Plugins & Tricks

Follow this category by RSS