<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Lazro on Medium]]></title>
        <description><![CDATA[Stories by Lazro on Medium]]></description>
        <link>https://medium.com/@lazro?source=rss-1983c9e8469b------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*3puJcU3fSp624fmgObYGrg.png</url>
            <title>Stories by Lazro on Medium</title>
            <link>https://medium.com/@lazro?source=rss-1983c9e8469b------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 20:00:38 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@lazro/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Securing Wazuh with UniFi: Network Configuration for SIEM Deployment]]></title>
            <link>https://medium.com/@lazro/securing-wazuh-with-unifi-network-configuration-for-siem-deployment-2e6a310cb0fb?source=rss-1983c9e8469b------2</link>
            <guid isPermaLink="false">https://medium.com/p/2e6a310cb0fb</guid>
            <category><![CDATA[unifi]]></category>
            <category><![CDATA[ubiquiti]]></category>
            <category><![CDATA[network-security]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Lazro]]></dc:creator>
            <pubDate>Thu, 26 Mar 2026 01:34:55 GMT</pubDate>
            <atom:updated>2026-03-26T01:34:55.754Z</atom:updated>
            <content:encoded><![CDATA[<p><em>This article was written with the help of Sonnet 4.5 on Claude.ai. All outputs were reviewed for accuracy and confirmed working on UniFi OS 5.0.12.</em></p><h3>Overview</h3><p>This guide focuses exclusively on configuring UniFi OS 5.0.12 to support a Wazuh SIEM deployment. It assumes you already have a Wazuh server installed and running, and covers the network configuration needed to enable both internal and external agent connectivity while maintaining security through VLAN isolation and controlled firewall policies.</p><p><strong>Prerequisites:</strong></p><ul><li>Wazuh server already installed and configured</li><li>Wazuh dashboard configured on port 8443</li><li>DuckDNS subdomain registered and pointing to your public IP</li><li>Cloud Gateway Ultra running UniFi OS 5.0.12</li><li>Static IP assigned to Wazuh server</li></ul><p><strong>What This Guide Covers:</strong></p><ul><li>Port forwarding for external agent connectivity</li><li>Firewall policies for internal agent access</li><li>Teleport VPN access for secure dashboard access</li><li>Network isolation best practices</li></ul><p><strong>What This Guide Does NOT Cover:</strong></p><ul><li>Wazuh server installation</li><li>Wazuh configuration</li><li>Agent installation and deployment</li></ul><h3>Understanding the Network Requirements</h3><h3>Wazuh Communication Ports</h3><p><strong>Agent Communication:</strong></p><ul><li><strong>Port 1514 (TCP):</strong> Agent log transmission and communication</li><li><strong>Port 1515 (TCP):</strong> Agent enrollment and authentication</li></ul><p><strong>Dashboard Access:</strong></p><ul><li><strong>Port 8443 (HTTPS):</strong> Wazuh web interface (changed from default 443 to avoid conflict with UniFi OS)</li></ul><h3>Network Access Patterns</h3><p><strong>External Agents:</strong></p><ul><li>Laptops, mobile devices outside your network</li><li>Connect via DuckDNS hostname (e.g., yourdomain.duckdns.org)</li><li>Route through port forwarding on ports 1514 and 1515</li></ul><p><strong>Internal Agents:</strong></p><ul><li>Workstations, servers on your local VLANs</li><li>Can use DuckDNS hostname (hairpin NAT) or local IP</li><li>Require firewall policies to reach Wazuh VLAN</li></ul><p><strong>Dashboard Access:</strong></p><ul><li>Never exposed directly to internet</li><li>Access via Teleport VPN for security</li><li>Requires port 8443 access through firewall</li></ul><h3>Why This Configuration?</h3><p><strong>Single Agent Configuration:</strong> Using DuckDNS for all agents means laptops work seamlessly whether at home or traveling. No need to maintain separate configurations or reconfigure when location changes.</p><p><strong>Security Through Isolation:</strong> Wazuh server on dedicated VLAN with controlled access prevents unauthorized systems from reaching sensitive security infrastructure.</p><p><strong>Secure Remote Access:</strong> Dashboard access through Teleport VPN eliminates internet exposure while enabling administration from anywhere.</p><h3>Part 1: Prerequisites and Preparation</h3><h3>Verify Wazuh Server Configuration</h3><p>Before configuring UniFi, confirm:</p><ol><li><strong>Wazuh server is accessible locally</strong> at its static IP on port 8443</li><li><strong>Static IP is assigned</strong> to Wazuh server in UniFi</li><li><strong>Wazuh is on isolated VLAN</strong> (typically security or monitoring VLAN)</li><li><strong>DuckDNS is configured</strong> and resolving to your public IP</li></ol><h3>Verify UniFi Teleport VPN</h3><p>Ensure Teleport VPN is enabled and functioning:</p><ol><li>Navigate to <strong>Settings</strong> → <strong>Teleport &amp; VPN</strong></li><li>Verify <strong>Teleport VPN</strong> shows as “Active”</li><li>Test connection from WiFiman app or Teleport client</li></ol><h3>Create Teleport VPN Network List</h3><p>You’ll need a network list for Teleport VPN clients to use in firewall policies:</p><ol><li>Navigate to <strong>Settings</strong> → <strong>Profiles</strong> → <strong>Network Lists</strong></li><li>Click <strong>Add New</strong></li><li>Configure:</li></ol><ul><li><strong>Name:</strong> Teleport VPN Clients</li><li><strong>Type:</strong> IPv4</li><li><strong>Address/Subnet:</strong> Your Teleport subnet (verify by connecting to Teleport and checking assigned IP)</li></ul><p>4. Click <strong>Save</strong></p><p><strong>Finding Your Teleport Subnet:</strong></p><ol><li>Connect to Teleport VPN via WiFiman app</li><li>Check your assigned IP address</li><li>Use the first three octets with .0/24 (e.g., if assigned 192.168.13.5, subnet is 192.168.13.0/24)</li></ol><h3>Part 2: Port Forwarding Configuration</h3><p>Port forwarding enables external agents to connect to your Wazuh server from anywhere using your DuckDNS hostname.</p><h3>Step 1: Forward Agent Communication Port</h3><ol><li>Navigate to <strong>Settings</strong> → <strong>Policy Engine</strong></li><li>Click <strong>Create New Policy</strong></li><li>Select <strong>Port Forwarding</strong></li><li>Configure:</li></ol><ul><li><strong>Name:</strong> Wazuh Agent Communication</li><li><strong>WAN Interface:</strong> WAN1 (Default)</li><li><strong>WAN Port:</strong> 1514</li><li><strong>From:</strong> Any</li><li><strong>Forward IP Address:</strong> Your Wazuh server’s static IP (Select Device)</li><li><strong>Forward Port:</strong> 1514</li><li><strong>Protocol:</strong> TCP</li></ul><p>5. Click <strong>Add</strong></p><h3>Step 2: Forward Agent Enrollment Port</h3><ol><li>Navigate to <strong>Settings</strong> → <strong>Policy Engine</strong></li><li>Click <strong>Create New Policy</strong></li><li>Select <strong>Port Forwarding</strong></li><li>Configure:</li></ol><ul><li><strong>Name:</strong> Wazuh Agent Enrollment</li><li><strong>WAN Interface:</strong> WAN1 (Default)</li><li><strong>WAN Port:</strong> 1515</li><li><strong>From:</strong> Any</li><li><strong>Forward IP Address:</strong> Your Wazuh server’s static IP (Select Device)</li><li><strong>Forward Port:</strong> 1515</li><li><strong>Protocol:</strong> TCP</li></ul><p>5. Click <strong>Add</strong></p><h3>Understanding Port Forwarding</h3><p><strong>What Happens:</strong></p><ol><li>External agent resolves yourdomain.duckdns.org to your public IP</li><li>Agent connects to public IP on port 1514 or 1515</li><li>Cloud Gateway forwards traffic to Wazuh server’s internal IP</li><li>Agent communicates with Wazuh server</li></ol><p><strong>Security Note:</strong> Only ports 1514 and 1515 are exposed. Dashboard port 8443 is NOT forwarded, keeping it inaccessible from internet.</p><h3>Part 3: Firewall Policy Configuration</h3><h3>Policy 1: External Access to Wazuh</h3><p>This policy allows external agents to reach your Wazuh server through port forwarding:</p><ol><li>Navigate to <strong>Settings</strong> → <strong>Policy Engine</strong></li><li>Click <strong>Create New Policy</strong></li><li>Select <strong>Firewall</strong></li><li>Configure:</li></ol><ul><li><strong>Name:</strong> External to Wazuh</li><li><strong>Source Zone:</strong> External</li><li><strong>Source Port:</strong> Any</li><li><strong>Action:</strong> Allow</li><li><strong>Auto Allow Return Traffic:</strong> Checked</li><li><strong>Destination Zone:</strong> Internal</li><li><strong>Check box for IP Address</strong></li><li><strong>Destination IP:</strong> Your Wazuh server’s static IP</li><li><strong>Destination Port:</strong> 1514,1515</li><li><strong>Protocol:</strong> TCP</li></ul><p>5. Click <strong>Add Policy</strong></p><h3>Policy 2: Internal Access to Wazuh</h3><p>This policy allows devices on your internal VLANs to reach the Wazuh server:</p><ol><li>Navigate to <strong>Settings</strong> → <strong>Policy Engine</strong></li><li>Click <strong>Create New Policy</strong></li><li>Select <strong>Firewall</strong></li><li>Configure:</li></ol><ul><li><strong>Name:</strong> Internal to Wazuh</li><li><strong>Source Zone:</strong> Internal</li><li><strong>Source Networks:</strong> Select all VLANs with agents (workstations, servers, IoT devices, etc.)</li><li><strong>Source Port:</strong> Any</li><li><strong>Action:</strong> Allow</li><li><strong>Auto Allow Return Traffic:</strong> Checked</li><li><strong>Destination Zone:</strong> Internal</li><li><strong>Check box for IP Address</strong></li><li><strong>Destination IP:</strong> Your Wazuh server’s static IP</li><li><strong>Destination Port:</strong> 1514,1515</li><li><strong>Protocol:</strong> TCP</li></ul><p>5. Click <strong>Add Policy</strong></p><p><strong>Which VLANs to Include:</strong></p><ul><li>Workstation/laptop VLANs</li><li>Server VLANs</li><li>IoT device VLANs (if monitoring smart home devices)</li><li>Any VLAN with systems you want to monitor</li></ul><h3>Policy 3: Teleport VPN Access to Dashboard</h3><p>This policy enables secure remote access to the Wazuh dashboard:</p><ol><li>Navigate to <strong>Settings</strong> → <strong>Policy Engine</strong></li><li>Click <strong>Create New Policy</strong></li><li>Select <strong>Firewall</strong></li><li>Configure:</li></ol><ul><li><strong>Name:</strong> Teleport to Wazuh</li><li><strong>Source Zone:</strong> External</li><li><strong>Source:</strong> IP</li><li><strong>Source Type:</strong> List</li><li><strong>Source List:</strong> Teleport VPN Clients</li><li><strong>Source Port:</strong> Any</li><li><strong>Action:</strong> Allow</li><li><strong>Auto Allow Return Traffic:</strong> Checked</li><li><strong>Destination Zone:</strong> Internal</li><li><strong>Check box for IP Address</strong></li><li><strong>Destination IP:</strong> Your Wazuh server’s static IP</li><li><strong>Destination Port:</strong> 8443</li><li><strong>Protocol:</strong> TCP</li></ul><p>5. Click <strong>Add Policy</strong></p><h3>Part 4: Understanding Hairpin NAT</h3><h3>What is Hairpin NAT?</h3><p>When internal agents use your DuckDNS hostname instead of a local IP:</p><ol><li>Agent resolves yourdomain.duckdns.org to your public IP</li><li>Traffic routes to your WAN interface</li><li>Port forwarding sends it back to internal Wazuh server</li><li>Connection succeeds</li></ol><p>This “loopback” behavior is called hairpin NAT or NAT reflection.</p><h3>Why Use DuckDNS for Internal Agents?</h3><p><strong>Benefits:</strong></p><ul><li><strong>Single configuration:</strong> Laptops that travel use the same config at home and away</li><li><strong>No management overhead:</strong> No need to track which agents are internal vs external</li><li><strong>Automatic failover:</strong> Agent works regardless of location</li><li><strong>Simplified deployment:</strong> One agent configuration for all systems</li></ul><p><strong>How It Works:</strong></p><ul><li>At home: Hairpin NAT routes traffic back to internal server</li><li>Away: Standard port forwarding handles external connection</li><li>Agent doesn’t know or care about location</li></ul><h3>Verifying Hairpin NAT</h3><p>Test from an internal device:</p><pre># Test agent communication port<br>nc -zv yourdomain.duckdns.org 1514</pre><pre># Test agent enrollment port  <br>nc -zv yourdomain.duckdns.org 1515</pre><p>Both should connect successfully, confirming hairpin NAT is working.</p><p><strong>If Tests Fail:</strong></p><ul><li>Verify port forwarding is configured correctly</li><li>Check that “Internal to Wazuh” firewall policy includes the testing device’s VLAN</li><li>Ensure DuckDNS is resolving to your current public IP</li></ul><h3>Part 5: Accessing Wazuh Dashboard</h3><h3>Remote Access via Teleport VPN</h3><p><strong>From Mobile Device:</strong></p><ol><li>Open WiFiman app</li><li>Tap Teleport icon</li><li>Connect to your home network</li><li>Open browser</li><li>Navigate to <a href="https://wazuh-server-ip:8443/">https://wazuh-server-ip:8443</a></li><li>Login with Wazuh credentials</li></ol><p><strong>From Computer:</strong></p><ol><li>Install UniFi Teleport app or use WiFiman</li><li>Connect to Teleport VPN</li><li>Open browser</li><li>Navigate to https://wazuh-server-ip:8443 or https://wazuh.local:8443 (if local DNS configured)</li><li>Accept security certificate warning (self-signed)</li><li>Login with Wazuh credentials</li></ol><h3>Local Access (On Internal Network)</h3><p>From any device on VLANs with access to the Wazuh server:</p><ol><li>Navigate to <a href="https://wazuh-server-ip:8443/">https://wazuh-server-ip:8443</a></li><li>Accept certificate warning</li><li>Login with credentials</li></ol><h3>Why Not Expose Dashboard to Internet?</h3><p><strong>Security Risks of Direct Exposure:</strong></p><ul><li>Dashboard provides complete visibility into your network security</li><li>Contains sensitive security event data</li><li>Exposed interfaces are prime targets for attacks</li><li>Additional attack surface for credential stuffing</li></ul><p><strong>Benefits of Teleport VPN Access:</strong></p><ul><li>Dashboard never exposed to internet</li><li>VPN provides encryption and authentication</li><li>Can access entire home network securely</li><li>No additional ports to manage or secure</li></ul><h3>Part 6: Testing and Verification</h3><h3>Test External Agent Connectivity</h3><p>From outside your network (cellular data):</p><pre># Test agent ports<br>nc -zv yourdomain.duckdns.org 1514<br>nc -zv yourdomain.duckdns.org 1515</pre><p>Both should show successful connection.</p><h3>Test Internal Agent Connectivity</h3><p>From device on internal VLAN:</p><pre># Using DuckDNS (tests hairpin NAT)<br>nc -zv yourdomain.duckdns.org 1514<br>nc -zv yourdomain.duckdns.org 1515</pre><pre># Using local IP (tests internal policy)<br>nc -zv wazuh-server-ip 1514<br>nc -zv wazuh-server-ip 1515</pre><p>All tests should succeed.</p><h3>Test Dashboard Access</h3><p><strong>Via Teleport:</strong></p><ol><li>Connect to Teleport VPN</li><li>Access <a href="https://wazuh-server-ip:8443/">https://wazuh-server-ip:8443</a></li><li>Should load dashboard login</li></ol><p><strong>Without VPN (should fail):</strong></p><ol><li>Disconnect from Teleport</li><li>Try accessing <a href="https://yourdomain.duckdns.org:8443/">https://yourdomain.duckdns.org:8443</a></li><li>Should timeout (port not forwarded)</li></ol><h3>Verify in UniFi Analytics</h3><p><strong>Check Port Forwarding:</strong></p><ol><li>Navigate to <strong>Insights</strong> → <strong>Traffic</strong></li><li>Filter by destination IP (Wazuh server)</li><li>Should see connections on ports 1514 and 1515</li></ol><p><strong>Check Policy Usage:</strong></p><ol><li>View firewall policies in Policy Engine</li><li>Policies should show traffic counters</li><li>Confirms policies are active and being used</li></ol><h3>Part 7: Security Best Practices</h3><h3>Network-Level Security</h3><ol><li><strong>Isolate Wazuh Server:</strong></li></ol><ul><li>Keep on dedicated VLAN</li><li>Separate from production workloads</li><li>Apply principle of least privilege for access</li></ul><p><strong>2. Review Firewall Policies Regularly:</strong></p><ul><li>Quarterly review which VLANs have access</li><li>Remove access for decommissioned networks</li><li>Verify policies match current infrastructure</li></ul><p><strong>3. Monitor External Connections:</strong></p><ul><li>Use UniFi traffic analytics</li><li>Alert on unusual connection patterns</li><li>Review connection sources regularly</li></ul><p><strong>4. Limit Dashboard Exposure:</strong></p><ul><li>NEVER forward port 8443 to internet</li><li>Always use Teleport VPN for remote access</li><li>Consider IP whitelisting for additional security</li></ul><h3>Port Forwarding Security</h3><ol><li><strong>Only Forward Required Ports:</strong></li></ol><ul><li>Ports 1514 and 1515 only</li><li>Dashboard port 8443 stays internal</li><li>No unnecessary exposure</li></ul><p><strong>2. Monitor Port Forwarding Rules:</strong></p><ul><li>Document all forwarding rules</li><li>Review annually or when infrastructure changes</li><li>Remove unused rules promptly</li></ul><p><strong>3. DuckDNS Security:</strong></p><ul><li>Keep token secure</li><li>Update IP addresses automatically</li><li>Monitor for unauthorized changes</li></ul><h3>Teleport VPN Security</h3><ol><li><strong>Strong Ubiquiti Account:</strong></li></ol><ul><li>Use complex password</li><li>Enable two-factor authentication</li><li>Don’t share credentials</li></ul><p><strong>2. Monitor VPN Access:</strong></p><ul><li>Review Teleport connection logs</li><li>Alert on connections from unexpected locations</li><li>Disable if not actively used</li></ul><p><strong>3. Keep Teleport Updated:</strong></p><ul><li>Update UniFi OS regularly</li><li>Review Teleport release notes</li><li>Test after major updates</li></ul><h3>Part 8: Troubleshooting Common Issues</h3><h3>External Agents Can’t Connect</h3><p><strong>Symptoms:</strong></p><ul><li>Agent shows disconnected in Wazuh dashboard</li><li>Connection timeouts on ports 1514/1515</li><li>Agent logs show connection failures</li></ul><p><strong>Solutions:</strong></p><ol><li>Verify DuckDNS resolves to correct public IP</li><li>Check port forwarding rules are active</li><li>Confirm “External to Wazuh” firewall policy is enabled</li><li>Test ports from external network: nc -zv yourdomain.duckdns.org 1514</li><li>Check UniFi logs for blocked connections</li></ol><h3>Internal Agents Can’t Connect</h3><p><strong>Symptoms:</strong></p><ul><li>Hardwired agents work but WiFi agents fail</li><li>Agents on some VLANs work, others don’t</li><li>Hairpin NAT test fails</li></ul><p><strong>Solutions:</strong></p><ol><li>Verify agent’s VLAN is in “Internal to Wazuh” policy’s Source Networks</li><li>Check that VLAN has isolation enabled (if isolated, needs explicit policy)</li><li>Confirm Wazuh server’s static IP hasn’t changed</li><li>Test connection: nc -zv wazuh-server-ip 1514</li><li>Review firewall logs for blocked traffic</li></ol><h3>Can’t Access Dashboard via Teleport</h3><p><strong>Symptoms:</strong></p><ul><li>Connection timeout to dashboard</li><li>Certificate errors</li><li>“This site can’t be reached”</li></ul><p><strong>Solutions:</strong></p><ol><li>Verify Teleport VPN connection is active (green in WiFiman)</li><li>Confirm “Teleport to Wazuh” policy is enabled</li><li>Check Teleport network list includes correct subnet</li><li>Verify Wazuh dashboard is running: sudo systemctl status wazuh-dashboard</li><li>Test local access first (from device on internal VLAN)</li></ol><h3>Hairpin NAT Not Working</h3><p><strong>Symptoms:</strong></p><ul><li>Internal agents using DuckDNS can’t connect</li><li>External connection works, internal doesn’t</li><li>Port tests fail from internal network</li></ul><p><strong>Solutions:</strong></p><ol><li>Verify Cloud Gateway Ultra supports hairpin NAT (it should)</li><li>Check “Internal to Wazuh” firewall policy includes testing device’s VLAN</li><li>Confirm port forwarding rules are correct</li><li>Test using local IP instead: nc -zv wazuh-server-ip 1514</li><li>If local IP works but DuckDNS doesn’t, hairpin NAT may be disabled</li></ol><h3>Conclusion</h3><p>Proper UniFi network configuration is essential for secure and functional Wazuh SIEM deployment. By implementing port forwarding for external agents, targeted firewall policies for internal access, and Teleport VPN for dashboard administration, you’ve created a network architecture that balances security with operational needs.</p><p><strong>What You’ve Accomplished:</strong></p><p><strong>Secure External Access:</strong> Traveling laptops and remote devices can connect to your Wazuh server from anywhere while maintaining security through controlled port forwarding and firewall policies.</p><p><strong>Internal Network Isolation:</strong> Wazuh server operates on an isolated VLAN, accessible only through explicit firewall policies. Even compromised systems on other VLANs cannot reach your security infrastructure without authorization.</p><p><strong>Unified Agent Configuration:</strong> Using DuckDNS for all agents provides seamless connectivity whether devices are at home or traveling. Hairpin NAT ensures the same configuration works in both scenarios without manual intervention.</p><p><strong>Protected Dashboard Access:</strong> The Wazuh dashboard is never exposed to the internet. Remote access requires Teleport VPN connection, adding authentication and encryption layers while enabling secure administration from anywhere.</p><p><strong>Enterprise-Grade Network Security:</strong> The techniques demonstrated — VLAN isolation, IP-based firewall targeting, controlled port forwarding, and VPN-secured administration — implement best practices used in enterprise environments.</p><p>This network configuration provides the foundation for comprehensive security monitoring across your entire infrastructure. Whether monitoring 5 systems or 500, the architecture scales seamlessly by adding VLANs to firewall policies and deploying agents with consistent configuration.</p><p>The combination of UniFi’s robust networking capabilities and Wazuh’s powerful security monitoring creates a professional-grade security operations center that protects your infrastructure while maintaining the flexibility needed for modern remote work environments.</p><h3>References and Resources</h3><ul><li><strong>UniFi Documentation</strong>: <a href="https://help.ui.com/">https://help.ui.com/</a></li><li><strong>UniFi Teleport VPN Guide</strong>: <a href="https://help.ui.com/hc/en-us/articles/115005445768">https://help.ui.com/hc/en-us/articles/115005445768</a></li><li><strong>DuckDNS</strong>: <a href="https://www.duckdns.org/">https://www.duckdns.org/</a></li><li><strong>Wazuh Documentation</strong>: <a href="https://documentation.wazuh.com/">https://documentation.wazuh.com/</a></li><li><strong>Network Segmentation Best Practices</strong>: NIST Special Publication 800–125B</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2e6a310cb0fb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building a Homelab SIEM: Installing and Tuning Wazuh on Ubuntu 24.04 LTS]]></title>
            <link>https://medium.com/@lazro/building-a-homelab-siem-installing-and-tuning-wazuh-on-ubuntu-24-04-lts-caee74d2381b?source=rss-1983c9e8469b------2</link>
            <guid isPermaLink="false">https://medium.com/p/caee74d2381b</guid>
            <category><![CDATA[wazuh]]></category>
            <category><![CDATA[ubuntu]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[homelab]]></category>
            <category><![CDATA[siem]]></category>
            <dc:creator><![CDATA[Lazro]]></dc:creator>
            <pubDate>Thu, 26 Mar 2026 01:30:48 GMT</pubDate>
            <atom:updated>2026-03-26T03:55:25.766Z</atom:updated>
            <content:encoded><![CDATA[<p><em>This article was written with the help of Claude Sonnet 4.6 on Claude.ai. All outputs were reviewed for accuracy and confirmed working on Ubuntu 24.04.3 LTS with Wazuh 4.14.</em></p><h3>Overview</h3><p>This guide covers installing and configuring a Wazuh SIEM server on an Ubuntu 24.04 workstation that is already running Plex. It focuses on the homelab reality: shared hardware, machines that go offline for days or weeks, and the need to coexist with other services without consuming all available resources.</p><p><strong>Prerequisites:</strong></p><ul><li>Ubuntu 24.04 LTS workstation with existing services (e.g., Plex)</li><li>16GB+ RAM recommended (8GB minimum)</li><li>15GB+ free disk space for the Wazuh stack</li><li>Static LAN IP assigned to the workstation</li><li>sudo access</li></ul><p><strong>What This Guide Covers:</strong></p><ul><li>Installing Wazuh all-in-one on Ubuntu 24.04</li><li>Tuning JVM heap to coexist with other services</li><li>Configuring agent disconnection behavior for homelab use</li><li>Changing the dashboard port to avoid conflicts with UniFi OS</li><li>Setting up DuckDNS for external agent connectivity</li><li>Verifying services and accessing the dashboard</li></ul><p><strong>What This Guide Does NOT Cover:</strong></p><ul><li>Firewall and port configuration — covered in the companion article: <em>Securing Wazuh with UniFi: Network Configuration for SIEM Deployment</em></li><li>Agent installation and deployment on client machines</li><li>Advanced Wazuh rules and alert customization</li></ul><h3>Understanding the Resource Requirements</h3><h3>Wazuh Components</h3><p>Wazuh’s all-in-one deployment runs three services on the same machine:</p><ul><li><strong>Wazuh Indexer:</strong> OpenSearch-based storage and search engine — the heaviest component</li><li><strong>Wazuh Manager:</strong> Analyzes data from agents and triggers alerts</li><li><strong>Wazuh Dashboard:</strong> Web UI for monitoring and administration</li></ul><h3>Hardware Considerations</h3><p><strong>RAM</strong></p><p>The installer auto-assigns the OpenSearch JVM heap to half of available RAM. On a 16GB machine that is 8GB — too aggressive when sharing with Plex. This guide caps it at 1GB, which is sufficient for a 6-agent homelab.</p><p><strong>Disk I/O</strong></p><p>Plex reads large sequential media files. OpenSearch writes lots of small random index files. These are competing I/O patterns. On an enterprise drive like the Seagate Exos X16 this is manageable.</p><p><strong>Ports</strong></p><p>Wazuh uses ports 1514/1515 for agent communication and 443 for the dashboard by default. Port 443 conflicts with UniFi OS. This guide moves the dashboard to port 8443.</p><h3>Hardware Used in This Guide</h3><ul><li>Motherboard: ASUS WS C246M PRO Series</li><li>CPU: Intel Xeon E-2124 (4 cores)</li><li>RAM: 16GB DDR4–2400 ECC</li><li>Storage: Seagate Exos X16 14TB 7200 RPM SATA</li><li>OS: Ubuntu 24.04.3 LTS</li><li>Existing services: Plex Media Server</li><li>Monitored endpoints: 5 client machines + the server itself</li></ul><h3>Part 1: Pre-Flight Checks</h3><p>Before installing, update your system and note the server’s LAN IP — you will need it throughout this guide.</p><pre>sudo apt update &amp;&amp; sudo apt upgrade -y<br>ip a</pre><p>Confirm at least 15GB free disk space:</p><pre>df -h /</pre><h3>Part 2: Install Wazuh (All-in-One)</h3><p>Wazuh provides an official installation script that handles all three components — Indexer, Manager, and Dashboard — in a single pass. This is the correct approach for a single-node homelab deployment.</p><h3>Step 1: Download and Run the Installer</h3><pre>/usr/bin/curl -sO https://packages.wazuh.com/4.14/wazuh-install.sh<br>sudo bash ./wazuh-install.sh -a</pre><p>This takes 10–20 minutes. When it finishes, the terminal prints your admin credentials:</p><pre>INFO: --- Summary ---<br>INFO: You can access the web interface https://&lt;your-ip&gt;<br>     User: admin<br>     Password: &lt;generated-password&gt;</pre><p><strong>Copy that password immediately.</strong> You can also retrieve it later with:</p><pre>sudo tar -O -xvf wazuh-install-files.tar wazuh-install-files/wazuh-passwords.txt</pre><h3>Part 3: Cap the JVM Heap</h3><p>The installer sets the OpenSearch heap to half of available RAM automatically. Verify what it set and correct it if needed.</p><pre>sudo nano /etc/wazuh-indexer/jvm.options</pre><p>Locate the heap size lines. They should read:</p><pre>-Xms1024m<br>-Xmx1024m</pre><p>If the values are higher (e.g., 8g), change both lines to 2g or 3g. The Xms (minimum) and Xmx (maximum) values must always be identical — mismatched values cause JVM heap resizing at runtime, which degrades performance. For a 6-agent homelab, 1024m (1GB) is ideal.</p><p>After any changes, restart the indexer:</p><pre>sudo systemctl restart wazuh-indexer</pre><h3>Part 4: Tune Agent Disconnection Behavior</h3><p>Out of the box, Wazuh marks agents as disconnected after 15 minutes offline. In a homelab where machines are powered off for days or weeks, this produces constant noise — a gaming laptop offline during the school week should not be triggering alerts.</p><p>Edit the manager configuration:</p><pre>sudo nano /var/ossec/etc/ossec.conf</pre><p>Find the &lt;global&gt; section and update it:</p><pre>&lt;global&gt;<br>  &lt;agents_disconnection_time&gt;1d&lt;/agents_disconnection_time&gt;<br>  &lt;agents_disconnection_alert_time&gt;0&lt;/agents_disconnection_alert_time&gt;<br>&lt;/global&gt;</pre><p><strong>What these values do:</strong></p><ul><li><strong>agents_disconnection_time: 1d</strong> — a machine must be offline a full day before Wazuh marks it disconnected</li><li><strong>agents_disconnection_alert_time: 0</strong> — never generate an alert when agents disconnect, regardless of how long they are offline</li></ul><p>Agents will still appear grayed out in the dashboard when offline. When a machine comes back online after two weeks, the agent reconnects and resumes reporting silently — no manual intervention needed.</p><p>Restart the manager:</p><pre>sudo systemctl restart wazuh-manager</pre><h3>Part 5: Change the Dashboard Port</h3><p>Wazuh’s dashboard runs on port 443 by default. If you are running UniFi OS or any other HTTPS service on the same machine or network, this will conflict. Moving it to port 8443 resolves the issue cleanly.</p><pre>sudo nano /etc/wazuh-dashboard/opensearch_dashboards.yml</pre><p>Find and change:</p><pre>server.port: 443</pre><p>To:</p><pre>server.port: 8443</pre><pre>sudo systemctl restart wazuh-dashboard</pre><p>The dashboard is now accessible at https://&lt;your-ip&gt;:8443.</p><h3>Part 6: Verify All Services</h3><p>Confirm all four Wazuh components are running:</p><pre>sudo systemctl status wazuh-indexer<br>sudo systemctl status wazuh-manager<br>sudo systemctl status wazuh-dashboard<br>sudo systemctl status filebeat</pre><p>All four should show <strong>active (running)</strong>. Press <strong>q</strong> to exit each status view. If any service shows failed, check its logs:</p><pre>journalctl -u wazuh-indexer --no-pager | tail -n 50</pre><h3>Part 7: Access the Dashboard</h3><p>Open a browser on any machine on your local network and navigate to:</p><pre>https://&lt;your-server-LAN-ip&gt;:8443</pre><p>You will see a certificate warning — this is expected with the default self-signed certificate. Click <strong>Advanced</strong> and accept the exception, then log in with your admin credentials.</p><blockquote><strong><em>Note:</em></strong><em> Never expose port 8443 directly to the internet. For remote dashboard access, use Teleport VPN as covered in the companion UniFi article.</em></blockquote><h3>Part 8: Configure DuckDNS for External Agent Connectivity</h3><p>Agents on machines that leave your home network need a stable hostname to reach your Wazuh server. Most residential ISPs assign dynamic IPs that change periodically, so a raw IP address is unreliable. DuckDNS provides a free hostname that always points to your current IP.</p><h3>Confirm You Are Not Behind CGNAT</h3><p>Port forwarding only works if your ISP gives you a true public IP. Verify first:</p><pre>/usr/bin/curl ifconfig.me</pre><p>Compare the result to your router’s WAN IP. If they match, you are good. If they differ, you are behind CGNAT and a VPN solution like WireGuard would be required instead.</p><h3>Set Up DuckDNS</h3><ol><li>Go to <strong>duckdns.org</strong> and sign in with Google or GitHub</li><li>Create a subdomain (e.g., myhome-wazuh.duckdns.org) and note your token</li><li>Install the update client on your Ubuntu server:</li></ol><pre>mkdir -p ~/duckdns<br>nano ~/duckdns/duck.sh</pre><p>Paste the following, replacing YOURSUBDOMAIN and YOURTOKEN with your actual values:</p><pre>echo url=&quot;https://www.duckdns.org/update?domains=YOURSUBDOMAIN&amp;token=YOURTOKEN&amp;ip=&quot; | /usr/bin/curl -k -o ~/duckdns/duck.log -K -</pre><pre>chmod 700 ~/duckdns/duck.sh<br>crontab -e</pre><p>Add this line to run the update every 5 minutes:</p><pre>*/5 * * * * ~/duckdns/duck.sh &gt;/dev/null 2&gt;&amp;1</pre><h3>Forward Ports on Your Router</h3><p>In your router’s port forwarding settings, create two rules pointing to your Wazuh server’s static LAN IP:</p><ul><li>External port <strong>1514 TCP</strong> → Wazuh server LAN IP : 1514</li><li>External port <strong>1515 TCP</strong> → Wazuh server LAN IP : 1515</li></ul><p>When enrolling agents on external machines, use your DuckDNS hostname as the server address. Internal agents can use either the hostname (hairpin NAT will route it correctly) or the LAN IP directly. The companion UniFi article covers the firewall policies required to make internal agents work across VLANs.</p><h3>Conclusion</h3><p>With Wazuh installed and tuned, you have a functional homelab SIEM that coexists politely with Plex and handles the realities of machines that come and go on their own schedule.</p><p><strong>What You’ve Accomplished:</strong></p><p><strong>Resource-Efficient Installation:</strong> Wazuh running on shared hardware with JVM heap capped at 1GB, leaving the majority of RAM available for Plex and the OS.</p><p><strong>Homelab-Tuned Disconnection Handling:</strong> Agents that go offline for days or weeks generate no alert noise. They reconnect silently when the machine powers back on.</p><p><strong>Port Conflict Resolution:</strong> Dashboard moved from 443 to 8443, eliminating conflicts with UniFi OS and other HTTPS services.</p><p><strong>External Agent Connectivity:</strong> DuckDNS provides a stable hostname for agents on machines that travel, backed by automatic IP updates and port forwarding for seamless connectivity from anywhere.</p><p>These settings make Wazuh a quiet, well-behaved tenant on a shared machine. You get full SIEM visibility when machines are online, and silence when they are not.</p><h3>What’s Next</h3><p>With the Wazuh server installed and tuned, the next step is configuring your network to support it securely. The companion article — <a href="https://medium.com/@lazro/securing-wazuh-with-unifi-network-configuration-for-siem-deployment-2e6a310cb0fb"><em>Securing Wazuh with UniFi: Network Configuration for SIEM Deployment</em></a> — covers:</p><ul><li>Port forwarding rules for external agent connectivity</li><li>Firewall policies for internal VLAN-to-VLAN agent traffic</li><li>Teleport VPN access for secure remote dashboard administration</li><li>Hairpin NAT configuration so agents use a single DuckDNS hostname whether at home or traveling</li><li>Security best practices for isolating your Wazuh server on a dedicated VLAN</li></ul><h3>References and Resources</h3><ul><li><strong>Wazuh Documentation:</strong> <a href="https://documentation.wazuh.com/">https://documentation.wazuh.com/</a></li><li><strong>Wazuh Quickstart Guide:</strong> <a href="https://documentation.wazuh.com/current/quickstart.html">https://documentation.wazuh.com/current/quickstart.html</a></li><li><strong>OpenSearch JVM Tuning:</strong> <a href="https://documentation.wazuh.com/current/user-manual/wazuh-indexer/wazuh-indexer-tuning.html">https://documentation.wazuh.com/current/user-manual/wazuh-indexer/wazuh-indexer-tuning.html</a></li><li><strong>DuckDNS:</strong> <a href="https://www.duckdns.org/">https://www.duckdns.org/</a></li><li><strong>Ubuntu UFW Guide:</strong> <a href="https://help.ubuntu.com/community/UFW">https://help.ubuntu.com/community/UFW</a></li><li><strong>Network Segmentation Best Practices:</strong> NIST Special Publication 800–125B</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=caee74d2381b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Securing Reolink IP Camera Systems: NVR VLAN Isolation with UniFi OS 4.4.9]]></title>
            <link>https://medium.com/@lazro/securing-reolink-ip-camera-systems-nvr-vlan-isolation-with-unifi-os-4-4-9-b4b76cee2dff?source=rss-1983c9e8469b------2</link>
            <guid isPermaLink="false">https://medium.com/p/b4b76cee2dff</guid>
            <category><![CDATA[vlan]]></category>
            <category><![CDATA[unifi]]></category>
            <category><![CDATA[reolink]]></category>
            <category><![CDATA[security-camera]]></category>
            <category><![CDATA[network-security]]></category>
            <dc:creator><![CDATA[Lazro]]></dc:creator>
            <pubDate>Fri, 12 Dec 2025 01:27:25 GMT</pubDate>
            <atom:updated>2025-12-12T01:27:25.770Z</atom:updated>
            <content:encoded><![CDATA[<p><em>This article was written with the help of Sonnet 4.5 on Claude.ai. All outputs were reviewed for accuracy and confirmed working on the UniFi OS and Reolink NVR systems.</em></p><h3>Overview</h3><p>IP camera systems and Network Video Recorders (NVRs) represent a unique security challenge in home and small office networks. These devices require internet access for firmware updates, remote viewing, and cloud features, yet they handle sensitive video footage and often have security vulnerabilities. This guide demonstrates how to isolate a Reolink NVR system on a dedicated VLAN using UniFi OS 4.4.9, allowing necessary functionality while maintaining network security through controlled access.</p><p><strong>Hardware Used:</strong></p><ul><li>Cloud Gateway Ultra (running UniFi OS 4.4.9)</li><li>USW Flex Mini</li><li>PoE+ Switch</li><li>U6+ Access Point</li></ul><p><strong>Camera System:</strong></p><ul><li>Reolink NVR (hardwired to switch)</li><li>IP cameras (connected to NVR via PoE or WiFi)</li></ul><p><strong>Key Principle:</strong> NVRs need internet access for updates and remote viewing, but should be isolated from other network devices to prevent unauthorized access to video feeds and limit the impact of potential security vulnerabilities.</p><h3>Understanding the NVR Security Model</h3><h3>Why NVRs Need Special Treatment</h3><p><strong>Sensitive Data:</strong> NVR systems record video footage of your property, potentially capturing sensitive information about your daily routines, when you’re home, security vulnerabilities, and private activities.</p><p><strong>Internet Access Requirements:</strong> Unlike printers or some IoT devices, NVRs legitimately need internet access for:</p><ul><li>Firmware updates from the manufacturer</li><li>Remote viewing via mobile apps and web portals</li><li>Cloud recording and backup features</li><li>Time synchronization (NTP)</li><li>Push notifications for motion detection events</li></ul><p><strong>Security Vulnerabilities:</strong> Camera systems and NVRs have a poor security track record:</p><ul><li>Outdated firmware with known vulnerabilities</li><li>Weak default credentials</li><li>Unnecessary services enabled by default (UPnP, P2P)</li><li>Poor encryption implementations</li><li>Lack of timely security updates</li></ul><p><strong>Attack Vectors:</strong> Compromised camera systems can be used to:</p><ul><li>Access and exfiltrate video footage</li><li>Use as pivot points to attack other network devices</li><li>Participate in botnets (Mirai botnet famously targeted IP cameras)</li><li>Serve as reconnaissance tools for physical security breaches</li></ul><h3>The Balance: Isolation with Functionality</h3><p>The challenge is maintaining functionality while implementing security:</p><p><strong>Must Allow:</strong></p><ul><li>Internet access for updates and remote viewing</li><li>Controlled access from specific networks (laptops, phones, tablets)</li><li>Communication between NVR and its cameras</li></ul><p><strong>Must Prevent:</strong></p><ul><li>Unauthorized access to video feeds</li><li>Lateral movement to other network segments if compromised</li><li>Unnecessary exposure of the entire camera network</li></ul><p>The solution: Place the NVR on an isolated VLAN with internet access, but use IP-based firewall policies that target only the NVR itself. This provides necessary functionality while limiting the attack surface.</p><h3>Understanding Reolink NVR Architecture</h3><h3>How Reolink Systems Work</h3><p><strong>NVR as Central Hub:</strong> The Reolink NVR acts as the central management and recording system for all cameras. You don’t access individual cameras directly — all management, viewing, and recording happens through the NVR interface.</p><p><strong>Camera Connection Methods:</strong></p><p><strong>PoE Cameras (Most Common):</strong></p><ul><li>Connect directly to NVR’s built-in PoE ports</li><li>Receive both power and data from NVR</li><li>Operate on NVR’s internal network</li><li>No network configuration needed</li></ul><p><strong>WiFi Cameras:</strong></p><ul><li>Connect to your WiFi network</li><li>Must be on the same VLAN as the NVR for discovery</li><li>Managed through NVR console once added</li><li>Still record to NVR storage</li></ul><h3>Part 1: Initial NVR Configuration</h3><p><strong>Important:</strong> Complete these NVR configuration steps BEFORE creating VLANs or changing network assignments in UniFi OS. This ensures you have access to configure the NVR and can verify settings before isolation.</p><h3>Step 1: Initial NVR Setup</h3><ol><li>Connect the Reolink NVR to your network (temporarily on your main network)</li><li>Power on the NVR and complete initial setup wizard</li><li>Set a strong admin password</li><li>Configure basic settings (time zone, date/time)</li><li>Add any cameras that will be connected</li></ol><h3>Step 2: Configure NVR Network Ports</h3><p>Access the Reolink NVR through the client software:</p><ol><li>Open <strong>Reolink Client</strong></li><li>Navigate to <strong>Device Settings</strong> → <strong>Network</strong> → <strong>Advanced</strong> → <strong>Server Settings</strong></li><li>Configure the following ports:</li></ol><ul><li><strong>Basic Service Port:</strong> 9000 (default, can be changed if desired)</li><li>Check <strong>HTTPS</strong> to enable secure connections</li><li><strong>HTTPS Port:</strong> 443 (default, can be changed if desired)</li></ul><p>4. Click <strong>Save</strong> or <strong>Apply</strong></p><p>5. Note these port numbers for the firewall policy configuration</p><p><strong>Why Configure Ports First:</strong></p><ul><li>Ensures you know exactly which ports to open in the firewall policy</li><li>Allows you to enable HTTPS before network isolation</li><li>Verifies NVR is functioning properly before moving to isolated VLAN</li><li>Makes troubleshooting easier if issues arise</li></ul><h3>Step 3: Test Basic Connectivity</h3><p>Before proceeding with VLAN isolation:</p><ol><li>Verify you can access NVR web interface</li><li>Confirm all cameras are visible and recording</li><li>Test live view and playback</li><li>Verify motion detection is working</li><li>Note the NVR’s current IP address</li></ol><p>Once the NVR is properly configured and tested, proceed with VLAN isolation.</p><h3>Part 2: Creating the Camera VLAN</h3><h3>Step 1: Create the Camera Network</h3><ol><li>Click the <strong>Settings gear</strong> icon on the left sidebar</li><li>Navigate to <strong>Networks</strong></li><li>Click <strong>New Virtual Network</strong></li><li>Configure the network:</li></ol><ul><li><strong>Name:</strong> Camera</li><li><strong>Router:</strong> Default (leave as is)</li><li><strong>Zone:</strong> Internal</li><li><strong>Protocol:</strong> IPv4</li><li><strong>Auto-scale network:</strong> Enabled</li><li><strong>Advanced:</strong> Manual</li><li>Check <strong>Isolate Network</strong></li><li>Check <strong>Allow Internet Access</strong></li></ul><p>5. Click <strong>Add</strong></p><h3>Understanding the Configuration</h3><p><strong>Isolate Network (Checked):</strong> Prevents devices on this VLAN from communicating with devices on other VLANs. This ensures the NVR and any WiFi cameras cannot access or be accessed by devices on your other networks except through explicit firewall policies.</p><p><strong>Allow Internet Access (Checked):</strong> Unlike printers, NVRs legitimately need internet access for:</p><ul><li>Manufacturer firmware updates</li><li>Remote viewing through Reolink cloud or app</li><li>Time synchronization via NTP servers</li><li>Push notifications to mobile devices</li><li>Cloud backup features (if enabled)</li></ul><h3>Part 3: Assigning NVR to Camera VLAN</h3><h3>Step 1: Configure Switch Port</h3><p>Since your Reolink NVR is hardwired to your network:</p><ol><li>Click <strong>UniFi Devices</strong> on the left sidebar</li><li>Select your switch (the one the NVR is connected to)</li><li>Click <strong>Port Manager</strong> on the right-hand side</li><li>Select the port that your NVR is connected to</li><li>Under <strong>Native VLAN / Network</strong>, select <strong>Camera</strong></li><li>Click <strong>Apply</strong></li></ol><h3>Step 2: Set Fixed IP Address for NVR</h3><p>Setting a static IP is critical for the IP-based firewall policy approach:</p><ol><li>Click <strong>Client Devices</strong> on the left sidebar</li><li>Find and select your <strong>Reolink NVR</strong></li><li>Click <strong>Settings</strong> in the right-hand menu</li><li>Under <strong>IP Settings:</strong></li></ol><ul><li>Check <strong>Virtual Network Override</strong></li><li>Set <strong>Network</strong> to <strong>Camera</strong></li><li>Check <strong>Fixed IP Address</strong> (required for security)</li><li>Assign a static IP address</li><li>Check <strong>Local DNS Record</strong> (optional)</li><li>If using DNS, enter hostname (e.g., nvr.local)</li></ul><p>5. Click <strong>Apply</strong></p><p><strong>Why Static IP is Required:</strong></p><p>With our security approach, the firewall policy targets the NVR’s specific IP address rather than the entire Camera network. If the IP changes:</p><ul><li>The firewall policy breaks</li><li>You lose access to the NVR</li><li>Security is compromised if the old IP is reused</li></ul><p>Static IP ensures the firewall policy remains effective and access stays consistent.</p><h3>Step 3: Restart NVR</h3><p>Power cycle the Reolink NVR to ensure it picks up the new network configuration:</p><ol><li>Disconnect power from the NVR</li><li>Wait 10 seconds</li><li>Reconnect power</li><li>Wait 2–3 minutes for full boot</li></ol><h3>Step 4: Verify NVR Network Assignment</h3><ol><li>In UniFi, go to <strong>Client Devices</strong></li><li>Find your Reolink NVR</li><li>Verify it shows:</li></ol><ul><li>Connected to Camera VLAN</li><li>Has the static IP you assigned</li><li>Shows as “Online”</li></ul><h3>Part 4: Adding WiFi Cameras (If Applicable)</h3><p>Most Reolink cameras connect via PoE directly to the NVR and require no additional configuration. However, if you have WiFi-enabled cameras (battery-powered, plug-in WiFi, or PoE cameras used wirelessly):</p><h3>Step 1: Initial Camera Setup</h3><p>Initialize your WiFi camera on your network first:</p><ol><li>Follow Reolink’s initial setup process for your camera</li><li>Connect the camera to your WiFi network</li><li>Set a strong password for the camera</li><li>Verify the camera is functioning properly</li></ol><p>For detailed setup instructions, refer to: <a href="https://support.reolink.com/hc/en-us/articles/900000616066-How-to-Initially-Set-up-Reolink-Devices">How to Initially Set up Reolink Devices</a></p><h3>Step 2: Add Camera to NVR via LAN</h3><p><strong>Important:</strong> Both the camera and NVR must be on the same network for discovery. Since your NVR is now on the Camera VLAN, you need to temporarily assign the camera to the Camera VLAN as well.</p><ol><li>Click <strong>Client Devices</strong> on the left sidebar in UniFi</li><li>Find and select the WiFi camera</li><li>Click <strong>Settings</strong> in the right-hand menu</li><li>Under <strong>IP Settings:</strong></li></ol><ul><li>Check <strong>Virtual Network Override</strong></li><li>Set <strong>Network</strong> to <strong>Camera</strong></li><li>Check <strong>Fixed IP Address</strong> (recommended)</li><li>Assign a static IP address</li></ul><p>5. Click <strong>Apply</strong></p><h3>Step 3: Auto-Add Camera to NVR</h3><ol><li>Log in to your Reolink NVR</li><li>Navigate to <strong>Channel</strong> → <strong>Channel Management</strong></li><li>Turn on <strong>Auto Add</strong></li><li>All cameras on the same LAN (Camera VLAN) will automatically appear in the list</li><li>You may see “Incorrect account name or password” — this is normal</li></ol><h3>Step 4: Enter Camera Credentials</h3><ol><li>Click <strong>Modify</strong> next to the camera</li><li>Enter the login password you set for the camera during initial setup</li><li>Click <strong>OK</strong></li><li>The camera should now appear with live view on the NVR</li></ol><h3>Step 5: Assign to Channel</h3><ol><li>Select the camera you want to add</li><li>Choose which channel to assign it to</li><li>Click <strong>Next</strong> to complete the addition</li></ol><p><strong>Note:</strong> Each camera must be on a unique channel. You cannot have two cameras on the same channel.</p><h3>Important Considerations for Battery-Powered WiFi Cameras</h3><p><strong>NVR Takes Over Management:</strong> Once a battery-powered WiFi camera is added to the NVR:</p><ul><li>The NVR takes full control of the camera</li><li>Standalone access through the Reolink App/Client is no longer possible</li><li>All viewing and management must be done through the NVR</li></ul><p><strong>To Restore Standalone Access:</strong> If you need standalone access to the battery-powered camera again (without NVR):</p><ul><li>A hard reset of the camera is required</li><li>The camera will need to be set up from scratch</li><li>You’ll lose the NVR integration</li></ul><p>For complete instructions on adding WiFi cameras to Reolink NVRs, see: <a href="https://support.reolink.com/hc/en-us/articles/23138914692633-How-to-Add-Reolink-IP-Cameras-to-Reolink-WiFi-NVR-New-UI/">How to Add Reolink IP Cameras to Reolink WiFi NVR</a></p><h3>Part 5: Configuring Firewall Policy</h3><h3>Create IP-Based Policy for NVR Access</h3><ol><li>Navigate to <strong>Settings</strong> → <strong>Policy Engine</strong></li><li>Click <strong>Create New Policy</strong></li><li>Select <strong>Firewall</strong></li><li>Configure:</li></ol><ul><li><strong>Name:</strong> Internal to Reolink NVR</li><li><strong>Source Zone:</strong> Internal</li><li><strong>Source Networks:</strong> Select all networks that need access (Apple, Windows VLANs, etc.)</li><li><strong>Source Port:</strong> Any</li><li><strong>Action:</strong> Allow</li><li><strong>Auto Allow Return Traffic:</strong> Checked</li><li><strong>Destination Zone:</strong> IP Address</li><li><strong>Destination IP:</strong> Your NVR’s static IP address</li><li><strong>Destination Port:</strong> 443,9000</li><li><strong>Protocol:</strong> All</li></ul><p>5. Click <strong>Save</strong></p><h3>Understanding the Ports</h3><p>We specify only the ports configured in the NVR settings:</p><p><strong>Port 443 (TCP) — HTTPS:</strong></p><ul><li>Secure web interface access</li><li>Required for browser-based management</li><li>Must be enabled in NVR settings (Part 1, Step 2)</li></ul><p><strong>Port 9000 (TCP) — Basic Service Port:</strong></p><ul><li>Reolink client software connection</li><li>Default port for client application access</li><li>Configured in NVR settings (Part 1, Step 2)</li></ul><p><strong>Note:</strong> If you changed the default ports in the NVR configuration (Part 1, Step 2), update the port numbers in this policy to match your custom settings. For example, if you set HTTPS to port 8443 instead of 443, use 8443,9000 in the policy.</p><h3>Still IP-Based for Maximum Security</h3><p>We’re targeting the NVR’s specific IP address rather than the entire Camera network. This means:</p><ul><li>Only the NVR is accessible from approved VLANs</li><li>WiFi cameras on the Camera VLAN remain isolated</li><li>Adding cameras doesn’t expand the accessible surface</li><li>Clear, maintainable security posture</li></ul><h3>Part 6: Testing and Verification</h3><h3>Verify NVR Access from Approved Networks</h3><p><strong>From Windows PC (on Windows VLAN):</strong></p><ol><li>Open web browser</li><li>Navigate to: <a href="http://[nvr-ip-address]">https://n</a>vr.local (or static IP address)</li><li>Should see Reolink login page</li><li>Log in with NVR credentials</li><li>Test live view from cameras</li><li>Test playback of recorded footage</li></ol><p><strong>From macOS/iOS (on Apple VLAN):</strong></p><ol><li>Open Reolink app on iPhone/iPad</li><li>NVR should be accessible</li><li>Test live view</li><li>Test playback</li><li>Test remote notifications (if enabled)</li></ol><p><strong>From Any Approved Network:</strong></p><ol><li>Access NVR web interface</li><li>Verify all cameras appear and are recording</li><li>Test playback controls</li><li>Check motion detection settings</li><li>Verify recording schedules</li></ol><h3>Verify Internet Connectivity</h3><p><strong>Check NVR Can Reach Internet:</strong></p><ol><li>Log into NVR web interface</li><li>Navigate to <strong>Settings</strong> → <strong>System</strong> → <strong>About</strong></li><li>Check for firmware updates — should be able to check for updates</li><li>If available, test downloading an update</li></ol><p><strong>Test Remote Access (If Using Reolink Cloud):</strong></p><ol><li>Disconnect from your home network (use cellular data)</li><li>Open Reolink app</li><li>NVR should be accessible remotely</li><li>Test live view over internet</li><li>Verify push notifications work</li></ol><p><strong>Verify Time Synchronization:</strong></p><ol><li>Check NVR system time</li><li>Should match actual time (synced via NTP)</li><li>Important for accurate recording timestamps</li></ol><h3>Verify Isolation</h3><p><strong>Test That Other VLANs Cannot Access NVR:</strong></p><ul><li>Devices on VLANs NOT listed in the Source Networks should be unable to reach the NVR</li><li>Try accessing NVR from a guest network or other isolated VLAN</li><li>Should timeout or be blocked</li></ul><p><strong>Check Camera VLAN Cannot Access Other Networks:</strong></p><ul><li>The NVR should not be able to access devices on your main networks</li><li>Isolation prevents the NVR from scanning or accessing other network resources</li><li>This is automatic due to the “Isolate Network” setting</li></ul><h3>Part 7: Troubleshooting</h3><h3>Cannot Access NVR Web Interface</h3><p><strong>Possible Causes:</strong></p><ol><li>Firewall policy not active or misconfigured</li><li>Wrong IP address in policy</li><li>NVR didn’t pick up static IP</li><li>Source network not included in policy</li></ol><p><strong>Solutions:</strong></p><ol><li>Verify required ports are in firewall policy (443,9000 if using defaults)</li><li>Check if you changed default ports in NVR — update policy to match</li><li>Confirm policy destination IP matches NVR’s actual IP</li><li>Check NVR IP in UniFi Client Devices</li><li>Verify your device’s VLAN is listed in Source Networks</li><li>Try accessing from a different device on an approved VLAN</li></ol><h3>NVR Shows as Offline in App</h3><p><strong>Possible Causes:</strong></p><ol><li>NVR doesn’t have internet access</li><li>DNS resolution issues</li><li>Reolink cloud service disruption</li><li>Port forwarding issues (if manually configured)</li></ol><p><strong>Solutions:</strong></p><ol><li>Verify “Allow Internet Access” is checked on Camera VLAN</li><li>Check NVR can ping internet addresses (8.8.8.8)</li><li>Test web interface access locally (should work even if cloud is down)</li><li>Check Reolink service status on their website</li><li>Restart NVR and test again</li></ol><h3>Cameras Not Appearing in NVR</h3><p><strong>For PoE Cameras:</strong></p><ol><li>Verify camera is connected to NVR’s PoE ports</li><li>Check cable connections</li><li>Try different PoE port on NVR</li><li>Power cycle NVR</li><li>Check camera power indicator lights</li></ol><p><strong>For WiFi Cameras:</strong></p><ol><li>Verify camera is on Camera VLAN (check UniFi Client Devices)</li><li>Confirm camera has static IP assigned</li><li>Check WiFi signal strength</li><li>Camera and NVR must be on same VLAN for discovery</li><li>Try re-adding camera through NVR interface</li></ol><h3>Part 8: Security Best Practices</h3><h3>NVR-Specific Security</h3><ol><li><strong>Change Default Password Immediately:</strong></li></ol><ul><li>Access NVR web interface</li><li>Change the admin password from default</li><li>Use strong, unique password (20+ characters)</li><li>Store in password manager</li><li>Never use default credentials like “admin/admin”</li></ul><p><strong>2. Keep Firmware Updated:</strong></p><ul><li>Enable Auto Update in NVR settings</li><li>Updates often include security patches</li><li>NVR will automatically check for and install updates</li><li>Test functionality after automatic updates if needed</li></ul><p><strong>3. Disable Unnecessary Features:</strong></p><ul><li>Turn off UPnP if not needed for remote access</li><li>Disable P2P if using VPN for remote access</li><li>Turn off cloud features if not used</li><li>Disable RTSP if not streaming to third-party systems</li><li>Review and disable any unused network services</li></ul><p><strong>4. Configure Motion Detection Properly:</strong></p><ul><li>Set up detection zones (avoid triggering on trees, flags)</li><li>Adjust sensitivity to reduce false alerts</li><li>Configure useful notifications</li><li>Use privacy masks for sensitive areas</li><li>Test detection before relying on it</li></ul><p><strong>5. Manage Recording Storage:</strong></p><ul><li>Use appropriate retention periods (7–30 days typical)</li><li>Enable overwrite when storage full</li><li>Regularly check storage health</li><li>Consider backup for critical recordings</li><li>Don’t store recordings on network shares (security risk)</li></ul><h3>Network-Level Security</h3><ol><li><strong>Monitor NVR Traffic:</strong></li></ol><ul><li>Use UniFi traffic analytics to watch NVR activity</li><li>Check for unusual outbound connections</li><li>Monitor bandwidth usage</li><li>Look for connections to unexpected IPs or countries</li><li>Set up alerts for unusual traffic patterns</li></ul><p><strong>2. Review Access Regularly:</strong></p><ul><li>Quarterly review which VLANs have NVR access</li><li>Remove access for networks that don’t need it</li><li>Verify firewall policy is still appropriate</li><li>Check for any unauthorized devices on Camera VLAN</li><li>Review NVR access logs</li></ul><p><strong>3. Consider VPN for Remote Access:</strong></p><ul><li>More secure than cloud-based access</li><li>UniFi Teleport VPN provides easy setup</li><li>No ports exposed to internet</li><li>Works even if Reolink cloud is down</li><li>Trade-off: Requires VPN connection before access</li></ul><p><strong>4. Physical Security:</strong></p><ul><li>Place NVR in secure location</li><li>Limit physical access to NVR</li><li>Protect power supply and network connections</li><li>Consider locking network rack/cabinet</li><li>Document camera and cable locations</li></ul><h3>What NOT to Do</h3><p>❌ <strong>Don’t expose NVR directly to internet without proper security</strong> — Use Reolink cloud service or VPN</p><p>❌ <strong>Don’t use the same password for NVR and other systems</strong> — Unique credentials for each system</p><p>❌ <strong>Don’t ignore firmware updates</strong> — Security patches are critical</p><p>❌ <strong>Don’t put NVR on your main network</strong> — Defeats the purpose of segmentation</p><p>❌ <strong>Don’t create policies that open the entire Camera network</strong> — Use IP-based targeting for security</p><p>❌ <strong>Don’t rely solely on cloud access</strong> — Have local access method as backup</p><h3>Understanding Remote Access Options</h3><h3>Reolink Cloud/P2P (Built-in)</h3><p><strong>How it works:</strong></p><ul><li>NVR connects to Reolink cloud servers</li><li>Mobile app connects to cloud servers</li><li>Cloud servers relay connection to your NVR</li><li>Uses P2P technology for video streaming</li></ul><p><strong>Advantages:</strong></p><ul><li>Easy setup (usually automatic)</li><li>Works from anywhere</li><li>No port forwarding needed</li><li>Handles dynamic IP addresses</li></ul><p><strong>Disadvantages:</strong></p><ul><li>Relies on Reolink’s servers</li><li>Less control over security</li><li>May have bandwidth limitations</li><li>Cloud service could be discontinued</li></ul><p><strong>Security considerations:</strong></p><ul><li>Enable only if you need remote access</li><li>Use strong UID password</li><li>Enable two-factor authentication if available</li><li>Monitor for unauthorized access attempts</li></ul><h3>Manual Port Forwarding</h3><p><strong>How it works:</strong></p><ul><li>Forward specific ports from WAN to NVR IP</li><li>Access NVR directly via your public IP</li><li>No reliance on third-party services</li></ul><p><strong>Advantages:</strong></p><ul><li>Direct connection (no intermediary)</li><li>Full control</li><li>No cloud dependency</li><li>Often better performance</li></ul><p><strong>Disadvantages:</strong></p><ul><li>Exposes NVR directly to internet</li><li>Requires static IP or DDNS</li><li>More complex setup</li><li>Must secure NVR carefully</li></ul><p><strong>If you choose this approach:</strong></p><ul><li>Use non-standard ports (not 80/443)</li><li>Enable HTTPS only</li><li>Implement IP whitelist if possible</li><li>Use very strong credentials</li><li>Monitor access logs religiously</li></ul><h3>UniFi Teleport VPN (Most Secure)</h3><p><strong>How it works:</strong></p><ul><li>UniFi Cloud Gateway provides built-in Teleport VPN</li><li>Install Teleport app on your phone or computer</li><li>Connect to VPN from remote location</li><li>Access NVR as if on local network</li></ul><p><strong>Advantages:</strong></p><ul><li>Most secure option</li><li>No NVR ports exposed to internet</li><li>Can access entire network securely</li><li>Works even without Reolink cloud</li><li>Easy setup through UniFi interface</li><li>No additional VPN server needed</li></ul><p><strong>Disadvantages:</strong></p><ul><li>Requires UniFi Teleport app on remote devices</li><li>Need to connect to VPN before accessing NVR</li><li>Slightly more steps than direct cloud access</li></ul><p><strong>Recommendation:</strong> If you’re using UniFi equipment (Cloud Gateway Ultra), Teleport VPN is the gold standard for remote camera access. It’s built-in, easy to set up, and provides secure access to your entire network including the NVR.</p><h3>Conclusion</h3><p>Isolating your Reolink NVR system on a dedicated Camera VLAN represents a significant security improvement while maintaining full functionality. By implementing this configuration, you’ve achieved several critical security objectives:</p><p><strong>Contained Video Access:</strong> Your surveillance footage is now protected behind network segmentation. Even if the NVR has a security vulnerability, an attacker cannot use it as a launching point to access your computers, phones, NAS, or other sensitive systems on different VLANs.</p><p><strong>Controlled Access Points:</strong> Only explicitly authorized networks (Apple, Windows VLANs) can access the NVR through targeted firewall policies. Guest networks, IoT devices, and other segments have no ability to view your camera feeds or modify NVR settings.</p><p><strong>Maintained Internet Connectivity:</strong> Unlike printers and other IoT devices which benefit from complete internet isolation, NVRs legitimately need internet access for firmware updates, remote viewing, and time synchronization. The Camera VLAN allows this while preventing lateral movement to other network segments.</p><p><strong>Simplified Camera Management:</strong> Understanding that Reolink cameras are managed through the NVR means you only need one firewall policy. PoE cameras are inherently isolated on the NVR’s internal network, and WiFi cameras on the Camera VLAN are only accessible through the NVR interface. This architectural understanding simplifies security without compromising protection.</p><p><strong>IP-Based Security:</strong> By targeting the NVR’s specific IP address rather than the entire Camera network, you’ve created a precise security model. If you add WiFi cameras to the Camera VLAN in the future, they won’t be automatically accessible — only the NVR remains accessible. This is defense-in-depth in action.</p><p>The combination of VLAN isolation and IP-based firewall policies creates a security architecture that respects the realities of modern camera systems while implementing enterprise-grade segmentation principles. Your camera system now operates in a security sandbox that limits potential damage from vulnerabilities while preserving the functionality that makes these systems valuable.</p><p>As you expand your surveillance infrastructure with additional cameras or NVRs, the pattern remains consistent: Camera VLAN with internet access, static IP addressing, and targeted firewall policies. Whether adding WiFi cameras or deploying a second NVR, you can replicate this secure architecture with minimal additional configuration.</p><p>The techniques demonstrated here extend beyond camera systems to any network device that requires internet access but should remain isolated from your core infrastructure. Network-attached storage with cloud sync, smart TVs with streaming services, and game consoles all benefit from similar VLAN isolation strategies.</p><p>Your surveillance system is now properly secured, accessible where needed, and isolated from potential compromise vectors — all while maintaining the remote access and management features that make modern NVR systems practical and useful.</p><h3>References and Resources</h3><ul><li><strong>UniFi Documentation</strong>: <a href="https://help.ui.com/">https://help.ui.com/</a></li><li><strong>Reolink Support</strong>: <a href="https://support.reolink.com/">https://support.reolink.com/</a></li><li><strong>Network Segmentation Best Practices</strong>: <a href="https://nvlpubs.nist.gov/nistpubs/specialpublications/nist.sp.800-125b.pdf">NIST Special Publication 800–125B</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b4b76cee2dff" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Securing Network Printers: VLAN Isolation with UniFi OS 4.4.9]]></title>
            <link>https://medium.com/@lazro/securing-network-printers-vlan-isolation-with-unifi-os-4-4-9-b804e1dd8d9b?source=rss-1983c9e8469b------2</link>
            <guid isPermaLink="false">https://medium.com/p/b804e1dd8d9b</guid>
            <category><![CDATA[printers]]></category>
            <category><![CDATA[vlan]]></category>
            <category><![CDATA[network-security]]></category>
            <category><![CDATA[unifi]]></category>
            <category><![CDATA[networking]]></category>
            <dc:creator><![CDATA[Lazro]]></dc:creator>
            <pubDate>Thu, 11 Dec 2025 18:08:52 GMT</pubDate>
            <atom:updated>2025-12-11T18:08:52.281Z</atom:updated>
            <content:encoded><![CDATA[<p><em>This article was written with the help of Sonnet 4.5 on Claude.ai. All outputs were reviewed for accuracy and confirmed working on the UniFi OS, Windows, and macOS systems.</em></p><p>Network printers represent a significant security vulnerability in home and small office networks. These devices often run outdated firmware, have poor security implementations, and can serve as entry points for attackers to access more sensitive systems. This guide demonstrates how to isolate printers on a dedicated VLAN using UniFi OS 4.4.9, allowing printing functionality while preventing printers from accessing other network resources or the internet.</p><p><strong>Hardware Used:</strong></p><ul><li>Cloud Gateway Ultra (running UniFi OS 4.4.9)</li><li>USW Flex Mini</li><li>PoE+ Switch</li><li>U6+ Access Point</li></ul><p><strong>Printer Used:</strong></p><ul><li>Legacy HP LaserJet (WiFi-connected)</li></ul><p><strong>Key Principle:</strong> Printers don’t need internet access or the ability to communicate with other network devices. By isolating them on a dedicated VLAN with no internet access, we eliminate common attack vectors while maintaining full printing functionality.</p><h3>Understanding the Threat Model</h3><h3>Why Printers are Security Risks</h3><p><strong>Outdated Firmware:</strong> Many printers run years-old firmware with known vulnerabilities. Manufacturers rarely provide security updates for older models.</p><p><strong>Poor Security Practices:</strong> Printers often have default passwords, unencrypted management interfaces, and unnecessary services running (FTP, Telnet, etc.).</p><p><strong>Attack Vectors:</strong> Compromised printers can be used to:</p><ul><li>Intercept print jobs containing sensitive information</li><li>Serve as pivot points to access other network devices</li><li>Participate in DDoS botnets</li><li>Execute man-in-the-middle attacks</li></ul><p><strong>Internet Connectivity Risks:</strong> When printers have internet access, they can:</p><ul><li>Phone home to manufacturer servers with usage data</li><li>Download malicious firmware updates</li><li>Be accessed remotely if vulnerabilities are discovered</li><li>Participate in botnet activities</li></ul><h3>The Solution: Complete Isolation</h3><p>By placing printers on an isolated VLAN with:</p><ul><li><strong>No internet access</strong> — Eliminates remote attack vectors</li><li><strong>No inter-device communication</strong> — Prevents lateral movement if compromised</li><li><strong>Controlled access from specific networks only</strong> — Only authorized devices can print</li></ul><p>We create a secure printing environment that maintains functionality while drastically reducing risk.</p><h3>Part 1: Creating the Printer VLAN</h3><h3>Step 1: Create the Printer Network</h3><ol><li>Click the <strong>Settings gear</strong> icon on the left sidebar</li><li>Navigate to <strong>Networks</strong></li><li>Click <strong>New Virtual Network</strong></li><li>Configure the network:</li></ol><ul><li><strong>Name:</strong> Printer</li><li><strong>Router:</strong> Default (leave as is)</li><li><strong>Zone:</strong> Internal</li><li><strong>Protocol:</strong> IPv4</li><li><strong>Auto-scale network:</strong> Enabled</li><li><strong>Advanced:</strong> Manual</li><li>Check <strong>Isolate Network</strong></li><li><strong>Uncheck</strong> Allow Internet Access</li><li>Check <strong>IGMP Snooping</strong> (for AirPrint discovery)</li><li>Check <strong>mDNS</strong> (for AirPrint discovery)</li></ul><p>5. Click <strong>Add</strong></p><p><strong>Critical Configuration Notes:</strong></p><p><strong>Isolate Network (Checked):</strong> Prevents devices on this VLAN from communicating with devices on other VLANs. This ensures printers cannot access or be accessed by devices on your other networks except through explicit firewall policies.</p><p><strong>Allow Internet Access (Unchecked):</strong> Printers have no route to the internet. This eliminates the ability for malware to phone home, prevents unauthorized firmware updates, and blocks participation in botnets.</p><p><strong>IGMP Snooping and mDNS (Checked):</strong> Required for AirPrint discovery across VLANs. Without these, iOS/macOS devices won’t automatically discover the printer.</p><h3>Part 2: Assigning Printer to the Printer VLAN</h3><h3>For WiFi-Connected Printers (Most Common)</h3><p><strong>Step 1: Connect Printer to WiFi</strong></p><p>First, connect your printer to your WiFi network using the printer’s control panel or setup wizard. It will initially receive an IP on whatever network your WiFi is assigned to.</p><p><strong>Step 2: Assign to Printer VLAN</strong></p><ol><li>Click <strong>Client Devices</strong> on the left sidebar</li><li>Find and select your <strong>HP printer</strong></li><li>Click <strong>Settings</strong> in the right-hand menu</li><li>Under <strong>IP Settings:</strong></li></ol><ul><li>Check <strong>Virtual Network Override</strong></li><li>Set <strong>Network</strong> to <strong>Printer</strong></li><li>Check <strong>Fixed IP Address</strong> (strongly recommended)</li><li>Assign a static IP address</li></ul><p>5. Click <strong>Apply</strong></p><p><strong>Step 3: Reconnect Printer</strong></p><p>After changing VLANs, your printer will lose connectivity temporarily. On the printer:</p><ol><li>Turn off WiFi</li><li>Turn WiFi back on</li><li>The printer should reconnect and receive its new IP address</li></ol><h3>For Wired Printers (Ethernet Connection)</h3><p><strong>Step 1: Configure Switch Port</strong></p><ol><li>Click <strong>UniFi Devices</strong> on the left sidebar</li><li>Select your <strong>PoE+ Switch</strong> (or appropriate switch)</li><li>Click <strong>Port Manager</strong> on the right-hand side</li><li>Select the port that your printer is connected to</li><li>Under <strong>Native VLAN / Network</strong>, select <strong>Printer</strong></li><li>Click <strong>Apply</strong></li></ol><p><strong>Step 2: Set Fixed IP Address</strong></p><ol><li>Click <strong>Client Devices</strong> on the left sidebar</li><li>Find and select your <strong>HP printer</strong></li><li>Click <strong>Settings</strong> in the right-hand menu</li><li>Under <strong>IP Settings:</strong></li></ol><ul><li>Check <strong>Virtual Network Override</strong></li><li>Set <strong>Network</strong> to <strong>Printer</strong></li><li>Check <strong>Fixed IP Address</strong></li><li>Assign a static IP address</li></ul><p>5. Click <strong>Apply</strong></p><p><strong>Step 3: Power Cycle Printer</strong></p><p>Turn the printer off and back on to ensure it picks up the new network configuration.</p><h3>Why Static IP is Important</h3><p>Using DHCP for printers creates maintenance headaches:</p><ul><li>Firewall policies targeting the network will work fine (this is why we use destination network, not IP)</li><li>But printer configurations on client devices will break if the IP changes</li><li>Manual printer additions by IP will need updating</li><li>Troubleshooting becomes more difficult</li></ul><p>Always use static IPs for printers.</p><h3>Part 3: Enable IGMP Snooping on Source VLANs</h3><p>For AirPrint discovery to work, the networks where your devices live must also have IGMP Snooping and mDNS enabled.</p><h3>For Each Source VLAN (Apple, Windows, etc.)</h3><ol><li>Navigate to <strong>Settings</strong> → <strong>Networks</strong></li><li>Select the VLAN (e.g., Apple VLAN)</li><li>Scroll down to <strong>Advanced</strong> → <strong>Manual</strong></li><li>Check <strong>IGMP Snooping</strong></li><li>Check <strong>mDNS</strong></li><li>Click <strong>Apply</strong></li></ol><p>Repeat for all VLANs that need printer access.</p><p><strong>Why This Matters:</strong> mDNS (multicast DNS) announcements don’t cross VLAN boundaries by default. IGMP Snooping with mDNS enabled allows these announcements to be reflected between VLANs, enabling automatic printer discovery.</p><h3>Part 4: Configuring Firewall Policy</h3><h3>Create Internal to Printer Policy</h3><ol><li>Navigate to <strong>Settings</strong> → <strong>Policy Engine</strong></li><li>Click <strong>Create New Policy</strong></li><li>Select <strong>Firewall</strong></li><li>Configure:</li></ol><ul><li><strong>Name:</strong> Internal to Printer</li><li><strong>Source Zone:</strong> Internal</li><li><strong>Source Networks:</strong> Select all networks that need printer access (Apple, Windows VLANs, etc.)</li><li><strong>Source Port:</strong> Any</li><li><strong>Action:</strong> Allow</li><li><strong>Auto Allow Return Traffic:</strong> Checked</li><li><strong>Destination Zone:</strong> Internal</li><li><strong>Destination Network:</strong> Printer</li><li><strong>Destination Port:</strong> 5353,161,162,515,631,9100</li><li><strong>Protocol:</strong> All</li></ul><p>5. Click <strong>Save</strong></p><h3>Understanding the Ports</h3><p><strong>Port 5353 (UDP) — mDNS:</strong></p><ul><li>Multicast DNS for automatic printer discovery</li><li>Allows AirPrint discovery on iOS/macOS devices</li><li>Without this, you must manually add printers by IP</li></ul><p><strong>Port 9100 (TCP) — Raw TCP Printing:</strong></p><ul><li>HP JetDirect protocol</li><li>Direct printing without additional protocols</li><li>Most common for basic network printing</li></ul><p><strong>Port 631 (TCP/UDP) — IPP (Internet Printing Protocol):</strong></p><ul><li>Modern printing standard</li><li>Used by AirPrint</li><li>Supports encryption and authentication</li></ul><p><strong>Port 515 (TCP) — LPR/LPD:</strong></p><ul><li>Line Printer Daemon protocol</li><li>Legacy Unix/Linux printing</li><li>Still supported by many printers</li></ul><p><strong>Port 161 (UDP) — SNMP:</strong></p><ul><li>Simple Network Management Protocol</li><li>Allows checking printer status (ink levels, paper jams)</li><li>Used by printer utilities to display printer information</li><li>Shows “Ready,” “Low Toner,” etc. in system preferences</li></ul><p><strong>Port 162 (UDP) — SNMP Traps:</strong></p><ul><li>Allows printer to send alerts/notifications</li><li>Less commonly used but included for completeness</li></ul><h3>Why Destination Network Instead of IP?</h3><p>Using the <strong>Printer network</strong> as the destination (rather than a specific printer IP) provides:</p><p><strong>Scalability:</strong> Add new printers to the Printer VLAN, and the policy automatically covers them. No need to create new policies or update existing ones.</p><p><strong>Simplicity:</strong> One policy covers all printers, regardless of how many you have.</p><p><strong>Easier Maintenance:</strong> When printers are replaced or added, the firewall configuration doesn’t need updating.</p><p><strong>Consistent Security Model:</strong> All printers receive the same security treatment automatically.</p><h3>Part 5: Testing and Verification</h3><h3>Verify Printer Connectivity</h3><ol><li><strong>Check VLAN Assignment:</strong></li></ol><ul><li>Go to <strong>Client Devices</strong></li><li>Find your printer</li><li>Verify it shows as connected to the Printer VLAN</li></ul><p><strong>2. Verify Static IP:</strong></p><ul><li>Check that the printer has the correct IP address</li><li>Note this IP for testing</li></ul><p><strong>3. Verify No Internet Access:</strong></p><ul><li>Try accessing the printer’s web interface at its IP</li><li>The printer should NOT be able to reach external websites</li><li>Check UniFi traffic logs to confirm no WAN traffic from printer</li></ul><h3>Test AirPrint Discovery (iOS/macOS)</h3><p><strong>On iPhone/iPad:</strong></p><ol><li>Open any document or photo</li><li>Tap <strong>Share</strong> → <strong>Print</strong></li><li>Tap <strong>Select Printer</strong></li><li>Your printer should appear automatically in the list</li></ol><p><strong>On macOS:</strong></p><ol><li>Open <strong>System Settings</strong> → <strong>Printers &amp; Scanners</strong></li><li>Click the <strong>+</strong> button</li><li>Your printer should appear in the nearby printers list</li></ol><p>If the printer appears automatically, AirPrint discovery is working correctly via mDNS reflection.</p><h3>Test Manual Printer Addition</h3><p>If automatic discovery doesn’t work immediately (mDNS can take a few minutes to propagate), test manual addition:</p><p><strong>On macOS:</strong></p><ol><li><strong>System Settings</strong> → <strong>Printers &amp; Scanners</strong></li><li>Click <strong>+</strong> → <strong>Add Printer or Scanner</strong></li><li>Select <strong>IP</strong> tab</li><li>Enter printer’s IP address</li><li>Select appropriate driver/protocol</li><li>Click <strong>Add</strong></li></ol><p><strong>On Windows:</strong></p><ol><li><strong>Settings</strong> → <strong>Devices</strong> → <strong>Printers &amp; scanners</strong></li><li>Click <strong>Add Device</strong></li><li>If the printer doesn’t appear automatically, click <strong>The printer that I want isn’t listed</strong></li><li>Select <strong>Add a printer using a TCP/IP address or hostname</strong></li><li>Enter printer’s IP address</li><li>Follow the wizard to complete setup</li></ol><h3>Test Printing Functionality</h3><ol><li><strong>Print a test page</strong> from each device/VLAN that needs printer access</li><li><strong>Check printer status</strong> in system preferences (should show ink levels, ready status)</li><li><strong>Verify print job completion</strong></li></ol><h3>Verify Isolation</h3><p><strong>Test that the printer cannot reach the internet:</strong></p><ol><li>Access the printer’s web interface at its IP address</li><li>Look for any “phone home” features or cloud connectivity options</li><li>These should fail or show as disconnected</li><li>Check UniFi logs — there should be no WAN traffic from the printer’s IP</li></ol><p><strong>Test that the printer cannot reach other VLANs:</strong></p><ul><li>The printer should only be accessible from networks specified in your firewall policy</li><li>Devices on other VLANs should not be able to reach the printer</li></ul><h3>Part 6: Troubleshooting</h3><h3>Printer Not Discovered Automatically</h3><p><strong>Possible Causes:</strong></p><ol><li>IGMP Snooping or mDNS not enabled on source VLAN</li><li>mDNS announcements haven’t propagated yet (can take 2–3 minutes)</li><li>Firewall policy missing port 5353</li></ol><p><strong>Solutions:</strong></p><ol><li>Verify IGMP Snooping and mDNS enabled on both Printer VLAN and source VLANs</li><li>Wait a few minutes and try again</li><li>Restart the printer (turn WiFi off and on)</li><li>Manually add printer by IP as a workaround</li></ol><h3>Cannot Print Despite Printer Being Discovered</h3><p><strong>Possible Causes:</strong></p><ol><li>Firewall policy missing required ports</li><li>Policy not enabled or in wrong order</li><li>Wrong source networks selected in policy</li></ol><p><strong>Solutions:</strong></p><ol><li>Verify all six ports are in the policy: 5353,161,162,515,631,9100</li><li>Check policy is enabled and there are no blocking rules above it</li><li>Confirm your device’s VLAN is listed in Source Networks</li></ol><h3>Printer Shows “Offline” After VLAN Move</h3><p><strong>Possible Causes:</strong></p><ol><li>Printer didn’t pick up new IP configuration</li><li>Static IP not properly assigned</li><li>DNS resolution issues</li></ol><p><strong>Solutions:</strong></p><ol><li>Power cycle the printer completely</li><li>For WiFi: Turn WiFi off and on in printer settings</li><li>Verify printer shows correct IP in UniFi Client Devices</li><li>Remove and re-add printer on client devices</li></ol><h3>Can See Printer But Cannot Check Status</h3><p><strong>Possible Causes:</strong></p><ol><li>SNMP ports (161/162) not included in firewall policy</li><li>SNMP disabled on printer</li></ol><p><strong>Solutions:</strong></p><ol><li>Verify ports 161 and 162 are in the policy</li><li>Access printer’s web interface and enable SNMP</li><li>Some printers require SNMP community strings to be configured</li></ol><h3>Printer Has Internet Access (Shows Online in Logs)</h3><p><strong>Possible Causes:</strong></p><ol><li>“Allow Internet Access” was accidentally left checked</li><li>Printer is on wrong VLAN</li></ol><p><strong>Solutions:</strong></p><ol><li>Edit Printer VLAN, ensure “Allow Internet Access” is UNCHECKED</li><li>Verify printer is actually assigned to Printer VLAN in Client Devices</li><li>Check UniFi traffic routes to confirm no WAN traffic</li></ol><h3>Part 7: Security Best Practices</h3><h3>Printer-Specific Security</h3><ol><li><strong>Change Default Passwords:</strong></li></ol><ul><li>Access printer’s web interface</li><li>Change admin password from default</li><li>Use strong, unique password</li><li>Document password in password manager</li></ul><p><strong>2. Disable Unnecessary Services:</strong></p><ul><li>Disable FTP if present</li><li>Disable Telnet</li><li>Disable any “phone home” or cloud features</li><li>Turn off remote management features</li></ul><p><strong>3. Update Firmware (Before Isolation):</strong></p><ul><li>Check for latest firmware while printer has internet access</li><li>Update to latest version</li><li>Then remove internet access by moving to Printer VLAN</li><li>Accept that you won’t get future updates (trade-off for security)</li></ul><p><strong>4. Regular Security Audits:</strong></p><ul><li>Periodically review printer configuration</li><li>Check for new vulnerabilities published for your model</li><li>Consider replacement if critical vulnerabilities are discovered</li></ul><h3>Network-Level Security</h3><ol><li><strong>Minimize Access:</strong></li></ol><ul><li>Only add VLANs to Source Networks that genuinely need printing</li><li>Don’t give every VLAN printer access “just in case”</li><li>Review quarterly whether each network still needs access</li></ul><p><strong>2. Monitor Failed Connection Attempts:</strong></p><ul><li>Check UniFi logs for blocked traffic to Printer VLAN</li><li>Investigate unexpected source IPs trying to reach printers</li><li>Could indicate reconnaissance or misconfiguration</li></ul><p><strong>3. Document Your Configuration:</strong></p><ul><li>Keep notes on which printer has which IP</li><li>Document the firewall policy and its purpose</li><li>Note any special configurations or quirks</li><li>Makes troubleshooting and maintenance much easier</li></ul><p><strong>4. Physical Security:</strong></p><ul><li>Place printers in secure locations</li><li>Disable USB ports if not needed (security risk)</li><li>Consider network-only printers without USB/SD card access</li></ul><h3>What NOT to Do</h3><p>❌ <strong>Don’t give printers internet access</strong> — No legitimate reason for a home/office printer to access the internet</p><p>❌ <strong>Don’t put printers on your main network</strong> — Defeats the purpose of segmentation</p><p>❌ <strong>Don’t use DHCP</strong> — Makes troubleshooting and management harder</p><p>❌ <strong>Don’t share admin passwords</strong> — Each administrator should have their own printer credentials</p><p>❌ <strong>Don’t ignore firmware vulnerabilities</strong> — If critical vulnerability discovered, consider replacing the printer</p><h3>Understanding Why Printers Don’t Need Internet</h3><h3>Common Misconceptions</h3><p><strong>“My printer needs internet for firmware updates”:</strong></p><ul><li>Update firmware manually before isolation</li><li>Most printers go years without updates anyway</li><li>Security benefit of no internet access outweighs update convenience</li></ul><p><strong>“Cloud printing requires internet”:</strong></p><ul><li>You’re printing from devices on your network directly</li><li>No need for cloud printing services (Google Cloud Print, etc.)</li><li>Direct network printing is faster and more reliable</li></ul><p><strong>“The printer app on my phone needs it”:</strong></p><ul><li>Manufacturer apps often work without internet if on same network</li><li>AirPrint and IPP don’t require internet connectivity</li><li>Apps that require internet are usually collecting usage data</li></ul><h3>What Printers Actually Need</h3><p><strong>To Function Properly:</strong></p><ul><li>IP address on local network ✅</li><li>Access from devices that need to print ✅</li><li>Ability to receive print jobs on standard ports ✅</li></ul><p><strong>What They Don’t Need:</strong></p><ul><li>Access to manufacturer servers ❌</li><li>Ability to download updates ❌</li><li>Connection to cloud services ❌</li><li>Access to other VLANs ❌</li></ul><p>By removing internet access, you eliminate entire categories of security risks without impacting functionality.</p><h3>Conclusion</h3><p>Isolating printers on a dedicated VLAN with no internet access represents a significant security improvement with minimal operational impact. By implementing this configuration, you’ve accomplished several critical security objectives:</p><p><strong>Eliminated Remote Attack Vectors:</strong> Without internet access, your printer cannot be reached by remote attackers, cannot download malicious firmware, and cannot participate in botnets. The attack surface is reduced to only authorized devices on your network.</p><p><strong>Contained Potential Compromises:</strong> If a printer is compromised through a vulnerability or malicious print job, the attacker’s ability to pivot to other systems is eliminated. The isolated VLAN acts as a security boundary that prevents lateral movement.</p><p><strong>Maintained Full Functionality:</strong> Despite the strict isolation, all printing functionality remains intact. AirPrint discovery works across VLANs through mDNS reflection, printer status monitoring functions via SNMP, and all standard printing protocols operate normally.</p><p><strong>Created Scalable Architecture:</strong> By using network-based firewall policies rather than IP-based targeting, adding additional printers requires no policy changes. The security model scales effortlessly as your printing infrastructure grows.</p><p>The combination of VLAN isolation, no internet access, and targeted firewall policies creates defense-in-depth that follows enterprise security principles. Printers are arguably the least secure devices on most networks — treating them as untrusted infrastructure is simply acknowledging reality.</p><p>This same pattern applies to other potentially vulnerable devices: security cameras, smart TVs, streaming devices, and other IoT equipment all benefit from similar isolation strategies. Network segmentation is a foundational security practice that pays dividends across your entire infrastructure.</p><p>Your network printers are now properly isolated and secured without sacrificing any convenience or functionality.</p><h3>References and Resources</h3><ul><li><strong>UniFi Documentation</strong>: <a href="https://help.ui.com/">https://help.ui.com/</a></li><li><strong>HP Printer Security Best Practices</strong>: <a href="https://support.hp.com/">https://support.hp.com/</a></li><li><strong>Internet Printing Protocol (IPP)</strong>: RFC 8010</li><li><strong>mDNS Protocol Specification</strong>: RFC 6762</li><li><strong>SNMP Protocol Overview</strong>: RFC 1157</li><li><strong>Network Segmentation Best Practices</strong>: NIST Special Publication 800–125B</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b804e1dd8d9b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Securing Ecobee and HomeKit Devices: IoT VLAN Isolation with UniFi OS 4.4.9]]></title>
            <link>https://medium.com/@lazro/securing-ecobee-and-homekit-devices-iot-vlan-isolation-with-unifi-os-4-4-9-9e2bc8437fb7?source=rss-1983c9e8469b------2</link>
            <guid isPermaLink="false">https://medium.com/p/9e2bc8437fb7</guid>
            <category><![CDATA[network-security]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[apple-homekit]]></category>
            <category><![CDATA[vlan]]></category>
            <category><![CDATA[ubiquiti]]></category>
            <dc:creator><![CDATA[Lazro]]></dc:creator>
            <pubDate>Thu, 11 Dec 2025 01:21:22 GMT</pubDate>
            <atom:updated>2025-12-11T23:02:11.000Z</atom:updated>
            <content:encoded><![CDATA[<p><em>This article was written with the help of Sonnet 4.5 on Claude.ai. All outputs were reviewed for accuracy and confirmed working on the UniFi OS system.</em></p><h3>Overview</h3><p>Smart home devices like thermostats, cameras, and sensors are convenient but pose significant security risks when left on your main network. These IoT devices often have weaker security, receive infrequent updates, and can become entry points for attackers. This guide demonstrates how to isolate Apple HomeKit devices (specifically an Ecobee smart thermostat) on a dedicated IoT VLAN while maintaining full HomeKit functionality through your Apple TV.</p><p><strong>Hardware Used:</strong></p><ul><li>Cloud Gateway Ultra (running UniFi OS 4.4.9)</li><li>USW Flex Mini</li><li>PoE+ Switch</li><li>U6+ Access Point</li></ul><p><strong>Devices Covered:</strong></p><ul><li>Apple TV 4K (HomeKit Hub)</li><li>Ecobee Essential Smart Thermostat</li><li>Other HomeKit-compatible IoT devices</li></ul><h3>Understanding the Challenge</h3><p>HomeKit relies heavily on <strong>mDNS (multicast DNS/Bonjour)</strong> for device discovery. When devices are on separate VLANs:</p><ul><li>mDNS announcements don’t naturally cross VLAN boundaries</li><li>Multicast traffic (224.0.0.251) is contained within each broadcast domain</li><li>Standard firewall policies alone won’t solve the discovery problem</li></ul><p>The solution requires both <strong>network-level multicast reflection</strong> and <strong>targeted firewall policies</strong> to allow HomeKit communication while maintaining security isolation.</p><h3>Part 1: Creating Network VLANs</h3><h3>Creating the Apple VLAN (if needed)</h3><p>If you haven’t already isolated your Apple devices:</p><ol><li>Click the <strong>Settings gear</strong> icon on the left sidebar</li><li>Navigate to <strong>Networks</strong></li><li>Click <strong>New Virtual Network</strong></li><li>Configure the network:</li></ol><ul><li><strong>Name:</strong> Apple</li><li><strong>Router:</strong> Default (leave as is)</li><li><strong>Zone:</strong> Internal</li><li><strong>Protocol:</strong> IPv4</li><li><strong>Auto-scale network:</strong> Enabled</li><li><strong>Advanced:</strong> Manual</li><li>Check <strong>Isolate Network</strong></li><li>Check <strong>Allow Internet Access</strong></li><li>Check <strong>IGMP Snooping</strong></li><li>Check <strong>mDNS</strong></li></ul><p>5. Click <strong>Add</strong></p><h3>Creating the IoT VLAN</h3><ol><li>Click the <strong>Settings gear</strong> icon on the left sidebar</li><li>Navigate to <strong>Networks</strong></li><li>Click <strong>New Virtual Network</strong></li><li>Configure the network:</li></ol><ul><li><strong>Name:</strong> IoT</li><li><strong>Router:</strong> Default (leave as is)</li><li><strong>Zone:</strong> Internal</li><li><strong>Protocol:</strong> IPv4</li><li><strong>Auto-scale network:</strong> Enabled</li><li><strong>Advanced:</strong> Manual</li><li>Check <strong>Isolate Network</strong></li><li>Check <strong>Allow Internet Access</strong></li><li>Check <strong>IGMP Snooping</strong></li><li>Check <strong>mDNS</strong></li></ul><p>5. Click <strong>Add</strong></p><h3>Enable IGMP Snooping and mDNS for Existing VLANs</h3><p>If you created VLANs previously without enabling these options, update them now. This is critical for HomeKit to work across VLANs.</p><p><strong>For each VLAN (Apple and IoT):</strong></p><ol><li>Navigate to <strong>Settings</strong> → <strong>Networks</strong></li><li>Select the VLAN</li><li>Scroll down to <strong>Advanced</strong> → <strong>Manual</strong></li><li>Check <strong>IGMP Snooping</strong></li><li>Check <strong>mDNS</strong></li><li>Click <strong>Apply</strong></li></ol><h3>Part 2: Assigning Devices to VLANs</h3><h3>Moving Apple TV to Apple VLAN</h3><h4>For Wired Apple TV:</h4><ol><li>Click <strong>UniFi Devices</strong> on the left sidebar</li><li>Select your <strong>PoE+ Switch</strong></li><li>Click <strong>Port Manager</strong> on the right-hand side</li><li>Select the port that your Apple TV is connected to</li><li>Under <strong>Native VLAN / Network</strong>, select <strong>Apple</strong></li><li>Click <strong>Apply</strong></li></ol><h4>Setting Fixed IP for Apple TV:</h4><ol><li>Click <strong>Client Devices</strong> on the left sidebar</li><li>Select your Apple TV</li><li>Click <strong>Settings</strong> in the right-hand menu</li><li>Under <strong>IP Settings:</strong></li></ol><ul><li>Check <strong>Virtual Network Override</strong></li><li>Set <strong>Network</strong> to <strong>Apple</strong></li><li>Check <strong>Fixed IP Address</strong> (recommended)</li><li>Assign your desired static IP address</li></ul><p>5. Click <strong>Apply</strong></p><h3>Moving Ecobee to IoT VLAN</h3><p><strong>Note:</strong> Most smart thermostats connect via WiFi. Simply connect your Ecobee to your WiFi network first, then reassign it to the IoT VLAN.</p><ol><li>Click <strong>Client Devices</strong> on the left sidebar</li><li>Find and select your <strong>Ecobee thermostat</strong></li><li>Click <strong>Settings</strong> in the right-hand menu</li><li>Under <strong>IP Settings:</strong></li></ol><ul><li>Check <strong>Virtual Network Override</strong></li><li>Set <strong>Network</strong> to <strong>IoT</strong></li><li>Check <strong>Fixed IP Address</strong> (strongly recommended for HomeKit devices)</li><li>Assign a static IP address (note this for the firewall policy)</li></ul><p>5. Click <strong>Apply</strong></p><p><strong>Important:</strong> Setting a static IP for your Ecobee is crucial for the targeted firewall policy approach we’ll use.</p><h3>Part 3: Configuring Firewall Policies</h3><p>The key to maintaining HomeKit functionality while keeping networks isolated is creating a targeted policy that allows your Apple devices to communicate with specific IoT devices by IP address.</p><h3>Policy: Apple to Ecobee</h3><ol><li>Navigate to <strong>Settings</strong> → <strong>Policy Engine</strong></li><li>Click <strong>Create New Policy</strong></li><li>Select <strong>Firewall</strong></li><li>Configure:</li></ol><ul><li><strong>Name:</strong> Apple to Ecobee</li><li><strong>Source Zone:</strong> Internal</li><li><strong>Source Networks:</strong> Apple</li><li><strong>Source Port:</strong> Any</li><li><strong>Action:</strong> Allow</li><li><strong>Auto Allow Return Traffic:</strong> Checked</li><li><strong>Destination Zone:</strong> IP Address</li><li><strong>Destination IP:</strong> Your Ecobee’s static IP address</li><li><strong>Destination Port:</strong> Any</li><li><strong>Protocol:</strong> All</li></ul><p>5. Click <strong>Save</strong></p><h3>Why This Approach Works</h3><p><strong>Destination Port: Any</strong> — Rather than trying to identify every port HomeKit uses (which can vary and includes dynamic port ranges), allowing all ports to the specific device IP is simpler and more reliable.</p><p><strong>IP-Based Targeting</strong> — By targeting the Ecobee’s specific IP rather than the entire IoT network, you maintain security isolation. Other IoT devices on the same VLAN remain inaccessible from the Apple VLAN.</p><p><strong>IGMP Snooping + Policy</strong> — The combination of IGMP Snooping (for mDNS reflection) and the firewall policy (for general communication) provides complete HomeKit functionality.</p><h3>Part 4: Testing and Verification</h3><h3>Initial Setup and Testing</h3><ol><li><strong>Restart your Apple TV</strong> after moving it to the Apple VLAN</li><li><strong>Turn off WiFi and turn it back on</strong> on your Ecobee after moving it to the IoT VLAN</li><li><strong>Open the Home app</strong> on your Apple TV or iPhone</li><li>The Ecobee should appear automatically</li><li>If not, try removing and re-adding it to HomeKit</li></ol><h3>Verifying Communication</h3><p>Test the following HomeKit functions:</p><ul><li><strong>View current temperature</strong> — Should update in real-time</li><li><strong>Change temperature setpoint</strong> — Should respond immediately</li><li><strong>Switch heating/cooling modes</strong> — Should change modes</li><li><strong>View schedule</strong> — Should display correctly</li><li><strong>Automation triggers</strong> — Should fire as expected</li></ul><p>All functions should work exactly as they did before VLAN isolation.</p><h3>Troubleshooting</h3><p>If HomeKit can’t find or control the Ecobee:</p><ol><li><strong>Verify VLAN assignments:</strong></li></ol><ul><li>Check that Apple TV is on Apple VLAN</li><li>Check that Ecobee is on IoT VLAN</li><li>Confirm in <strong>Client Devices</strong> that both show correct networks</li></ul><p><strong>2. Verify IGMP Snooping is enabled:</strong></p><ul><li><strong>Settings</strong> → <strong>Networks</strong> → Select each VLAN</li><li><strong>Advanced</strong> → Confirm <strong>IGMP Snooping</strong> and <strong>Multicast DNS</strong> are checked</li></ul><p><strong>3. Check the firewall policy:</strong></p><ul><li>Verify <strong>Destination IP</strong> matches Ecobee’s actual IP</li><li>Confirm <strong>Destination Port</strong> is set to <strong>Any</strong></li><li>Ensure <strong>Auto Allow Return Traffic</strong> is checked</li></ul><p><strong>4. Restart devices:</strong></p><ul><li>Restart Apple TV</li><li>Power cycle Ecobee (remove from wall plate for 30 seconds)</li><li>Wait 2–3 minutes for mDNS announcements to propagate</li></ul><p><strong>5. Remove and re-add to HomeKit:</strong></p><ul><li>Remove Ecobee from Home app</li><li>Factory reset Ecobee’s HomeKit pairing (check Ecobee documentation)</li><li>Re-add to HomeKit</li></ul><h3>Part 5: Security Best Practices</h3><h3>Network Segmentation Benefits</h3><p>By isolating HomeKit devices on an IoT VLAN, you’ve achieved:</p><p><strong>Containment:</strong> If a smart thermostat is compromised through a firmware vulnerability, the attacker cannot access computers, phones, or other sensitive devices on your main network.</p><p><strong>Controlled Access:</strong> Only your Apple TV (and other devices on the Apple VLAN) can communicate with IoT devices. Your work computer, NAS, media server, and other networks have zero access.</p><p><strong>Vendor Isolation:</strong> Different manufacturers’ IoT devices can’t communicate with each other, preventing lateral movement between compromised devices.</p><p><strong>Internet Access Without Internal Access:</strong> IoT devices can still reach the internet for cloud services and updates, but they’re isolated from your internal network.</p><h3>Additional Security Measures</h3><ol><li><strong>Regular Firmware Updates:</strong></li></ol><ul><li>Check for Ecobee firmware updates monthly</li><li>Enable automatic updates if available</li><li>Keep Apple TV updated for latest HomeKit security patches</li></ul><p><strong>2. Strong Authentication:</strong></p><ul><li>Use strong, unique passwords for IoT device accounts</li><li>Enable two-factor authentication where available</li><li>Don’t reuse passwords across devices</li></ul><p><strong>3. Minimize Cloud Dependencies:</strong></p><ul><li>Use HomeKit’s local control features when possible</li><li>Understand which features require internet access</li><li>Consider devices that support local-only operation</li></ul><p><strong>4. Monitor IoT Traffic:</strong></p><ul><li>Regularly check UniFi traffic analytics for unusual patterns</li><li>Watch for unexpected destinations (unfamiliar cloud servers)</li><li>Set up alerts for high-volume traffic from IoT devices</li></ul><p><strong>5. Document Your Setup:</strong></p><ul><li>Keep a list of all IoT devices and their static IPs</li><li>Document which policies control which devices</li><li>Note any special configuration requirements</li></ul><h3>What NOT to Do</h3><p>❌ <strong>Don’t put IoT devices on your main network</strong> — Even “trusted” brands have security vulnerabilities</p><p>❌ <strong>Don’t skip IGMP Snooping</strong> — HomeKit won’t work reliably without it</p><p>❌ <strong>Don’t use DHCP for HomeKit devices</strong> — Dynamic IPs will break your IP-based policies</p><p>❌ <strong>Don’t create overly permissive policies</strong> — Opening the entire IoT VLAN to the Apple VLAN defeats the purpose of isolation</p><h3>Understanding mDNS and IGMP Snooping</h3><h3>What is mDNS?</h3><p>Multicast DNS (mDNS) is a protocol that allows devices to discover each other on a local network without requiring a centralized DNS server. HomeKit, AirPlay, AirPrint, and many other Apple technologies rely on mDNS (marketed as “Bonjour”) for device discovery.</p><p><strong>How it works:</strong></p><ul><li>Devices send multicast announcements to 224.0.0.251 on port 5353</li><li>Other devices listening on that multicast address receive the announcements</li><li>No configuration required — it “just works” on a single network</li></ul><p><strong>The VLAN problem:</strong></p><ul><li>Multicast traffic doesn’t cross VLAN boundaries by default</li><li>Each VLAN becomes its own isolated broadcast domain</li><li>Devices on different VLANs can’t see each other’s mDNS announcements</li></ul><h3>What is IGMP Snooping?</h3><p>Internet Group Management Protocol (IGMP) Snooping is a network switch feature that:</p><ul><li>Monitors IGMP traffic between hosts and routers</li><li>Intelligently forwards multicast traffic only to interested receivers</li><li>Can be configured to reflect multicast between VLANs</li></ul><p><strong>Why UniFi needs both IGMP Snooping AND Multicast DNS enabled:</strong></p><ul><li><strong>IGMP Snooping</strong> manages how multicast traffic flows through switches</li><li><strong>Multicast DNS</strong> specifically enables mDNS reflection between VLANs</li><li>Together, they allow HomeKit devices on different VLANs to discover each other</li></ul><p>This is why you can’t rely solely on firewall policies — even with all ports open, mDNS announcements won’t cross VLANs without IGMP Snooping and Multicast DNS enabled at the network level.</p><h3>Conclusion</h3><p>Isolating IoT devices on a dedicated VLAN is one of the most effective security measures you can implement for your smart home. By combining network-level isolation with targeted firewall policies, you’ve created a security architecture that:</p><p><strong>Limits Attack Surface:</strong> Compromised IoT devices can’t access your computers, phones, NAS, or other sensitive systems. The blast radius of any security incident is contained to the IoT VLAN itself.</p><p><strong>Maintains Functionality:</strong> Unlike crude blocking approaches, this configuration preserves full HomeKit functionality. Your smart home works exactly as it did before, with no user-visible compromises.</p><p><strong>Provides Visibility:</strong> With devices properly segmented, UniFi’s traffic analytics become much more useful. You can easily monitor what your IoT devices are doing and spot anomalous behavior.</p><p><strong>Follows Industry Best Practices:</strong> This approach implements defense-in-depth, principle of least privilege, and network segmentation — fundamental security principles used in enterprise environments.</p><p>The combination of IGMP Snooping for mDNS reflection and IP-based firewall policies represents the optimal balance between security and functionality for HomeKit deployments. You don’t need to identify dozens of ports, maintain complex rule sets, or troubleshoot intermittent connectivity issues.</p><h3>Scaling to Multiple HomeKit Devices</h3><p>This approach scales efficiently to other HomeKit devices on your IoT VLAN. For each additional HomeKit device:</p><ol><li><strong>Assign a static IP</strong> to the device on the IoT VLAN</li><li><strong>Create a specific policy</strong> for that device:</li></ol><ul><li><strong>Name:</strong> Apple to [Device Name]</li><li><strong>Source:</strong> Apple VLAN</li><li><strong>Destination:</strong> Device’s specific IP address</li><li><strong>Destination Port:</strong> Any</li></ul><p><strong>3. Test</strong> HomeKit functionality</p><p>Each device gets exactly the access it needs through its own targeted policy. Whether you’re adding HomeKit cameras, door locks, light bulbs, or sensors, the pattern remains the same: IoT VLAN with static IP, targeted firewall policy from Apple VLAN, and rigorous isolation from everything else.</p><p>The techniques you’ve learned here extend beyond just HomeKit. The same principles apply to security cameras (dedicated camera VLAN), smart TVs (media VLAN), guest devices (guest VLAN), and any other class of devices that benefits from isolation. Network segmentation is a foundational security practice that will serve you well as your home network grows in complexity.</p><p>Your smart home is now significantly more secure, without sacrificing any of the convenience that made you adopt these technologies in the first place.</p><h3>References and Resources</h3><ul><li><strong>UniFi Documentation</strong>: <a href="https://help.ui.com/">https://help.ui.com/</a></li><li><strong>Apple HomeKit Security Guide</strong>: <a href="https://support.apple.com/guide/security/homekit-sec9bdf332e0/web">https://support.apple.com/guide/security/homekit-sec9bdf332e0/web</a></li><li><strong>Ecobee Support</strong>: <a href="https://support.ecobee.com/">https://support.ecobee.com/</a></li><li><strong>Network Segmentation Best Practices</strong>: <a href="https://nvlpubs.nist.gov/nistpubs/specialpublications/nist.sp.800-125b.pdf">NIST Special Publication 800–125B</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9e2bc8437fb7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Securing Your Plex Media Server: VLAN Isolation with UniFi OS 4.7.7]]></title>
            <link>https://medium.com/@lazro/securing-your-plex-media-server-vlan-isolation-with-unifi-os-4-7-7-c043c980db56?source=rss-1983c9e8469b------2</link>
            <guid isPermaLink="false">https://medium.com/p/c043c980db56</guid>
            <category><![CDATA[unifi]]></category>
            <category><![CDATA[vlan]]></category>
            <category><![CDATA[network-security]]></category>
            <category><![CDATA[ubuntu]]></category>
            <category><![CDATA[plex]]></category>
            <dc:creator><![CDATA[Lazro]]></dc:creator>
            <pubDate>Mon, 01 Dec 2025 02:41:01 GMT</pubDate>
            <atom:updated>2025-12-06T09:06:06.602Z</atom:updated>
            <content:encoded><![CDATA[<h3>Securing Your Plex Media Server: VLAN Isolation with UniFi OS 4.4.9</h3><p><em>This article was written with the help of Sonnet 4.5 on Claude.ai. All outputs were reviewed for accuracy and confirmed working on the UniFi OS and Plex system.</em></p><h3>Overview</h3><p>This guide walks through securing a Plex media server using VLAN isolation in UniFi OS 4.4.9. By isolating your media server and related services (like Deluge) on separate VLANs, you create network segmentation that limits potential security risks while maintaining controlled access from your other devices.</p><p><strong>Hardware Used:</strong></p><ul><li>Cloud Gateway Ultra (running UniFi OS 4.4.9)</li><li>USW Flex Mini</li><li>PoE+ Switch</li><li>U6+ Access Point</li></ul><p><strong>Services Covered:</strong></p><ul><li>Plex Media Server (Ubuntu 24.04.3 LTS)</li><li>Deluge BitTorrent Client</li><li>UniFi OS</li></ul><h3>Part 1: Creating Isolated VLANs</h3><p>Access your Unifi Site Manager at <a href="https://unifi.ui.com/">https://unifi.ui.com/</a>. You can select the site listed in the manager.</p><h3>Creating a New VLAN</h3><ol><li>Click the <strong>Settings gear</strong> icon on the left sidebar</li><li>Navigate to <strong>Networks</strong></li><li>Click <strong>New Virtual Network</strong></li><li>Configure the network:</li></ol><ul><li><strong>Name:</strong> Plex (or your preferred name)</li><li><strong>Router:</strong> Default (leave as is)</li><li><strong>Zone:</strong> Internal</li><li><strong>Protocol:</strong> IPv4</li><li><strong>Auto-scale network:</strong> Enabled</li><li><strong>Advanced:</strong> Manual</li><li>Check <strong>Isolate Network</strong></li><li>Check <strong>Allow Internet Access</strong></li></ul><p>5. Click <strong>Add</strong></p><p>Repeat this process for any additional isolated networks you need (Apple TV network, etc.).</p><h3>Assigning Devices to VLANs</h3><h4>For Wired Devices (Connected to Switch)</h4><ol><li>Click <strong>UniFi Devices</strong> on the left sidebar</li><li>Select your <strong>PoE+ Switch</strong></li><li>Click <strong>Port Manager</strong> on the right-hand side</li><li>Select the port that your device is connected to (e.g., the port for Plex server)</li><li>Under <strong>Native VLAN / Network</strong>, select your VLAN (e.g., Plex)</li><li>Click <strong>Apply</strong></li></ol><h4>Setting Fixed IP Address</h4><ol><li>Click <strong>Client Devices</strong> on the left sidebar</li><li>Select the device you want to configure (e.g., Plex server)</li><li>Click <strong>Settings</strong> in the right-hand menu</li><li>Under <strong>IP Settings:</strong></li></ol><ul><li>Check <strong>Virtual Network Override</strong></li><li>Set <strong>Network</strong> to your VLAN (e.g., Plex)</li><li>Check <strong>Fixed IP Address</strong> (recommended for servers)</li><li>Assign your desired static IP address</li></ul><p>5. Click <strong>Apply</strong></p><h3>Forcing IP Update on Ubuntu</h3><p>If your Ubuntu server doesn’t immediately pick up the new IP:</p><p><strong>Restart NetworkManager:</strong></p><pre>sudo systemctl restart NetworkManager</pre><p><strong>Alternative — GUI Method:</strong></p><ul><li>Disable the network adapter in Ubuntu’s network settings</li><li>Re-enable it</li><li>The system should request a new DHCP lease</li></ul><p><strong>Verify the new IP:</strong></p><pre>ip a</pre><h3>Part 2: Configuring Firewall Policies</h3><p>UniFi OS 4.4.9 uses a Zone-based Policy Engine rather than traditional firewall rules.</p><h3>Understanding Policy Components</h3><ul><li><strong>Source Zone:</strong> Where traffic originates (e.g., Client VLAN, User network)</li><li><strong>Source Port:</strong> Port on the originating device (almost always “Any”)</li><li><strong>Destination Zone:</strong> Where traffic is going (e.g., Plex VLAN)</li><li><strong>Destination Port:</strong> The service port you’re allowing (e.g., 32400 for Plex)</li><li><strong>Action:</strong> Block, Allow, or Reject</li></ul><p><strong>Critical Note:</strong> Source ports should almost always be set to “Any” because client devices use random high ports when initiating connections. Only the destination port should be restricted.</p><h3>Creating Internal Access Policies</h3><h4>Policy 1: Allow Multiple Networks to Access Plex</h4><ol><li>Navigate to <strong>Settings</strong> → <strong>Policy Engine</strong></li><li>Click <strong>Create New Policy</strong></li><li>Select <strong>Firewall</strong></li><li>Configure:</li></ol><ul><li><strong>Name:</strong> Internal to Plex</li><li><strong>Source Zone:</strong> Internal</li><li><strong>Source Networks:</strong> Select all networks that need Plex access</li><li><strong>Source Port:</strong> Any</li><li><strong>Action:</strong> Allow</li><li><strong>Auto Allow Return Traffic:</strong> Checked</li><li><strong>Destination Zone:</strong> Internal</li><li><strong>Destination Network:</strong> Plex</li><li><strong>Destination Port:</strong> 32400</li><li><strong>Protocol:</strong> All</li></ul><p>5. Click <strong>Save</strong></p><h4>Policy 2: Allow Access to Deluge (if applicable)</h4><ol><li>Navigate to <strong>Settings</strong> → <strong>Policy Engine</strong></li><li>Click <strong>Create New Policy</strong></li><li>Select <strong>Firewall</strong></li><li>Configure:</li></ol><ul><li><strong>Name:</strong> Internal to Deluge</li><li><strong>Source Zone:</strong> Internal</li><li><strong>Source Networks:</strong> Select networks that need Deluge access</li><li><strong>Source Port:</strong> Any</li><li><strong>Action:</strong> Allow</li><li><strong>Auto Allow Return Traffic:</strong> Checked</li><li><strong>Destination Zone:</strong> Internal</li><li><strong>Destination Network:</strong> Plex</li><li><strong>Destination Port:</strong> 8112</li><li><strong>Protocol:</strong> All</li></ul><p>5. Click <strong>Save</strong></p><h3>Part 3: External Access Configuration</h3><h3>Security Considerations</h3><p><strong>Important:</strong> Opening ports to the internet increases your attack surface and should only be done when necessary. Before proceeding with external access configuration, consider whether you truly need it.</p><p><strong>Alternative to External Access:</strong> Plex supports downloading media directly to mobile devices through the Plex app when you’re connected to your local network. You can sync content to your phone or tablet for offline viewing, eliminating the need to expose your server to the internet for many use cases. This is a much more secure option if your primary goal is accessing media while away from home.</p><p>If you decide external access is necessary, proceed with the following steps to configure it as securely as possible.</p><h3>Setting Up Remote Access for Plex</h3><p>Using a non-standard port (32401) provides security through obscurity.</p><h4>Step 1: Create Port Forwarding Rule</h4><ol><li>Navigate to <strong>Settings</strong> → <strong>Policy Engine</strong></li><li>Click <strong>Create New Policy</strong></li><li>Select <strong>Port Forwarding</strong></li><li>Configure:</li></ol><ul><li><strong>Name:</strong> Plex External</li><li><strong>WAN Interface:</strong> WAN1 (Default)</li><li><strong>WAN Port:</strong> 32401 (external port)</li><li><strong>From:</strong> Any</li><li><strong>Forward IP Address:</strong> Your Plex server’s IP address (Select Device)</li><li><strong>Forward Port:</strong> 32400 (Plex’s internal listening port)</li><li><strong>Protocol:</strong> TCP/UDP</li></ul><p>5. Click <strong>Add</strong></p><p><strong>Key Concept:</strong> Port translation happens here:</p><ul><li>External clients connect to port <strong>32401</strong></li><li>Traffic is forwarded to internal port <strong>32400</strong> where Plex actually listens</li></ul><h4>Step 2: Create External Firewall Policy</h4><ol><li>Navigate to <strong>Settings</strong> → <strong>Policy Engine</strong></li><li>Click <strong>Create New Policy</strong></li><li>Select <strong>Firewall</strong></li><li>Configure:</li></ol><ul><li><strong>Name:</strong> Internet to Plex</li><li><strong>Source Zone:</strong> External</li><li><strong>Source Region:</strong> Country of residence (or restrict to specific countries)</li><li><strong>Source Port:</strong> Any</li><li><strong>Action:</strong> Allow</li><li><strong>Auto Allow Return Traffic:</strong> Checked</li><li><strong>Destination Zone:</strong> Internal</li><li><strong>Destination Network:</strong> Plex</li><li><strong>Destination Port:</strong> 32400 (internal port after forwarding)</li><li><strong>IP Version:</strong> Both</li><li><strong>Protocol:</strong> All</li></ul><p>5. Click <strong>Save</strong></p><h4>Step 3: Configure Plex Server</h4><ol><li>Open Plex web interface</li><li>Go to <strong>Settings</strong> → <strong>Remote Access</strong></li><li>Check <strong>“Manually specify public port”</strong></li><li>Enter <strong>32401</strong></li><li>Click <strong>Apply</strong></li></ol><p><strong>Important:</strong> Plex always listens internally on port 32400. The manual port setting only tells Plex what external port to advertise.</p><p>In Plex:</p><ul><li><strong>Settings</strong> → <strong>Remote Access</strong> should show <strong>“Fully accessible outside your network”</strong></li></ul><h4>Step 4: Verify External Access</h4><ol><li>Visit <a href="https://www.canyouseeme.org/">https://www.canyouseeme.org/</a></li><li>Enter port <strong>32401</strong></li><li>Click <strong>Check Port</strong></li><li>Should show “Success”</li></ol><h4>Step 5: Fix Mobile App Relay Connection</h4><p>If the Plex mobile app shows “Relay” instead of direct connection:</p><ol><li>Open Plex app</li><li>Go to <strong>Profile</strong> (top right) → <strong>Settings</strong></li><li>Navigate to <strong>Advanced</strong></li><li>Tap <strong>Reset Cache</strong></li><li>Restart the app</li><li>Verify: <strong>Libraries</strong> → <strong>Library</strong> (top) → <strong>See All Libraries</strong> → Should show “Remote Connection”</li></ol><h3>Part 4: Local DNS Configuration</h3><p>Creating friendly hostnames makes accessing your services easier without remembering IP addresses.</p><h3>Creating DNS Records</h3><ol><li>Click <strong>Client Devices</strong> on the left sidebar</li><li>Select your device (e.g., Plex server)</li><li>Click <strong>Settings</strong> in the right-hand menu</li><li>Under <strong>IP Settings:</strong></li></ol><ul><li>Check <strong>Local DNS Record</strong></li><li>Enter your desired hostname (e.g., plex.local)</li></ul><p>5. Click <strong>Apply</strong></p><h3>Accessing Services</h3><p><strong>Note:</strong> DNS only resolves to IP addresses, not ports. You must include the port in the URL.</p><ul><li><strong>Plex:</strong> <a href="http://plex.local:32400/web">http://plex.local:32400/web</a></li><li><strong>Deluge:</strong> <a href="http://plex.local:8112/">http://plex.local:8112</a></li></ul><p><strong>Recommendation:</strong> Create browser bookmarks for these URLs for quick access.</p><h3>Part 5: Troubleshooting Common Issues</h3><h3>Device Not Getting Correct IP</h3><p><strong>Problem:</strong> Device shows old IP after VLAN assignment</p><p><strong>Solutions:</strong></p><ol><li>Disable and re-enable network adapter on the device</li><li>Restart NetworkManager: sudo systemctl restart NetworkManager</li><li>Reboot the device</li><li>Check that VLAN assignment is correct in UniFi</li></ol><h3>Cannot Access Service Despite Policy</h3><p><strong>Problem:</strong> Firewall policy exists but connection times out</p><p><strong>Common Causes:</strong></p><ol><li><strong>Source port is restricted:</strong> Should be “Any”, not a specific port</li><li><strong>Wrong destination port:</strong> Verify the service is actually listening on that port</li><li><strong>Policy order:</strong> Deny rules above Allow rules will block traffic</li><li><strong>Zone assignment:</strong> Device not actually on the expected VLAN/zone</li></ol><h3>External Access Shows Relay Connection</h3><p><strong>Problem:</strong> Plex accessible but mobile app uses relay</p><p><strong>Solutions:</strong></p><ol><li>Reset app cache (Profile → Settings → Advanced → Reset Cache)</li><li>Force quit and restart the app</li><li>Sign out and back into Plex account</li><li>Test on cellular data (not home WiFi)</li><li>Verify port forwarding shows success on canyouseeme.org</li><li>Check Plex Remote Access settings show correct public port</li></ol><h3>Conclusion</h3><p>Network segmentation through VLAN isolation represents a fundamental shift in how we approach home network security. Rather than treating your entire home network as a single trusted zone, this guide has demonstrated how to implement defense-in-depth principles that are commonly used in enterprise environments.</p><p>By isolating your Plex media server and related services on dedicated VLANs, you’ve accomplished several critical security objectives:</p><p><strong>Containment</strong>: If your media server were ever compromised — whether through a software vulnerability, weak credentials, or malicious media files — the attacker’s lateral movement across your network is severely restricted. They cannot freely pivot to other devices on different VLANs without first breaching your carefully constructed firewall policies.</p><p><strong>Principle of Least Privilege</strong>: Each firewall policy you’ve created embodies this security principle. Your Apple TV can access Plex on port 32400, but nothing more. Your client networks can reach Deluge on port 8112, but are blocked from everything else on that VLAN. This granular control means that even legitimate devices only have the minimum access necessary to function.</p><p><strong>Visibility and Control</strong>: With traffic now flowing through explicit policy definitions, you have unprecedented visibility into what’s happening on your network. UniFi’s traffic analytics can show you exactly which devices are communicating with your media server, how much bandwidth they’re consuming, and whether any unexpected connection attempts are occurring.</p><p><strong>External Access Without Compromise</strong>: The port forwarding configuration demonstrates how to safely expose services to the internet. By using port translation (external 32401 → internal 32400) and region-based restrictions, you’ve added multiple layers of protection that go beyond simple port forwarding. The non-standard external port reduces automated scanning exposure, while the internal isolation ensures that even if someone gains access to Plex, they haven’t gained access to your entire network.</p><p>The techniques covered in this guide — VLAN creation, zone-based firewall policies, port forwarding with translation, and local DNS configuration — are all transferable skills that extend beyond just securing a media server. These same principles can be applied to IoT devices, home automation systems, guest networks, security cameras, and any other services that benefit from isolation.</p><p>As you continue to expand your home network, remember that security is not a destination but an ongoing process. Regularly review your firewall policies, keep your services updated, monitor your network traffic for anomalies, and adjust your security posture as new threats emerge and your network requirements evolve.</p><p>The investment you’ve made in properly segmenting your network today will pay dividends in both security and peace of mind for years to come.</p><h3>References and Resources</h3><ul><li><strong>UniFi Documentation</strong>: <a href="https://help.ui.com/">https://help.ui.com/</a></li><li><strong>Plex Support</strong>: <a href="https://support.plex.tv/">https://support.plex.tv/</a></li><li><strong>Network Segmentation Best Practices</strong>: <a href="https://nvlpubs.nist.gov/nistpubs/specialpublications/nist.sp.800-125b.pdf">NIST Special Publication 800–125B</a></li><li><strong>CanYouSeeMe Port Checker</strong>: <a href="https://www.canyouseeme.org/">https://www.canyouseeme.org/</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c043c980db56" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Setting Up Plex and Deluge on Ubuntu 24.04 LTS: A Complete Guide]]></title>
            <link>https://medium.com/@lazro/setting-up-plex-and-deluge-on-ubuntu-24-04-lts-a-complete-guide-674363f67c1a?source=rss-1983c9e8469b------2</link>
            <guid isPermaLink="false">https://medium.com/p/674363f67c1a</guid>
            <category><![CDATA[plex]]></category>
            <category><![CDATA[deluge]]></category>
            <category><![CDATA[ubuntu]]></category>
            <dc:creator><![CDATA[Lazro]]></dc:creator>
            <pubDate>Sat, 29 Nov 2025 00:36:25 GMT</pubDate>
            <atom:updated>2025-12-06T08:48:57.774Z</atom:updated>
            <content:encoded><![CDATA[<h3>Setting Up Plex and Deluge on Ubuntu 24.04.3 LTS: A Complete Guide</h3><p><em>This article was written with the help of Sonnet 4.5 on Claude.ai. All outputs were reviewed for accuracy and confirmed working on the Ubuntu system.</em></p><h3>Introduction</h3><p>If you’ve installed Plex Media Server and Deluge torrent client on Ubuntu 24.04.3 LTS using the App Center (Snap packages), you may have encountered issues with file permissions and sharing files between the two applications. This is because Snap applications run in isolated, confined environments for security purposes.</p><p>This guide will walk you through setting up a shared media directory that both Plex and Deluge can access, allowing seamless file management between the applications.</p><h3>Prerequisites</h3><ul><li>Ubuntu 24.04.3 LTS</li><li>Plex Media Server installed via Snap (App Center)</li><li>Deluge installed via Snap (App Center)</li><li>Basic terminal/command line knowledge</li><li>Sudo (administrator) access</li></ul><h3>Understanding the Problem</h3><p>When you install applications as Snaps, they run in confined environments with restricted filesystem access. By default:</p><ul><li>Deluge downloads to an isolated snap directory that other applications cannot access</li><li>Plex runs as the root user within its snap container</li><li>Direct file copying between snap-isolated directories doesn’t work</li><li>Standard home directory permissions may not allow Plex to delete files</li></ul><p>The solution is to create a shared location outside the snap directories that both applications can access with proper permissions.</p><h3>Step 1: Create a Shared Media Directory</h3><p>First, we’ll create a dedicated media directory structure that both applications can access:</p><pre>sudo mkdir -p /mnt/plex-media/Downloads<br>sudo mkdir -p /mnt/plex-media/Movies<br>sudo mkdir -p /mnt/plex-media/TV</pre><p>This creates:</p><ul><li>/mnt/plex-media/Downloads - where Deluge will download files</li><li>/mnt/plex-media/Movies - for your movie library</li><li>/mnt/plex-media/TV - for your TV show library</li></ul><h3>Step 2: Set Up Permissions</h3><p>Now we need to set the correct ownership and permissions. Since Plex runs as root and we want the plex user to also have access:</p><pre>sudo chown -R plex:root /mnt/plex-media/<br>sudo chmod -R 775 /mnt/plex-media/</pre><p><strong>What these commands do:</strong></p><ul><li>chown -R plex:root - Sets the owner to &quot;plex&quot; and group to &quot;root&quot;</li><li>chmod -R 775 - Gives read/write/execute permissions to owner and group, read/execute to others</li><li>The -R flag applies these settings recursively to all subdirectories</li></ul><h3>Step 3: Grant Snap Permissions</h3><p>Snap applications need explicit permission to access certain directories. Grant Deluge access to removable media (which includes /mnt):</p><pre>sudo snap connect deluge-lukewh:removable-media</pre><p>Do the same for Plex:</p><pre>sudo snap connect plexmediaserver:removable-media</pre><p>Then restart Plex to apply the changes:</p><pre>sudo snap restart plexmediaserver</pre><h3>Step 4: Configure Deluge</h3><p>Now configure Deluge to download to the new shared location:</p><ol><li>Open <strong>Deluge</strong> (the GUI application)</li><li>Go to <strong>Edit</strong> → <strong>Preferences</strong></li><li>Click on <strong>Downloads</strong> in the left sidebar</li><li>Change “Download to:” from the default snap path to: /mnt/plex-media/Downloads</li><li>(Optional) Set “Move completed to:” to /mnt/plex-media/Movies if you primarily download movies</li></ol><ul><li><strong>Note:</strong> For better organization, consider using Labels instead (covered in Step 7) to automatically move different types of media to their appropriate folders</li></ul><p>6. Click <strong>Apply</strong> and <strong>OK</strong></p><h3>Step 5: Configure Plex Libraries</h3><p>Configure Plex to scan your new media directories:</p><ol><li>Open <strong>Plex Web Interface</strong> (usually at <a href="http://localhost:32400/web)">http://localhost:32400/web)</a></li><li>Go to <strong>Settings</strong> → <strong>Manage</strong> → <strong>Libraries</strong></li><li>For your <strong>Movies</strong> library:</li></ol><ul><li>Click on the library or create a new one</li><li>Add folder: /mnt/plex-media/Movies</li></ul><p>4. For your <strong>TV Shows</strong> library:</p><ul><li>Click on the library or create a new one</li><li>Add folder: /mnt/plex-media/TV</li></ul><p>5. Save your changes</p><p>Plex will now scan these directories for media files.</p><h3>Step 6: Migrate Existing Downloads (Optional)</h3><p>If you have existing downloads in Deluge’s old location, you can migrate them. First, find where they’re actually stored:</p><pre>sudo ls -R /var/snap/deluge-lukewh/common/Downloads</pre><p>If files exist there, copy them to the new location:</p><pre>sudo rsync -av /var/snap/deluge-lukewh/common/Downloads/ /mnt/plex-media/Downloads/</pre><p>Then move them to the appropriate library folder:</p><pre>sudo mv /mnt/plex-media/Downloads/* /mnt/plex-media/Movies/</pre><p>Finally, fix permissions on the moved files:</p><pre>sudo chown -R plex:root /mnt/plex-media/<br>sudo chmod -R 775 /mnt/plex-media/</pre><h3>Step 7: Organize Your Media With Labels</h3><p>The best way to organize your media is using Deluge’s <strong>Labels</strong> feature, which automatically moves completed downloads to the correct folders. Here’s how to set it up:</p><h3>Enable and Configure Labels</h3><ol><li>In Deluge, go to <strong>Edit</strong> → <strong>Preferences</strong> → <strong>Plugins</strong></li><li>Check the box next to <strong>Label</strong> to enable the plugin</li><li>Click <strong>OK</strong> or <strong>Apply</strong></li></ol><h3>Create Labels for Different Media Types</h3><ol><li>Look at the left sidebar in Deluge’s main window where filters are displayed</li><li><strong>Right-click on “Labels”</strong> in the filters section</li><li>Select <strong>Add Label</strong></li><li>Create a label called “movies”</li><li>Repeat to create another label called “tv”</li></ol><h3>Configure Automatic Moving</h3><p>For each label you created:</p><ol><li><strong>Right-click on the label</strong> (e.g., “movies”) in the left sidebar</li><li>Select <strong>Label Options</strong></li><li>Navigate to the <strong>Folder Options</strong> tab</li><li>Check the box for <strong>Move completed to:</strong></li><li>Set the path:</li></ol><ul><li>For “movies” label: /mnt/plex-media/Movies</li><li>For “tv” label: /mnt/plex-media/TV</li></ul><p>6. Click <strong>OK</strong></p><h3>Using Labels</h3><p>When you add a new torrent to Deluge:</p><ol><li><strong>Right-click on the torrent</strong> in the main torrent list</li><li>Hover over <strong>Label</strong></li><li>Select either <strong>movies</strong> or <strong>tv</strong></li></ol><p>The torrent will download to /mnt/plex-media/Downloads and automatically move to the appropriate library folder when complete!</p><h3>Verification Checklist</h3><p>Confirm everything is working correctly:</p><ul><li>[ ] Deluge can download files to /mnt/plex-media/Downloads</li><li>[ ] Files appear in Plex after moving them to /mnt/plex-media/Movies or /mnt/plex-media/TV</li><li>[ ] Plex can play the media files</li><li>[ ] Plex can delete files from the library (test with a small file first)</li><li>[ ] Permissions remain correct after adding new files</li></ul><h3>Troubleshooting</h3><h3>Deluge Can’t Write to /mnt/plex-media/Downloads</h3><p>Check the snap connections:</p><pre>snap connections deluge-lukewh</pre><p>Ensure removable-media is listed and connected. If not:</p><pre>sudo snap connect deluge-lukewh:removable-media</pre><h3>Plex Can’t Delete Files</h3><p>Verify permissions are correct:</p><pre>ls -la /mnt/plex-media/Movies/</pre><p>The owner should be plex and group should be root with 775 permissions. If not:</p><pre>sudo chown -R plex:root /mnt/plex-media/<br>sudo chmod -R 775 /mnt/plex-media/<br>sudo snap restart plexmediaserver</pre><h3>Files Not Showing in Plex</h3><ol><li>Verify the library path in Plex Settings → Libraries</li><li>Manually trigger a library scan: Library → Scan Library Files</li><li>Check file permissions allow Plex to read them</li><li>Ensure files are in a format Plex supports (MKV, MP4, AVI, etc.)</li></ol><h3>Permission Denied Errors</h3><p>If you encounter permission denied errors when moving files:</p><pre>sudo mv /mnt/plex-media/Downloads/file.mkv /mnt/plex-media/Movies/<br>sudo chown -R plex:root /mnt/plex-media/Movies/</pre><p>Always use sudo when moving files between the directories, then fix permissions afterward.</p><h3>Conclusion</h3><p>You now have a fully functional Plex and Deluge setup on Ubuntu 24.04.3 LTS with proper file sharing between the two snap applications. Files downloaded through Deluge can be easily organized and accessed by Plex, with full management capabilities including deletion.</p><p>The key takeaways:</p><ul><li>Snap applications require explicit permissions to access shared directories</li><li>The /mnt directory is accessible to snaps with removable-media permission</li><li>Proper ownership (plex:root) and permissions (775) allow both applications to access files</li><li>Using Labels in Deluge provides automatic organization of downloaded media</li></ul><p>Enjoy your media server!</p><h3>Next Steps: Network Security for Your Media Server</h3><p>While your Plex and Deluge setup is now fully functional, there’s an important security consideration to address. Since both Plex and Deluge are running on the same Ubuntu server, and Plex is often exposed to the internet for remote streaming, proper network segmentation becomes critical for protecting your home network.</p><h3>Why VLAN Segmentation Matters</h3><p>Running Plex and Deluge on the same server creates a unique security challenge:</p><ul><li><strong>Internet Exposure</strong>: Plex is typically exposed to the internet to enable remote streaming, making it a potential entry point for attacks</li><li><strong>Torrent Risks</strong>: Deluge connects to numerous unknown peers, increasing the server’s exposure to malicious actors</li><li><strong>Combined Risk</strong>: Having both services on one server means a compromise of either could affect the other</li></ul><p>Isolating this server on a dedicated VLAN (Virtual Local Area Network) provides critical security benefits:</p><ul><li><strong>Contain breaches</strong> to the isolated VLAN, protecting your main network</li><li><strong>Control access</strong> to the server using firewall rules</li><li><strong>Separate internet-facing services</strong> from your trusted home devices</li><li><strong>Monitor traffic</strong> to and from the server independently</li><li><strong>Limit lateral movement</strong> if the server is compromised</li></ul><h3>Coming Soon</h3><p>In our next guide, we’ll walk through setting up secure VLAN segmentation for your media server using <strong>UniFi OS 4.4.9</strong>, including:</p><ul><li>Creating a dedicated, isolated VLAN for your Ubuntu media server</li><li>Configuring firewall rules to allow Plex remote access while restricting other traffic</li><li>Setting up controlled access between VLANs</li><li>Implementing security policies to protect your main network from the internet-exposed server</li><li>Best practices for isolating servers that run both public-facing and high-risk services</li></ul><p>This configuration will let you safely enjoy remote Plex streaming while keeping your home network protected from potential threats.</p><p><strong>Stay tuned for:</strong> <em>“</em><a href="https://medium.com/@lazro/securing-your-plex-media-server-vlan-isolation-with-unifi-os-4-7-7-c043c980db56"><em>Securing Your Plex Media Server: VLAN Isolation with UniFi OS 4.</em></a><em>4.9”</em></p><h3>Additional Resources</h3><ul><li><a href="https://support.plex.tv/">Plex Support Documentation</a></li><li><a href="https://deluge-torrent.org/documentation/">Deluge Documentation</a></li><li><a href="https://snapcraft.io/docs">Ubuntu Snap Documentation</a></li><li><a href="https://support.plex.tv/articles/naming-and-organizing-your-movie-media-files/">Plex Media Naming Conventions</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=674363f67c1a" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>