Category Archives: Network

Information related to networking.

WireGuard VPN

WireGuard VPN
Our Unifi system can support several different VPN configurations. We used the VPN server built into our Unifi Dream Machine SE and configured it to use Wireguard clients on our iPhones, iPads, macOS laptops, and Windows laptops. The Unifi system makes setting up our WireGuard VPNs simple.

The following video explains the various VPN options and how to configure them.


5 Types of VPNs on Unifi and How To Configure Them

We use DDNS to ensure that our domains point to our router when our ISPs change our IP address. After the clients are installed, they are updated to point at our network’s current IP.

Iperf3

Iperf3
Iperf3

Iperf3 is a common tool for network performance testing. We run an Iperf3 server in a Docker container. You can find information on how to set up and use Iperf3 here.

Speedtest Tracker

Speedtest Tracker
Speedtest Tracker

We run a docker container called Speedtest Tracker to monitor the performance of our Internet connection.

Setup and Configuration

This container is easy to set up in docker. We used the process in the video below –


Setup Speedtest Tracker in Docker

Grafana Dashboard for Speedtest Tracker Results

We also configured Speetest Tracker to store test results in our Influxdb.

This allows us to configure a Grafana Dashboard to view the results of our Speedtests.

Speedtest Tracker Results
Speedtest Tracker Results

The Grafana Dashboard that we used can be found here.

Nginx Proxy Manager

Nginx Proxy Manager

Many services and devices in our home lab have web interfaces. We secure many of them using Nginx Proxy Manager as a reverse proxy.

Traefik Reverse Proxy provides ingress control and SSL certificates for our docker services. While Traefik can be used for services outside Docker, configuring it is complex and requires restarting the Trafik container. As a result, we also run Nginx PM in a container to enable SSL certificates and simple reverse proxy configuration of our web-based services outside of Docker.

Nginx Proxy Manager Installation

Installing is easy. The following video explains the process, including using a DNS-01 challenge to obtain SSL certificates via Let’s Encrypt.

We configured a Docker macVLAN network for the Nginx PM container so that the proxy could determine the source IP addresses that access it. This enables IP filtering and other features.

Pihole with a Cloudflare Tunnel

Pihole in Docker

We are running three Pihole installations, which enable load balancing and high availability for our DNS services. We also use a Cloudflare encrypted tunnel to protect information in external DNS queries via the Internet.

Our three instances are deployed on a combination of Docker host VMs in our Proxmox Cluster and a stand-alone Raspberry Pi Docker host.

Deploy Pihole with a Cloudflare Tunnel

Our software service stack for our dockerPiHole installs Pi includes the following applications:

Our combined stack was created using  information in the following video:


Deploy PiHole with Cloudflare Tunnel in Docker

Ubuntu Port 53 Fix

Unubtu VMs include a DNS caching server on port 53, which prevents Pihole from being deployed. To fix this, run the commands at this link on the host Ubuntu VM before installing the Pihole and Cloudflare Tunnel containers.

Scheduled Block List Updates

We must update our block lists by doing a Gravity pull. We do this daily via a cron job. This can be configured on the RPi host using the following commands –

# Edit the user crontab
sudo crontab -u <user-id> -e

# The following to the user crontab
min hr * * * su ubuntu -c /usr/bin/docker exec pihole pihole -g | /usr/bin/mailx -s"RPi Docker - Gravity Pull" [email protected]

Cloudflare DDNS

Cloudflare DDNS

We use Cloudflare to host our domains and the associated external DNS records. Cloudflare provides excellent security and scaling features and is free for our use cases.

We do not have a static IP address from either of our ISPs. This, coupled with the potential of a failover from our primary to our secondary ISP, requires us to use DDNS to keep the IPs for our domains up to date in Cloudflare’s DNS.

We run a docker container for each domain that periodically checks to see if our external IP address has changed and updates our DNS records in Cloudflare.  The repository for this container can be found here.

Deploying the DDNS update container is done via a simple docker compose yml –

