Post

Enterprise Networking for the Homelab

This project deploys a robust, production-like network stack using OPNsense and hardware that won't break the bank. By implementing granular VLAN segmentation on affordable hardware, this setup replicates core enterprise functions—firewalling, routing, and traffic isolation—in a compact, power-efficient, and easy-to-manage package. It’s designed to prove that you don’t need expensive Cisco or Juniper gear to master advanced networking concepts at home.

NETWORK TOPOLOGY

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
╔═════════════════════════════════════════════════════════════════════════════════════╗
║                                    INTERNET                                         ║
╚═════════════════════════════════════════════════════════════════════════════════════╝
                                          │
                                          ▼
╔═════════════════════════════════════════════════════════════════════════════════════╗
║                            ISP LAYER (router)                                       ║
║  ┌─────────────────────────────────────────────────────────────────────────────┐    ║
║  │           192.168.1.0/24                                                    │    ║
║  └─────────────────────────────────────────────────────────────────────────────┘    ║
╚═════════════════════════════════════════════════════════════════════════════════════╝
                                          │
                                          ▼
╔════════════════════════════════════════════════════════════════════════════════════╗
║                          OPNsense FIREWALL (Thin Client)                           ║
║  ┌──────────────────────────┐        ┌──────────────────────────────────────────┐  ║
║  │  WAN: ue0 (USB Dongle)   │        │  LAN: re0 (1GbE)                         │  ║
║  │  192.168.1.19            │◄──────►│  10.10.0.1/24                            │  ║
║  └──────────────────────────┘        └─────────────────┬────────────────────────┘  ║
║                                                        │                           ║
║         ┌──────────────────────────────────────────────▼──────────────────────┐    ║
║         │                     VLANs                     │                     │    ║
║         ├───────────┬───────────┬───────────┬───────────┼───────────┬─────────┤    ║
║         │ Mgmt VLAN │ VLAN10    │ VLAN20    │ VLAN30    │ VLAN40    │         │    ║
║         │10.10.0.0/ │10.10.10.0/│10.10.20.0/│10.10.30.0/│10.10.40.0/│         │    ║
║         │24         │24         │24         │24         │24         │         │    ║
║         └───────────┴───────────┴───────────┴───────────┴───────────┴─────────┘    ║
╚════════════════════════════════════════════════════════╤═══════════════════════════╝
                                                         │ Trunk (All VLANs)
                                                         ▼
╔═════════════════════════════════════════════════════════════════════════════════════╗
║                         CISCO MANAGED SWITCH (10.10.0.3)                            ║
║  ┌─────────────────────────────────────────────────────────────────────────────┐    ║
║  │  Port G0/1: TRUNK to OPNsense                                               │    ║
║  │  Port G0/2: TRUNK to Proxmox                                                │    ║
║  │  Port G0/3: TRUNK (Native Mgmt, Tagged 20,30) to Aruba AP                   │    ║
║  └─────────────────────────────────────────────────────────────────────────────┘    ║
╚════════════════════════════════╤══════════════════════════╤═════════════════════════╝
                                 │ Trunk                    │ Trunk
                                 ▼                          ▼
