How to Set Up OPNsense as Your Home Firewall

I ran a consumer ISP router for years and treated it like a magic box — it "just worked" until the day I wanted to do something it flat-out couldn't: segment my network, block ads at the router level, or actually see what was being filtered. The fix was a second-hand mini-PC for about $70 and OPNsense, the free open-source firewall. Now I control every packet that crosses my network, and the whole setup took an afternoon.

This is the guide I wish I'd had when I started. It takes you from a blank mini-PC to a working home firewall — flashing, the first-boot console, LAN config, DNS, and the specific pitfalls that lock you out (because at least one of them will, the first time).

Why not just keep the ISP router?

The short answer: you can't see or control what it's doing. A consumer router is a black box. You get a handful of toggles — Wi-Fi, parental controls, a port forward — and that's the extent of it. You can't:

  • Segment your network (IoT devices on an isolated VLAN, guests on a separate one, your trusted devices on the main LAN).
  • Run your own DNS with real ad and tracker blocking at the network level.
  • Inspect or log what's actually being allowed and blocked.
  • Run a VPN (WireGuard) to get home to your own network from anywhere.

OPNsense gives you all of that, for free, on hardware you own. It's the community fork of the same codebase as pfSense, with a cleaner interface and a faster release cycle.

What hardware you need

You don't need anything fancy. A used mini-PC — an Intel NUC, a Dell OptiPlex micro, an HP EliteDesk mini — from the second-hand market for $50–100 is perfect. The requirements are modest:

  • CPU: any x86_64, 2+ cores (a 4th-gen i5 or better is comfortable).
  • RAM: 2 GB minimum, 4 GB if you'll run extras like AdGuard Home or WireGuard.
  • NICs: at least 2 — one for WAN/Internet, one for LAN. More if you want VLANs later.
  • Storage: a 32 GB+ SSD, or even a fast SD card.

A word on NICs: for a clean first setup, use separate physical ports for WAN and LAN. You can do VLANs over a single NIC later, but separate ports are far easier to debug while you're learning, and "which port is which" is the first thing that goes wrong.

Flashing OPNsense

  1. Download the current OPNsense image (the amd64 .img.gz) from the official site.
  2. Write it to a USB stick or SD card. On Linux/macOS: gunzip -c opnsense-*.img.gz | dd of=/dev/sdX bs=4m status=progress. On Windows, use balenaEtcher — don't reach for a generic "write image" tool that pads the partition table, or the installer won't see it.
  3. Plug the USB/SD into the mini-PC and boot from it.

The first boot runs a guided install to your target disk (or runs live from the USB if you prefer — fine for a test, not for production). It's mostly "yes" and a disk selection. When it's done it reboots into the firewall.

First boot: the console is your friend

This is where most people get stuck, so slow down. After the install, OPNsense reboots and drops you at a console (VGA or serial). The web GUI isn't reachable until you know the LAN IP — and the console is the thing that tells you.

  • Note the LAN IP it shows (the default is usually 192.168.1.1).
  • Note the admin password it generates. It's printed on the console — write it down, you'll need it and there's no "forgot password" link.
  • Connect your computer to the LAN port with a cable. Not Wi-Fi — there's no Wi-Fi yet, and you want a link that can't flake mid-setup.
  • Put your computer on the same subnet. Set a static IP like 192.168.1.50 so DHCP can't hand you something odd.

Now open https://192.168.1.1 in your browser. You'll get a certificate warning — expected, it's self-signed. Click through and log in with admin and the password from the console. If the page won't load, the problem is almost always "my computer isn't on 192.168.1.x" or "I'm on the WAN port, not the LAN port."

LAN configuration

Go to Interfaces → LAN and confirm:

  • IPv4 address: 192.168.1.1/24 (or whatever you decided on).
  • DHCP server: enabled, so your devices actually get addresses.

If you're replacing an ISP router, the critical step is putting the old router into bridge mode (or unplugging it and running the ISP line straight into OPNsense's WAN). Two DHCP servers on the same segment is a recipe for devices grabbing the wrong gateway and DNS, and it's the single most common "why is nothing working" after a swap.

The WAN side

Go to Interfaces → WAN. Most home connections are plain DHCP — leave it on DHCP and it'll grab an address from your ISP. If your provider uses PPPoE (some cable and fibre setups do), set the WAN to PPPoE and enter the credentials your ISP gave you.

The number-one "I'm locked out" mistake: changing the LAN subnet to something your computer isn't on, before you've confirmed you can still reach the GUI. Change one thing at a time, and verify access after each change. If you do lose the GUI, the console (or a serial cable) is how you get back in — which is exactly why you noted that password.

DNS: where the real value is

This is the part that makes the whole exercise worth it. Go to Services → Unbound DNS and enable it. Unbound is a recursive DNS server — it resolves your queries itself, so your ISP's DNS servers stop seeing everything you look up, and it caches results for speed.

Then set your LAN DHCP to hand out 192.168.1.1 as the DNS server, so every device on the network resolves through Unbound. Now the whole house goes through your own DNS.

For ad and tracker blocking, the cleanest option is AdGuard Home. Install it as a package (or run it in a container on a LAN device) and point your DNS at it. You get network-wide blocking with no per-device browser extensions — phones, smart TVs, the lot.

First steps once it's up

  • System → Firmware → Update: check for updates and turn on notifications.
  • System → Settings → General: set the hostname, timezone, and NTP servers. Time sync matters more than people think — logs, certificates, and scheduled tasks all depend on it.
  • System → Logs: leave the firewall and system logs open for a day. You'll start to see your network — which device is phoning home every five minutes, what's being blocked, what's actually slow. That visibility is the point.

Pitfalls that will actually bite you

  1. Locked out of the GUI after a LAN IP change. The console gets you back, but a second NIC wired as a "management" escape hatch saves an evening.
  2. Two DHCP servers because the old router wasn't bridged. Devices get the wrong gateway and DNS and half the house "has no internet."
  3. WAN on the wrong NIC. No internet but the LAN works fine — check Interfaces → Overview to see which physical port is actually WAN.
  4. IPv6 confusion. If you don't need it yet, disable IPv6 on WAN and LAN to cut a whole class of problems, then re-enable it deliberately once the basics are solid.
  5. Forgetting the console password. It's on the first-boot screen. Keep a note. You will be grateful.

Where to go next

Once the basics are solid, this is where OPNsense gets genuinely fun:

  • VLANs to segment IoT / guest / trusted — the single best upgrade you can make to a home network.
  • WireGuard VPN to get home to your own network from anywhere.
  • AdGuard Home for network-wide ad and tracker blocking.
  • Traffic shaping so one bandwidth-hog can't starve everyone else.

If you've hit a gotcha I missed, or want a deeper dive on any of the "next steps," hit me up in the comments or via email — I'll add it to the guide.


Luke Keam
Thank you for reading. Email me: [email protected]
Luke Keam | techgeek.biz