version: '2'
services:
  cloudflare-ddns:
    image: oznu/cloudflare-ddns:latest
    restart: unless-stopped
    container_name: your-container-name
    environment:
        - API_KEY=YOUR-CF-API-KEY
        - ZONE=yourdomain.com
        - PROXIED=true
        # Runs every 5 minutes
        - CRON=*/5 * * * *

You’ll need a separate container for each DNS Zone you host on Cloudflare.

Docker Networking

Docker can create its own internal networks. There are multiple options here, so this aspect of Docker can be confusing.

Docker Networking Types

The following video explains the Docker networking options and provides examples of their creation and use.


Docker Networking Explained

Home Network

Gen 2 Gen 4 Home Network Core Rack
Gen 2 Gen 4 Home Network Core Rack

We use UniFi equipment throughout. We chose the UniFi platform for our second-generation home network primarily for its single-plane glass management and configuration capabilities.

Network Structure

Home Network Architecture
Network Structure

The image above shows our network’s structure. Our Network is a two-tiered structure with a core based upon high-speed 25 GbE capable aggregation switches and optically connected edge switches. We have installed multiple OM4 fiber multi-mode fiber links from the core to each room in our house. The speed of these links ranges from 1 Gbps to 25 Gbps, with most connections running as dual-fiber LACP LAG links.

Access Layer

At the top layer, redundant Internet connections provide Internet Access and ensure that we remain connected to the outside world.

Firewall, Routing, and Management Layer

Unifi Dream Machine Pro SE - Home Network
UniFi Dream Machine Pro SE

Our network’s firewall and routing layer implement security and routing functions using a UniFi UDM Pro router and firewall.

Home Network Dashboard
Home Network Dashboard

The UDM also provides a single-pane-of-glass management interface. All configuration functions are performed via the GUI provided by the UDM.

Core Aggregation Layer

Home Network Core Aggregation
UniFi High-Capacity Aggregation Switch

The core layer uses a pair of high-capacity Aggregation Switches to provide optical access links to all of the switches in our network’s edge layer. We also include a high-speed 10 GbE wired ethernet switch at this layer. All of our storage devices and servers are connected directly to the core layer of our network to maximize performance and minimize latency.

Edge Connectivity Layer

Home Network Edge
Example UniFi High-Speed Edge Switch

The edge layer uses various switches connected to the core layer, combining 25 GbE, 10 GbE, and 1 GbE optical links. Many of these links are built using pairs of optical links in an LACP/LAG configuration.

Home Network - Router, Core, and Edge Switches In Our Network
UniFi Firewall/Router, Core, and Edge Switches In Our Network

Our edge switches are deployed throughout our home. We use a variety of edge switches in our network, depending on each room’s connectivity needs.

Wi-Fi Access and Telephony

Unifi WiFi APs and Telephones - Home Network
UniFi WiFi APs and Telephones

This layer connects all our devices, including WiFi Access Points and our Telephones.

Welcome To Our Home Lab

Home Network Dashboard
Home Network Dashboard

This site is dedicated to documenting the setup, features, and operation of our Home Lab. Our Home Lab consists of several different components and systems, including:

  • A high-performance home network
  • A storage system that utilizes multiple NAS devices
  • An enterprise-grade server
  • Applications, services, and websites

Home Network

Home Network Core, High-Availability Storage and Secondary Server Rack
Home Network Core, High-Availability Storage and Secondary Server Rack

Our Home Network is a two-tiered structure with a core based upon high-speed 25 GbE capable aggregation switches and optically connected edge switches. We use UniFi equipment throughout. We have installed multiple OM4 fiber multi-mode fiber links from the core to each room in our house. The speed of these links ranges from 1 Gbps to 25 Gbps, with most connections running as dual-fiber LACP LAG links.

Enterprise Server And Storage

Main Server Rack and Primary NAS Storage Rack
Main Server Rack and Primary NAS Storage Rack

To be added

Storage System

To be added

Surveillance System

To be added

Telephone System

Telephone System Dashboard
Telephone System Dashboard

To be added

Backups

Daily backups for all VMs and LXC containers are configured as follows.

Applications, Services, and Websites

We are hosting several websites, including:

Set-up information for our self-hosted sites may be found here.