╔═══════════════════════════════════════════╗  ╔══════════════════════════════════════╗
║    PROXMOX HP Mini PC (10.10.0.2)         ║  ║    ARUBA AP HP 300 Series            ║
║  ┌──────────────────────────────────────┐ ║  ║  ┌────────────────────────────────┐  ║
║  │           VIRTUAL MACHINES           │ ║  ║  │           SSIDs                │  ║
║  │  ┌────────────────────────────────┐  │ ║  ║  │  ┌──────────────────────────┐  │  ║
║  │  │ VM: HomeAssistant              │  │ ║  ║  │  │ SSID: media_ap           │  │  ║
║  │  │ 10.10.30.95 (VLAN30 - IoT)     │  │ ║  ║  │  │ VLAN20: 10.10.20.0/24    │  │  ║
║  │  ├────────────────────────────────┤  │ ║  ║  │  ├──────────────────────────┤  │  ║
║  │  │ VM: WebServer1                 │  │ ║  ║  │  │ SSID: home_ap            │  │  ║
║  │  │ 10.10.20.41 (VLAN20 - Media)   │  │ ║  ║  │  │ Mgmt VLAN: 10.10.0.0/24  │  │  ║
║  │  ├────────────────────────────────┤  │ ║  ║  │  ├──────────────────────────┤  │  ║
║  │  │ VM: WebServer2                 │  │ ║  ║  │  │ SSID: iot_ap             │  │  ║
║  │  │ 10.10.20.40 (VLAN20 - Media)   │  │ ║  ║  │  │ VLAN30: 10.10.30.0/24    │  │  ║
║  │  └────────────────────────────────┘  │ ║  ║  │  └──────────────────────────┘  │  ║
║  │                                      │ ║  ║  └────────────────────────────────┘  ║
║  │            LXC CONTAINERS            │ ║  ╚══════════════════════════════════════╝
║  │  ┌────────────────────────────────┐  │ ║
║  │  │ LXC: WireGuard                 │  │ ║
║  │  │ 10.10.40.36 (VLAN40 - VPN)     │  │ ║
║  │  │ VPN Subnet: 10.12.12.0/24      │  │ ║
║  │  ├────────────────────────────────┤  │ ║
║  │  │ LXC: PiHole                    │  │ ║
║  │  │ 10.10.10.53 (VLAN10 - DNS)     │  │ ║
║  │  ├────────────────────────────────┤  │ ║
║  │  │ LXC: Docker-Host               │  │ ║
║  │  │ 10.10.20.66 (VLAN20 - Media)   │  │ ║
║  │  │                                │  │ ║
║  │  │  ┌──────────────────────────┐  │  │ ║
║  │  │  │    DOCKER CONTAINERS     │  │  │ ║
║  │  │  ├──────────────────────────┤  │  │ ║
║  │  │  │ • arrstack               │  │  │ ║
║  │  │  │ • immich                 │  │  │ ║
║  │  │  │ • calibre                │  │  │ ║
║  │  │  │ • samba                  │  │  │ ║
║  │  │  │ • jellyfin               │  │  │ ║
║  │  │  │ • filebrowser            │  │  │ ║
║  │  │  │ • traefik (reverse proxy)│  │  │ ║
║  │  │  │ • cloudflared (tunnel)   │  │  │ ║
║  │  │  └──────────────────────────┘  │  │ ║
║  │  └────────────────────────────────┘  │ ║
║  └──────────────────────────────────────┘ ║
╚═══════════════════════════════════════════╝

╔═════════════════════════════════════════════════════════════════════════════════════╗
║                              CLIENT DEVICES                                         ║
║  ┌─────────────────┐  ┌─────────────────┐  ┌─────────────────┐                      ║
║  │ Media Devices   │  │ Workstations    │  │ IoT Devices     │                      ║
║  │ (TVs, Tablets)  │  │ (Laptops, PCs)  │  │ (Tuya, Sensors) │                      ║
║  └────────┬────────┘  └────────┬────────┘  └────────┬────────┘                      ║
║           │                    │                    │                               ║
║           ▼                    ▼                    ▼                               ║
║      media_ap              home_ap               iot_ap                             ║
║      (VLAN20)              (Mgmt)                (VLAN30)                           ║
╚═════════════════════════════════════════════════════════════════════════════════════╝

┌─────────────────────────────────────────────────────────────────────────────────────┐
│                              SERVICE FLOWS                                          │
├─────────────────────────────────────────────────────────────────────────────────────┤
│                                                                                     │
│  DNS:      Client ──► PiHole (10.10.10.53) ──► OPNsense ──► ISP DNS                 │
│                                                                                     │
│  VPN:      Remote ──► WireGuard (10.12.12.x) ──► LXC (10.10.40.36) ──► LAN          │
│                                                                                     │
│  Public:   Internet ──► cloudflared ──► traefik ──► filebrowser                     │
│                                                                                     │
│  Certs:    traefik ──► cloudflared ──► Let's Encrypt                                │
│                                                                                     │
└─────────────────────────────────────────────────────────────────────────────────────┘

