unifi-opnsense

UniFi + OPNSense

I like my UniFi access point and ethernet switches. I’m less impressed with their firewall/router offerings. So I have a comodity x86 machine running OPNSense. Mixing more than one ecosystem always comes with unique challenges. As I solve them, I’ll post solutions here in hopes someone else may find the information useful.

Network Topology

Network Topology Diagram

Figure 1: Hastily constructed network diagram using LibreOffice and Material Design icons.

Physical Layout

My home network consists of an 8-port UniFi POE switch at its core.

Logical Layout

The network is segmented into two virtual networks (VLANs), tagged as #1 and #10. Routing is handled by the OPNSense firewall.

Firewall Rule Visualization

Firewall Diagram

Figure 2: Another fabulous LibreOffice diagram, this time showing network traffic flow between firewall interfaces.

Setup Details

To go deeper than what’s shown in the diagrams, I’ve created a couple documents to detail the how and why.

IoT VLAN – The first challenge I ran into was creating a separate network for Internet of Things (IoT) devices when my firewall only has two physical ethernet ports. The short answer is VLANs. For the details, see the guide.

Firewall Rules – For a little insight into how I decided which devices should go on which VLAN and how to control access via OPNSense, I’ve created this explanation of the process and the resulting firewall rules.