quBSD - A New Jails and bhyve Wrapper That Emulates Qubes reddit / BSD ---------------------------------------------------------------------- bawdyanarchist · 2022-02-14 04:27 I posted this on the FreeBSD sub, but I thought maybe it can't hurt to spread it a bit more. It's been quite a few months in the making, but I believe I have something good enough to share with the community. It's written in shell, based on zfs, and uses the underlying FreeBSD tools. Here's a summary of features: - All workloads are run inside of jails - GUI jails! Comes with a pre-configured template - Network Isolation - NIC and USB PCI devices are isolated in separate VMs - A series of gateway/tunnel jails provide network to client jails - Host is always offline, except for updates/pkgs - Just like Qubes has pristine templates, quBSD has *rootjails* - A set of scripts act as a simplying wrapper for daily use and mgmt - An installer script configures the intial setup of jails and VMs - Default i3 integration (but can be easily modified for any WM) - Useful setup, even if you're running headless. I hope that people find it useful. Let me know what you think! https://github.com/BawdyAnarchist/quBSD ---------------------------------------------------------------------- crashj · 2022-02-14 05:28 So many unanswered questions. What is it? What does it do? Who is this intended for? Why is this different than bhyve or standalone jails architectures? Why do I have to go all the way to an architecture diagram deep in github to guess a description of what you are trying to accomplish? ---------------------------------------------------------------------- bawdyanarchist · 2022-02-14 05:50 Thanks for the feedback. Maybe I should start at a higher level when posting outside of FreeBSD community. If you'll give me some rope here, a bit of background might help. I got into FreeBSD a couple years ago. The BSDs are awesome, and close some holes that have formed in the Linux ecosystem (altho I love Linux too, particularly Qubes). In fact, I love the containerization schema so much, that when I was learning FreeBSD, I decided to try and emulate the Qubes concept on FreeBSD. It requires *alot* of configuration regarding exec scripts to create networking between jails; resource constraints; and also some important details when running jails as GUI containers. I first did this as my own little experiment and side project, but about 6 months ago, decided to try and formalize it. Which meant cleaning up my scripts, putting a help section for all of them, and scripting an installer. But okay, maybe I haven't directly answered your question. ### TLDR quBSD is a *wrapper* for native FreeBSD tools. It installs a set of jails and virtual machines, which isolate the physical network controller from host; and firewalls network connections between jails and the outside internet. A set of scripts act as a wrapper for the inbuilt `jail` and `bhyve` commands for FreeBSD, which simplify management of networking and resource constraints. It also pre- configures a GUI template jail, which you can use to spawn new GUI jails. This is my first real code project, so go easy on me, but I really do appreciate direct feedback as well. What kind of recommendations do you have for me to make this more accessible? I understand that it's pretty much isolated to the FreeBSD community. ---------------------------------------------------------------------- bolapara · 2022-02-14 05:51 Do you know what Qubes OS is? Knowing that will answer most of your questions. OP put the system their modeling theirs after in the title. ---------------------------------------------------------------------- angelofdeauth · 2022-02-14 22:35 Not my first time saying it, but I like the direction you're taking, and the initiative is awesome. Great job! Keep it up! ---------------------------------------------------------------------- sigzero · 2022-02-15 18:37 Did you run your scripts through a checker like shellcheck? It gives great output on cleaning up scripts. [https://www.shellcheck.net/](https://www.shellcheck.net/) This is awesome btw. Nice job. ---------------------------------------------------------------------- bawdyanarchist · 2022-02-15 19:07 That is such an awesome tool, and I had no idea it existed. Thanks for linking it. I just checked my installer script, and everything looks okay, apart from some warnings regarding backticks, double quotes, and recommending to split out `if [ p -a q ]` to `if [ p ] && [ q ]` But yeah I'll definitely drop all my scripts in there one at a time now to check them. And at some future point, I'll clean up the places where I wasn't doing best practices.