┌─────────────────────────────────────────────────────────────────────────────────────┐
│                              QUICK REFERENCE                                        │
├──────────────┬─────────────────────┬────────────────────────────────────────────────┤
│ VLAN         │ Subnet              │ Purpose                                        │
├──────────────┼─────────────────────┼────────────────────────────────────────────────┤
│ Mgmt         │ 10.10.0.0/24        │ OPNsense, Cisco Switch, Proxmox, Aruba mgmt    │
│ VLAN10       │ 10.10.10.0/24       │ PiHole DNS                                     │
│ VLAN20       │ 10.10.20.0/24       │ WebServers (40,41), Docker-Host (66), media_ap │
│ VLAN30       │ 10.10.30.0/24       │ HomeAssistant (95), iot_ap                     │
│ VLAN40       │ 10.10.40.0/24       │ WireGuard (36), VPN Clients (10.12.12.0/24)    │
└──────────────┴─────────────────────┴────────────────────────────────────────────────┘

┌─────────────────────────────────────────────────────────────────────────────────────┐
│                              IP ADDRESSES                                           │
├────────────────────────────┬────────────────────────────────────────────────────────┤
│ ISP Gateway                │ 192.168.1.1                                            │
│ OPNsense WAN (ue0)         │ 192.168.1.19                                           │
│ OPNsense LAN (re0)         │ 10.10.0.1                                              │
│ Cisco Switch               │ 10.10.0.3                                              │
│ Proxmox Host               │ 10.10.0.2                                              │
│ PiHole                     │ 10.10.10.53                                            │
│ WebServer1                 │ 10.10.20.41                                            │
│ WebServer2                 │ 10.10.20.40                                            │
│ Docker-Host                │ 10.10.20.66                                            │
│ HomeAssistant              │ 10.10.30.95                                            │
│ WireGuard                  │ 10.10.40.36                                            │
│ WireGuard VPN Subnet       │ 10.12.12.0/24                                          │
└────────────────────────────┴────────────────────────────────────────────────────────┘

┌─────────────────────────────────────────────────────────────────────────────────────┐
│                              WIRELESS SSIDs                                         │
├────────────────────────────┬─────────────────────┬──────────────────────────────────┤
│ SSID                       │ VLAN                │ Subnet                           │
├────────────────────────────┼─────────────────────┼──────────────────────────────────┤
│ media_ap                   │ VLAN20              │ 10.10.20.0/24                    │
│ home_ap                    │ Mgmt VLAN           │ 10.10.0.0/24                     │
│ iot_ap                     │ VLAN30              │ 10.10.30.0/24                    │
└────────────────────────────┴─────────────────────┴──────────────────────────────────┘

┌─────────────────────────────────────────────────────────────────────────────────────┐
│                              DOCKER CONTAINERS (on 10.10.20.66)                     │
├────────────────────────────┬────────────────────────────────────────────────────────┤
│ Container                  │ Purpose                                                │
├────────────────────────────┼────────────────────────────────────────────────────────┤
│ arrstack                   │ Media automation (Radarr, Sonarr, etc.)                │
│ immich                     │ Photo backup and management                            │
│ samba                      │ NAS / File sharing                                     │
│ jellyfin                   │ Media streaming server                                 │
│ filebrowser                │ Web-based file manager                                 │
│ traefik                    │ Reverse proxy + Let's Encrypt                          │
│ cloudflared                │ Cloudflare tunnel                                      │
└────────────────────────────┴────────────────────────────────────────────────────────┘
This post is licensed under CC BY 4.0 by the author.