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

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

UniFi Zone Matrix: Policy States for Server, CCTV and IoT Networks
Contents
  1. Understanding the Policy States
  2. Scenario 1: Securing a Server Network
  3. Scenario 2: Isolating CCTV and Smart Home (IoT)
  4. Questions and answers
  5. Sources

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).

Left, the three policy states Allow All, Allow Return and Block All. Right, a zone matrix with sources Internal, Server Network and IoT zone: Internal to server and IoT Allow All, server and IoT back to Internal Allow Return, IoT to External Block All. Below, the server and CCTV scenarios.
The three policy states of the UniFi Zone Matrix and the cells set in the server and CCTV/IoT scenarios.

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.

Questions and answers

Do VPN clients inherit the Internal zone in the UniFi zone matrix, or do they arrive in a zone of their own?

They arrive in a zone 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 a common mistake 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, such as the home automation interface on one port and 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 weakening the separation the setup just created.

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.

Write a comment

Experience with other hardware or firmware and questions about the configuration are welcome here.

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

Articles & categories

CCTV

Follow this category by RSS

Cloud & AI

All 11 articles in this category Follow this category by RSS

Data Privacy

All 18 articles in this category Follow this category by RSS

Digital Analytics

All 58 articles in this category Follow this category by RSS

Digital Marketing

All 37 articles in this category Follow this category by RSS

IT & Networks

All 17 articles in this category Follow this category by RSS

Music Production

All 16 articles in this category Follow this category by RSS

Raspberry PI

Follow this category by RSS

SaaS & Internet Earning

Articles coming soon

Smart Home

All 18 articles in this category Follow this category by RSS

Web Development

All 11 articles in this category Follow this category by RSS

WordPress Plugins & Tricks

All 13 articles in this category Follow this category by RSS