Custom OPNsense Router

Night street placeholder for The Long Way Round

/ROLE

Design, build & administration

/TEAM

Solo · Personal homelab

/TECH

Proxmox · OPNsense · Pi-hole · Caddy · WireGuard

/TIMELINE

Ongoing · In daily use

Overview

I replaced my ISP's BT router with one I built myself. The stock router locked out settings I needed: I couldn't run an effective reverse proxy with Caddy or Nginx, because it fought with my Pi-hole over which of them resolved DNS first. I also wanted ad blocking at the router, so every device on the network is covered.

Hardware

  • Mini PC: Ryzen 7 5825U, 8 GB RAM, 512 GB SSD

  • Netgear 8-port 2.5 Gbps managed switch

  • TP-Link Omada Wi-Fi 6 access point

Architecture

The mini PC runs Proxmox, which hosts three services:

  • OPNsense VM: the router and firewall, with the network cards passed through directly from the host. It also runs my WireGuard VPN.

  • Pi-hole LXC: DNS filtering that blocks ads and trackers for the whole network

  • Caddy LXC: a reverse proxy for my self-hosted services

Challenge: PPPoE and hardware passthrough

BT's connection uses PPPoE rather than a standard DHCP handoff, so before OPNsense could get online I had to track down BT's PPPoE login details and configure the WAN connection around them. On top of that, the network cards had to be passed through from Proxmox to the OPNsense VM so the router has direct control of the hardware, which took careful configuration on the host.

Security

  • WireGuard firewall rules give my own devices full access, while friends' VPN connections can only reach Jellyfin

  • Three separate Wi-Fi networks: a trusted 5 GHz network, a 2.4 GHz network for other devices, and a 2.4 GHz guest network

Result

Network-wide ad blocking and full control over my routing, DNS, firewall and remote access.

What's next

I'm considering moving to pfSense once I have my own place.