From f31fbfecc463e0beeb3bf2060596fbd9d493695e Mon Sep 17 00:00:00 2001 From: D Delmar Davis Date: Sun, 10 May 2026 10:46:41 -0700 Subject: start documenting the dnsmasq journey --- .../sense/reconsidering-opnsense.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/docs/rethinkeverything/sense/reconsidering-opnsense.md b/docs/rethinkeverything/sense/reconsidering-opnsense.md index 42def70..c0fcf1d 100644 --- a/docs/rethinkeverything/sense/reconsidering-opnsense.md +++ b/docs/rethinkeverything/sense/reconsidering-opnsense.md @@ -60,9 +60,31 @@ service jail start figaro See: [https://www.digithink.com/merlot/Dnsmasq/](https://www.digithink.com/merlot/Dnsmasq/) +## It's complicated (this may need it's own article) + +While the above works for basic networking broadcast UDP never seems to leave the jail. +So DNS works but DHCP doesn't. [This link](https://forums.freebsd.org/threads/dnsmasq-server-in-jail-dns-works-dhcp-doesnt.52775/) describes the same symptoms and some of the reasond DHCP fails. It did not provide a solution that worked for me. + +### Attempts with simply assigning the jail to an shared interface. + +The simplest way to get a jail on the net is pretty much to tell it to use the interface that it shares with the host. +I never did get this to work. Something to do with raw packets and [bpf] (https://www.truenas.com/community/threads/dnsmasq-fails-to-start-in-11-2-u2.74202/). I finally (at 5am on a Friday morning) ran up dnsmasq on an incus container and shut the jail down. + +### vnet and bridges oh my! + +After I gave up I dug arround a bit and found two links using bridges specifically for getting dhcp to work. + +- https://henryleach.com/2025/04/vnet-jails-with-dhcp-on-freebsd/ +- https://www.amoradi.org/20210908201936.html + +The Henry Leach blog actually walked through starting and configuring the jail manually and then making it permanent. I followed th manual setup and was able to get a functioning dhcp server. + +YOU ARE HERE MAKING IT permanent. + ## Linkdump - https://github.com/exeba/FTL-freebsd-port/blob/main/examples/jail-setup.sh - https://forum.opnsense.org/index.php?topic=26975.0 - https://www.reddit.com/r/opnsense/comments/sjewa4/jails_under_opnsense_221/?rdt=59758 - https://forum.opnsense.org/index.php?topic=26724.0 +- https://henryleach.com/2025/04/vnet-jails-with-dhcp-on-freebsd/ -- cgit v1.2.3