<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xml:base="https://blog.passwordclass.xyz/" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Courtnix Blog</title>
    <link>https://blog.passwordclass.xyz/</link>
    <atom:link href="https://blog.passwordclass.xyz/feed.xml" rel="self" type="application/rss+xml" />
    <description>Unix, Sysadmin, Programming, and other random stuff.</description>
    <language>en</language>
    <item>
      <title>Migrating My Email to Stalwart</title>
      <link>https://blog.passwordclass.xyz/posts/2025-12-23/</link>
      <description>&lt;div id=&quot;preamble&quot;&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I have been self hosting my own email for quite some time now on OpenBSD.
In the beginning, I had a little trouble with getting out of peoples spam
boxes, but eventually my mail server became my least troublesome server
since there has only been 2 people on the server, not much room to get
on a spam list.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;My configuration has been to use OpenSMTPd, dovecot, and rspamd to
handle everything. My server was never quite complete, admittedly,
since I never got spam filtering right. I never got spam though until
I put one alias out on a website. I expected spam, and never got much.
The amount was so little that when I did get spam to that recipient,
I just marked it as spam (which did nothing) and moved on. Maybe I was
getting hit with spam a lot, but I had some basic filters already with
OpenSMTPd and I imagine that handled a lot of the real crud. It was
smooth sailing.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_why_the_switch&quot;&gt;Why The Switch?&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;My real pain points were with getting my spam filter set, which, I just
needed to add spam headers at the right place. I also was seeing that
Dovecot has been in the works of removing features from their open source
version and putting them behind a &quot;Pro&quot; plan. When I saw that dovecot is
in the market of ensh**ification, I knew it was time to move on. I don&amp;#8217;t
mind the FOSS core, proprietary extensions model. I don&amp;#8217;t like when a
project starts rug pulling features. Looking for an alternative made
me realize some of these alternatives also support CalDAV/CardDAV, which
I am interested in, and will touch on that later as a side bar.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Stalwart was an option I stumbled upon some time ago and forgot about.
I think because there was no OpenBSD support. It did land in ports
earlier this year, then again when I was ready to kick the tires I saw
it got updated to the latest (at the time) v0.14.1. What got me interested
was the CalDAV/CardDAV support, JMAP, and all the batteries included to
do email. Bonus points to OIDC, which I very crappily have set up but it
would be really cool to integrate. I also really like the admin UI. I am
not much of a point and click guy, but this is nice. I also like that
there are all sorts of backends to scale up a Stalwart mail cluster. I
don&amp;#8217;t have that need right now though, so I am just using RocksDB.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_the_switch&quot;&gt;The Switch&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I wanted to detach my email domain from my daily sending domains. So,
I created a new domain name and spun up my server under that. I really
wanted to try out the Enterprise features, mostly because I like pretty
graphs and metrics and wanted to look into the tenant feature. So, I
created tenants, domains, user accounts, groups, etc. I tried to get
close to what I had on my previous server, but with changes to make up
for bad decisions.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I also had all the DNS records and such figured out for my sending domain.
Stalwart has a very handy page under domains that shows you all the
DNS records you will ever want. I let that run for a while but with
no real email being sent. None of my daily accounts had been moved,
but I was ready to start getting things moved over.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;sect2&quot;&gt;
&lt;h3 id=&quot;_the_rush&quot;&gt;The Rush&lt;/h3&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;So, I only thought I would start with one domain today, and figured I would
start with the email accounts for the previous sending domain. That
wasn&amp;#8217;t all that smart as I had my other domain pointing to that for
the mail records. So heck, I was here now and just started the whole
migration. Was this the right path? Probably not.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect2&quot;&gt;
&lt;h3 id=&quot;_migration_steps&quot;&gt;Migration Steps&lt;/h3&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Here are the steps I took. I have very few accounts, so only me and
one other would notice the disruption, and I know they wouldn&amp;#8217;t notice.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Note that prior to this, I lowered TTLs to 5 minutes on all necessary DNS
records. That way stuff wouldn&amp;#8217;t be going to the old server potentially
for many days.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;olist arabic&quot;&gt;
&lt;ol class=&quot;arabic&quot;&gt;
&lt;li&gt;
&lt;p&gt;Made sure all the DKIM, DMARC, SPF records and all were correct for each domain&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Updated MX records with priority to the old server and the new one (with lower priority)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;used imapsync to sync mailboxes between servers.&lt;/p&gt;
&lt;div class=&quot;olist loweralpha&quot;&gt;
&lt;ol class=&quot;loweralpha&quot; type=&quot;a&quot;&gt;
&lt;li&gt;
&lt;p&gt;This only worked because I had credentials to all the accounts&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Removed old MX record priority and kept only the new one&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Did a check with imapsync again to look for mail that went to the old server, this is what I wanted:&lt;/p&gt;
&lt;div class=&quot;olist loweralpha&quot;&gt;
&lt;ol class=&quot;loweralpha&quot; type=&quot;a&quot;&gt;
&lt;li&gt;
&lt;p&gt;&quot;The sync looks good, all 1410 identified messages in host1 are on host2.&quot;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Once all boxes were synced, I started bumping TTLs up higher on my DNS records&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_looking_back&quot;&gt;Looking Back&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;This was majorly a thought experiment as I have intentions on doing this on
a larger deployment and with users that really, heavily rely on email.
I think this is something that will take more user interaction to do
neatly for each inbox in the environment I am in. I will also refine my
steps and timing. I will cross that bridge when I get there. However, this
was a very helpful test for me.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I am very happy with my switch. I like how it is easier to manage accounts
and domains. I like the built-in features Stalwart has. I don&amp;#8217;t mind touching
other servers, but this is just a nice setup and I look forward to the
1.0 realease that is incoming. I think Stalwart has a bright future.
Now I just hope the clients will catch up and we get some JMAP support
coming along. ;)&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Last thing I am working on is Sieve scripts. Dovecot would do &lt;code&gt;INBOX.Example&lt;/code&gt;,
but apparenty Stalwart does syntax &lt;code&gt;INBOX/Example&lt;/code&gt;. Still trying to confirm
that, but so far seemingly my inbox isn&amp;#8217;t being sorted right..I&amp;#8217;ll get there.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_final_thoughts_sidebar&quot;&gt;Final Thoughts (Sidebar)&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Earlier I mentioned my interest in CalDAV/CardDAV. Since people rely on
contact syncing a lot for sending email, it makes sense to make this a
part of Stalwart. Also, I have entered into an environment where calendar
sharing and invites is very heavily used. It is handy to do. So it also
makes sense to have Stalwart handle calendar since invites are often sent
via email. Nothing against Nextcloud, but I wouldn&amp;#8217;t mind moving calendar
and contacts off Nextcloud. Some combo of Apple and Nextcloud has issues
with syncing contacts, and I would be okay with putting calendar/contacts
in a more logical place.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;sect2&quot;&gt;
&lt;h3 id=&quot;_one_problem&quot;&gt;One Problem&lt;/h3&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I was initially drafting up doing that, but I ran into a problem with
calendar sharing. Stalwart DOES support sharing calendars via CalDAV
&lt;a href=&quot;https://stalw.art/docs/collaboration/sharing#sharing-resources&quot;&gt;for individual users&lt;/a&gt;,
but practically no clients do that. Not on iOS (but I hear you can on macOS?),
nor Thunderbird, anything really. There are a couple but it is just well
out of the reach of the users I am targeting on my own server. I can
do a shared calendar with groups and all, but because of lack of client
support, my users cannot share without admin intervention. Nextcloud
at least makes this easy to share calendars with other Nextcloud users.
In my realm of use, this may not matter an inch. But at scale, this
won&amp;#8217;t work well. Since there&amp;#8217;s word about more JMAP clients coming around,
maybe we will see that change. JMAP is pretty new and not well adopted
yet. It could provide for a better ecosystem, at least I hope.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;For now, I will play with what I have, and hope I don&amp;#8217;t cause too much trouble.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</description>
      <pubDate>Tue, 23 Dec 2025 15:00:00 PST</pubDate>
      <dc:creator>Courtney</dc:creator>
      <guid>https://blog.passwordclass.xyz/posts/2025-12-23/</guid>
    </item>
    <item>
      <title>Disable Fish Shell Greeting</title>
      <link>https://blog.passwordclass.xyz/posts/2025-12-22/</link>
      <description>&lt;div id=&quot;preamble&quot;&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I have been using the fish shell recently. I have it tweaked some, and one
day (probably after an update), I started to get this message:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;Welcome to fish, the friendly interactive shell
Type help for instructions on how to use fish

&amp;gt; ~&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Not sure why I need a greeting every time, don&amp;#8217;t want it. So I found
two ways to disable this functionality:&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_1_create_an_empty_function_file&quot;&gt;1. Create an Empty Function File&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;The method I chose was to create an empty file at &lt;code&gt;$HOME/.config/fish/functions/fish_greeting.fish&lt;/code&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_2_update_config_fish&quot;&gt;2. Update config.fish&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Adding this line to your config.fish file will suppress the message:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-fish&quot; data-lang=&quot;fish&quot;&gt;set fish_greeting&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;That&amp;#8217;s all you should need to do. Enjoy the quieter prompt.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</description>
      <pubDate>Mon, 22 Dec 2025 16:30:00 PST</pubDate>
      <dc:creator>Courtney</dc:creator>
      <guid>https://blog.passwordclass.xyz/posts/2025-12-22/</guid>
    </item>
    <item>
      <title>My SmartOS Live Demo Failure, and Success</title>
      <link>https://blog.passwordclass.xyz/posts/2025-08-21-my-smartos-live-demo-failure-and-success/</link>
      <description>&lt;div id=&quot;preamble&quot;&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;This summer, I was tasked with a workshop: spend roughly 8 hours of the day teaching Ansible.
The workshop went great. I got good feedback to improve and good remarks. I have grown to love
to teach, and I always appreciate what people think about how I do. As a part of that workshop,
I wanted to have VMs available for any of the people there that couldn&amp;#8217;t virtualize on their
own computers. The group was small, with 10 members in the workshop so I felt I could take my
extra Thinkpad T480 and throw SmartOS on there and let that be the virtualization platform.
I configured it at home for the trip.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;My first step in the workshop was to show the attendees a working
playbook that they could copy/paste and then run on my server to spin up virtual machines.
I was ready, flew to the conference, and the next day was showtime.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_the_troubles_begin&quot;&gt;The Troubles Begin&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Before the conference, I requested a block of IPs on the same network so that we could
all be on the same network as the virtualization host. I also needed an ethernet port.
Some of the network issues this day included the port in the wall not being connected
to the right port on the patch panel and switch so there was no access, and then come
to find out the cable I brought decided to die along the way. Thankfully there were
extras, but it was fun to find these things out as the workshop was starting. Additionally,
The DHCP addresses were not correct, so static IPs were needed.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_showing_my_ignorance&quot;&gt;Showing My Ignorance&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;As I was trying to figure these things out, SmartOS was spending an eternity booting.
I could not get the system to boot, only single user mode!
I thought maybe I had dorked something up, and I didn&amp;#8217;t know what the fix was. So I
figured the best thing was to reinstall the OS.
What I later found out is SmartOS will get stuck booting for an
eternity if it is configured to get a DHCP address but there is no DHCP answer. This
situation left me with a questionable network, no hypervisor, and the clock was ticking,
it was my teaching time.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_the_resolution&quot;&gt;The Resolution&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;With my Framework laptop handy, I was able to confirm that the networking was complete
and functional. By then, it was too late. I had already chosen the path of destruction.
I was already reinstalling SmartOS. The bad news though was because there existed a
previous zpool on the disk, I had to dd the beginning/end of the disk to reinstall.
I was able to wipe the beginning/end of the disk at this point and was plugging through
the installer. As I was doing that, I was teaching the workshop, getting up to the point
of running our first playbook. In about 10 minutes or so after starting the SmartOS installer,
I had a running system! I knew which Ubuntu 22.04 image I wanted to pull down, so
I grabbed it with &lt;code&gt;imgadm&lt;/code&gt; and was then able to tell the users to add their ssh pubkeys
to the authorized_keys file on the SmartOS server. They ran their first playbook, which
contained &lt;code&gt;community.general.vmadm&lt;/code&gt; and installed the new Ubuntu 22.04 BHYVE zones.
Great success!&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_the_failure_and_success&quot;&gt;The Failure and Success&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;This could be counted as a failure if this was any other operating system. If I had to
nuke Debian or FreeBSD or something else, it would take a lot more for me to get from
0 to deploying VMs. I didn&amp;#8217;t have to nuke my install, but in a hurry
(and at the time not knowing the best way to fix the dhcp issue), I knew my setup was
simple and would not require much effort to put things back together. As for the success,
things timed out just right despite reinstalling mid-presentation and everything ran
smoothly from there. I told the attendees to update their VM, take a snapshot, and then
from there if there was ever a need, it was easy for us to rollback and fix mistakes.
It was daring for me to take the OS out on the road and hook it up to an unfamiliar
network, but all was well and the workshop was a success.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</description>
      <pubDate>Thu, 21 Aug 2025 18:00:00 PDT</pubDate>
      <dc:creator>Courtney</dc:creator>
      <guid>https://blog.passwordclass.xyz/posts/2025-08-21-my-smartos-live-demo-failure-and-success/</guid>
    </item>
    <item>
      <title>Core Ultra Framework Laptop and OpenBSD</title>
      <link>https://blog.passwordclass.xyz/posts/2025-01-30_framework-laptop/</link>
      <description>&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_software&quot;&gt;Software&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;ulist&quot;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;I started with a Fedora iso to update firmware stuff easily&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;tried with the efi updater but it would not work&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_openbsd_installer&quot;&gt;OpenBSD installer&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;ure0 ethernet card works
iwx0 wireless works&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_post_install&quot;&gt;Post-Install&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Here is a list of what does/doesn&amp;#8217;t work:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;ulist&quot;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;audio - yes&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;battery status - yes&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;bluetooth - no&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;keyboard backlight - yes&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;ethernet - yes&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;wireless - yes&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;ssd - yes&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;suspend/resume - mostly&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;touchpad - yes&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;video - yes&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;webcam - haven&amp;#8217;t tried&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;microphone - also haven&amp;#8217;t tried&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;fingerprint reader - not even sure what I&amp;#8217;d use to test this&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;graphics - 6/10&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;2.8k display - good&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I assume the webcam, mic, and fingerprint reader still work since they have
worked on older Framework models according to other OpenBSD blog posts about
OpenBSD on the Framework laptop&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_overall_experience&quot;&gt;Overall Experience&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I&amp;#8217;ve been using the new Intel Core Ultra Framework laptop for a few weeks
by now, and so far it has been both better and worse than I thought.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;What surprised me was I was able to get the Anker 553 USB-C hub and have
everything work off of it. I have 2 HDMI monitors plugged in, power delivery,
a USB switcher plugged in, ethernet, and it all works. All off a single type C
port on the laptop. The downside is, unplugging this doesn&amp;#8217;t result in friendly
experiences. I have to hard power off the laptop if I unplug it from the
laptop. Not the biggest deal since my setup requires I reload some stuff anyway
when I go from many monitors to just the laptop one.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;The other downside right now, which may more be the Intel driver&amp;#8217;s fault, is
that I get very bizarre graphical glitches, mostly when I have multi monitors
hooked up. I noticed that graphical issues with this Intel iGPU is nothing new,
so I am hopeful that the next driver pull (kernel 6.12?) will have fixes for
all these oddities.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Still a little bummed that I have to deal with weird xhci interrupts really
messing with my USB input/output. I can lose keypresses sometimes and audio
will cut out on occasion. Scrolling can be laggy. All of this is over that
single xhci interface. It&amp;#8217;s all going over xhci1, so I may see if I can get
some of that stuff plugged into xhci0 (assuming that&amp;#8217;s the right side of the
laptop) and see if spreading the load out will help. Maybe also since video
is pretty demanding it is really making the interrupt count very high.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Despite all that though, I am pleased that everything is working, even if some
of it isn&amp;#8217;t providing me the best experience. I found it is best to keep the
apm setting at auto. When driving my displays on performance mode, the
Framework gets quite toasty and the fan runs a lot. Auto is actually quite
good. And the laptop stays around 65C with fans off most of the time on auto.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Battery life has been good? I don&amp;#8217;t expect good battery life if it isn&amp;#8217;t macOS
or perhaps even Windows. I haven&amp;#8217;t done a proper test but I think I could be
getting 6 hours of battery off this with regular use.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Sleep works some times, and doesn&amp;#8217;t work other times (like me).&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I&amp;#8217;ve tried Wayland some and was happy that Wayland could handle the hidpi
display very well with my 1440p and 1080p display. But Wayland on OpenBSD
(maybe Linux too, haven&amp;#8217;t tried) just isn&amp;#8217;t there and I was ready to get back
on Xenocara after a day of using it. I just keep my laptop display off and
have the dpi at 96 and use my 2 monitors. That makes the laptop display
unusable since the text is SO tiny unless the dpi is set to 192.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_cool_battery_feature&quot;&gt;Cool Battery Feature&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;The Framework lets you set the max charge capacity. Since I have this as a
desktop replacement, I set the max charge to 80% and it works. What is really
cool too is if I had it at 100% before and set it to 80%, it will drain my
battery back down to 80%. Very nice. Doing this within OpenBSD doesn&amp;#8217;t work.
I understand it is very vendor-specific. So it&amp;#8217;s something that Framework
would have to provide some sort of driver compatibility for? Either way, I
am perfectly fine having that feature in the BIOS.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_conclusion&quot;&gt;Conclusion&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Overall, I am actually very happy with this laptop. I don&amp;#8217;t regret my choice.
It does sadden me that I am putting up with these audio stutters again. I
solved that issue on my desktop by having my USB DAC connected via SPDIF and
that has worked incredibly well. Maybe I&amp;#8217;ll get tipped over the edge with
the stuttering to the point where I say enough is enough since I am listening
to something all day, every day. But I really do believe that I have the most
easy, comfy, and manageable setup having OpenBSD on my laptop all other things
considered. I just have to take some occasional copium with the audio stutters.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</description>
      <pubDate>Thu, 30 Jan 2025 16:45:00 PST</pubDate>
      <dc:creator>Courtney</dc:creator>
      <guid>https://blog.passwordclass.xyz/posts/2025-01-30_framework-laptop/</guid>
    </item>
    <item>
      <title>How is SmartOS So Far?</title>
      <link>https://blog.passwordclass.xyz/posts/how-is-smartos-so-far/</link>
      <description>&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;In an &lt;a href=&quot;https://blog.passwordclass.xyz/posts/complete-smartos-migration/&quot;&gt;earlier post&lt;/a&gt;, I wrote on
my migration to SmartOS. It has been about 6 months now and I thought
I would write up some on my experience so far.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_fault_management_architecture_fma&quot;&gt;Fault Management Architecture (FMA)&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Right after I got setup, it didn&amp;#8217;t take long for me to start digging into
&lt;a href=&quot;https://illumos.org/books/wdd/gevsi.html&quot;&gt;FMA&lt;/a&gt;. FMA was one of the selling
points for me, since I thought it would be cool to get some insights into
the hardware I was running. This turned out to be to my advantage.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I ran &lt;code&gt;fmadm faulty&lt;/code&gt; to look at my system&amp;#8217;s faults and found out there was
a fault detected not long into running my server with SmartOS. What was
cool was it showed me the path of what was faulty. It mostly went like:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;chassis &amp;#8594; cpu &amp;#8594; motherboard &amp;#8594; dimm0/dimm1&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Something like that. The message showed that a feature in my memory was not
working in 2 DIMM slots. I took out the 2 memory sticks in those slots and
those messages went away after I cleared them. I still had faults, however.
The message indicated that the MMU was failing. So, I found out that modern
Intel processors have the MMU on the CPU die, so I replaced the processor with
a &quot;new&quot; 12 core Intel Xeon and cleared the FMRI, and the fault message was gone!&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I&amp;#8217;m not sure if Linux or FreeBSD have anything like this. I have not
encountered errors in my hardware like this before, so it was cool to
see where the issue was and manage it.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_ansible_usage&quot;&gt;Ansible Usage&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;There&amp;#8217;s an existing module available in Ansible-galaxy community. I&amp;#8217;ve been
using it to deploy new zones to my server. I use it for my one-off zones
and ones I repeatably deploy for testing. It isn&amp;#8217;t as flexible as I&amp;#8217;d like
though. There&amp;#8217;s still some manifest settings I would like, such as &lt;code&gt;owner_uuid&lt;/code&gt;
and &lt;code&gt;flexible_disk_size&lt;/code&gt; for bhyve zones. They don&amp;#8217;t exist, however. If I
get around to it, I may modify the module to include more options. Or,
just switch to doing &lt;code&gt;ansible.builtin.command&lt;/code&gt; and run vmadm straight
with JSON manifests for each zone.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_owner_uuid_fun&quot;&gt;Owner UUID Fun&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;&lt;code&gt;owner_uuid&lt;/code&gt; is more of a variable for Triton Datacenter, but I like to
use it because I run my own zones, some zones for friends, and work. I
set a uuid so I can nicely sort out these zones when listing them.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I have a JSON file called &lt;code&gt;/usbkey/owner.json&lt;/code&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-json&quot; data-lang=&quot;json&quot;&gt;{
        &quot;me&quot;: &quot;00000000-0000-0000-0000-000000000000&quot;,
        &quot;work&quot;: &quot;632ce8ef-ea4b-4d38-bd94-5ee1da596b28&quot;,
        &quot;friend1&quot;: &quot;1bb332ea-5d5c-448a-b8ad-c6bf8322d798&quot;,
        &quot;friend2&quot;: &quot;2704b08b-772e-49b4-82d9-d8bdacee3f30&quot;
}&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;In my bashrc file I have a function to make it easy to sort by UUID&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;function vml () {
        if [ -z &quot;$1&quot; ]; then
                vmadm list -s alias
        else
                vmadm list -s alias owner_uuid=&quot;$(cat $zone_owners | json $1)&quot;
        fi
}&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;So I can run &lt;code&gt;vml me&lt;/code&gt; or &lt;code&gt;vml friend1&lt;/code&gt; and get that subset of zones.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_how_are_native_zones&quot;&gt;How Are Native Zones?&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I&amp;#8217;ve been enjoying native SmartOS zones so far. I use them as much as possible.
I&amp;#8217;m an OpenBSD nut, so I have quite a number of OpenBSD VMs. I also have a few Linux-only
applications. However, the rest I have are native zones. So far, my regular
setup is like this:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;ulist&quot;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Ansible - SmartOS zone (WIP actually, migrating from OpenBSD to SmartOS)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;SMB/storage - SmartOS zone&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Collabora CODE - Debian 12 VM. LX zone had an issue&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;factorio - Alma Linux 9 LX zone&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;gitea - SmartOS zone&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Vault - OpenBSD&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Immich - Debian 12 VM since it&amp;#8217;s a docker-composed program&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Jellyfin - Alpine Linux LX zone&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Synapse matrix - OpenBSD&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Nextcloud - SmartOS zone&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I have a bunch of other small stuff too.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;What I like about the native zones are the package availability from pkgsrc
and how I can mix and match php versions and postgresql versions for Nextcloud.
I also like how updating the global zone updates the SmartOS zones too.
That make management much easier. With FreeBSD I&amp;#8217;d either have to &lt;code&gt;freebsd-update&lt;/code&gt;
a bunch of jails or weave my way around thin jails and the management
weirdness that comes with that. Using native zones lets me get easy access
to ZFS tooling and such too, though, those tools are available and mostly
functional in an LX zone too. I also get easy access to running SMB and NFS
servers too with delegated datasets. Because of the easy management and
performance, I run native zones as much as I can.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_fwadm&quot;&gt;fwadm&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I haven&amp;#8217;t gotten much into this, but I&amp;#8217;ve been messing around a little
with fwadm to set firewall rules for zones. It is pretty easy to create
new rules and apply tags to zones to apply rules.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_etherstub&quot;&gt;etherstub&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I came across the etherstub last week, but I have a concept that I want to do
for my zones that require reverse proxies. The etherstub is essentially
a virtual switch.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I already run haproxy on my router to do TLS passthrough for my internal
services that use ports 80/443. However, I don&amp;#8217;t like this setup as much.
I woulnd&amp;#8217;t mind doing TLS termination on haproxy and let each application
know it is being proxied. In some cases I have 2 proxies running because
of this setup. Not very efficient. I also don&amp;#8217;t like the idea of letting
unencrypetd traffic run over my local network. This is where etherstubs
come into play.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I can create an etherstub and then create new interfaces with IPs on my
zones so they can communicate locally over the etherstub. My goal then
is to have haproxy do TLS termination up front and proxy locally over an
etherstub. That will be my next upcoming project to take some load off
my weak router and hopefully make my setups a bit simpler.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_deploying_zonesvms_is_easy&quot;&gt;Deploying zones/VMs is Easy&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;One issue I had with FreeBSD was the lack of built-in tooling to deploy
jails and bhyve virtual machines. I really do not like the default jail.conf
method of managing jails. I also don&amp;#8217;t like relying on software in ports,
namely, vm-bhyve (which is great software) to manage jails. SmartOS makes
deploying all zone types (native, lx, bhyve) painless. There&amp;#8217;s also a
web GUI I can setup too to manage my zones. Since zone management has been
such an easy job for me, I find myself running more on my server. I only
have so much mental bandwidth before I say &quot;okay, no more. I am out of time&quot;.
However, I have been able to add projects and I have had to touch my server
less. YMMV, but that&amp;#8217;s been my experience these last 6 months.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Another fun fact: later in 2024 there was a bhyve vuln that allowed a guest
to execute code on the host. Because of the security design built into
illumos zones, the bhyve vulnerability was fully mitigated. Maybe this
could have been mitigated on FreeBSD too if bhyve VMs were always deployed
in a jail by default.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_host_management&quot;&gt;Host Management&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;There isn&amp;#8217;t much of that. I grabbed zrepl from github and set up my own
SMF manifest to run backups. I haven&amp;#8217;t had to do a whole lot otherwise.
I have some monitoring set, but otherwise I flash a new image to a flash
drive, poweroff, swap flash drives, start up, and move on. Going from,
say, FreeBSD 14.0 &amp;#8594; 14.1 would have involved all the host update processes,
zpool upgrades and praying I don&amp;#8217;t screw up boot code, upgrading all
my jails.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_shots_fired&quot;&gt;Shots Fired&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I know I am shooting fire at FreeBSD. I don&amp;#8217;t hate FreeBSD, having been
a FreeBSD user since 2017 and still actively maintain FreeBSD boxes today.
However, coming from that background, these are things that I have found
that make quality of life as an admin much better, and I think, if any
FreeBSD devs ever read this, would be some very great changes to FreeBSD
that would make sysadmin life much nicer.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;olist arabic&quot;&gt;
&lt;ol class=&quot;arabic&quot;&gt;
&lt;li&gt;
&lt;p&gt;bhyve VMs always jailed&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;easier jail management&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;better tooling in base for jail/bhyve management&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_conclusion&quot;&gt;Conclusion&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;There&amp;#8217;s more I could write over time. I will likely add bits here and
there and document more of the fun things I do on my virtualization host.
These are my thoughts 6 months later running SmartOS. I&amp;#8217;m a very happy
user, performance is good, management is very nice, and I am happy that
I can trust this OS to run my servers. I don&amp;#8217;t miss the OpenZFS features
that I lost either.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</description>
      <pubDate>Thu, 02 Jan 2025 20:30:00 PST</pubDate>
      <dc:creator>Courtney</dc:creator>
      <guid>https://blog.passwordclass.xyz/posts/how-is-smartos-so-far/</guid>
    </item>
    <item>
      <title>I Fixed My Blog...Again</title>
      <link>https://blog.passwordclass.xyz/posts/2024-12-31-i-fixed-my-blog-again/</link>
      <description>&lt;div id=&quot;preamble&quot;&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I&amp;#8217;ve had this blog go through some different softwares.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;First time I did it all in raw AsciiDoc and used the asciidoctor tool
to export it all and one of their stock css styles. Worked fine, but I
wanted more utility. I went onto Hugo, but had some issues there, and
now am on 11ty.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_hugo_problems&quot;&gt;Hugo Problems&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I like writing in AsciiDoc. I&amp;#8217;ve tried Markdown, I just can&amp;#8217;t get used
to it. Its feature set is too narrow. The issue I had with Hugo was that
eventually Hugo made changes to syntax highlighting which broke my theming.
Then the theme I was using broke. All my code blocks were messed up and
unreadable. I was getting tired of the constant moving target of the theme
and Hugo, so I came across &lt;a href=&quot;https://www.11ty.dev/&quot;&gt;11ty&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_what_i_like_about_11ty&quot;&gt;What I like About 11ty&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I had already made my own static site generator for my church&amp;#8217;s website
with a basic Python script, Jinja2 templates, and Bootstrap. The theming
is not easy for me as someone who doesn&amp;#8217;t work with CSS or Javascript at
all. However, the site turned out really nice! Well, with my blog being
broken and needing to add some stuff to the church site, I needed more
flexibility. So, I picked 11ty. What I like is there&amp;#8217;s a lot of different
ways to build a site, data can be fetched and manipulated with different
modules and such, and best of all, there&amp;#8217;s a community module for AsciiDoc!&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I was able to move all my Hugo blog pages into 11ty without having to
modify them any, the rest was just making the site look nice and doing
the pagination. I lost my easy copy button, but I&amp;#8217;ll add that back eventually.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;What I like now is that I have the flexibility to do my own theming on my
own time, and upgrade versions of 11ty on my own time. It&amp;#8217;s just static pages,
I don&amp;#8217;t need constant moving targets for themes and site generators. I don&amp;#8217;t
want to futz with that stuff. 11ty so far seems it will fit the bill. Time
will tell. But for now, I like that it is easy to just write again and hit
&lt;code&gt;npm run build&lt;/code&gt; (which I put in the packages.json file) and get the directory
slapped up on my server.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Really, the most I had to do was make 2 templates for my main pages and my
blog pages (even the latter wasn&amp;#8217;t necessary), then do some &lt;a href=&quot;https://shopify.github.io/liquid/&quot;&gt;Liquid&lt;/a&gt;
templating for my few page types, and the rest is just writing my content
in AsciiDoc.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_whats_next&quot;&gt;What&amp;#8217;s Next&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Now that this is all back, I&amp;#8217;m going to get back into writing. I have some
drafts I want to finish, some I want to toss, and some things I need to
catch up on, like some more of my SmartOS stuff.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</description>
      <pubDate>Tue, 31 Dec 2024 06:00:00 PST</pubDate>
      <dc:creator>Courtney</dc:creator>
      <guid>https://blog.passwordclass.xyz/posts/2024-12-31-i-fixed-my-blog-again/</guid>
    </item>
    <item>
      <title>Fix MTR Report in Ubuntu 24.04</title>
      <link>https://blog.passwordclass.xyz/posts/fix-mtr-report-in-ubuntu-2404/</link>
      <description>&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_tldr&quot;&gt;TL;DR&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Run this:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;#!/usr/bin/env sh

sed -i &#39;s/Types: deb/Types: deb deb-src/g&#39; /etc/apt/sources.list.d/ubuntu.sources
cd /tmp
apt-get update
apt-get install -y dpkg-dev
apt-get source mtr
apt-get build-dep mtr
cd mtr-0.95

# Get patch
curl -o debian/patches/5908af4c19188cb17b62f23368b6ef462831a0cb.patch https://github.com/traviscross/mtr/commit/5908af4c19188cb17b62f23368b6ef462831a0cb.patch

# Apply patch
patch -p1 &amp;lt; debian/patches/5908af4c19188cb17b62f23368b6ef462831a0cb.patch

# Build package
dpkg-buildpackage -rfakeroot -uc -b

# Install package
find /tmp -name &quot;*mtr-tiny*.deb&quot; -exec dpkg -i {} &#92;;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_the_fix&quot;&gt;The Fix&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I&amp;#8217;ve been meaning to upgrade some computers to Ubuntu 24.04 LTS, but have run
into a problem with the MTR package. I frequently use the &lt;code&gt;-r&lt;/code&gt; flag to generate
reports. However, there is a
&lt;a href=&quot;https://github.com/traviscross/mtr/issues/508&quot;&gt;known&lt;/a&gt;
&lt;a href=&quot;https://bugs.launchpad.net/ubuntu/+source/mtr/+bug/2071890&quot;&gt;issue&lt;/a&gt;
with the report feature in Ubuntu 24.04 due to Ubuntu enabling &quot;string_fortified&quot;
by default. The good news is the fix is pretty simple, as seen in the patch below:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-diff&quot; data-lang=&quot;diff&quot;&gt;From 5908af4c19188cb17b62f23368b6ef462831a0cb Mon Sep 17 00:00:00 2001
From: Marcus Meissner &amp;lt;meissner@suse.de&amp;gt;
Date: Tue, 11 Apr 2023 16:05:36 +0200
Subject: [PATCH] fixed the sizes passed into snprintf

---
 ui/report.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/ui/report.c b/ui/report.c
index 93014808..61f2c74b 100644
--- a/ui/report.c
+++ b/ui/report.c
@@ -140,7 +140,7 @@ void report_close(
             continue;

         snprintf(fmt, sizeof(fmt), &quot;%%%ds&quot;, data_fields[j].length);
-        snprintf(buf + len, sizeof(buf), fmt, data_fields[j].title);
+        snprintf(buf + len, sizeof(buf) - len, fmt, data_fields[j].title);
         len += data_fields[j].length;
     }
     printf(&quot;%s&#92;n&quot;, buf);
@@ -172,10 +172,10 @@ void report_close(

             /* 1000.0 is a temporary hack for stats usec to ms, impacted net_loss. */
             if (strchr(data_fields[j].format, &#39;f&#39;)) {
-                snprintf(buf + len, sizeof(buf), data_fields[j].format,
+                snprintf(buf + len, sizeof(buf) - len, data_fields[j].format,
                          data_fields[j].net_xxx(at) / 1000.0);
             } else {
-                snprintf(buf + len, sizeof(buf), data_fields[j].format,
+                snprintf(buf + len, sizeof(buf) - len, data_fields[j].format,
                          data_fields[j].net_xxx(at));
             }
             len += data_fields[j].length;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;And the patch was committed &lt;a href=&quot;https://github.com/traviscross/mtr/commit/5908af4c19188cb17b62f23368b6ef462831a0cb&quot;&gt;here&lt;/a&gt;.
Since the patch was back in April 11, 2023, I was hoping that after a bug report being filed
on 2024-07-04 on launchpad that it would hopefully make its way to 24.04.1. Sadly, it didn&amp;#8217;t.
So, for anyone who wants to patch this for themselves, here is how.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;sect2&quot;&gt;
&lt;h3 id=&quot;_process&quot;&gt;Process&lt;/h3&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;First, you want to update &lt;code&gt;/etc/apt/sources.list.d/ubuntu.sources&lt;/code&gt; and include &lt;code&gt;deb-src&lt;/code&gt; in
the &quot;Types&quot; lines to look like so:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;&lt;code&gt;Types: deb deb-src&lt;/code&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Next, we need to install dpkg-dev&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;cd /tmp; apt-get update; apt-get install -y dpkg-dev&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Next, you can get the source for mtr and get the build dependencies for it&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;apt-get source mtr; apt-get build-dep mtr&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Next, I fetched the patch and put it in the &lt;code&gt;debian/patches&lt;/code&gt; dir, you can put it anywhere you like&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;cd mtr-0.95; curl -o debian/patches/5908af4c19188cb17b62f23368b6ef462831a0cb.patch https://github.com/traviscross/mtr/commit/5908af4c19188cb17b62f23368b6ef462831a0cb.patch&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;When you get the source, the patches get applied too, so you need to apply the patch yourself&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;patch -p1 &amp;lt; debian/patches/5908af4c19188cb17b62f23368b6ef462831a0cb.patch&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;With the patch applied, build the package with this command:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;dpkg-buildpackage -rfakeroot -uc -b&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Finally, install the package;&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;dpkg -i ./mtr-tiny_0.95-1.1build2_amd64.deb&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I install the mtr-tiny package because I don&amp;#8217;t need the x11 version, but it is also there.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</description>
      <pubDate>Thu, 29 Aug 2024 17:45:00 PDT</pubDate>
      <dc:creator>Courtney</dc:creator>
      <guid>https://blog.passwordclass.xyz/posts/fix-mtr-report-in-ubuntu-2404/</guid>
    </item>
    <item>
      <title>My OpenBSD Desktop Revisited</title>
      <link>https://blog.passwordclass.xyz/posts/my-openbsd-desktop-revisited/</link>
      <description>&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;In May 2022 I wrote about switching from FreeBSD to OpenBSD. Today
I want to revisit that post, as a lot has changed since then in OpenBSD land.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_the_hardware&quot;&gt;The Hardware&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;My hardware has changed since:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;ulist&quot;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Ryzen 5800X&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Some B450 motherboard&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;32GB DDR4 at 2666MHz&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;OS Drive: 500GB WD Black SN750&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;MSI RX 6700XT&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;ZSA Ergodox EZ keyboard&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Ploopy Adept trackball&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;AudioEngine D1 DAC/amp&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_environmentsoftware&quot;&gt;Environment/Software&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;ulist&quot;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;i3 (i3bar + i3status)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Nextcloud client&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;keepassxc&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;neovim (also dabbling with Helix as I write this)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Firefox&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Audacious music player - Strawberry no longer compiles, and same with Clementine&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_first_impressions_revisited&quot;&gt;First Impressions Revisited&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;When I was running FreeBSD, my Ethernet port didn&amp;#8217;t work out of the box, my graphics
card was not supported, and U2F was not supported in base. I can&amp;#8217;t confirm if that
is still true today, but I do know now that my graphics card is supported with the
latest &lt;code&gt;drm-kmod&lt;/code&gt; package.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;sect2&quot;&gt;
&lt;h3 id=&quot;_my_elecom_huge_problem&quot;&gt;My Elecom HUGE Problem&lt;/h3&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I stated that not all my buttons worked on the Elecom. I found a solution by editing
the &lt;code&gt;/etc/X11/xorg.conf&lt;/code&gt; file and adding&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-conf&quot; data-lang=&quot;conf&quot;&gt;Section &quot;InputClass&quot;
        Identifier &quot;mouse driver&quot;
        MatchIsPointer &quot;on&quot;
        Driver &quot;mouse&quot;
EndSection&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I still have that with my Ploopy trackball. Would it all work the same without
it? Maybe, haven&amp;#8217;t bothered to try.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_freebsd_revisited&quot;&gt;FreeBSD Revisited&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;My experience with what I stated then is outdated. I hear that Wifi with Intel
chips is getting better. Maybe it is catching up to OpenBSD? On OpenBSD with an
Intel AC7265(?) I was able to get 400x400Mbps. I don&amp;#8217;t know if I was on 2.4GHz
or 5GHz, but at any rate, that was totally acceptable to me.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I also hear there&amp;#8217;s been great strides made with USB audio and disconnecting
devices. If so, that is also fantastic as it was such a pain if I accidentally
disconnected my DAC and found it being almost easier to reboot my computer than
do the dance to get everything back in order.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_openbsd_experience_revisited&quot;&gt;OpenBSD Experience Revisited&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;sect2&quot;&gt;
&lt;h3 id=&quot;_usb_audio&quot;&gt;USB Audio&lt;/h3&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;When I started using OpenBSD, USB audio was probably worse than it was on
FreeBSD. The constant stuttering was so bad that I would have to about every
30 minutes kill Firefox to get my audio in order.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Eventually I got an AudioEngine D1 anticipating using the SPDIF port on it.
But to my dismay, SPDIF on my system wasn&amp;#8217;t supported by OpenBSD! BUT, switching
devices did really help my problem. Instead of restarting Firefox every 30
minutes, it was more like twice a day. Still don&amp;#8217;t understand that one. Even
better, over time I only had to restart Firefox once a day or not at all in
a day to solve the stuttering audio issue.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Even better better, some kind soul submitted updates to OpenBSD that supported
the sound device on my motherboard! So now I have my DAC doing audio through
the SPDIF port on my motherboard and it has been smooth sailing.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect2&quot;&gt;
&lt;h3 id=&quot;_firefox&quot;&gt;Firefox&lt;/h3&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;These days the Download button in the file manager in Firefox actually takes
me to the Downloads folder. Previously, I had to train it at first to remember.
From time to time, Firefox may crash when trying to upload/download a file.
It can be very frustrating. But I assume there&amp;#8217;s some sort of pledge or unveil
violations going on and assume that these security controls are doing their job.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect2&quot;&gt;
&lt;h3 id=&quot;_keepassxc_proxy&quot;&gt;keepassxc-proxy&lt;/h3&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;All works great. Though I did eventually stop and switched to hosting
Vaultwarden and using the browser extension. I still use KeePassXC for a
lot of credentials, ones I don&amp;#8217;t want in Vaultwarden.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect2&quot;&gt;
&lt;h3 id=&quot;_erlang&quot;&gt;Erlang&lt;/h3&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Works! The port maintainer has chosen to support multiple versions, so
currently there&amp;#8217;s erlang25, erlang26, and erlang27 in ports and I&amp;#8217;d have
to go through the steps of symlinking a bunch of stuff so I didn&amp;#8217;t have to
type &lt;code&gt;erl27&lt;/code&gt; and stuff like that. So I just download the tarball, set my
own feature flags and build and &lt;code&gt;make install&lt;/code&gt; the package myself. Overall,
I don&amp;#8217;t mind this.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect2&quot;&gt;
&lt;h3 id=&quot;_hostname_if_for_wireguard_clients&quot;&gt;hostname.if for Wireguard Clients&lt;/h3&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I still use &lt;code&gt;wg-quick&lt;/code&gt;. I think there&amp;#8217;s a way to not autostart the interface,
but I prefer my method of having an up/down script to wrap &lt;code&gt;wg-quick&lt;/code&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect2&quot;&gt;
&lt;h3 id=&quot;_sndiodis_great&quot;&gt;sndiod&amp;#8230;&amp;#8203;is Great!&lt;/h3&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;My issues have been solved here, I like using sndiod. I&amp;#8217;m still not super used
to the different tools, but the man pages are helpful, sndio is pretty
straightforward. I&amp;#8217;ve gotten sndiod to work well with my USB microphones,
minus one I mentioned before. Oh well, now I hardly use a microphone.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;One issue I have encountered though, not sure if it is sndio or usb related
on OpenBSD, but I tried to record some audio with aucat in over USB and
there was a constant audible tick in the recording. This problem did not
happen on Linux where I also tested for this problem.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_overall_thoughts&quot;&gt;Overall Thoughts&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;OpenBSD is still slow compared to FreeBSD. But I find every release something
gets better and better in OpenBSD. New stuff supported, new security features,
better hardware support, performance gains here and there, it has been a fun
2 years of using OpenBSD on my computers.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I stated previously that I would likely switch back to FreeBSD on my desktop
once my graphics card was supported. At this point, I am very happy with
OpenBSD and will not. But, I will revisit FreeBSD on the desktop again some
time again. I have accumulated extra SSDs so maybe it&amp;#8217;s time for a triple
boot and have some fun!&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I see both FreeBSD and OpenBSD improving release after release and that is
exciting to me. 2 great operating systems that deserve much love. In the end,
I don&amp;#8217;t regret moving my desktop to OpenBSD. Maybe sometimes I miss a package
that might be on Linux or FreeBSD, but I haven&amp;#8217;t missed anything so much that
I feel like I have to abandon OpenBSD as my daily driver, and it will be here
to stay on my systems.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</description>
      <pubDate>Tue, 20 Aug 2024 19:30:00 PDT</pubDate>
      <dc:creator>Courtney</dc:creator>
      <guid>https://blog.passwordclass.xyz/posts/my-openbsd-desktop-revisited/</guid>
    </item>
    <item>
      <title>Complete SmartOS Migration</title>
      <link>https://blog.passwordclass.xyz/posts/complete-smartos-migration/</link>
      <description>&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Today I continue my SmartOS saga. Actually, it&amp;#8217;s done! I have SmartOS on my main server.
It was quite a task. In addition to my dad&amp;#8217;s server being replaced with SmartOS in April
(which has been running very well), I have yet to get SmartOS on my friend&amp;#8217;s server.
Previously, I said I would probably install SmartOS on a friend&amp;#8217;s box before mine, but
events lead me to get ahead on my box first.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_recap_why_the_switch&quot;&gt;Recap: Why The Switch?&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I&amp;#8217;ve originally been using FreeBSD as my main server OS for 7 years. It has been great,
reliable, never gave me an issue, and performant. My first motivation is because this
is a home lab server and I like to try and learn new things. SmartOS has some overlap
in features that I like:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;ulist&quot;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;ZFS&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;bhyve&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Same bootloader as FreeBSD&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;zones (like jails, but not entirely)&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;The other reason has to do with a couple shortcomings in FreeBSD that SmartOS very
uniquely solves:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;ulist&quot;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;VM images - native OS zones, Linux (LX) branded zones, a variety of Linux VMs, and I can still make my own from scratch&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Unified tooling for the sysadmin (vmadm, imgadm, zoneadm, fwadm, etc.)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;JSON manifests to create zones easily from images&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Available Ansible module for zone management&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;It&amp;#8217;s easier to wrap my mind around firewalls for each zone with fwadm and tags&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Some of these things I could solve in ways with some third party tools and build some
of my own stuff, but as I get busier with life, I sometimes need something that I can
do fast or with minimal thought. SmartOS makes it a bit easier to automate some of the
stuff that I do with my server.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_the_long_winded_process&quot;&gt;The Long-winded Process&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Since I wasn&amp;#8217;t familiar with SmartOS and wanted to learn and kick the tires, I pulled
out the only extra computer I had, which was an 8GB RAM Intel i5 4570 Thinkcentre.
After learning, I decided it was time and I was comfortable enough to get the migration
on. It was quite the journey learning and starting to move my virtual machines over to this
desktop initially. I only had a single 4TB NAS drive and the amount of data I have on
my server is just over 4TB. So I ended up removing some extra data that was unneeded
and planned to move another chunk of data somewhere else while I was preparing this migration.
So I started with moving some of my simpler VMs, ones that didn&amp;#8217;t take up too much
space and didn&amp;#8217;t require much memory or CPU time.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I proceeded to one of my larger servers, which was Plex. Since I don&amp;#8217;t update my Plex library
very often and the amount of space it uses up was okay for me to move
it over, it wasn&amp;#8217;t that big of an issue. A day later I had noticed that ZFS foudn 8
corrupt files in my Plex library. I eventually found out that the issue was a faulty
SATA cable. After replacing it, everything worked fine, I did a memtest to ensure my
memory was okay and did a scrub on the zpool. Afterward, I replaced the corrupt files.
I was concerned then with the reliability of this drive. It had been running for 4 years
24/7, then I let it sit 3 years. That had my concerned about the identical drive in my
existing server which has been running 24/7 for 7 years. To be safe, I decided it was time
to spend the cash (which I was trying to avoid) and I ordered 2x14TB drives.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;sect2&quot;&gt;
&lt;h3 id=&quot;_new_drive_configuration&quot;&gt;New Drive Configuration&lt;/h3&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;In my intial plan, I had intended to install my zones zpool on one of my SSDs and then
have the data in its own data zpool. However, I was advised not to do that since I would
not see any gains from using these SSDs. Additionally, I&amp;#8217;d be having to do workarounds
with SmartOS such as LOFS and such to get the data properly in each zone, which would
have added complexity to my server. So at the advice of the maintainers, I decided to
use only my new hard drives.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect2&quot;&gt;
&lt;h3 id=&quot;_the_process_begins&quot;&gt;The Process Begins&lt;/h3&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Once I got the new drives, I couldn&amp;#8217;t wait. I decided to start the migration over the
upcoming weekend. I installed my new drives in my Thinkcentre, with one hanging out
the chassis since it only supported a single 3.5&quot; drive. I started copying data from
my jails to my new zones to delegated datasets. However, I started encountering issues.
One issue was the constant battle of low memory and trying to move everything over to
this new &quot;server&quot; without overloading the desktop. I had been using rsync up until this
time, but since my destination zones had too little memory allocated to them, rsync would
eventually fail. I found sftp to work, and eventually I reached a point where I had to
just turn stuff off and allocate more memory to these zones to get data over efficiently.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I did my best to recreate all my jails as zones. Most of them were done beforehand since
they had low CPU/memory requirements. I had some others such as Nextcloud, my samba server,
Plex, and my friend&amp;#8217;s minecraft server that required some messing around to get things
right and get it correct in joyent/lx branded zones. Once it was all done, I was ready
to power down both machines and swap the guts.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect2&quot;&gt;
&lt;h3 id=&quot;_failure&quot;&gt;Failure&lt;/h3&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;At this point, I had my 2 disks in my server and all else hooked up, but encountered an
error: I was booting into single user mode constantly. After looking through the logs
and beating my head against the wall, I had to revert everything and put stuff back in
their messed up state with both computers running their duties. I kept Nextcloud, Immich,
Matrix, and Minecraft on my old server for the night, and most of the next day. In the
meantime, it was the end of the night.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;The following day, I scoured the internet for some sort of answer, and came upon
&lt;a href=&quot;http://setupnotes.gozoinks.com/consider-swap-when-sizing-storage&quot;&gt;this&lt;/a&gt; post.
In it the writer notes to size up the dump and swap space on the zones zpool. Even
mentioning the exact same error I had gotten. So I followed his instructions, but kept
swap the same since I was doing this on my live system, and not single user mode. But I
increased my dump volsize:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;zfs set volsize={Installed RAM ÷ 2}G zones/dump
dumpadm -d /dev/zvol/dsk/zones/dump&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I have 64GB RAM, where my old system which I built SmartOS on had 8GB. So the dump size
was too small, and I set it to 40GB or something. When I put everything back in my server,
it all worked!&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect2&quot;&gt;
&lt;h3 id=&quot;_finishing_the_move&quot;&gt;Finishing the Move&lt;/h3&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;The remaining bits were to put back together Nextcloud, Immich, Matrix, and Minecraft.
I had ensured my data was current on Nextcloud, did a database dump/restore and Nextcloud
was running well then. Immich, I had already moved the data and samba (namely, SmartOS&#39;
in-kernel SMB server) share. So my steps were to just restore the database stuff I backed
up and spin Immich up in a new VM. Matrix and Minecraft restores went well too. At this
point, I was fully on SmartOS.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_finishing_touches&quot;&gt;Finishing Touches&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Once done, I had some improvements to make. For one, I think going from a raidz1 to
a mirrored zpool slowed down my write speeds some, which I was thinking might hav been
the case. And it was. However, I also noticed that Nextcloud was performing particularly
slow. For one, I noticed I didn&amp;#8217;t install the php redis module, opcache php modules
were missing too, and it wasn&amp;#8217;t configured right either. After making those changes,
Nextcloud is running where it&amp;#8217;s been at. Some things feel a little slower, and I have
high certainty it is disk I/O bound.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;sect2&quot;&gt;
&lt;h3 id=&quot;_monitoring_and_backups&quot;&gt;Monitoring and Backups&lt;/h3&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I like to receive alerts for problems, so I put in place SMART data monitoring, as well
as monitoring to detect if a zpool is not in an ONLINE state or experiencing problems.
Additionally, I have a monitor that will alert me if one of my zones goes offline.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;The last bit is backups, which, I am using znapzend to backup my delegated ZFS datasets.
I have backups of my bhyve virtual machines going to my storage zone. My last plan of
action is to get all my configs backed up to a better spot so I can use Ansible or
something to neatly rebuild my servers.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_final_thoughts&quot;&gt;Final Thoughts&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;This project was a lot of fun to do, and so far I have been enjoying SmartOS. My hope is
that it will continue to run well as it is now. I still have some fwadm work to do with
this server, get into tagging and improving my zone manifests for future deployments of
whatever I want to do. I am also hoping that my vision of this being a time saver
will be true. As other obligations keep me busy, and family, I want something that I
can let lowkey hum along in the back and check up on it when I feel like it. Since SmartOS
seems to be more rolling, this is helpful for me. Likewise too since when I update the
global zone, it also updates my native zones too.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</description>
      <pubDate>Tue, 20 Aug 2024 19:00:00 PDT</pubDate>
      <dc:creator>Courtney</dc:creator>
      <guid>https://blog.passwordclass.xyz/posts/complete-smartos-migration/</guid>
    </item>
    <item>
      <title>Pause on SmartOS</title>
      <link>https://blog.passwordclass.xyz/posts/pause-on-smartos/</link>
      <description>&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I&amp;#8217;ve been writing about doing more with SmartOS and switching to it. The more
I try it and look into it, the more I am interested in the operating system
for my personal use. I have already deployed one lighter use server with it,
and it was a pleasure. I will also be deploying one more that will likewise
be somewhat lighter use. However, I will have to pause for my own personal
server. It will be quite the job.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;What is keeping me behind is I have not been satisfied with my backup plan
on my current server. While I am migrating to SmartOS, I need to be certain
that I have good backups. When that is in a comfortable position, I will
move onward when I get some time&amp;#8230;&amp;#8203;the other element is a lack of time. :)&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;In the meantime as I correct my backups, I am also creating playbooks for
everything that I do repeatably on my server. SmartOS was an excuse for
me to beef up my Ansible playbooks for personal use. So instead of waiting,
I will do some of those in the meantime. Recently, I created a system to
sign my SSH certificates and regenerate new hostkeys for servers on creation.
I also have about completed automating SSL certificate updates with
&lt;a href=&quot;https://go-acme.github.io/lego/&quot;&gt;Lego&lt;/a&gt; and playbooks to deploy my certificates.
I also have a nearly-complete collection to handle setting up Nextcloud
in a SmartOS zone.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Writing has not been a priority, as time as filled to the top with other
projects. But hopefully I can return to this. I think I will have lost
out on my 100 days to offload so I am throwing in the towel there :(&lt;/p&gt;
&lt;/div&gt;</description>
      <pubDate>Mon, 10 Jun 2024 22:32:58 PDT</pubDate>
      <dc:creator>Courtney</dc:creator>
      <guid>https://blog.passwordclass.xyz/posts/pause-on-smartos/</guid>
    </item>
    <item>
      <title>Flair 58 Review</title>
      <link>https://blog.passwordclass.xyz/posts/flair-58-review/</link>
      <description>&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I&amp;#8217;ve been a Flair user since the beginning of my making home espresso. I started
with the Classic, got the Pro, and pre-ordered the original 58. I&amp;#8217;ve used it near
daily for the last almost 3 years now. I did just have to set it aside to put
a semi-auto machine on my coffee bar so both my wife and I could make espresso -
she didn&amp;#8217;t like coffee much up until recently - so I wanted to make a long term
reveiw of the 58.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Having the original, I have a few differences in design compared to the ones out
today. The ones I am aware of are the puck screen always being mandatory, as the
original 58 had its own shower screen in the chamber, the plunger design is
different. There&amp;#8217;s likely other features that are different.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_workflow&quot;&gt;Workflow&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;My workflow for my 58 has been to start heating it on setting 2 and then walk
away for maybe 15 minutes. I&amp;#8217;ll come back and start my kettle and heat it to
210F for medium roasts (I overshoot the water temp because it drops when I pour
it into the chamber), and as the water is heating I will start my puck prep.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;As the water gets hot I will balance my portafilter on top of my kettle to
steam the basket, since it isn&amp;#8217;t hot enough after 15 minutes. During that time
I will grind my coffee, and at that point the basket is usually warm enough
to dry it off and then prepare my basket.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I lock the the portafilter in place, pour in my hot water, then start pulling.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_clean_up&quot;&gt;Clean Up&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;My clean up involves purging the rest of the water from the chamber, dumping
out my puck, then taking my purge cup and portafilter to the kitchen sink to
clean it. Lastly, I put everything back in place for the next cup.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_my_overall_thoughts&quot;&gt;My Overall Thoughts&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I&amp;#8217;ve loved making espresso on the Flair 58 all these years. Maintenance has
been simple, I will take the plunger out of the chamber and remove the o-rings
and clean them all once every 2-3 weeks, and that&amp;#8217;s been about all it needs.
I have not needed to replace or repair anything, there isn&amp;#8217;t much to repair.
I know in the beginning there were controller failure issues, but I didn&amp;#8217;t
have that problem. Users were warned to plug/unplug the machine in the right
order, since early designs shorted out from doing this in the wrong order.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_coffee_quality&quot;&gt;Coffee Quality&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;The quality of the espresso has always been excellent. Every now and again
I found something was lacking, but couldn&amp;#8217;t figure out what. Maybe it was
the beans or the way I made my coffee, but sometimes I would get a magical
shot from a cafe using a La Marzocco and I couldn&amp;#8217;t match it. However, all
my coffee was excellent. The lever made it fun to try different techniques,
but it also saved my coffee many times. If pulling too fast or too slow,
it was always easy to manipulate the lever to get something good that probably
wouldn&amp;#8217;t have been as good on a traditional semi-auto machine.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_downsides&quot;&gt;Downsides&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;For me, the downsides were always the need to heat up the portafilter and
basket on top of my water kettle. It was never hot enough unless I let the
basket hang out over some steam for a while. Also, the constant use
of the purge cup wasn&amp;#8217;t my favorite thing either, and needing to fill up
and manage a water kettle at the same time was just an added step to my
process.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;The biggest issue though was that my wife did not want to make espresso on
it. She could, but didn&amp;#8217;t like doing the job herself. So the biggest con
to me is it is definitely a personal pleasure tool, unless others in your
house like to do the fun process of making their coffee.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_conclusion&quot;&gt;Conclusion&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I love my 58. Currently, it got set aside by a Profitec GO so my wife could
also make espresso. However, I intend on getting a new bar so I can put the
58 back on it. I love the GO, and a review will come for that.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;The Flair 58 makes coffee fun and with great results. The price is good for
what you get, and the fact that there is nearly 0 maintenance on this machine
and few parts to break is excellent. If something DOES break, it doesn&amp;#8217;t
require a technician. Flair&amp;#8217;s support is top notch in my experience and
it makes the art of good quality lever espresso achievable.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;3 years later, I would buy this machine again. And I am sad to put this machine
on the side for a season, but I can&amp;#8217;t wait to have it back for the times I want
to experiment with my coffees.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</description>
      <pubDate>Sat, 18 May 2024 11:32:15 PDT</pubDate>
      <dc:creator>Courtney</dc:creator>
      <guid>https://blog.passwordclass.xyz/posts/flair-58-review/</guid>
    </item>
    <item>
      <title>OpenBSD 7.5 on SmartOS</title>
      <link>https://blog.passwordclass.xyz/posts/openbsd75-on-smartos/</link>
      <description>&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I use OpenBSD a lot. I have 14 jails/VMs right now and 5 of them are OpenBSD.
As a part of wanting to move to SmartOS, one of my requirements is that I get
OpenBSD running on SmartOS. Since there is no image, I made it my own way following
the &lt;a href=&quot;https://docs.smartos.org/how-to-create-a-virtual-machine-from-scratch&quot;&gt;Virtual Machine from Scratch&lt;/a&gt;
docs on the SmartOS wiki.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;It makes it easy with OpenBSD 7.5 supporting EFI boot for the .iso images. I
started with using this manifest:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-json&quot; data-lang=&quot;json&quot;&gt;{
    &quot;brand&quot;: &quot;bhyve&quot;,
    &quot;alias&quot;: &quot;OpenBSD75&quot;,
    &quot;autoboot&quot;: false,
    &quot;hostname&quot;: &quot;obsd&quot;,
    &quot;resolvers&quot;: [
        &quot;9.9.9.9&quot;,
        &quot;149.112.112.112&quot;
    ],
    &quot;ram&quot;: 1024,
    &quot;vcpus&quot;: 2,
    &quot;device&quot;: null,
    &quot;nics&quot;: [
        {
            &quot;interface&quot;: &quot;vio0&quot;,
            &quot;model&quot;: &quot;virtio&quot;,
            &quot;nic_tag&quot;: &quot;admin&quot;,
            &quot;ip&quot;: &quot;dhcp&quot;,
            &quot;primary&quot;: true

        }
    ],
    &quot;disks&quot;: [
        {
            &quot;boot&quot;: true,
            &quot;model&quot;: &quot;virtio&quot;,
            &quot;size&quot;: 16384
        },
        {
            &quot;model&quot;: &quot;virtio&quot;,
            &quot;media&quot;: &quot;disk&quot;,
            &quot;path&quot;: &quot;/install75.iso&quot;,
            &quot;size&quot;: &quot;654&quot;,
            &quot;nocreate&quot;: true
        }
    ],
    &quot;bootrom&quot;: &quot;uefi&quot;,
    &quot;bhyve_extra_opts&quot;: &quot;-w&quot;
}&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;</description>
      <pubDate>Mon, 29 Apr 2024 22:05:03 PDT</pubDate>
      <dc:creator>Courtney</dc:creator>
      <guid>https://blog.passwordclass.xyz/posts/openbsd75-on-smartos/</guid>
    </item>
    <item>
      <title>SmartOS Progress</title>
      <link>https://blog.passwordclass.xyz/posts/smartos-progress/</link>
      <description>&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;A while back I briefly wrote about using SmartOS and wanting to give it a spin.
I ran short on time and excuses to try it, so I put it on the back burner, despite
wanting to get into it.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Well, great news! My dad&amp;#8217;s server died and a friend&amp;#8217;s TrueNAS CORE box needs
replacing (it is having problems too, the plugins really do suck at times).
With my dad having a timeline to meet to get a server up with a couple VMs, it was
a great time to bite the bullet on SmartOS for real. I still have plenty to learn,
but I believe now I have a good server ready to go with the 2 VMs he needs.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_the_server&quot;&gt;The Server&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;It&amp;#8217;s just an old beater HP i3 desktop with 2 cores, 4 threads and 6GB RAM, and
we stuck in an SSD that we will do a mirrored zpool on later.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I installed SmartOS to a flash drive and set it up. This server only has 2 functions:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;olist arabic&quot;&gt;
&lt;ol class=&quot;arabic&quot;&gt;
&lt;li&gt;
&lt;p&gt;A UISP server - so I pulled down Debian 12 for that&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;OpenBSD wireguard VM - so I did the process to install from iso&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I&amp;#8217;ll write later on what I did to install OpenBSD 7.5.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_ansible&quot;&gt;Ansible&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I use Ansible at work and always wanted to get it up for home use. I finally
pulled the trigger and have a couple roles and such to manage setting up servers
with SSH and adding users. I&amp;#8217;ll add more as time goes on, but this is all these
two servers need as far as Ansible goes right now.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Everything is running well right now, I am quite pleased with the end result.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_last_steps&quot;&gt;Last Steps&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I need to get this server out to its destination, finish the UISP setup, connect
clients to the VM at its new destination, and then pair up the Ubiquiti devices
with the UISP server, and then this should be good to roll for now. There&amp;#8217;s lots
of changes happening AROUND this server, which I will get to at some point.
I will also probably get a DNS server on this too and use a zone-dataset fixed
up with that and run unbound on it or something.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;This is a good start for me. Next steps will be to move onto the next server
and migrate my friend&amp;#8217;s Nextcloud to a zone-dataset, and I think he wants an
Immich server too, plus some sort of local DNS as well. But yeah, overall
quite pleased, more to come as I set these boxes up and go into more detail.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;#100DaysToOffload #Post11&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</description>
      <pubDate>Mon, 29 Apr 2024 22:00:07 PDT</pubDate>
      <dc:creator>Courtney</dc:creator>
      <guid>https://blog.passwordclass.xyz/posts/smartos-progress/</guid>
    </item>
    <item>
      <title>From Nextcloud Photos to Immich</title>
      <link>https://blog.passwordclass.xyz/posts/from-nextcloud-photos-to-immich/</link>
      <description>&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Lately I&amp;#8217;ve been growing a little disappointed with Nextcloud&amp;#8217;s offering.
I&amp;#8217;ve been running it since its first release, and overall it has been
a great piece of software. However, lately I&amp;#8217;ve encountered issues like
sometimes the desktop client won&amp;#8217;t use secret service (and there&amp;#8217;s been
lots of yelling about this on GitHub with 0 developer response), Nextcloud&amp;#8217;s
pursuit for new shiny stuff like AI without fixing the core software,
and lastly, utterly breaking core software in big ways and shipping it anyway.
So, I&amp;#8217;ve been looking to replace components of Nextcloud since there isn&amp;#8217;t
exactly a one-to-one replacement for it.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;My first shot is at photos. This has actually been a pain point already.
I was frustrated when Nextcloud seriously broke Photos 2.0 in Nextcloud 26.
It was broken until a later release and I had to get over it. I switched to
using Memories, which is actually incredibly awesome and should just replace
what Nextcloud has, but the big problem is with albums.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Albums are great. Nextcloud doesn&amp;#8217;t make it easy to sync any of that. Also,
if my family is mainly phone users, as they are, I can&amp;#8217;t tell them to pull
out a laptop and go and add pictures to albums. They don&amp;#8217;t do that. But,
if they could from their phones, they could, and likely would, collaborate
on family albums. After playing with Piwigo some, I settled on Immich.
Piwigo is also very good, and it settled my strong desire to run my software
on FreeBSD and not use Docker, but Immich is just too cool.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_whats_cool_about_immich&quot;&gt;What&amp;#8217;s Cool About Immich?&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Here&amp;#8217;s a nice bullet point list of what I like:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;ulist&quot;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Don&amp;#8217;t have to do community albums to allow single users to have their own photo syncing&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Web UI is nicer&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Administration is straightforward&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;A stupid amount of picture recognition stuff out of the box&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Pretty maps for geotagged photos&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Transcoding&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Easy album sharing&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Lots of search options, like searching for a mountain, my wife, a plane&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Sync photos from my phone&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;OIDC support - this will be fun maybe&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_how_i_am_attempting_this&quot;&gt;How I Am Attempting This&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;At first I started with the idea of cloning my ZFS dataset with my Nextcloud data,
adding it to Immich, and deleting the other surrounding documents since a lot of
the storage is taken up in photos and videos from our phones. However, I noticed that
Immich copies the files into a library. So, that would mean importing and then deleting
all the data in the dataset pretty much. Not super effective.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;sect2&quot;&gt;
&lt;h3 id=&quot;_what_i_want&quot;&gt;What I Want&lt;/h3&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I don&amp;#8217;t like having big data tied up in a disk image. That&amp;#8217;s also not useful for me
with the way I do backups. So, how from a FreeBSD box do I take data from dataset
A, and import it into dataset B from a Linux (Debian 12) virtual machine?&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;olist arabic&quot;&gt;
&lt;ol class=&quot;arabic&quot;&gt;
&lt;li&gt;
&lt;p&gt;Create the VM&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;ZFS clone my Nextcloud dataset and set it up for an NFS mount&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Create a new ZFS dataset and NFS mount it: this is will be the end destination&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Create a docker user and spin up Immich&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Mount both NFS filesystems&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Use immich cli to upload my Nextcloud camera rolls&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;When done, delete the old NFS mount and dataset&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;This process has the added bonus of letting me upload to both Nextcloud and Immich
while I get things in order.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_im_still_in_the_middle_of_this&quot;&gt;I&amp;#8217;m Still in the Middle of This&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I am still moving data as I speak. I am kicking the tires on only my user at this moment,
but if I get it all working right, I&amp;#8217;m sliding the family over.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;My biggest concerns at this moment are how well will the iOS app sync? And, will the app
pick up where I left off in my photos and not make me have to upload my whole entire
library? That would be a huge pain.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_first_attempt&quot;&gt;First Attempt&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;My first attempt was messy. I did what I described in &quot;What I Want&quot; but it is a lot of work
for many users, and I ran into some roadblocks with the features currently present in Immich.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;First, I can&amp;#8217;t tell the iOS app to start backing up my photos from NOW. It has to do everything.
Secondly, I converted all my files to jpg with Nextcloud, Immich operates on the HEIC files.
This means I have to sync everything because the file hashes will not match.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;So, I used the immich cli to import my Nextcloud photos, then uploaded all my pictures on
my phone with Immich. This left me with duplicates for HEIC and jpg files. To alleviate this,
I thought to change the Storage Template to be the same thing, applied that template to my
existing files, then uploaded the images on my phone. This meant the file names were identical, minus
the HEIC and jpg. I looked for all the HEIC files I had and removed the equivalent files named jpg&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;for f in $(find /mnt/nfs/library/library -type f -name &quot;*.HEIC&quot;); do
   jpg_file=&quot;$(echo $f | sed &#39;s/.HEIC/.jpg/g&#39;)&quot;
   rm $jpg_file
done&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Then I had to remove these files from the database. This required I exec into the postgresql
container and run some commands on the database. I took the orphans.json file that Immich
provides in the Repair page, having only the Offline Paths entries. I pulled out the entityIDs
and stuck them into a file, which I then ran a for loop on to delete the entries that matched&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;for entry in $(cat /entityIds.txt); do
	psql -d immich -c &quot;DELETE FROM ASSETS WHERE id=&#39;$entry&#39;;&quot;
done&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;After that, I had a bunch of untracked files to clear out, since they&amp;#8217;re all thumbnails
and what not that were generated for those images. So I downloaded the untracked.txt again,
this time putting it in the immich-server container. I didn&amp;#8217;t have to do any grepping or awk,
it was already in a nice format. SO I ran a somewhat similar command as before&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;for file in $(cat /untracked.txt); do
	rm $entry
done&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I did a refresh on the repair page to make sure it was all cleared out.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_next_steps&quot;&gt;Next Steps&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I got my family on Immich for now. It will be a job to move their old stuff over, but I think my
next attempt will be to match time info in the filenames between Nextcloud and Immich, and
if the time info matches, it is probably the same file. If that file does not exist in immich,
then upload it.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;After that, at a much later date, I&amp;#8217;ll clean out all the Nextcloud data.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;This will probably be a &quot;do this over months&quot; project, especially since I have family on
Nextcloud that isn&amp;#8217;t in the area, so I have to migrate them when they get here.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Anyway, this is a big job. It could have been easily solved if I could backup the camera
roll from NOW. But, so far I still find Immich worth it. I do have my first upgrade coming
up. Lots of irons in the fire right now though&amp;#8230;&amp;#8203;I&amp;#8217;m also super duper behind on my
100 days to offload :)&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;#100DaysToOffload #Post10&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</description>
      <pubDate>Mon, 29 Apr 2024 21:30:46 PDT</pubDate>
      <dc:creator>Courtney</dc:creator>
      <guid>https://blog.passwordclass.xyz/posts/from-nextcloud-photos-to-immich/</guid>
    </item>
    <item>
      <title>Pondering Leaving Nextcloud</title>
      <link>https://blog.passwordclass.xyz/posts/pondering-leaving-nextcloud/</link>
      <description>&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I&amp;#8217;ve been using Nextcloud since its first release in 2016. It has been fun to
watch it grow and improve over all these years. I sometimes hear people complain
about how difficult it is to maintain, or it breaking and such. However for me,
8 years later, it has been incredible and put up with a lot from me.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I started using Nextcloud on a Raspberry Pi 2 with a 32GB flash drive for
storage, a Raspbian 8(?) LAMP stack. Then I got the Nextcloud Box and upgraded
it to 1TB storage, then moved to an Ubuntu 16.04 server in an LXD container,
then to a FreeBSD 11.1 server in an iocage jail, changed from Apache2 to nginx,
changed from MariaDB to PostgreSQL, upgraded hardware again in there, moved
it to a hand-spun jail, and now to today. I have run it on all sorts of configurations
and over all of it, it has worked. Until recently.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Over time, I have watched the scope of Nextcloud grow broader and broader. I don&amp;#8217;t
blame them though. It is a great one stop shop and pluggable. However, I have
recently seen core parts of Nextcloud languish. With Nextcloud 25, Photos 2.0
was released. And it was a horrible launch. Every feature that was touted in
the marketing was entirely broken. It really took until Nextcloud 27 for it to
feel adequate, but still not impressed. In 28, Files got a facelift. However,
still, core functionality is broken. When creating new files/folders it just sticks
with &quot;New Folder&quot; or whatever, requiring extra clicks, even having to go to the &quot;Rename&quot;
option to rename it from the default, where before I could just create new and type
the name. I can no longer download files in bulk. It pops open a new tab and does
nothing. The nextcloud client only seems to behave well for me with kwallet,
and does not work with any other secret service for me. I noticed that there were
multiple issues open on GitHub, all of which had received 0 developer response.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I have been seeing a trend. A focus on new shiny features with big promises and
hugely under delivering. I can never trust E2EE after its debut years ago,
Guests was a promised feature at one point that still does not exist, all their
efforts to polish existing core software has left them in a condition with all
sorts of bugs at release. Really, a release that should not have happened at all.
I am experiencing too many bugs today to be comfortable with Nextcloud like I
had been for years. So, it is time I consider new pastures.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_so_onto_what&quot;&gt;So, Onto What?&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I really only use Nextcloud for a small set of things:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;ulist&quot;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Files&lt;/p&gt;
&lt;div class=&quot;ulist&quot;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Sharing with people on the server, and via public links&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Versioning&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Desktop sync client&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Photos&lt;/p&gt;
&lt;div class=&quot;ulist&quot;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Syncing from my phone&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;sharing with friends/family&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Allowing family/friends WITHOUT accounts to upload&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Albums&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;CalDAV/CardDAV&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Kanban (kinda)&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;So, all my options aren&amp;#8217;t 100% solidified, but here is where I plan on going.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;sect2&quot;&gt;
&lt;h3 id=&quot;_files&quot;&gt;Files&lt;/h3&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;If I didn&amp;#8217;t do file sharing, I would have gone with syncthing. I used it for a long
time before I switched to Nextcloud. Maybe I will look at it again, but I also have
to consider that I am wanting strangers to possibly have an upload spot without installing
a client, as well as sharing with family on the server. I don&amp;#8217;t think Syncthing does
any of this, but it also has been many years since I looked at the project.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Really, I see myself possibly using Owncloud OCIS. It does files. Done. Neat. The UI
is familiar too. I&amp;#8217;ve poked at it with a stick over the years, and I have a feeling
it is good enough for me to do this job. Hopefully the desktop client is still good.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect2&quot;&gt;
&lt;h3 id=&quot;_photos&quot;&gt;Photos&lt;/h3&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;If you&amp;#8217;ve read my posts, you&amp;#8217;ll probably know that I have basically 0 Linux servers
in my house. It&amp;#8217;s FreeBSD or OpenBSD (or maybe even SmartOS soon, time will tell).
I&amp;#8217;m not AGAINST Linux, I just like running those operating systems from a management
and design perspective. However. I was recommended Immich. Even worse, it basically
requires I use something like Docker which 99% of the time I refuse to even consider
using&amp;#8230;&amp;#8203;.but Immich struck that 1% chance. It is still in active development and
they have warning signs saying thar be dragons. But I have ZFS snapshots to save
the day if something goes south.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Immich is just&amp;#8230;&amp;#8203;awesome. It does everything I wished Nextcloud could do, but couldn&amp;#8217;t.
I don&amp;#8217;t like Nextcloud albums. I like Memories, but one fatal flaw has been that album
sharing and all that really requires being on a computer. I tried making it a PWA on my phone,
it didn&amp;#8217;t bode very well. Immich still has some work to be done for it to be that
golden program for me, but it is so good that I am pressing on. I&amp;#8217;ll be writing soon
about migrating from Nextcloud to Immich. It isn&amp;#8217;t easy. But I will make it work!&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect2&quot;&gt;
&lt;h3 id=&quot;_caldavcarddav&quot;&gt;CalDAV/CardDAV&lt;/h3&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;This was THE feature that got me onto Nextcloud in 2016. I noticed a project called
Radicale, and I will be using that. No one in my family uses the Nextcloud Calendars
app (which, also has had all sorts of problems, forgot to mention that). We use our
phones or Thunderbird to manage calendars. So this will be easy to replace.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect2&quot;&gt;
&lt;h3 id=&quot;_kanban&quot;&gt;Kanban&lt;/h3&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I use Deck. Deck is awesome. But I don&amp;#8217;t need it. In fact, where I do use it is on
the work&amp;#8217;s Nextcloud server, and I am all good with keeping my server at work on Nextcloud.
It has served its purpose for us very well there.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_moving_onward&quot;&gt;Moving Onward&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Nextcloud has served me very well over the years. I still don&amp;#8217;t know if I will
be dropping Files and Cal/CardDAV for other software. I also have to consider
my family who has also been using this. I also have to consider my own time
managing all this. But I think I am ready to move on.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;The last bit I am interested in possibly is setting all this up with a Keycloak
server. Only Radicale doesn&amp;#8217;t seem to support some sort of SSO, but they suggest
I can do this at the web server level. This could be that nice &quot;bow on top&quot;
piece here, but I may not care either, since I have all my family using
password managers.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;So yeah, let&amp;#8217;s see where this goes. I have another post lined up on my migration
from Nextcloud photos &amp;#8594; Immich experience. I actually started with that before
this post, but I have more to add to that.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;#100DaysToOffload #Post9&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</description>
      <pubDate>Wed, 10 Apr 2024 20:26:58 PDT</pubDate>
      <dc:creator>Courtney</dc:creator>
      <guid>https://blog.passwordclass.xyz/posts/pondering-leaving-nextcloud/</guid>
    </item>
    <item>
      <title>Pork Top Loin and Mushrooms</title>
      <link>https://blog.passwordclass.xyz/posts/pork-top-loin-and-mushrooms/</link>
      <description>&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I&amp;#8217;ve only written tech stuff here, but I wanted to share a good recipe that I
threw together for dinner tonight. It&amp;#8217;s a pork top loin chop from Costco with
buttery garlic mushrooms, and a white wine pan sauce. I made 2 loins for my wife and myself.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_ingredients&quot;&gt;Ingredients&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;This is only an approximation, I throw stuff together on the fly.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;The meat:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;ulist&quot;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;2 pork loins&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Salt and pepper&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Avocado or olive oil&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;The mushrooms:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;ulist&quot;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Button mushrooms - about 4-6oz&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;4 cloves of garlic&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;2Tbsp unsalted butter&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Salt and pepper&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;The sauce:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;ulist&quot;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;White wine - I had a chardonnay, maybe 3 fl oz? A good splash and glug.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;2Tbsp unsalted butter&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;1-2 cloves of garlic&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Heavy cream - just under 1/4 cup&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Thyme (I had dried)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Salt and pepper&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_cooking_the_meat&quot;&gt;Cooking the Meat&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;olist arabic&quot;&gt;
&lt;ol class=&quot;arabic&quot;&gt;
&lt;li&gt;
&lt;p&gt;Take the pork out, pat it dry and apply a generous amount of salt to all sides&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Let sit on the counter for about 30 minutes&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;While resting the meat, get a cast iron skillet and put it in a 250F oven for that 30 minutes&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Cook the meat about 25 minutes, or until it hits 110-115F&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Just before the meat is ready to come out, get a stainless steel skillet and put it on medium heat&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Put 2Tbsp of oil in the skillet and bring it up to temp, and put the meat in the new skillet&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Cook on all sides to get it golden brown and delicious&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Cook until it reaches 145F internally&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Set the meat aside on a wire rack&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_the_mushrooms&quot;&gt;The Mushrooms&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;With the skillet fresh out of the oven, put it on the burner at about medium heat&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;olist arabic&quot;&gt;
&lt;ol class=&quot;arabic&quot;&gt;
&lt;li&gt;
&lt;p&gt;Add in some butter and let it melt and warm up&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Add the sliced mushrooms&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Add some salt and a lot of black pepper&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;When 3/4 of the way done, add more butter, then add minced garlic&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Cook on medium-low to let the garlic slowly cook and not burn&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;When the mushrooms are done, I took my pork and put it back in the skillet to keep it warm. Set the burner to the lowest setting&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_the_pan_sauce&quot;&gt;The Pan Sauce&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;olist arabic&quot;&gt;
&lt;ol class=&quot;arabic&quot;&gt;
&lt;li&gt;
&lt;p&gt;With the meat out, set the heat to medium-low&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Add 1Tbsp of butter, let it melt, and add the minced garlic&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Once lightly brown and fragrant, dump in the white wine to deglaze the pan&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Scrape the meat off the bottom, turn up the heat a little to maintain a simmer&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Add a bunch of black pepper and some thyme, a few good shakes of it&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;I also dumped in the drippings from the pork as it sat on the wire rack&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;When the wine is reduced some, about half the amount of liquid gone, add the heavy cream&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Lower the heat a little and bring the cream up to temp, just a couple minutes of stirring&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Turn the heat down and add the butter and melt it in&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Check the seasoning for anymore salt or pepper&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_serving&quot;&gt;Serving&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Put the meat on a plate, load some of the mushroom on top, and drown it all in the pan sauce.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Enjoy.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;#100DaysToOffload #Post8&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</description>
      <pubDate>Wed, 03 Apr 2024 23:03:17 PDT</pubDate>
      <dc:creator>Courtney</dc:creator>
      <guid>https://blog.passwordclass.xyz/posts/pork-top-loin-and-mushrooms/</guid>
    </item>
    <item>
      <title>Trying SmartOS</title>
      <link>https://blog.passwordclass.xyz/posts/trying-smartos/</link>
      <description>&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Today, I am going to try something very different. I am going to give TRITON SmartOS
a shot.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;A number of years back, I tried OmniOS and loved it. But I wasn&amp;#8217;t ready to move to it
or anything. After trying out some of the Solaris zone and SMF stuff, I was hooked.
It was really cool tooling to use and felt thought out.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Now again, I am going to try again, but with SmartOS. I found the idea of running the
OS off a flash drive interesting. Rotating flash drives for my updates and clearing up
my SSDs for JUST zones is a cool idea. Especially since I don&amp;#8217;t have any more cables
in my server to add anymore drives :)&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;If I like it, I may even try moving my 7 year FreeBSD installation to SmartOS. I really
like the idea of the zone manifests and all the other cool management stuff I can do,
and possibly even integrating it all with Ansible, which I use a lot at work. Now I
have a nice place to integrate it all in with, perhaps.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I have an installation already with data on an external USB drive. I think I should
just be able to plug that into the computer, plug in my flash drive, and pick up where
I left off before. If I like it enough, this is how I imagine moving to SmartOS would look like.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Right now, I have FreeBSD 14.0 installed on a mirrored zpool that has my jails and VMs.
I have a RaidZ1 pool with a few VMs and all my data. My imagined steps would go like:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;olist arabic&quot;&gt;
&lt;ol class=&quot;arabic&quot;&gt;
&lt;li&gt;
&lt;p&gt;Try out SmartOS and get acquainted with it on my flash drive/extra USB external drive&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If I like it, detach an SSD from my mirrored zpool&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Start from the ground up, making the new SSD my zones drive&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Build new SmartOS zones on top to replace what my jails do, and probably a Linux one to get Plex on there&lt;/p&gt;
&lt;div class=&quot;admonitionblock note&quot;&gt;
&lt;table&gt;
&lt;tr&gt;
&lt;td class=&quot;icon&quot;&gt;
&lt;div class=&quot;title&quot;&gt;Note&lt;/div&gt;
&lt;/td&gt;
&lt;td class=&quot;content&quot;&gt;
I prefer FreeBSD for Plex, but I like the idea of mounting ZFS datasets into a jail/zone like I am now, and LX zones will let me keep that.
&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Since FreeBSD and SmartOS use bhyve, I would test moving some VMs over one at a time&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If all looks good:&lt;/p&gt;
&lt;div class=&quot;olist loweralpha&quot;&gt;
&lt;ol class=&quot;loweralpha&quot; type=&quot;a&quot;&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;zpool export&lt;/code&gt; my data zpool&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;move my flash drive and SSD to my server&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Import the data zpool&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Map my zpool datasets to my new zones and get it all running&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Clean up anything that needs cleaning&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Clean my extra SSD and then attach it to the new zones zpool&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;By then, FreeBSD should replaced with SmartOS.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;What is my motivation? Just to do something fun and different. After running FreeBSD for 7 years,
I&amp;#8217;ve grown a bit bored with it just working all the time :) I like to try new things still and
build new things, and SmartOS checks all the boxes of different, interesting, and has a lot of
the things I like about FreeBSD like ZFS and bhyve, and then some. It&amp;#8217;s time to mix it up some
on my own servers. Some of my motivations include:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;ulist&quot;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Freeing up my internal drives since SmartOS is designed to run from a flash drive&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;SMF and Crossbow are really cool. These management tools are great&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;To my understanding, Type 1 hypervisors are a little more performant&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;zone manifests are neat. And with existing Ansible collections for this stuff, I can more easily automate some of my server deployments&lt;/p&gt;
&lt;div class=&quot;ulist&quot;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Also, being able to pass in some init commands with the &lt;code&gt;customer_metadata&lt;/code&gt; stuff to install SSH keys or run cloud-init or what have you is neat&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;pkgsrc has also been a cool feature to me, and I like seeing it used here&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I think there&amp;#8217;s a lot to like. And, this may be an odd view from the perspective of an outsider
looking in, but when I see some of what Illumos has, it looks like an OS from the future, but
also in other ways, like hardware support, an OS of the past. So, it&amp;#8217;s all just interesting to
me and I can&amp;#8217;t wait to play with it more, jot down my thoughts, and see if I really do decide
to commit to it. If I don&amp;#8217;t replace FreeBSD on my server, I at least know I can say I tried
out a very interesting operating system.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;#100DaysToOffload #Post7&lt;/p&gt;
&lt;/div&gt;</description>
      <pubDate>Mon, 25 Mar 2024 22:32:40 PDT</pubDate>
      <dc:creator>Courtney</dc:creator>
      <guid>https://blog.passwordclass.xyz/posts/trying-smartos/</guid>
    </item>
    <item>
      <title>Hebrew and Greek With asciidoctor-pdf</title>
      <link>https://blog.passwordclass.xyz/posts/hebrew-and-greek-asciidoctor-pdf/</link>
      <description>&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I was tasked with trying to get both Hebrew and Greek to be readable with
&lt;a href=&quot;https://asciidoc.org/&quot;&gt;Asciidoc&lt;/a&gt;, primarily for epub and PDF, but I also wanted
to try with HTML too. Both HTML and epub worked great, but I had troubles with
getting it to work with PDFs.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_installation&quot;&gt;Installation&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I&amp;#8217;m on OpenBSD, but there are similar steps. In fact, I also did this on Linux
and the steps were pretty similar. First I had asciidoctor installed on my computer:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;pkg_add asciidoc asciidoctor&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;This also installed ruby, but if not for you, install that so you can get the gem
package manager. Here is how I installed asciidoctor-pdf and asciidoctor-epub&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;gem32 install --user asciidoctor-pdf&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;On OpenBSD I have to specify gem32.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;NOKOGIRI_USE_SYSTEM_LIBRARIES=1 gem32 install --user asciidoctor-epub3&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;That&amp;#8217;s all is needed to make HTML, PDF, and epub.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_html_output&quot;&gt;HTML Output&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;HTML output didn&amp;#8217;t need any work. I just had my source content which contained
English, Hebrew, and Greek.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;asciidoctor myfile.adoc&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Done. I now had a single HTML page.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_epub_output&quot;&gt;EPUB Output&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;This one contains some extra metadata in the document to make it work&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-adoc&quot; data-lang=&quot;adoc&quot;&gt;:doctype: book
:author: Author Name Here
:copyright: CC0
:epub-chapter-level: 2
:toc:
:media: print&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Then I ran the command to get an ebook&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;asciidoctor-epub332 myfile.adoc&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;That generated the epub file, looks great, renders all languages great.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_pdf_output&quot;&gt;PDF Output&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;This one was tricky. I guess the HTML uses FontAwesome, maybe the epub tool does
too, but the PDF tool handles it differently. I was suggested to get
&lt;a href=&quot;https://www.sbl-site.org/educational/BiblicalFonts_SBLBibLit.aspx&quot;&gt;Society of Bible Literature&amp;#8217;s&lt;/a&gt;
TTF font file. I had to modify the theme to make it use this font. In the
working directory where my adoc file is, I created this yaml file:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-yaml&quot; data-lang=&quot;yaml&quot;&gt;extends: default

font:
  catalog:
    merge: false
    SBL BibLit:
      normal: /path/to/Documents/mypdf/fonts/SBL_BLit.ttf
      bold: /path/to/Documents/mypdf/fonts/SBL_BLit.ttf

base:
  font-family: SBL BibLit&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I called the file &lt;code&gt;mytheme-theme.yml&lt;/code&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I also created a fonts directory and placed the downloaded ttf file there.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;admonitionblock note&quot;&gt;
&lt;table&gt;
&lt;tr&gt;
&lt;td class=&quot;icon&quot;&gt;
&lt;div class=&quot;title&quot;&gt;Note&lt;/div&gt;
&lt;/td&gt;
&lt;td class=&quot;content&quot;&gt;
These fonts do not support italics, so it is vital to avoid styling that will put Greek/Hebrew texts in italics, such as quote blocks with &lt;code&gt;----&lt;/code&gt;. Use ____ (4 underscores) instead.
&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;The header metadata is also very similar to the epub&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-adoc&quot; data-lang=&quot;adoc&quot;&gt;:doctype: book
:author: Author Name Here
:copyright: CC0
:epub-chapter-level: 2
:toc:
:media: print
:pdf-page-margin: [0.5in, 0.25in]&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;You should be able to run this command now to generate the PDF:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;asciidoctor-pdf32 --theme mytheme-theme.yml -a pdf-fontsdir=/path/to/Documents/mypdf/fonts test.adoc&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;#100DaysToOffload #Post6&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</description>
      <pubDate>Wed, 13 Mar 2024 17:29:34 PDT</pubDate>
      <dc:creator>Courtney</dc:creator>
      <guid>https://blog.passwordclass.xyz/posts/hebrew-and-greek-asciidoctor-pdf/</guid>
    </item>
    <item>
      <title>i3 Fix Firefox Alerts</title>
      <link>https://blog.passwordclass.xyz/posts/i3-fix-firefox-alerts/</link>
      <description>&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Somewhere around Firefox 120/121 I noticed my Firefox notifications were getting
messed up. At first I didn&amp;#8217;t see them, then I realized they were transparent and
would freeze the part of the screen where the notification would appear until it
eventually faded away. But It was hard to know when that was, so I would have to
reload i3 constantly when I needed to access that part of the screen since I
didn&amp;#8217;t have any sort of &lt;code&gt;x&lt;/code&gt; button to close out.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_the_fix&quot;&gt;The Fix&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Enter Firefox 123. Not sure what they changed, but in version 123 notifications
started to pop up again&amp;#8230;&amp;#8203;and tile. So I would have half my screen tile out of
nowhere because i3 treated it as a regular window. I was able to quickly run
&lt;code&gt;xprop&lt;/code&gt; and get the window&amp;#8217;s information. I decided the best method in my case
was to modify how i3 (I should note: version 4.23) treated &quot;alert&quot; windows as
this is what the window role popped up as. So I added these two lines to my
i3 config file:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-conf&quot; data-lang=&quot;conf&quot;&gt;for_window [window_role=&quot;alert&quot;] floating enable
no_focus [window_role=&quot;alert&quot;]&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;This made the alert windows float, and not focus since these windows were
also drawing focus.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;After that, things seem to be back to normal.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;#100DaysToOffload #Post5&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</description>
      <pubDate>Mon, 26 Feb 2024 16:30:36 PST</pubDate>
      <dc:creator>Courtney</dc:creator>
      <guid>https://blog.passwordclass.xyz/posts/i3-fix-firefox-alerts/</guid>
    </item>
    <item>
      <title>Ploopy Adept Initial Review</title>
      <link>https://blog.passwordclass.xyz/posts/ploopy-adept-initial-review/</link>
      <description>&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;The other day, I received my Ploopy Adept in the mail, after having waited since
mid-December when I placed my preorder. I have been a trackball user for a few
years now, mainly having used the Elecom HUGE and the Kensington Orbit Fusion.
The Kensington was awesome, but the angle was a bit too steep for my wrists. The
Elecom has been my favorite by far, but the stock bearings caused me a lot of grief
with the insane amount of stiction. I eventually switched the bearings to chrome
plated steel ball bearings and those worked wonderfully. However, with how much I
use the trackball, about every 6-8 months I had to swap the bearings. No fun.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Enter: the Ploopy devices.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I&amp;#8217;ve eyeballed these trackballs for a couple years now, but was never ready to
settle on one. Plus, I wanted something with a couple more buttons. The ploopy
had all I wanted:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;olist arabic&quot;&gt;
&lt;ol class=&quot;arabic&quot;&gt;
&lt;li&gt;
&lt;p&gt;A good price&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;some extra buttons (6)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;I wanted to try out a blade-style trackball&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Now below are some of my initial thoughts on this trackball, after having used
it only a couple days so far. I will have something more in-depth later&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_whats_nice&quot;&gt;What&amp;#8217;s Nice&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I ordered mine in black and with a red ball. Looks great. I like bright colors,
but I am also easily distracted and liked the more utilitarian look of just black
and red. However, I think it is really cool that they have so many different color
options.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;imageblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;img src=&quot;https://blog.passwordclass.xyz/images/ploopy_adept.jpg&quot; alt=&quot;Ploopy Adept&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect2&quot;&gt;
&lt;h3 id=&quot;_stiction&quot;&gt;Stiction?&lt;/h3&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;None to speak of. The ball glides so well. I&amp;#8217;ve never had a trackball that felt
so good in terms of ball movement. It is taking some getting used to honestly.
The roller bearings feel great too. They are here to stay.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect2&quot;&gt;
&lt;h3 id=&quot;_button_quality&quot;&gt;Button Quality&lt;/h3&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;The 6 buttons on this trackball feel great. Nice and clicky, not mushy, not
hard to press down either. They feel durable, and like they will last.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect2&quot;&gt;
&lt;h3 id=&quot;_ergonomics&quot;&gt;Ergonomics&lt;/h3&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;This is subjective and I think depends on who you are. I like this shape and
design. It does feel nice. The buttons above the ball are a little hard to reach,
but no surprise there with the ball pretty well in the way.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect2&quot;&gt;
&lt;h3 id=&quot;_the_chassis&quot;&gt;The Chassis&lt;/h3&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I was expecting the chassis to feel like it was 3D printed, but it is actually
nice and smooth. And it has some of the lines from the printing so it has some
character to it, so I can have my cake and eat it too.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_whats_not_nice&quot;&gt;What&amp;#8217;s Not Nice&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;So far, can&amp;#8217;t say much negative about it. They suggest that you use Via to
customize the buttons and such for this trackball. I was shocked that making
changes were instant. The downside though is I don&amp;#8217;t see any option to adjust
my DPI, and I would have preferred the drag scroll (nice feature by the way)
to be an on button press, not holding down the button.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;The default layout doesn&amp;#8217;t feel all that good either, I arranged the default
keys around and that was good to my taste. Again, subjective.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;sect2&quot;&gt;
&lt;h3 id=&quot;_modifying_this_on_linux&quot;&gt;Modifying This on Linux&lt;/h3&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;This is where it was a bit odd. I couldn&amp;#8217;t find any information on how to
modify this mouse&amp;#8217;s layout except on Reddit I think. To use Via, I needed
to use a chromium browser, but by default on Linux you have to find the device
from the command line and &lt;code&gt;chmod a+rw&lt;/code&gt; that device. I had to find which device
it was using in chromium&amp;#8217;s log. In my case, it was &lt;code&gt;/dev/hidraw6&lt;/code&gt;. After
adjusting permissions, I could use Via. Then afterwards I reset it back to &lt;code&gt;0600&lt;/code&gt;.
I think that some newer Linux users who are using this mouse won&amp;#8217;t like having
to enter a console and chmod the device after finding it to modify the layout.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_what_i_want&quot;&gt;What I Want&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I&amp;#8217;m not very creative with fancy custom layouts, but what I would like to
be able to do easily is&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;ulist&quot;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Adjust the DPI - it&amp;#8217;s too fast for my taste out of the box&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;have drag scroll be toggle feature, not hold&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;allow different functionality if I am holding or pressing a button&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;For the last point, I could see myself saying &quot;on click for the bottom right button,
enable drag scroll. On hold, enter layer 2&quot;. Or even vise-versa. I am pretty
sure that is something that can be done in QMK&amp;#8230;&amp;#8203;my Ergodox EZ does that
sort of stuff anyway, which is also a QMK board. So perhaps those features are
there. However, I recall seeing I will have to disassemble my Adept if I
want to make these changes.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_conclusion&quot;&gt;Conclusion&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Overall, I give this trackball a 9/10 on initial use and a couple days in.
I really love how this mouse feels. The more I get used to it, the better
it is. And lastly, maybe some of my nitpicks are easily addressable, or
maybe not. I&amp;#8217;m really not sure. But I am hoping that my couple requests are
possible. If not, I think I will just get used to these things and still be
a happy user. Thank you for the great device!&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;#100DaysToOffload #Post4&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</description>
      <pubDate>Mon, 19 Feb 2024 18:16:13 PST</pubDate>
      <dc:creator>Courtney</dc:creator>
      <guid>https://blog.passwordclass.xyz/posts/ploopy-adept-initial-review/</guid>
    </item>
    <item>
      <title>My Dumb Roasting Script</title>
      <link>https://blog.passwordclass.xyz/posts/my-dumb-roasting-script/</link>
      <description>&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I roast coffee at home regularly. I haven&amp;#8217;t updated my &lt;a href=&quot;https://blog.passwordclass.xyz/coffeeroasts/&quot;&gt;roasting log&lt;/a&gt;,
I need a more lazy man approach to converting it all nicely. But I still
do roast, and I use the neatest, dumb script ever..which I know works on OpenBSD
and Linux. And it&amp;#8217;s public domain&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;#!/usr/bin/env sh

COFFEEDIR=&quot;$HOME/Documents/coffeeroasts&quot;

echo &quot;Coffee country of origin?&quot;; read origin
mkdir -p &quot;$COFFEEDIR/$origin&quot;

filecount=$(ls &quot;$COFFEEDIR/$origin&quot; | wc -l | xargs)

start_timer()
{
	terms=&quot;xterm konsole gnome-terminal xfce4-terminal mate-terminal rxvt urxvt xterm-256color&quot;
	if [ $(command -v xterm) ]; then
		xterm -e sh ./timer.sh &amp;amp;
	elif [ $(command -v gnome-terminal) ]; then
		gnome-terminal -- sh ./timer.sh &amp;amp;
	fi
}

seconds_to_ts()
{
	TIME=$1
	if [ $(uname | grep -c &quot;BSD&quot;) -eq 1 ]; then
		date -u -r $TIME +%T
	elif [ $(uname) = &quot;Linux&quot; ]; then
		date -d @${TIME} +%T
	fi
}

configure_roast()
{
	echo &quot;What is the coffee&#39;s name?&quot;; read coffeename
	dirname=$(echo $coffeename | sed &#39;s/ /_/g&#39;)
	roastdir=&quot;$COFFEEDIR/$origin/$dirname&quot;
	mkdir -p &quot;$roastdir&quot;
}

write_details()
{
	START=&quot;$1&quot;
	DETAILS=&quot;$2&quot;
	FILE=&quot;$3&quot;

	#timefromstart=$(($(date +%s) - $START))
	timefromstart=$(expr $(date +%s) - $START)
	#printtime=$(date -u -r $timefromstart +%T)
	printtime=$(seconds_to_ts $timefromstart)
	echo &quot;$printtime $DETAILS&quot;
	echo &quot;$printtime $DETAILS&quot; &amp;gt;&amp;gt; &quot;$FILE&quot;
}


calculate_phases()
{
	START=&quot;$1&quot;
	ROASTFILE=&quot;$2&quot;

	drop=$(grep &quot;TAG:DROP&quot; &quot;$ROASTFILE&quot; | awk &#39;{print $3}&#39;)
	#roasttotal=$((($drop - $START)))
	roasttotal=$(expr $drop - $START)

	drystart=$(grep &quot;TAG:DRY&quot; &quot;$ROASTFILE&quot; | awk &#39;{print $3}&#39;)
	#drytime=$((($drystart - $START)))
	drytime=$(expr $drystart - $START)
	drypercent=$(echo $(echo &quot;scale=2; $drytime/$roasttotal&quot; | bc -l)*100 | bc)

	onecrackstart=$(grep &quot;TAG:1CSTART&quot; &quot;$ROASTFILE&quot; | awk &#39;{print $3}&#39;)
	#browningtotal=$((($onecrackstart - $drystart)))
	browningtotal=$(expr $onecrackstart - $drystart)
	browningpercent=$(echo $(echo &quot;scale=2; $browningtotal/$roasttotal&quot; | bc -l)*100 | bc)

	#developtotal=$((($drop - $onecrackstart)))
	developtotal=$(expr $drop - $onecrackstart)
	developpercent=$(echo $(echo &quot;scale=2; $developtotal/$roasttotal&quot; | bc -l)*100 | bc)

	echo &quot;Roast complete at $(date +%T) in $(seconds_to_ts $roasttotal) minutes&quot;
	echo &quot;Roast complete at $(date +%T) in $(seconds_to_ts $roasttotal) minutes&quot; &amp;gt;&amp;gt; &quot;$ROASTFILE&quot;
	echo &quot;Dry time: $(seconds_to_ts $drytime)&#92;t&#92;t&#92;tDry time percent: $drypercent&quot;
	echo &quot;Dry time: $(seconds_to_ts $drytime)&#92;t&#92;t&#92;tDry time percent: $drypercent&quot; &amp;gt;&amp;gt; &quot;$ROASTFILE&quot;
	echo &quot;Caramelization time: $(seconds_to_ts $browningtotal)&#92;t&#92;tCaramelization percent: $browningpercent&quot;
	echo &quot;Caramelization time: $(seconds_to_ts $browningtotal)&#92;t&#92;tCaramelization percent: $browningpercent&quot; &amp;gt;&amp;gt; &quot;$ROASTFILE&quot;
	echo &quot;Develop time: $(seconds_to_ts $developtotal)&#92;t&#92;t&#92;tDevelop percent: $developpercent&quot;
	echo &quot;Develop time: $(seconds_to_ts $developtotal)&#92;t&#92;t&#92;tDevelop percent: $developpercent&quot; &amp;gt;&amp;gt; &quot;$ROASTFILE&quot;

}

if [ $filecount -eq 0 ]; then
	configure_roast
else
	ls &quot;$COFFEEDIR/$origin&quot; | nl
	echo &quot;Are you roasting any of these? Pick the number or any other key for no&quot;; read pickroast
	dirname=$(ls &quot;$COFFEEDIR/$origin&quot; | nl | grep &quot; $pickroast&quot; | awk &#39;{print $2}&#39;)
	if [ -z &quot;$dirname&quot; ]; then
		configure_roast
	else
		roastdir=&quot;$COFFEEDIR/$origin/$dirname&quot;
	fi
fi



start=$(date +%F)
roastfile=&quot;$roastdir/$start.txt&quot;
touch &quot;$roastfile&quot;

echo &quot;Batch size?&quot; ; read batchsize
echo &quot;Batch weight $batchsize&quot; &amp;gt;&amp;gt; &quot;$roastfile&quot;

echo &quot;Press any key to start the roast timer&quot;; read x
startepoch=$(date +%s)
#xtimer &amp;amp;
start_timer
timer_pid=$!

echo &quot;Enter 1 to note end of drying phase&quot;
echo &quot;Enter 2 to note start of 1 crack&quot;
echo &quot;Enter 3 to note end of roast&quot;
echo &quot;Enter q to exit the program entirely&quot;

while read detail; do
	case &quot;$detail&quot; in
		q)
			break
			exit
			;;
		1)
			write_details $startepoch &quot;TAG:DRY $(date +%s)&quot; &quot;$roastfile&quot;
			continue
			;;
		2)
			write_details $startepoch &quot;TAG:1CSTART $(date +%s)&quot; &quot;$roastfile&quot;
			continue
			;;
		3)
			write_details $startepoch &quot;TAG:DROP $(date +%s)&quot; &quot;$roastfile&quot;
			break
			;;
		*)
			write_details $startepoch &quot;$detail&quot; &quot;$roastfile&quot;
			continue
			;;
	esac
done

calculate_phases $startepoch &quot;$roastfile&quot;
#pkill xtimer
if [ -z $timer_pid ]; then
	pkill timer.sh
else
	kill $timer_pid
fi

echo &quot;Final roast size?&quot; ; read finalbatchsize

echo &quot;Drop weight: $finalbatchsize&quot; &amp;gt;&amp;gt; &quot;$roastfile&quot;

startbatchnum=$(echo $batchsize | sed &#39;s/g//g&#39;)
endbatchnum=$(echo $finalbatchsize | sed &#39;s/g//g&#39;)
percentloss=$(echo &quot;100*(1-($endbatchnum/$startbatchnum))&quot; | bc -l)
printf &quot;Weight percent loss: %.2f&#92;n&quot; $percentloss &amp;gt;&amp;gt; &quot;$roastfile&quot;

grep &quot;TEMP&quot; &quot;$roastfile&quot; | awk &#39;{print $1&quot; &quot; $3}&#39; | sed &#39;s/C//g&#39; &amp;gt; temp.dat
cat graphit.gp | gnuplot
graphfile=&quot;$roastfile-graph.png&quot;
rm temp.dat
mv temps.png &quot;$graphfile&quot;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;It&amp;#8217;s pretty dumb, but works great. I roast with a BocaBoca250 so I have no
way to input data in except to watch the thermometer and do my best.
This script is nice because you can select the coffee origin, the name of the
coffee you are roasting, batch size, then input information you want such as
roaster settings, smells, etc. The part that matters is temperature entry. For
example, &lt;code&gt;TEMP 100&lt;/code&gt;, &lt;code&gt;TEMP 180&lt;/code&gt;, etc. Then numbers 1,2,3 for different phases&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;olist arabic&quot;&gt;
&lt;ol class=&quot;arabic&quot;&gt;
&lt;li&gt;
&lt;p&gt;Dry phase finish&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;First crack start&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Roast done&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Looking at the contents &lt;a href=&quot;https://blog.passwordclass.xyz/coffeeroasts/ethiopia/gera_ayetu_farm/gera_ayetu_farm/#_2022_november_01&quot;&gt;here&lt;/a&gt;,
you can see how I entered the values. I didn&amp;#8217;t enter the times though. That is handle
automatically as you enter temperatures and such.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;When done, it calculates the time and percentages in dry phase, caramelization phase,
and development phase, and lets you enter the final weight which will get you
the % of moisture loss while roasting. Lastly, with gnuplot installed you will
get a nice graph too like in the above post.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;The last 2 scripts needed are &lt;code&gt;timer.sh&lt;/code&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;#!/usr/bin/env sh

seconds_to_ts()
{
        TIME=$1
        if [ $(uname | grep -c &quot;BSD&quot;) -eq 1 ]; then
                date -u -r $TIME +%H:%M:%S
        elif [ $(uname) = &quot;Linux&quot; ]; then
                date -d @${TIME} +%H:%M:%S
        fi
}

start=$(date +%s)
while true; do
	time=&quot;$(($(date +%s) - $start))&quot;
	printf &#39;%s&#92;r&#39; &quot;$(seconds_to_ts $time)&quot;
done&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;and &lt;code&gt;graphit.gp&lt;/code&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;#!/usr/bin/env gnuplot

set terminal png size 800,600
set output &quot;temps.png&quot;

set xdata time
set timefmt &quot;%H:%M:%S&quot;

set title &quot;Roasting Temperature Profile&quot;
set xlabel &quot;Minutes/seconds&quot;
set ylabel &quot;Temperature (C)&quot;

set key below
set grid
plot &quot;temp.dat&quot; using 1:2 title &quot;Time&quot; with lines&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Very basic and dumb but I&amp;#8217;ve had fun using it the last year, and it
has helped me make consistent roasts.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;#100DaysToOffload #Post3&lt;/p&gt;
&lt;/div&gt;</description>
      <pubDate>Mon, 05 Feb 2024 19:32:14 PST</pubDate>
      <dc:creator>Courtney</dc:creator>
      <guid>https://blog.passwordclass.xyz/posts/my-dumb-roasting-script/</guid>
    </item>
    <item>
      <title>Intro to SSH Certificates</title>
      <link>https://blog.passwordclass.xyz/posts/intro-to-ssh-certificates/</link>
      <description>&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Like many of us, I have been using SSH since the beginning of learning how
to learn Linux, or some other UNIX-like OS. My usage has moved from password
logins, to SSH keys, and now I have picked up on SSH certificates. This is
an introduction to using SSH certificates with &lt;a href=&quot;https://www.openssh.com/&quot;&gt;OpenSSH&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Before I get to my pros/cons, what the heck are SSH certificates? Think of
getting an SSL/TLS certificate. First, I would generate my private/public
RSA keypair, then a trusted certificate authority confirms my identity, being
the owner of the website I want to enable HTTPS on, then they give me a signed
public certificate to use alongside my private key, the new public key, and
the intermediate certificate. That is similar to how SSH certificates work,
except I am the certificate authority (CA).&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;The way it is done, is I generate two unique SSH keypairs:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;olist arabic&quot;&gt;
&lt;ol class=&quot;arabic&quot;&gt;
&lt;li&gt;
&lt;p&gt;To sign my servers&#39; host keys&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;To sign my users&#39; personal keys&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I then tell the servers to trust the user keys I sign and vice versa. So,
why should I do this instead of using only a password, or dropping my public
key in the authorized_keys file on my server? Well here&amp;#8217;s the reasons I found
that make this worthwhile:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;ulist&quot;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;When I create new keys, I don&amp;#8217;t have to password login to then add my new SSH key&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;With the trust relationship in place, I don&amp;#8217;t have to accept host keys on a new connection&lt;/p&gt;
&lt;div class=&quot;admonitionblock note&quot;&gt;
&lt;table&gt;
&lt;tr&gt;
&lt;td class=&quot;icon&quot;&gt;
&lt;div class=&quot;title&quot;&gt;Note&lt;/div&gt;
&lt;/td&gt;
&lt;td class=&quot;content&quot;&gt;
This basically remedies the &lt;a href=&quot;https://www.hypr.com/security-encyclopedia/trust-on-first-use-tofu&quot;&gt;TOFU&lt;/a&gt; situation
(Trust on First Use). But not 100% of the time if you don&amp;#8217;t have direct console access to the server. But it will
solve the problem for users logging in after the host key signing has been finished.
&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If a host dies, instead of installing all users&#39; public keys, I just sign the host keys and the clients won&amp;#8217;t complain. It is already trusted.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;It makes key expiration policies much more feasible and enforcable.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;This can be automated pretty easily&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;And the cons:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;ulist&quot;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;It&amp;#8217;s not as well known as passwords or plain old keys, so there is a learning curve for policy/use changes&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;You probably want 2 dedicated, and preferably offline hosts for key signing&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Digging into the weeds with &lt;a href=&quot;https://man.openbsd.org/ssh-keygen.1#CERTIFICATES&quot;&gt;principals&lt;/a&gt; can be hard to track to get right&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If you plan on expiring keys, you will want processes in place to manage and sign new keys for other users&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Does it sound more complicated than just dumping a key on a server or using a password?
Yeah probably. But the scope of certificates go beyond just signing in. It is a system
for good security practices. And I argue, does add some convenience in some occasions.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_getting_started&quot;&gt;Getting Started&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Now that that is out of the way and some of the what&amp;#8217;s and why&amp;#8217;s are in the open, lets
drill down into the application.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;First, consider having 2 separate hosts for this job. But if you are just doing this for
home use, a single host that isn&amp;#8217;t internet accessible should do. But I find it nicer to
have 2 virtual machines running that I can turn on/off as I need. From here, I will
act on the assumption you have 2 servers.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;sect2&quot;&gt;
&lt;h3 id=&quot;host-keys&quot;&gt;Host Keys&lt;/h3&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;On host A, create the keypair. If you want to get extra fancy, password protect these keys.
That way, if someone somehow got one of the keypairs, they would still need the password.
So lets generate the keys&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;# ssh-keygen -t ed25519 -a100 -f /root/.ssh/hostkey
Generating public/private ed25519 key pair.
Enter passphrase (empty for no passphrase): SuperSpecialAwesomeOptionalPassword
Enter same passphrase again: SuperSpecialAwesomeOptionalPassword
Your identification has been saved in hostkey
Your public key has been saved in hostkey.pub
The key fingerprint is:
SHA256:WaOws18CKpgntRnFSgmJeKWD9utZqjqN8cmaLNtyw10 root@hostkeys
The key&#39;s randomart image is:
+--[ED25519 256]--+
|+. ..            |
|+o.+             |
|.o= o .   o      |
|...+   o + .     |
|  +.  + S        |
|.+ +..E+         |
|+B=+.o. . .      |
|*=X.=  . o       |
|BOo=    .        |
+----[SHA256]-----+&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Neat. That&amp;#8217;s one down. A quick rundown of the flags I specified&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;ulist&quot;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;-t ed25519&lt;/code&gt; sets the key type to ed25519. The default before OpenSSH 9.5 was RSA. So if you are running 9.5 or newer, you don&amp;#8217;t need this&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;-a 100&lt;/code&gt; - rounds of KDF used. Makes the private key more brute-force resistant. Useful only if you are password protecting your key&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;-f&lt;/code&gt; - tells &lt;code&gt;ssh-keygen&lt;/code&gt; where to create the key&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect2&quot;&gt;
&lt;h3 id=&quot;_user_keys&quot;&gt;User Keys&lt;/h3&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Now, same as before but on the other host,  lets generate the user keys&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;ssh-keygen -t ed25519 -a100 -f /root/.ssh/userkey
Generating public/private ed25519 key pair.
Enter passphrase (empty for no passphrase): SuperSpecialOtherOptionalPassword
Enter same passphrase again: SuperSpecialOtherOptionalPassword
Your identification has been saved in userkey
Your public key has been saved in userkey.pub
The key fingerprint is:
SHA256:NP4fKqdvbILpwfOhKx9u3voefyKR4+/ugTTjnsj5NY4 root@userkeys
The key&#39;s randomart image is:
+--[ED25519 256]--+
|                 |
|                 |
|        o        |
|       o .       |
|        S.       |
|     . o+=       |
|      =+=+= .    |
|    .o+@=O*=..   |
|     *%*E#Xo.    |
+----[SHA256]-----+&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_signing_host_keys&quot;&gt;Signing Host Keys&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Onward to signing our first keys. Let&amp;#8217;s start with the host keys.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;On each host when you first enable and run the sshd server, it will create some
keys for itself. Usually RSA, ED25519, and ECDSA. I only use ED25519, so I will
sign only those here in this example. In some cases, I still sign the RSA keys
if some clients are doing RSAkeys. These are the default public keys that are to
be found on a host:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre&gt;/etc/ssh/ssh_host_ecdsa_key.pub
/etc/ssh/ssh_host_ed25519_key.pub
/etc/ssh/ssh_host_rsa_key.pub&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Copy these to the host that is doing the key signing. Now, this is perhaps where
the TOFU I talked about earlier gets defeated. You need to sign into that computer
once to get the public host keys. This is a predicament with cloud servers that
you do not have console access to. This is only a problem once. After this, all
subsequent logins to that server can be trusted. Here&amp;#8217;s how the key signing will go:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;ssh-keygen -s /root/.ssh/hostkey -I example.com -h -n example.com ssh_host_ed25519_key.pub&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Breakdown:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;ulist&quot;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;-s&lt;/code&gt; - the signing key&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;-I&lt;/code&gt; - the key identity. Can be used for key revocation&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;-h&lt;/code&gt; - specifies that this is a host certificate, not a user certificate&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;ssh_host_ed25519_key.pub&lt;/code&gt; - the public key being signed&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;This generates a &lt;code&gt;ssh_host_ed25519_key-cert.pub&lt;/code&gt; file. This needs to be copied back to &lt;code&gt;/etc/ssh&lt;/code&gt;
on the host we got it from.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Cool. Now what&amp;#8217;s next is we need to tell sshd to accept and use this certificate.
Let&amp;#8217;s add these lines to the &lt;code&gt;/etc/ssh/sshd_config&lt;/code&gt; file&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-conf&quot; data-lang=&quot;conf&quot;&gt;HostCertificate /etc/ssh/ssh_host_ed25519_key-cert.pub
TrustedUserCAKeys /etc/ssh/userkey.pub
RevokedKeys /etc/ssh/revoked_keys&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;ulist&quot;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;HostCertificate&lt;/code&gt; - the certificate that we just got back from signing the public key&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;TrustedUserCAKeys&lt;/code&gt; - this is the /root/.ssh/userkey.pub file created on the User Keys server&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;RevokedKeys&lt;/code&gt; - currently, just an empty file. But if any user keys ever need to be revoked for some reason, you&amp;#8217;d add the public key here&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;There&amp;#8217;s more that can be done, but I&amp;#8217;ll reference it later as bonus material.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Next, run &lt;code&gt;sshd -t&lt;/code&gt; which will let you know if a configuration is wrong or not. If all
is good, run &lt;code&gt;rcctl reload sshd&lt;/code&gt; or &lt;code&gt;service sshd reload&lt;/code&gt; or &lt;code&gt;systemctl ssh reload&lt;/code&gt; or
whatever init system command you need to do.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_signing_user_keys&quot;&gt;Signing User Keys&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;The server is done, so now what? We just told the server that we want to trust keys signed
by the Host Certificate Authority. Now our user keys need to be signed, and tell our computer
to trust the host certificate.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;First generate ssh keys&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;ssh-keygen -t ed25519 -a100 -f ~/.ssh/mycoolkey&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Same as before, optional password, the &lt;code&gt;-t&lt;/code&gt; and &lt;code&gt;-a&lt;/code&gt; are optional to what you want.
I want to get the &lt;code&gt;~/.ssh/mycoolkey.pub&lt;/code&gt; file to the &lt;em&gt;USER&lt;/em&gt; key signing server this time.
Once there, this is the command I want to run&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;ssh-keygen -s /root/.ssh/userkey -I me@example.com -n bob -V +180d mycoolkey.pub&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;The flags:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;ulist&quot;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;-s&lt;/code&gt; - the key used for signing&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;-I&lt;/code&gt; - the key ID. This can be useful for tracking logins. You could make this &lt;code&gt;mylaptop&lt;/code&gt; or &lt;code&gt;myphone&lt;/code&gt; or &lt;code&gt;mycomputer&lt;/code&gt; and correlate each key to each sign in&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;-n&lt;/code&gt; - this is the permitted username, or principal (more on this later). If my user is bob, I should make this be bob for now&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;-V +180d&lt;/code&gt; - this sets an expiration of 180 days after creation. If you do not specify this, it will be valid forever&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Now I have a shiny &lt;code&gt;mycoolkey-cert.pub&lt;/code&gt; file. This will go in my &lt;code&gt;~/.ssh&lt;/code&gt; directory alongside my other keys.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;With the file in place&amp;#8230;&amp;#8203;I still cannot sign in to the server. Why? I will get a prompt
asking me whether or not I trust the destination server. Kind of defeats the purpose. What
to do now? This is one of my favorite parts. Instead of having a billion entries in my
&lt;code&gt;~/.ssh/known_hosts&lt;/code&gt; file, I can instead litter these with &lt;code&gt;@cert-authority&lt;/code&gt; lines!
This actually gets much cleaner when you have many servers using the same host key.
For example, I have about 70 servers that I signed with the same host key and can
use a SINGLE line in my known_hosts file, instead of multiple (one per host key, which
will probably be 3, then if I signed in with the IP and then later with the hostname,
that can be 4 lines per host!). Ashamedly, I have gotten my known_hosts file over
700 lines from all my sign ins and servers that I nixed and never cleaned out my known_hosts
file. So what do I add to my known_hosts:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-conf&quot; data-lang=&quot;conf&quot;&gt;@cert-authority *.example ssh-ed25519 ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILw3E3Pa1CvvdCDQ8EkMpjl9kD72Sxbms9R1QCU8/ni6 root@example.com&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;To break down this line:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;ulist&quot;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;@cert-authority&lt;/code&gt; - Indicates the public key of the accepted certificate authority&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;*.example.com&lt;/code&gt; - any example.com host that is signed with the aforementioned host key&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;everything else - this is the contents of hostkey.pub from the &lt;a href=&quot;https://blog.passwordclass.xyz/posts/intro-to-ssh-certificates/#host-keys&quot;&gt;Host Keys&lt;/a&gt; section&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_signing_in&quot;&gt;Signing In&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;So far, we&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;olist arabic&quot;&gt;
&lt;ol class=&quot;arabic&quot;&gt;
&lt;li&gt;
&lt;p&gt;Created a user key signing keypair&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Created a host key signing keypair&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Signed a server&amp;#8217;s host keys and told it to use that certificate, and trust the user keys we sign&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Signed the user keys, and told our ssh client to trust the host keys that we signed&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;If all went right, you should be able to sign into your server and &lt;em&gt;NOT&lt;/em&gt; get the yes/no prompt to trust
that host&amp;#8217;s keys. If I signed into that server before, I remove the previous trust entries
from my known_hosts file. I do this by making a backup copy, in case I totally dorked stuff.
Don&amp;#8217;t want to get locked out! If you are getting a yes/now prompt, something went wrong and
steps taken should be revisited. From here, you can just go with this. But I want to explore key
revocation as well as principals a little.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_key_revocation&quot;&gt;Key Revocation&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;There are 2 kinds of key revocation to consider:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;olist arabic&quot;&gt;
&lt;ol class=&quot;arabic&quot;&gt;
&lt;li&gt;
&lt;p&gt;Host key revocation&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;User key revocation&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div class=&quot;sect2&quot;&gt;
&lt;h3 id=&quot;_host_key_revocation&quot;&gt;Host Key Revocation&lt;/h3&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;This is useful for SSH clients, if you want to enforce not trusting host keys. Say,
if a host&amp;#8217;s keys were compromised and you want to ensure your users will not get
tricked into logging into a server with the compromised keys. You can add this info
to &lt;code&gt;/etc/ssh/ssh_config&lt;/code&gt;, or even your own &lt;code&gt;~/.config&lt;/code&gt; file. You would update your
&lt;code&gt;Host *&lt;/code&gt; section to have this:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-conf&quot; data-lang=&quot;conf&quot;&gt;Host *
	RevokedHostKeys		/etc/ssh/revoked_hostkeys&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;or&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-conf&quot; data-lang=&quot;conf&quot;&gt;Host *
	RevokedHostKeys		~/.ssh/revoked_hostkeys&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;In this file, add the public keys of the host keys you want to revoke. Your ssh client
will look to see if the pubkey is in your revoked hostkeys file and cancel the login
if the keys are revoked.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect2&quot;&gt;
&lt;h3 id=&quot;_user_key_revocation&quot;&gt;User Key Revocation&lt;/h3&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;This is very similar to host key revocation, just the other way around. Earlier,
I created a config like in the sshd_config file&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-conf&quot; data-lang=&quot;conf&quot;&gt;RevokedKeys /etc/ssh/revoked_keys&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Like before, if a user&amp;#8217;s keypair instead gets compromised, you can add the public key
to this RevokedKeys file and any login attempts with this keypair will get denied.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_principals&quot;&gt;Principals&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I don&amp;#8217;t want to get too deep into principals, but what makes it handy is you can do
stuff like say user1 can sign into host1.example.com but not host2.example.com. By
default, user1 can sign into any host that has their key signed by the user CA.
We can modify user1&amp;#8217;s principal to be something like &quot;host1only&quot;&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;ssh-keygen -s /root/.ssh/userkey -I user1@example.com -n host1only -V +180d mycoolkey.pub&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;To make this work, a couple tweaks need to be made to our sshd_config file. Namely:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-conf&quot; data-lang=&quot;conf&quot;&gt;AuthorizedPrincipalsFile /etc/ssh/principals/%u&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Next, make the file &lt;code&gt;/etc/ssh/principals/user1&lt;/code&gt; on host1.example.com and have it only
contain &lt;code&gt;host1only&lt;/code&gt;. Although user1 may exist on host2.example.com, this setup
will mandate that user1 has their keypair principal be &lt;code&gt;host1only&lt;/code&gt;. This can be useful,
for example, if you have a backups user on all your hosts but only want the backups user
to be allowed to SSH into only the backup server.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_conclusion&quot;&gt;Conclusion&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;This sounds like a lot, but definitely give it a try if you have a bunch of servers
you log into! This is definitely more useful on larger scale deployments, but even in
my home of a handful of servers I find it nice to be able to just create a key, sign
it, and I can sign into all my hosts with ease, no needing to copy around keys or
copying public keys to all my authorized_keys files.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;#100DaysToOffload #Post2&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</description>
      <pubDate>Mon, 05 Feb 2024 19:25:00 PST</pubDate>
      <dc:creator>Courtney</dc:creator>
      <guid>https://blog.passwordclass.xyz/posts/intro-to-ssh-certificates/</guid>
    </item>
    <item>
      <title>Device Busy</title>
      <link>https://blog.passwordclass.xyz/posts/device-busy/</link>
      <description>&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Once a week I pop out the microSD card on my church&amp;#8217;s recorder and get the
sermon uploaded. I do this on OpenBSD, and also mount/umount the microSD
card via the command line. On another note, I use the SSH ControlMaster
feature when logging into my servers. Why is this related? You&amp;#8217;ll see.
The other day I mounted the microSD card&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;doas mount /dev/sd3i /mnt/usb&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Then cd&amp;#8217;d to that directory to copy out the music file. While I was there
I SSH&amp;#8217;d into a server for some reason. I finished my copying of the audio,
exited the terminal, edited and uploaded the Sunday sermon. Then went to
umount the microSD card&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;$ doas umount /mnt/usb
umount: /mnt/usb: Device busy&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Huh. I wasn&amp;#8217;t cd&amp;#8217;d into the directory, no open files, I checked fstat&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;$ fstat -f /mnt/usb
USER     CMD          PID   FD MOUNT        INUM  MODE R/W    SZ|DV
courtney ssh        40229   wd /mnt/usb        2  drwxr-xr-x r     4096
$ ps -ux | grep 40229
courtney 40229  0.0  0.0  2312  2664 ??  Ip     12:14PM    0:00.00 ssh: /home/courtney/.ssh/controlmasters/courtney@example.com22 [mux] (ssh)&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Well okay then. Why on earth is my control master file there? I found that strange.
Turns out, this isn&amp;#8217;t some SSH thing. For some reason in the UNIX world if you create
an open file from your shell, it creates a file descriptor from that directory,
something I wasn&amp;#8217;t aware of. I thought since I wasn&amp;#8217;t cd&amp;#8217;d into the directory
and that the file was on my /home partition, this wouldn&amp;#8217;t be a thing. Sure
enough, closing the SSH connection solved the issue&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;$ ssh -O exit example.com
Exit request sent.
$ doas umount -v /mnt/usb
/dev/sd3i: unmount from /mnt/usb&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;All good. I tried this with httpd out of curiosity. I started httpd from /mnt/usb&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;# httpd -f /etc/httpd.conf&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;This had the same effect. I had to stop httpd so I could then umount /dev/sd3i.
So many small things that you may never encounter unless you really know operating
systems, or have a random encounter like I did here, I guess.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;#100DaysToOffload #Post1&lt;/p&gt;
&lt;/div&gt;</description>
      <pubDate>Mon, 05 Feb 2024 15:08:57 PST</pubDate>
      <dc:creator>Courtney</dc:creator>
      <guid>https://blog.passwordclass.xyz/posts/device-busy/</guid>
    </item>
    <item>
      <title>OpenBSD Is My Desktop of Choice</title>
      <link>https://blog.passwordclass.xyz/posts/openbsd-is-my-desktop-of-choice/</link>
      <description>&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;It has been almost a year and a half now of using OpenBSD on my desktop.
From previous &lt;a href=&quot;https://blog.passwordclass.xyz/posts/2022/05/my-openbsd-desktop&quot;&gt;blog&lt;/a&gt; &lt;a href=&quot;https://blog.passwordclass.xyz/posts/2022/11/openbsd_audio_woes&quot;&gt;posts&lt;/a&gt;
I have noted some of my frustrations with the desktop experience in OpenBSD,
and in some ways, these have been more or less addressed. So, why do I really
love using my computer with OpenBSD?&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_sndiod&quot;&gt;sndiod&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;This may sound funny, since in my previous blog posts and in other public forums,
I have frequently complained about OpenBSD audio. I still do on occasion get that
stutter with USB audio. My solution was to buy a new DAC (the Audioengine D1, great device),
which sounds better anyway than my previous FiiO E10k, but also means I only have to
restart Firefox every maybe 1-2 days instead of every half hour. There was no solution
for that. I also have a problem with a USB audio input device that has a ticking
audio sound. Couldn&amp;#8217;t be resolved. It probably requires an OpenBSD developer to
make some changes in the kernel.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;All that said, these problems are offset with audio issues in other operating
systems. Like with Linux, when an issue arises you have to have familiarity
potentially with alsa, pulseaudio, and pipewire now. I actually like pipewire,
but really, I find the documentation hard to navigate. I really love sndiod
because it really has been a set and forget sort of thing for me. It reliably
works all the time. The man pages are simple, the FAQ for audio is simple,
I don&amp;#8217;t have to go very far if I have a problem.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_release_or_current&quot;&gt;Release or Current?&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Since the beginning of using OpenBSD on my desktop in May 2022, I was using -current.
I really had no issues to speak of. It&amp;#8217;s honestly very rare that I would encounter
an issue. But, it is a development branch. I did have an issue on occasion.
For all of my uses with OpenBSD -current, I just do my usual &lt;code&gt;sysupgrade -s&lt;/code&gt;
and update packages and carry on. However, I did just reinstall my desktop
with 7.4. I&amp;#8217;ve hit a bad sysupgrade a couple times and it did cause me to
lose time at work trying to fix the issues. Those minutes aren&amp;#8217;t mine, and
the problems were likely entirely avoidable if I had sat on a release.
So, I moved my desktop to the release branch, but I do have my laptop (and a few
servers) on -current still. It is great flexibility. I like that on one
hand, I can camp on a release and have things hum along without any care
in the world to speak of. -current requires a little more attention, but
I am happy that I can keep up with the latest updates and ports tree for
the applications where I need it.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I did like that every 1-2 weeks doing my sysupgrade and updating packages.
However, there is also a good feeling knowing that the OS is gonna pretty
well stay put for the next 6 months. So far, after 3 years of release
upgrades, I have had 0 issues. I trust (and hope, we are talking computers)
in April 2024 I will have a clean upgrade to OpenBSD 7.5 and have another
6 months of not having to bother with my computer.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</description>
      <pubDate>Tue, 31 Oct 2023 17:28:44 PDT</pubDate>
      <dc:creator>Courtney</dc:creator>
      <guid>https://blog.passwordclass.xyz/posts/openbsd-is-my-desktop-of-choice/</guid>
    </item>
    <item>
      <title>How I Backup My Openbsd Desktop</title>
      <link>https://blog.passwordclass.xyz/posts/how-i-backup-my-openbsd-desktop/</link>
      <description>&lt;div id=&quot;toc&quot; class=&quot;toc&quot;&gt;
&lt;div id=&quot;toctitle&quot;&gt;Table of Contents&lt;/div&gt;
&lt;ul class=&quot;sectlevel1&quot;&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/how-i-backup-my-openbsd-desktop/#_my_tools&quot;&gt;My Tools&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/how-i-backup-my-openbsd-desktop/#_scripts&quot;&gt;Scripts&lt;/a&gt;
&lt;ul class=&quot;sectlevel2&quot;&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/how-i-backup-my-openbsd-desktop/#_backing_up&quot;&gt;Backing Up&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/how-i-backup-my-openbsd-desktop/#_pruning_backups&quot;&gt;Pruning Backups&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/how-i-backup-my-openbsd-desktop/#_cron&quot;&gt;Cron&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/how-i-backup-my-openbsd-desktop/#_nuke&quot;&gt;Nuke&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/how-i-backup-my-openbsd-desktop/#_restoration&quot;&gt;Restoration&lt;/a&gt;
&lt;ul class=&quot;sectlevel2&quot;&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/how-i-backup-my-openbsd-desktop/#_restoring_packages&quot;&gt;Restoring Packages&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/how-i-backup-my-openbsd-desktop/#_bow_on_top&quot;&gt;Bow on Top&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;It&amp;#8217;s not often I backup and restore my desktop, but I do like having good
backups for my desktop computer, especially since I rely on it for work.
I use OpenBSD for my desktop operating system. I&amp;#8217;ve been running -current
since May 2022. 99.9% of the time it has been very good to me with no
headache. Every now and then though I run into an issue, and it is something
I can work around and maybe even just wait a day and sysupgrade. I&amp;#8217;ve come
to find right now though, I need something more predictable for my daily
workstation since it is the tool I use to put dinner on the table. So, I
decided today to downgrade to OpenBSD 7.4 from -current. I still run -current
on a handful more servers and my laptop, but this machine I need to take
a step back on. So, I got to verify my backup and restore plan actually works!&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_my_tools&quot;&gt;My Tools&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I use Restic to do all my backing up, and I piece it together with some scripts.
To get some of my config files, my setup is a little inconvenient, so I am
pondering if I should do backups as the root user or something to get some
of the files I don&amp;#8217;t have permissions to read unless I escalate with doas. So,
those files aside, let&amp;#8217;s just pretend I back those up and they make it into
my restic backups safely.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I backup over SSH to my FreeBSD server as the destination.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_scripts&quot;&gt;Scripts&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;sect2&quot;&gt;
&lt;h3 id=&quot;_backing_up&quot;&gt;Backing Up&lt;/h3&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Here is my backup script&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;#!/usr/bin/env sh

RESTIC_PASSWORD_FILE=&quot;$HOME/.local/bin/.restic_pass&quot;
export RESTIC_PASSWORD_FILE
RESTIC_REPOSITORY=&quot;sftp:homeBackup:/usr/home/username/rstc-desktop&quot;
export RESTIC_REPOSITORY

excludes=&quot;/home/username/.local/bin/EXCLUDEFILE&quot;

cp /etc/X11/xorg.conf /etc/rc.conf.local /etc/doas.conf /etc/httpd.conf /etc/man.conf /etc/sysctl.conf /etc/fstab /etc/login.conf $HOME/Documents/desktop_configs/OpenBSD
pkg_info -m -z -- &amp;gt; $HOME/Documents/desktop_configs/OpenBSD/packages.txt

restic --compression=auto --exclude-file $excludes backup $HOME /var/www/htdocs/username
complete=$(echo $?)

rm $HOME/Documents/desktop_configs/OpenBSD/*


if [ $complete -eq 1 ]; then
        dunstify &quot;Restic backup failed&quot;
fi&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Some files are missing here, notably my pf.conf file. I should make a better way
of backing those up as said earlier.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;My favorite line is:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;pkg_info -m -z -- &amp;gt; $HOME/Documents/desktop_configs/OpenBSD/packages.txt&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;This does a fuzzy export of packages installed. Very handy.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect2&quot;&gt;
&lt;h3 id=&quot;_pruning_backups&quot;&gt;Pruning Backups&lt;/h3&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Backups accumulate over time, and I don&amp;#8217;t need the old ones. So I have a
similar script that prunes backups:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;#!/usr/bin/env sh

RESTIC_PASSWORD_FILE=&quot;$HOME/.local/bin/.restic_pass&quot;
export RESTIC_PASSWORD_FILE
RESTIC_REPOSITORY=&quot;sftp:homeBackup:/usr/home/username/rstc-desktop&quot;
export RESTIC_REPOSITORY

restic forget --keep-daily 10 --keep-weekly 5 --keep-monthly 3 --prune
complete=$(echo $?)


if [ $complete -ne 0 ]; then
        dunstify &quot;Restic pruning failed&quot;
fi&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I have dunst installed so I can get desktop notifications of backups or prunes
failing. So far, hasn&amp;#8217;t happened yet and listing backups shows that to be true.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;The restic_pass file is permissions 400 so only my user can read the file.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect2&quot;&gt;
&lt;h3 id=&quot;_cron&quot;&gt;Cron&lt;/h3&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;This is my crontab that runs these commands. I backup hourly, and at the end of
the workday I clear out old backups&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;@hourly -ns /bin/sh /home/courtney/.local/bin/rstbkp
30 17 * * * /bin/sh /home/courtney/.local/bin/rstprune&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_nuke&quot;&gt;Nuke&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I prepared my flash drive following the &lt;a href=&quot;https://www.openbsd.org/faq/faq4.html#Download&quot;&gt;faq&lt;/a&gt;
and did a backup of my computer. I did a test restore of a few files to ensure my backups
actually worked like I expected&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;$ RESTIC_PASSWORD_FILE=&quot;$HOME/.local/bin/.restic_pass&quot;
$ export RESTIC_PASSWORD_FILE
$ RESTIC_REPOSITORY=&quot;sftp:homeBackup:/usr/home/username/rstc-desktop&quot;
$ export RESTIC_REPOSITORY
$ restic restore --target restore/ -i /home/username/.Xresources latest&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;This restored the .Xresources file from the latest snapshot. It worked, I&amp;#8217;ve done
similar file/subdirectory restores in the past, I trust the process.
Before nuke and pave time, I wanted to grab just a handful of directories to have
separate from the restic repo so I could conveniently grab them. Just my ssh
files in this case, so I could do my key sign into the server easily to restore
my backups. I encrypted those and stored them elsewhere safely. Nuke and pave time.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I installed OpenBSD the way I wanted, then it was onward to restoration.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_restoration&quot;&gt;Restoration&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I signed into root and first things first, I installed restic so I could restore
my backups. Then I copied my ssh files back to my user. I then started restoring
my backups:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;$ RESTIC_REPOSITORY=&quot;sftp:homeBackup:/usr/home/username/rstc-desktop&quot;
$ export RESTIC_REPOSITORY
$ restic restore --target restore/ latest&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I was prompted to enter my restic password, then I waited for the restoration.
Once done, I put all my files where they needed to go.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;sect2&quot;&gt;
&lt;h3 id=&quot;_restoring_packages&quot;&gt;Restoring Packages&lt;/h3&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;This is my favorite part about OpenBSD. The fuzzy export of package names is
super handy. FreeBSD needs this (wink wink, nudge nudge). My backup contained
a packages.txt file which I can install from doing this:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;pkg_add `cat packages.txt`&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Done. Easy.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_bow_on_top&quot;&gt;Bow on Top&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;My data is restored, files are where they were before, packages installed, last
bit was to &lt;code&gt;syspatch&lt;/code&gt; and then reboot. I was greeted with a working system as
it was before. I wasn&amp;#8217;t missing much, since my snapshot was only a few days newer
than the latest release, so now I don&amp;#8217;t have to feel like I am lacking something
I did not have.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I&amp;#8217;m very grateful to the OpenBSD devs and their awesome work. OpenBSD -current
is the most stable development branch I have used on any OS. It is expected to
run into bugs. I knew that, and was still surprised with how well things ran all
this time. But, I&amp;#8217;m at a point in my work life where I cannot risk stability.
Even a day or a little time of minor inconveniences is just a bit much for me
at this moment in life. I&amp;#8217;m sure it won&amp;#8217;t be long before I find myself back on
current though on my workstation. It really makes computing fun.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;So yes..I am typing this now from my 7.4 installation and am content with where
I am right now. Great operating system, and backup/restore with OpenBSD and restic
is quick and convenient.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</description>
      <pubDate>Wed, 25 Oct 2023 23:40:00 PDT</pubDate>
      <dc:creator>Courtney</dc:creator>
      <guid>https://blog.passwordclass.xyz/posts/how-i-backup-my-openbsd-desktop/</guid>
    </item>
    <item>
      <title>Creating FreeBSD Thick Jails</title>
      <link>https://blog.passwordclass.xyz/posts/creating_freebsd_thick_jails/</link>
      <description>&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;In an &lt;a href=&quot;https://blog.passwordclass.xyz/posts/2022/01/freebsd-13-0-jails-with-zfs-and-vnet&quot;&gt;older blog post&lt;/a&gt;
I focused on creating FreeBSD base jails with VNET on ZFS. Today, I want to do
the same thing with Thick jails, since I have some use cases where base jails
don&amp;#8217;t quite do what I want to do in terms of management.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_thick_jail&quot;&gt;Thick Jail?&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;A thick jail in creation is basically half the steps of a base jail. It is a
jail with its own complete userspace, no nullfs mounts and the sort.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;My reasons for wanting a thick jail is because I used base jails to have an
easy to manage jail. &lt;code&gt;freebsd-update&lt;/code&gt; the base they were built on, restart the
jails, then I&amp;#8217;m done. But to keep my jail versions pure and be able to delete
older FreeBSD versions, I&amp;#8217;ve migrated my jails from base to base. For most,
this is not a problem. However, I have grown very tired of doing this with my
Nextcloud jail. Now yeah yeah I could use Ansible to do it all for me but for
this single jail, that&amp;#8217;s a bit much.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;The thick jail is has its own copy of the FreeBSD userland, which then means
it uses more space the more thick jails you add. It also means I have to
independently manage each jail. That makes it easier for me with Nextcloud,
and some other single use jails where it&amp;#8217;s probably easier to just treat
each jail as a virtual machine, so to speak.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_creating_the_jail&quot;&gt;Creating the Jail&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;First off, we need to create the jail. I&amp;#8217;m going to start by making a new jails
dataset and mounting it at /jails&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;zfs create -o mountpoint=/jails zroot/jails&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Here is the foundation for everything. Now I&amp;#8217;ll create a few other datasets for
our releases and templates and running jails, as well as our first release dataset (14.0-RELEASE)&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;zfs create -p zroot/jails/jails/myjailname&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Next, we need to download the base OS as well as lib32 for our jail.
The contents should be extracted into &lt;code&gt;/jails/jails/myjailname&lt;/code&gt; in the end.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;fetch https://ftp.freebsd.org/pub/FreeBSD/releases/amd64/amd64/14.0-RELEASE/base.txz -o /tmp/base.txz&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;fetch https://ftp.freebsd.org/pub/FreeBSD/releases/amd64/amd64/14.0-RELEASE/lib32.txz -o /tmp/lib32.txz&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;tar -xf /tmp/base.txz -C /jails/jails/myjailname&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;tar -xf /tmp/lib32.txz -C /jails/jails/myjailname&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Now let us update the jail contents&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;env UNAME_r=14.0-RELEASE freebsd-update -b /jails/jails/myjailname fetch install&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;env UNAME_r=14.0-RELEASE freebsd-update -b /jails/jails/myjailname IDS&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Then, we can copy our /etc/localtime and our /etc/resolv.conf files into the jail&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;cp /etc/localtime /jails/jails/myjailname/etc/localtime&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;cp /etc/resolv.conf /jails/jails/myjailname/etc/resolv.conf&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_jail_configuration&quot;&gt;Jail Configuration&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Now that the jail is done, we need to configure it to start it. This is done by
editing the &lt;code&gt;/etc/jail.conf&lt;/code&gt; file. For this single jail, it should look something
like this&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-conf&quot; data-lang=&quot;conf&quot;&gt;$jails=&quot;/jails/jails&quot;;

exec.start = &quot;/bin/sh /etc/rc&quot;;
exec.stop = &quot;/bin/sh /etc/rc.shutdown&quot;;
exec.clean;
exec.system_user = &quot;root&quot;;
exec.jail_user = &quot;root&quot;;
mount.devfs;
vnet;
vnet=&quot;new&quot;;
allow.raw_sockets = 1;
devfs_ruleset=&quot;5&quot;;

myjailname {
        host.hostname = &quot;myjailname&quot;;
        path = &quot;$jails/myjailname&quot;;
        #securelevel=&quot;2&quot;;
        vnet.interface = &quot;e0b_jeth&quot;;
        exec.prestart += &quot;sh /usr/local/bin/jib addm jeth em0&quot;;
        exec.poststop += &quot;/usr/local/bin/jib destroy jeth&quot;;
}&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;admonitionblock note&quot;&gt;
&lt;table&gt;
&lt;tr&gt;
&lt;td class=&quot;icon&quot;&gt;
&lt;div class=&quot;title&quot;&gt;Note&lt;/div&gt;
&lt;/td&gt;
&lt;td class=&quot;content&quot;&gt;
em0 is my hosts interface and jeth is the name of the interface that &lt;code&gt;jib&lt;/code&gt; expects
&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;We will need to drop some basic configs in the jail soon such as an rc.conf and pf.conf
file since this configuration is set up to run pf in each jail on its own.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;sect2&quot;&gt;
&lt;h3 id=&quot;_inside_the_jail&quot;&gt;Inside the Jail&lt;/h3&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Inside the jail, we need a working rc.conf and pf.conf. To start, my rc.conf looks like this&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-conf&quot; data-lang=&quot;conf&quot;&gt;cron_flags=&quot;$cron_flags -J 15&quot;

# Disable Sendmail by default
sendmail_enable=&quot;NO&quot;
sendmail_submit_enable=&quot;NO&quot;
sendmail_outbound_enable=&quot;NO&quot;
sendmail_msp_queue_enable=&quot;NO&quot;

# Run secure syslog
syslogd_flags=&quot;-c -ss&quot;

hostname=&quot;myjailname&quot;
# NOTE the usage of jeth here with /etc/jail.conf
ifconfig_e0b_jeth=&quot;192.168.1.100/24&quot;
defaultrouter=&quot;192.168.10.1&quot;

pf_enable=&quot;YES&quot;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;And the pf.conf file (definitely be sure to configure this properly, this is only an example)&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-conf&quot; data-lang=&quot;conf&quot;&gt;block all
pass out&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_host_configuration&quot;&gt;Host Configuration&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;For the host, we need to setup a few things:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;ulist&quot;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Enable the service&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Get jib in the right place&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Configure our interface (optional)&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&quot;sect2&quot;&gt;
&lt;h3 id=&quot;_enable_the_service&quot;&gt;Enable the Service&lt;/h3&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;sysrc jail_enable=&quot;YES&quot;
sysrc jail_list=&quot;myjailname&quot;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;The above enables the jail server and &lt;code&gt;jail_list&lt;/code&gt; will autostart the jail when
the service gets started and stopped when the service stops&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect2&quot;&gt;
&lt;h3 id=&quot;_get_jib_in_the_right_place&quot;&gt;Get jib in the Right Place&lt;/h3&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Either copy or symlink jib to /usr/local/bin&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;cp /usr/share/examples/jails/jib /usr/local/bin/jib&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_wrapping_it_up&quot;&gt;Wrapping It Up&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;The jail should be able to start now. Here is one way the jail can be started&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;service jail start myjailname&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;And now it is possible to &lt;a href=&quot;https://man.freebsd.org/cgi/man.cgi?query=jexec&amp;amp;sektion=8&quot;&gt;jexec&lt;/a&gt; into it&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;jexec myjailname&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Now you can do whatever you wish with this jail like any other jail.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_updates&quot;&gt;UPDATES&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;ulist&quot;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;2024-01-15 - Updated release numbers to 14.0&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</description>
      <pubDate>Fri, 01 Sep 2023 21:06:11 PDT</pubDate>
      <dc:creator>Courtney</dc:creator>
      <guid>https://blog.passwordclass.xyz/posts/creating_freebsd_thick_jails/</guid>
    </item>
    <item>
      <title>My Matrix Server Migration</title>
      <link>https://blog.passwordclass.xyz/posts/my-matrix-server-migration/</link>
      <description>&lt;div id=&quot;toc&quot; class=&quot;toc&quot;&gt;
&lt;div id=&quot;toctitle&quot;&gt;Table of Contents&lt;/div&gt;
&lt;ul class=&quot;sectlevel1&quot;&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/my-matrix-server-migration/#_synapse&quot;&gt;Synapse&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/my-matrix-server-migration/#_my_setup&quot;&gt;My Setup&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/my-matrix-server-migration/#_my_new_plan&quot;&gt;My New Plan&lt;/a&gt;
&lt;ul class=&quot;sectlevel2&quot;&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/my-matrix-server-migration/#_set_up_a_virtual_machine&quot;&gt;Set up a Virtual Machine&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/my-matrix-server-migration/#_set_up_a_vpn&quot;&gt;Set up a VPN&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/my-matrix-server-migration/#_restore_my_data&quot;&gt;Restore my data&lt;/a&gt;
&lt;ul class=&quot;sectlevel3&quot;&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/my-matrix-server-migration/#_restoring_packages&quot;&gt;Restoring Packages&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/my-matrix-server-migration/#_the_new_vps&quot;&gt;The New VPS&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/my-matrix-server-migration/#_moving_to_the_new_server&quot;&gt;Moving to the New Server&lt;/a&gt;
&lt;ul class=&quot;sectlevel2&quot;&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/my-matrix-server-migration/#_the_problem&quot;&gt;The Problem&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/my-matrix-server-migration/#_wrapping_up&quot;&gt;Wrapping Up&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I have been paying to host my Matrix synapse server for 2.5 years now.
It has been one of my favorite projects to host because I have found
a great communities this way and have been able to learn a lot
being on Matrix. The problem for me though is, the synapse server is
a bit of a resource hog, and has grown to be expensive.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_synapse&quot;&gt;Synapse&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/matrix-org/synapse&quot;&gt;Synapse&lt;/a&gt; is the current Matrix
server, in addition to &lt;a href=&quot;https://github.com/matrix-org/dendrite&quot;&gt;dendrite&lt;/a&gt;
which has been a gradual work in progress. I think dendrite is ready
to go as a replacement, apparently&amp;#8230;&amp;#8203;anecdotally. However, there is no
way to migrate from synapse to dendrite yet.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;The biggest issue I have run into with Synapse is it is pretty resource
intensive. I started out using a VPS with 2 cores and 1GB RAM, but with
more activity, it couldn&amp;#8217;t keep up and my server would basically DoS
itself from the extra load and become unavailable. So, I upgraded to a
2 core and 2GB RAM server. That bumped my prices from $5 to $15 per
month. A price I didn&amp;#8217;t want to pay. But, I did it anyway.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_my_setup&quot;&gt;My Setup&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I have been running synapse on OpenBSD with PostgreSQL, in addition to
hosting element-web on my server. With that added performance, the server
is basically sitting idle most of the time, all the while I do need
that extra RAM because of what synapse gobbles up.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_my_new_plan&quot;&gt;My New Plan&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I already paid for my server at home, as well as the electric bill and
everything else. Why am I letting this perfectly good hardware go to
waste? After hearing a good idea on the OpenBSD Matrix group, I decided
it is a good idea to follow a similar idea. My home internet is already
pretty good, so why not move synapse and PostgreSQL to my local server?
This isn&amp;#8217;t a comprehensive migration solution, but a loose documenting
of some of the stuff I did to accomplish my task.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I don&amp;#8217;t want to move EVERYTHING back my house, because I don&amp;#8217;t want my
home IP exposed. So my new gameplan is:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;olist arabic&quot;&gt;
&lt;ol class=&quot;arabic&quot;&gt;
&lt;li&gt;
&lt;p&gt;Set up an OpenBSD 7.3 virtual machine on my local server&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Set up a site to site VPN for migration&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Restore my data to this server&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Spin up a new OpenBSD 7.3 VPS (my current one is 7.2 so might as well go afresh)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Set up all the relayd, httpd, etc. etc. on it&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Set up a site to site VPN between the 2&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Shut down the old&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Dump and restore the database to my local server&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Restore the last bit of data with an rsync&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Turn on all the lights&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Make DNS changes&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;With this done, let&amp;#8217;s move forward.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;sect2&quot;&gt;
&lt;h3 id=&quot;_set_up_a_virtual_machine&quot;&gt;Set up a Virtual Machine&lt;/h3&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;My local server is running FreeBSD 13.2, and I am managing my VMs with
&lt;a href=&quot;https://www.freshports.org/sysutils/vm-bhyve&quot;&gt;vm-bhyve&lt;/a&gt;.
Thankfully, I already created an OpenBSD 7.3 image, so I provisioned it.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;sudo vm provision &amp;lt;long-id-here&amp;gt; matrix&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I then used restic to restore backup configurations locally. Mainly
user stuff, some config files and my element-web stuff. More will come
later as I move along.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect2&quot;&gt;
&lt;h3 id=&quot;_set_up_a_vpn&quot;&gt;Set up a VPN&lt;/h3&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;For this I chose WireGuard. It handles domain names, which works for my
ever changing IP address here at home. I take advantage of Namecheap&amp;#8217;s
A+ record to handle my ISP&amp;#8217;s dynamically given IP with &lt;a href=&quot;https://ddclient.net/&quot;&gt;ddclient&lt;/a&gt;.
The WireGuard setup was easier than I thought.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;This is only a temporary VPN, since it will be to conveniently get my
data off the old server and onto the new. I will repeat this setup later,
but with the new server. Same thing, different keys. And I will delete
this temporary tunnel.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;On my local server, I created &lt;code&gt;/etc/hostname.wg0&lt;/code&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-conf&quot; data-lang=&quot;conf&quot;&gt;wgkey mykeyLocal wgport 51820
inet 10.25.50.2 255.255.255.0
wgpeer pubkeyRemote wgendpoint remote.example.com 51820 wgaip 10.25.50.1&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;And on my remote server&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-conf&quot; data-lang=&quot;conf&quot;&gt;wgkey mykeyRemote wgport 51820
inet 10.25.50.2 255.255.255.0
wgpeer pubkeyLocal wgendpoint local.example.com 51820 wgaip 10.25.50.2&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;On each, I also have firewall rules. I will tighten this down later, this
is just temporary:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-conf&quot; data-lang=&quot;conf&quot;&gt;pass in on egress proto udp from any to any port 51820
pass on wg0
pass out on egress inet from (wg0:network) nat-to (egress:0)&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Load the firewall rules &lt;code&gt;pfctl -f /etc/pf.conf&lt;/code&gt;. Later I want
to ratchet this down more so the VPN only works and is exposed between
my home and the server. Another downside which I will have to figure
out later, is to monitor if my IP changes and do something about adding
it to PF. This is outside the scope of this, but&amp;#8230;&amp;#8203;I&amp;#8217;ll put my script in
later in this post.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect2&quot;&gt;
&lt;h3 id=&quot;_restore_my_data&quot;&gt;Restore my data&lt;/h3&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I have my new server set up with its own disk at &lt;code&gt;/var/synapse&lt;/code&gt; to use.
With my servers communicating, let&amp;#8217;s sync up &lt;code&gt;/var/synapse&lt;/code&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;rsync -az /var/synapse/ root@10.25.50.2:/var/synapse/&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Let it run, eventually it will be synced up. Later when I turn the old
server off, I have to sync these again. Now that I think about it, Python
versions are probably incorrect too so I will likely have to handle that
since I build synapse instead of relying on ports. I just found this easier
for my own taste since I don&amp;#8217;t want to ride on OpenBSD -current (actually,
that&amp;#8217;s what I did in the end, more on that later).&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;sect3&quot;&gt;
&lt;h4 id=&quot;_restoring_packages&quot;&gt;Restoring Packages&lt;/h4&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;When I backup my matrix server, I also run &lt;code&gt;pkg_info -m -z&amp;#8201;&amp;#8212;&amp;#8201;&amp;gt; $HOME/packages.txt&lt;/code&gt;
as a part of my script. This dumps my installed packages in a fuzzy format so
I can quickly restore them on the new server like this&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;pkg_add `cat packages.txt`&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect2&quot;&gt;
&lt;h3 id=&quot;_the_new_vps&quot;&gt;The New VPS&lt;/h3&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Now to set up the new server. Previously, I was partitioning this server
by hand because I wanted to maximize space for &lt;code&gt;/var/synapse&lt;/code&gt;. However,
since I have plenty of free space on my local server to store my Matrix
data, I went with the auto partitioning in the VPS since it won&amp;#8217;t be
storing anything.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;This server will only be handling:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;ulist&quot;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;httpd&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;relayd&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;pf&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;sshd&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I copied all these configs, as well as crontabs, my personal scripts, and
user data to the VPS and set up my VPN as I did earlier. I did make
adjustments to my firewall. I have a script running that will do a DNS
check every minute to the authoritative DNS server for my domain name to
see if the A record changed. And if it did, add the new IP address to
PF by using a table, then removing the old IP address.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Here&amp;#8217;s my configs for each file:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;&lt;code&gt;/etc/httpd.conf&lt;/code&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-conf&quot; data-lang=&quot;conf&quot;&gt;types {
        include &quot;/usr/share/misc/mime.types&quot;
}

server &quot;web.example.com&quot; {
        listen on * port 8080
        location &quot;/*&quot; {
                root &quot;/htdocs/web.example.com&quot;
                #request strip 1
        }
}

server &quot;example.com&quot; {
        listen on * port 80
        alias autoconfig.example.com
        location &quot;/.well-known/acme-challenge/*&quot; {
                root &quot;/acme&quot;
                request strip 2
        }
        location * {
                block return 302 &quot;https://$HTTP_HOST$REQUEST_URI&quot;
        }
}

server &quot;example.com&quot; {
        listen on * port 443
        alias autoconfig.example.com
        hsts { subdomains, preload }
        location &quot;/.well-known/acme-challenge/*&quot; {
                root &quot;/acme&quot;
                request strip 2
        }
        location &quot;/.well-known/matrix/*&quot; {
                root &quot;/matrix&quot;
                request strip 2
        }
        location &quot;/*&quot; {
                directory auto index
                root &quot;/matrix&quot;
        }
}&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;&lt;code&gt;/etc/relayd.conf&lt;/code&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-conf&quot; data-lang=&quot;conf&quot;&gt;ip4=&quot;$publicIP4&quot;
ip6=&quot;$publicIP6&quot;

table &amp;lt;element&amp;gt; { 127.0.0.1 }
table &amp;lt;matrixserver&amp;gt;  { 10.25.50.2 } # the IP of my synapse server in the VPN&#39;s network

log connection

http protocol &quot;https&quot; {
        tls { tlsv1.2, tlsv1.3, ciphers secure }
        tls keypair &quot;example.com&quot;
        tls {session tickets }
        match header set &quot;X-Forwarded-For&quot;   value &quot;$REMOTE_ADDR&quot;
        match header set &quot;X-Forwarded-Proto&quot; value &quot;https&quot;
        #match header set &quot;X-Forwarded-Proto&quot; value &quot;SERVER_ADDR:$SERVER_PORT&quot;

        match response header set &quot;Server&quot; value &quot;flippinburgers&quot;

        # set CORS header for .well-known/matrix/server, .well-known/matrix/client
        # httpd does not support setting headers, so do it here
        match request path &quot;/.well-known/matrix/*&quot; tag &quot;matrix-cors&quot;
        match response tagged &quot;matrix-cors&quot; header set &quot;Access-Control-Allow-Origin&quot; value &quot;*&quot;

        pass request quick header &quot;Host&quot; value &quot;web.example.com&quot; forward to &amp;lt;element&amp;gt;

        # pass on non-matrix traffic to webserver
        #pass                                 forward to &amp;lt;webserver&amp;gt;
        #pass                                 forward to &amp;lt;element&amp;gt;
}

relay &quot;https_traffic&quot; {
        listen on $ip4 port 443 tls
        protocol &quot;https&quot;
        forward to &amp;lt;matrixserver&amp;gt; port 8008 check tcp
        forward to &amp;lt;element&amp;gt; port 8080 check tcp
}

relay &quot;https_traffic6&quot; {
        listen on $ip6 port 443 tls
        protocol &quot;https&quot;
        forward to &amp;lt;matrixserver&amp;gt; port 8008 check tcp
        forward to &amp;lt;element&amp;gt; port 8080 check tcp
}

http protocol &quot;matrix&quot; {
        tls { tlsv1.2, tlsv1.3, ciphers secure }
        tls keypair &quot;example.com&quot;
        block
        pass quick path &quot;/_matrix/*&quot;         forward to &amp;lt;matrixserver&amp;gt;
        pass quick path &quot;/_synapse/client/*&quot; forward to &amp;lt;matrixserver&amp;gt;
}

relay &quot;matrix_federation&quot; {
        listen on $ip4 port 8448 tls
        protocol &quot;matrix&quot;
        forward to &amp;lt;matrixserver&amp;gt; port 8008 check tcp
}

relay &quot;matrix_federation6&quot; {
        listen on $ip6 port 8448 tls
        protocol &quot;matrix&quot;
        forward to &amp;lt;matrixserver&amp;gt; port 8008 check tcp
}&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;&lt;code&gt;/etc/pf.conf&lt;/code&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-conf&quot; data-lang=&quot;conf&quot;&gt;table &amp;lt;homeip&amp;gt; persist file &quot;/etc/homeip&quot;
table &amp;lt;bruteforce&amp;gt; persist
table &amp;lt;rfc1918&amp;gt; const { 192.168.0.0/16, 172.16.0.0/12, 10.0.0.0/8 }

set skip on lo

set loginterface egress
match in all scrub (no-df random-id max-mss 1440)
antispoof quick for egress
block in on egress from { &amp;lt;bruteforce&amp;gt; &amp;lt;rfc1918&amp;gt; } to any
block in log all
pass from (self)
pass out on egress

pass in on egress inet proto tcp from any to (egress) port { http, https, 8008, 8448 } keep state
pass in on egress inet6 proto tcp from any to (egress) port { http, https, 8008, 8448 } keep state

pass proto tcp from any to (egress) port ssh &#92;
        keep state (max-src-conn 15, max-src-conn-rate 5/3, &#92;
                overload &amp;lt;bruteforce&amp;gt; flush global)

pass in on egress proto udp from &amp;lt;homeip&amp;gt; to any port 51821
pass on wg1
pass out on egress inet from (wg1:network) nat-to (egress:0)

pass in on egress inet6 proto icmp6 all icmp6-type { echoreq routeradv neighbrsol neighbradv }
pass in on egress inet proto icmp icmp-type { echoreq, unreach }

# By default, do not permit remote connections to X11
block return in on ! lo0 proto tcp to port 6000:6010

# Port build user does not need network
block return out log proto {tcp udp} user _pbuild&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;And here is my script for checking the IP and updating my firewall rules.
This runs every minute in cron&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;&lt;code&gt;/usr/local/bin/changeip&lt;/code&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;#!/usr/bin/env sh

currentip=$(dig +short @dns1.registrar-servers.com myhomeip.example.com)
fileip=$(cat /etc/homeip)

if [ &quot;$currentip&quot; != &quot;$fileip&quot; ]; then
        echo &quot;$currentip&quot; &amp;gt; /etc/homeip
        pfctl -t homeip -T add &quot;$currentip&quot;
        pfctl -t homeip -T delete &quot;$fileip&quot;
fi&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;admonitionblock note&quot;&gt;
&lt;table&gt;
&lt;tr&gt;
&lt;td class=&quot;icon&quot;&gt;
&lt;div class=&quot;title&quot;&gt;Note&lt;/div&gt;
&lt;/td&gt;
&lt;td class=&quot;content&quot;&gt;
This script isn&amp;#8217;t tested, my IP hasn&amp;#8217;t changed yet :)
&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;With all these configuration on hand, I should be able to accept connections
and pass them along back to my home server&amp;#8217;s virtual machine, once that
part is ready. Last bit is the WireGuard tunnel part. It&amp;#8217;s basically what
I did earlier between my old VPS and my VM at home, but change the IP address
to something different for the new VPS.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_moving_to_the_new_server&quot;&gt;Moving to the New Server&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;For moving to the new server, I turned off synapse on the old server so
I wasn&amp;#8217;t getting new data. I then did a dump of the database and a restore
to the database on the new one. I basically followed the Option 1 method
in &lt;code&gt;/usr/local/share/doc/pkg-readmes/postgresql-server&lt;/code&gt; to get this.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Admittedly, I didn&amp;#8217;t really change my pf rules a whole lot on this server
since the only publicly listening service is synapse. And I set my bind
address in the homeserver.yaml file to be the VPN address. And only servers
in this VPN tunnel can talk with each other. And, it&amp;#8217;s a public endpoint
anyway and with my router and all in the way, it&amp;#8217;s not a threat for me.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Now that PostgreSQL is restored to my local database I did one last rsync
of my data and made a couple tweaks to the homeserver.yaml file, like
the bind address.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;sect2&quot;&gt;
&lt;h3 id=&quot;_the_problem&quot;&gt;The Problem&lt;/h3&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Earlier I said I did not want to play the OpenBSD -current game with this
server. Well, meh. I was having troubles getting the server to work right
with building synapse for OpenBSD 7.3. I could have made it work, but I
didn&amp;#8217;t want to deal with it. So I upgraded to -current and am now using
the synapse package that is in ports. I feel safer with this because I
can easily and quickly power off my VM and do a ZFS snapshot of it before
doing my &lt;code&gt;sysupgrade&lt;/code&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_wrapping_up&quot;&gt;Wrapping Up&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;The last part then was to start the synapse server, ensure relayd and httpd
were playing nice on my VPS. I made changes to DNS to ensure my domain names
were pointing to the VPS, and then I got new SSL certs. I then made sure that
everything was talking with DNS propagated, and it was! I was able to chat
over Matrix again.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I got backups working of my synapse server too. I don&amp;#8217;t care to backup my
web server. That&amp;#8217;s all documented here so I can copy/paste ;) I&amp;#8217;ll probably
back it up anyway but it isn&amp;#8217;t a priority at the moment of writing.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;So yeah. That was my migration process. I&amp;#8217;m saving a few bucks a month now.
I think performance is a bit better. I get a 404 here and there though
that I need to diagnose. Maybe I&amp;#8217;m losing connection between my home server
and this VPS but it is only ever for a minute right now at any given time.
Not the biggest issue, and it is a bit expected.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</description>
      <pubDate>Tue, 15 Aug 2023 00:20:00 PDT</pubDate>
      <dc:creator>Courtney</dc:creator>
      <guid>https://blog.passwordclass.xyz/posts/my-matrix-server-migration/</guid>
    </item>
    <item>
      <title>Setting Up An OpenBSD Mail Server</title>
      <link>https://blog.passwordclass.xyz/posts/setting-up-an-openbsd-mail-server/</link>
      <description>&lt;div id=&quot;toc&quot; class=&quot;toc&quot;&gt;
&lt;div id=&quot;toctitle&quot;&gt;Table of Contents&lt;/div&gt;
&lt;ul class=&quot;sectlevel1&quot;&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/setting-up-an-openbsd-mail-server/#_openbsd&quot;&gt;OpenBSD&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/setting-up-an-openbsd-mail-server/#_initial_setup&quot;&gt;Initial Setup&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I&amp;#8217;ve mulled over setting up a mail server for years. I tried once
5 years ago, and failed. I don&amp;#8217;t know why I wanted to do this, it&amp;#8217;s
just something I wanted to do. So I did.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I have been on a kick to move a lot of servers to OpenBSD. I love
OpenBSD. It is simple (as in simplicity) to use, and I find it easier
for me to maintain more than other operating systems. I also liked
having OpenSMTPD built in. I read a lot of articles, and found none
of them really worked. I guess email isn&amp;#8217;t a one size fits all thing.
I pulled together everything I found and built it my own way. I&amp;#8217;m sure
the way I did it will be yet another one of those blog posts. Works for
me, doesn&amp;#8217;t work for you.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Here, I have this documented for myself, and hopefully it can help you.
I didn&amp;#8217;t understand a LOT of what I was setting up. I really learned
a lot as I did it. I would encourage reading the man pages as you go
and documentation. There&amp;#8217;s a lot of moving parts. I&amp;#8217;ll do my best to
explain some of this stuff. So here we go!&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_openbsd&quot;&gt;OpenBSD&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;First, you need a stable provider. If you want to send mail, you want a
VPS provider with good uptime, will give you a clean IP, and of course
you want one that will let you install OpenBSD.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;One thing that sucks is if you want to send emails to the bigger email
companies like Google, Microsoft, Apple, you may find out you are SOL
only when you have everything set up. You can plug your IP into a site
like MXToolbox and see for yourself if you have a clean IP, but these
other companies have their own blackbox lists and you probably won&amp;#8217;t
find out until you send your first email to them and get the sad bounce.
Vultr could be a good option, but you have to ask for permission to
open the right ports. This usually means you won&amp;#8217;t get blocked by the
big email companies. Currently, I am blocked on RamNode&amp;#8217;s network. Hoping
they can resolve the issue, otherwise I have to move everything and
try again myself.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_initial_setup&quot;&gt;Initial Setup&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Once your system is up and running, you&amp;#8217;ll want to do your syspatches and
what not. You can do any other tweaking you might like here. Assign
your IP addresses, go set your A and AAAA records as well as your
PTR (or rDNS) records. I set these records:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;A - mail.example.com
CNAME - smtp.example.com
CNAME - imap.example.com&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</description>
      <pubDate>Tue, 07 Mar 2023 18:45:30 PST</pubDate>
      <dc:creator>Courtney</dc:creator>
      <guid>https://blog.passwordclass.xyz/posts/setting-up-an-openbsd-mail-server/</guid>
    </item>
    <item>
      <title>Faster SSH Connections with Control Master</title>
      <link>https://blog.passwordclass.xyz/posts/openssh-control-master/</link>
      <description>&lt;div id=&quot;toc&quot; class=&quot;toc&quot;&gt;
&lt;div id=&quot;toctitle&quot;&gt;Table of Contents&lt;/div&gt;
&lt;ul class=&quot;sectlevel1&quot;&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/openssh-control-master/#_how_to_setup&quot;&gt;How to Setup&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/openssh-control-master/#_resources&quot;&gt;Resources&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Many years ago I was told about a way to speed up my SSH connections to servers
I have recently made a connection to. The idea was that a session would be kept
open for a certain amount of time, even when you had closed out of your sessions.
I couldn&amp;#8217;t remember the name, so I forgot about it until today when I was trying
to find out ways to speed up my Ansible connections.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;If you&amp;#8217;re like me, you may have many SSH connections opened up to the same server.
This trick will make it so your first connection to that server is slow, but
any following connections to that server will be sped up because you will have
an already opened multiplexed connection.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_how_to_setup&quot;&gt;How to Setup&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Setting it up is simple. You can either set this in your system-wide ssh_config
file at &lt;code&gt;/etc/ssh/ssh_config&lt;/code&gt;, or set this on in your own user&amp;#8217;s ssh_config file
at &lt;code&gt;~/.ssh/config&lt;/code&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;These are the lines I set:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-conf&quot; data-lang=&quot;conf&quot;&gt;Host *
	IdentitiesOnly	yes
	ControlPath   	~/.ssh/controlmasters/%C
	ControlMaster 	auto
	ControlPersist	60m&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;ControlPath is where the control socked will be stored. &lt;code&gt;%C&lt;/code&gt; will be a hash and
not human readable. If you want it human readable, you could do something like
&lt;code&gt;%r@%h:%p&lt;/code&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;ControlMaster is what lets you create the sessions and handle the control sockets.
auto will do it automatically for all hosts, and you can specify &lt;code&gt;autoask&lt;/code&gt; if you
want to be asked to confirm it.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;ControlPersist says how long that session will stay active in the background when
you close your session. So if you disconnect, and remember you wanted to do something
on that server, you won&amp;#8217;t have to wait to establish an entire new connection, you will
connect of the session that is sitting in the background.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_resources&quot;&gt;Resources&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;ulist&quot;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://man.openbsd.org/ssh_config.5#ControlMaster&quot; class=&quot;bare&quot;&gt;https://man.openbsd.org/ssh_config.5#ControlMaster&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://man.openbsd.org/ssh_config.5#ControlPath&quot; class=&quot;bare&quot;&gt;https://man.openbsd.org/ssh_config.5#ControlPath&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://man.openbsd.org/ssh_config.5#ControlPersist&quot; class=&quot;bare&quot;&gt;https://man.openbsd.org/ssh_config.5#ControlPersist&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</description>
      <pubDate>Sat, 07 Jan 2023 18:45:30 PST</pubDate>
      <dc:creator>Courtney</dc:creator>
      <guid>https://blog.passwordclass.xyz/posts/openssh-control-master/</guid>
    </item>
    <item>
      <title>My OpenBSD Audio Woes and My (Hopeful) Resolution</title>
      <link>https://blog.passwordclass.xyz/posts/openbsd_audio_woes/</link>
      <description>&lt;div id=&quot;toc&quot; class=&quot;toc&quot;&gt;
&lt;div id=&quot;toctitle&quot;&gt;Table of Contents&lt;/div&gt;
&lt;ul class=&quot;sectlevel1&quot;&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/openbsd_audio_woes/#_the_trouble&quot;&gt;The Trouble&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/openbsd_audio_woes/#_usb_on_openbsd_sucks&quot;&gt;USB on OpenBSD Sucks&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/openbsd_audio_woes/#_new_hardware_time&quot;&gt;New Hardware Time&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/openbsd_audio_woes/#_audio_on_openbsd_sucks&quot;&gt;Audio on OpenBSD Sucks&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/openbsd_audio_woes/#_sowhat_now&quot;&gt;So&amp;#8230;&amp;#8203;What Now?&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I have been an OpenBSD desktop user &lt;a href=&quot;https://blog.passwordclass.xyz/posts/2022/05/my-openbsd-desktop/&quot;&gt;since May&lt;/a&gt;.
In my blog post, I mentioned I was having some audio woes with OpenBSD. Namely, when running Firefox
on OpenBSD it wouldn&amp;#8217;t take long for the audio to sound like someone was taking a hammer to my ears.
Now that may be an exaggeration, but someone might as well have because the stuttering frustrated
me to no end. I tried a handful of solutions:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;olist arabic&quot;&gt;
&lt;ol class=&quot;arabic&quot;&gt;
&lt;li&gt;
&lt;p&gt;Reducing core usage in Firefox&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Switching Firefox cache to use an mfs filesystem&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Handful of knobs to reduce as much I/O to disk as possible&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;No luck.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_the_trouble&quot;&gt;The Trouble&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;After (likely) annoying people too much on the OpenBSD Matrix channel (sorry!), I have concluded
a couple things:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;olist arabic&quot;&gt;
&lt;ol class=&quot;arabic&quot;&gt;
&lt;li&gt;
&lt;p&gt;USB on OpenBSD sucks&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Audio on OpenBSD sucks&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Now in many ways I most certainly feel like an outsider to OpenBSD. The community is great, but
because of the way the OpenBSD dev community operates, it is perhaps unlikely to get anywhere
with any sort of audio bugs. After perusing the bugs and misc mailing lists, there seems to be a
lot of unanswered and unresolved threads relating to audio issues.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I get it. OpenBSD is a small group, basically all donation based, and there are so many hands.
So on one hand I feel my complaint is valid, but my expectation to have something fixed simply
should not be an expectation. I have pretty well learned that a lot of OpenBSD is by and for
the developers. If you aren&amp;#8217;t one, then, well, you probably aren&amp;#8217;t going to get what you want.
I don&amp;#8217;t fault the project with this. In fact, even if there are some things that frustrate me,
such as this audio issue, I really appreciate what the project has become because of their approach
to who contributes what.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_usb_on_openbsd_sucks&quot;&gt;USB on OpenBSD Sucks&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;At first, I pointed my fingers at Firefox. After Firefox 91 ESR these problems ensued. But
this seems to only be a problem because (as the devs tell me) USB is far from perfect on
OpenBSD, and yes, apparently the stack is flimsy enough that a (heavy) browser can thrash
the crap out of it.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_new_hardware_time&quot;&gt;New Hardware Time&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Since I pretty well decided I won&amp;#8217;t be using chromium browsers anytime soon, and there&amp;#8217;s probably
no way I could expect USB to get to a place I want (maybe if I had donation money and someone
who would take up the work), I decided to try out S/PDIF audio.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I bought an AudioEngine D1 DAC deciding that if USB audio sucks hardcore, then maybe using
the S/PDIF out on my motherboard could bypass that and I&amp;#8217;ll get good sound.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Boy, I didn&amp;#8217;t think it could possibly get worse. It seems this issue has been mentioned
in the past at least twice&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;olist arabic&quot;&gt;
&lt;ol class=&quot;arabic&quot;&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://marc.info/?l=openbsd-bugs&amp;amp;m=160112047222899&amp;amp;w=2&quot; class=&quot;bare&quot;&gt;https://marc.info/?l=openbsd-bugs&amp;amp;m=160112047222899&amp;amp;w=2&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://marc.info/?l=openbsd-bugs&amp;amp;m=151652586722827&amp;amp;w=2&quot; class=&quot;bare&quot;&gt;https://marc.info/?l=openbsd-bugs&amp;amp;m=151652586722827&amp;amp;w=2&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;No resolution. Basically, not too long after use, whatever is playing constantly loops
the last second of audio until finally sndiod just says &quot;NOPE&quot; and now nothing else
will play. Restarting sndiod doesn&amp;#8217;t work. In fact, the daemon successfully runs,
and running in debug mode shows nothing once this happens. You have to restart your
computer.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I&amp;#8217;ve had a 1 hour session of no issues, and a session last half a song. It is
unpredictable.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_audio_on_openbsd_sucks&quot;&gt;Audio on OpenBSD Sucks&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;So, USB audio stutters, the azalia drivers seems to just blow up over S/PDIF, and
standard headphone jack may be usable, but I want good sounding audio darn it!&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_sowhat_now&quot;&gt;So&amp;#8230;&amp;#8203;What Now?&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Well, my previous DAC was a FiiO E10k. Stuttered horribly on OpenBSD. &lt;em&gt;SO FAR&lt;/em&gt;
this AudioEngine D1 does not seem to exhibit this behavior over USB. I am REALLY
hoping this continues to function okay.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;This seems to be a very hardware-specific issue over USB then for audio. So in
conclusion, I will +1 the AudioEngine D1 for OpenBSD. It sounds good, is fairly
compact, and does not stutter when running Firefox on OpenBSD.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</description>
      <pubDate>Mon, 28 Nov 2022 18:45:30 PST</pubDate>
      <dc:creator>Courtney</dc:creator>
      <guid>https://blog.passwordclass.xyz/posts/openbsd_audio_woes/</guid>
    </item>
    <item>
      <title>My Home Server</title>
      <link>https://blog.passwordclass.xyz/posts/my_home_server/</link>
      <description>&lt;div id=&quot;toc&quot; class=&quot;toc&quot;&gt;
&lt;div id=&quot;toctitle&quot;&gt;Table of Contents&lt;/div&gt;
&lt;ul class=&quot;sectlevel1&quot;&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/my_home_server/#_where_i_began&quot;&gt;Where I began&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/my_home_server/#_from_pis_to_towers&quot;&gt;From Pis to Towers&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/my_home_server/#_changing_hardware_to_changing_operating_systems&quot;&gt;Changing Hardware to Changing Operating Systems&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/my_home_server/#_more_new_hardware&quot;&gt;More New Hardware!&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/my_home_server/#_rearranging_my_jails_and_data&quot;&gt;Rearranging My Jails and Data&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/my_home_server/#_where_am_i_at_now&quot;&gt;Where Am I At Now?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/my_home_server/#why-you-should-selfhost&quot;&gt;Why You Should Self Host&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I have been self hosting since about 2015. It is probably something I could say is
a decision that I regret the least and have enjoyed the most. When I say regret the
least I mean it has been a rewarding endeavor for me and has given me much value
since I started using it. I want to share my history of self hosting, what my setup
is now, and my thoughts on why you should do so yourself. If you want to skip the
personal stories, you can go &lt;a href=&quot;https://blog.passwordclass.xyz/posts/my_home_server/#why-you-should-selfhost&quot;&gt;here&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_where_i_began&quot;&gt;Where I began&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;To quickly recap my history prior to self hosting, I started using Ubuntu 13.04
when I started learning more about computers. I started using Linux to prep for
my college education, since I found one of my upcoming courses in my first year
of my cyber security program I would learn Linux, and I saw it was something I could
get a head start on.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;What started my desire to self host was a need I found I had with my school work.
I would work on my laptops and desktop and wanted easy syncing access between my
devices for my school work. I conveniently had a Raspberry Pi 1B at the time and
thought to set up Syncthing on it so I could sync my school work. So, I set up
Raspbian 7 on it, installed Syncthing and let it do its magic.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;That did well for about a year. At that time I began to think &quot;gee, I sure would
love to synchronize calendars and contacts between my phone and computers&quot;. This
was in 2016. I was about to hop onto ownCloud, but around that exact same time that
I was playing around with it, the split to Nextcloud happened. I already knew how
to do a LAMP stack at the time. I had done it dozens of times to learn how to build
simple servers, normally setting up Wordpress and not doing much with it.
I had also purchased a Pi 2 around that time, then set up Nextcloud 9 with
the Raspberry Pi and had a 32GB flash drive plugged in. I stopped using Syncthing
at the time and used Nextcloud&amp;#8217;s syncing instead and utilized its WebDAV support
to handle syncing calendars and contacts with my iPhone and Thunderbird client.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I had a great time running Nextcloud. In fact, I&amp;#8217;m still running the same database
that I started out with with Nextcloud 9 in 2016. Eventually, I introduced the idea
to my family, and they liked it. So in the nature of me using more files and letting
my family use Nextcloud with me, I got the Nextcloud Box that came with a 1TB
hard drive. I got an upgrade from my 32GB flash drive then, woohoo!&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_from_pis_to_towers&quot;&gt;From Pis to Towers&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I ran my Pi server for quite some time. However, I wanted to do more. Just having
a Nextcloud box in my house wasn&amp;#8217;t enough. I wanted to try out different things.
Also the Pi wasn&amp;#8217;t keeping up with my use. I actually didn&amp;#8217;t stick with the Nextcloud
Box too long. After 4 months I got an HP Proliant ML110 G6 off eBay for $110. I
upgraded it to 16GB and switched to Ubuntu Server 16.04. I wanted to also
increase storage, so I got some refurbished (mistake #1) enterprise HDDs so I could
do LXD containers and ZFS to mirror the disks and &quot;jail&quot; off my services.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I set up a bunch of random stuff. I made a website for one of my classes with
just HTML, CSS, and a little JS, moved Nextcloud over, got into running Plex,
samba server, and some other stuff I forget.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_changing_hardware_to_changing_operating_systems&quot;&gt;Changing Hardware to Changing Operating Systems&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I was really digging my setup. Ubuntu 16.04 was great, I really loved the simple
command line interface for LXD, ZFS was running solid and I loved the data protection
and easy disk mirroring it offers. However, by July of 2017 I was wanting to switch
operating systems. At that time there were murmurs of Canonical starting an IPO.
I didn&amp;#8217;t like the idea of my OS being dictated by the mandates of meeting quarterly
earnings and becoming less and less community focused (granted, it probably wasn&amp;#8217;t
all that much to begin with). I really liked my LXD/ZFS combo. Nobody in the Linux
distro community was quite as bold as Canonical for offering an easy way to run ZFS,
and nobody was offering LXD.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;At that point, the thought struck me. I had the opportunity to talk with Allan Jude
and Rodney Grimes at a Linuxfest a few times. I remembered each time I&amp;#8217;d talk to these
two gentlemen they&amp;#8217;d blow my mind with how much they knew. Clearly they were leagues
ahead of me. Being one of the uppermost Linux gurus in my classes (and really, the
rest of the Linuxfest folks advertising their stuff on more of a social merit than
a technological one), I felt like I had never come by people so smart when it came
to operating systems. Sure there were other booths of geniuses, but no one talked
tech like these two. At that time, I investigated FreeBSD. I found out pretty quickly
that FreeBSD offered better ZFS integration, and iocage was an excellent replacement
for LXD. In fact, a lot of the commands were very similar.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;admonitionblock note&quot;&gt;
&lt;table&gt;
&lt;tr&gt;
&lt;td class=&quot;icon&quot;&gt;
&lt;div class=&quot;title&quot;&gt;Note&lt;/div&gt;
&lt;/td&gt;
&lt;td class=&quot;content&quot;&gt;
Don&amp;#8217;t use iocage. It&amp;#8217;s dead. You can read my
&lt;a href=&quot;https://blog.passwordclass.xyz/blogs/2022/01/freebsd-13-0-jails-with-zfs-and-vnet.html&quot;&gt;older article&lt;/a&gt;
on how I do FreeBSD jails now
&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I put FreeBSD on an extra computer, set up identical jails and tried it out. After
a month of playing around, I didn&amp;#8217;t feel fully comfortable with FreeBSD yet, but it
felt like the replacement for me. It fit my needs exactly. So, I went through the
process of reinstalling the OS on my main server and rebuilding everything on the
new installation, and restored data from backups to get Nextcloud back and running
among my other content.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_more_new_hardware&quot;&gt;More New Hardware!&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Around 2019 my demands grew larger with my home server. I wanted to start virtualzing
operating systems, and for some reason my processor would not virtualize. It was
time for an upgrade. I found myself an HP Z440 with a 6 core Xeon and 64GB DDR4 ECC
for $300! Wow! I moved my drives over aaaaand failed to boot. My old system was
doing a traditional BIOS boot and the new server was an EFI system. So I had to reinstall.
I think that time I had used the chance to upgrade to 12.0 or whatever the latest
FreeBSD was.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Finally, last year I wanted to upgrade from my 120GB drives to 500GB so I could do more
and utilize the speed. I bought new drives and made some big changes.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_rearranging_my_jails_and_data&quot;&gt;Rearranging My Jails and Data&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;In my initial setup, I made the mistake of putting my jails on my hard drives and
lumped it in with my data. I found out pretty quick it is not fun to couple
jails and data. Sure, you can. But I was starting to like the idea of thin
and thick jails and utilizing ZFS mounts better. At the same time I also got
2 more 4TB drives. I was going to take my old 2 and existing 2 and do a striped
mirror of sorts, but I don&amp;#8217;t have 6 SATA connectors and I wanted my system on
the new stuff. So I detached a drive, turned my pool into a raidz1, and built my
jails on my SSDs, then copied my data to new datasets on my raidz1 zpool.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;When I was done I had my jails on my SSDs, started making VMs to put on the SSDs,
and had my data separated on my drives. This made managing much more flexible.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_where_am_i_at_now&quot;&gt;Where Am I At Now?&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Now, in the current time I have the same existing setup, however, I moved away
from iocage. Like I said earlier in a note, I changed how I did jails and switched
to FreeBSD&amp;#8217;s built-in management. This works out just fine for my own server use.
There are great tools out there such as Bastille BSD, but I wanted basic tooling.
Bastille is very advanced for the simple stuff I do.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I also have my network set up with some fun gear. It is still a work in progress
though. In January of last year I install OpenBSD 6.8 on my router and made my
first OpenBSD router, having switched from pfSense. Today, I have upgraded that
router to 7.2 and it has been great. It is running on a PC Engines APUc4. The 3rd
port isn&amp;#8217;t used. I intend to learn vlans on OpenBSD and FreeBSD and break out
my jails and VMs more, since it has too much access to my home network as it is.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;why-you-should-selfhost&quot;&gt;Why You Should Self Host&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;

&lt;/div&gt;
&lt;/div&gt;</description>
      <pubDate>Sat, 29 Oct 2022 19:45:30 PDT</pubDate>
      <dc:creator>Courtney</dc:creator>
      <guid>https://blog.passwordclass.xyz/posts/my_home_server/</guid>
    </item>
    <item>
      <title>Simulate Packet Loss with iptables</title>
      <link>https://blog.passwordclass.xyz/posts/iptables_simulate_packetloss/</link>
      <description>&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I work primarily with Linux servers during &lt;code&gt;$dayjob&lt;/code&gt; and sometimes come across needs
where I need to have packet loss. Of course, I can&amp;#8217;t be sitting around waiting for
it to happen. Turns out, there&amp;#8217;s a pretty simple way to do this.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre&gt;iptables -A INPUT -s &amp;lt;SOURCE_IP_ADDRESS&amp;gt; -m statistic --mode random --probability 0.1 -j DROP&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;You can find more info in the
&lt;a href=&quot;https://ipset.netfilter.org/iptables-extensions.man.html&quot;&gt;iptables-extensions(8)&lt;/a&gt; man page.
There are some other settings beyond random and probability to make packets drop.
So, if you need a more precise kind of packet loss, you could do something like
drop every nth packet.&lt;/p&gt;
&lt;/div&gt;</description>
      <pubDate>Wed, 28 Sep 2022 19:45:30 PDT</pubDate>
      <dc:creator>Courtney</dc:creator>
      <guid>https://blog.passwordclass.xyz/posts/iptables_simulate_packetloss/</guid>
    </item>
    <item>
      <title>Fixing OpenBSD Bootcode</title>
      <link>https://blog.passwordclass.xyz/posts/fixing_openbsd_bootcode/</link>
      <description>&lt;div id=&quot;toc&quot; class=&quot;toc&quot;&gt;
&lt;div id=&quot;toctitle&quot;&gt;Table of Contents&lt;/div&gt;
&lt;ul class=&quot;sectlevel1&quot;&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/fixing_openbsd_bootcode/#_windows_install_woes&quot;&gt;Windows Install Woes&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/fixing_openbsd_bootcode/#_fixing_openbsd_bootcode&quot;&gt;Fixing OpenBSD Bootcode&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/fixing_openbsd_bootcode/#_if_you_read_this_in_the_future&quot;&gt;If You Read This In The Future&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Back in April(?) of this year when I got my AMD RX 6700XT graphics card I came across
FreeBSD still not supporting the card. So, I switched my desktop to OpenBSD. In that
same step, I had to fix Windows because it put some of its bootcode on my FreeBSD drive.
Long story short, I switched to Linux to do my gaming for a few months because Windows
wouldn&amp;#8217;t install. My last desktop died, and over time found Linux didn&amp;#8217;t fit my needs
entirely and switched back to Windows.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_windows_install_woes&quot;&gt;Windows Install Woes&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Windows is &lt;strong&gt;dumb&lt;/strong&gt;. In the installer, I went to wipe my Linux drive (good luck figuring
out which drive is which for starters&amp;#8230;&amp;#8203;disk 1,2,3 is SO descriptive). When I selected
the option to configure my now empty drive to be my install target, Windows complained
that my System partition was too small. What System partition? This is an empty drive!&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;&amp;#8230;&amp;#8203;ahhh&amp;#8230;&amp;#8203; said I, when I realized Windows wanted to be the &lt;em&gt;only&lt;/em&gt; OS on my machine.
In other words, it said &quot;that OTHER System partition must go&quot;, being my OpenBSD
EFI partition. I wanted Windows, so I had no choice. Bye bye OpenBSD EFI partition.
I had Windows up and running, now to fix OpenBSD since it was no longer bootable with
the EFI stuff gone.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_fixing_openbsd_bootcode&quot;&gt;Fixing OpenBSD Bootcode&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;This part was a little tricky. I think this could have been easily achieved by booting
into the OpenBSD live installer, but after talking with some people on the OpenBSD
Matrix channel, I learned you can point to the existing drive at the &lt;code&gt;boot&amp;gt;&lt;/code&gt; prompt
from a live USB. Allegedly, at the &lt;code&gt;boot&amp;gt;&lt;/code&gt; prompt you coan type &lt;code&gt;diskinfo&lt;/code&gt; and get
your disks listed? Didn&amp;#8217;t work for me anyway. But I found out that typing
&lt;code&gt;boot hd1a:/bsd&lt;/code&gt; booted straight to my OpenBSD installation! It was just like I had
never screwed up its boot code. For you it could be &lt;code&gt;hd2a&lt;/code&gt; or &lt;code&gt;hd3a&lt;/code&gt; or whatever so
if you don&amp;#8217;t get the expected outcome, try incrementing the drive number.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Now I was in my system&amp;#8230;&amp;#8203;now what? Allegedly, &lt;code&gt;installboot(8)&lt;/code&gt; is supposed to be
a solution, as it says in the man page&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;quoteblock&quot;&gt;
&lt;blockquote&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;installboot installs bootstrap on the specified disk&lt;/p&gt;
&lt;/div&gt;
&lt;/blockquote&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;That didn&amp;#8217;t work for me. With uncertainty, I went to the
&lt;a href=&quot;https://www.openbsd.org/faq/faq14.html#fdisk&quot;&gt;Using fdisk&lt;/a&gt; section of the OpenBSD
FAQ where it says:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;quoteblock&quot;&gt;
&lt;blockquote&gt;
&lt;div class=&quot;literalblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre&gt;A totally blank disk will need to have the master boot record&#39;s boot code written to the disk before it can boot. Normally, all you need to do is:&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/blockquote&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Followed by the command:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;# fdisk -iy sd0&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;In the past, I did this following the GPT section shown
&lt;a href=&quot;https://www.openbsd.org/faq/faq14.html#softraidFDE&quot;&gt;below&lt;/a&gt; in the Full Disk Encryption
section. There, it specifies the command for GPT for UEFI booting is different:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;# fdisk -gy -b 960 sd0&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;So, I did that since my drive is in fact sd0. Did a reboot and bing bang boom, my
computer booted OpenBSD again!&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_if_you_read_this_in_the_future&quot;&gt;If You Read This In The Future&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I wanted to make a note here that since this is a &quot;how to fix X&quot; article to always
reference the latest documentation WITHIN OpenBSD and their FAQ pages in case anything
changes. But, if you landed in the same predicament as me and don&amp;#8217;t want to nuke your
install, this should be your fix.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</description>
      <pubDate>Wed, 28 Sep 2022 19:45:30 PDT</pubDate>
      <dc:creator>Courtney</dc:creator>
      <guid>https://blog.passwordclass.xyz/posts/fixing_openbsd_bootcode/</guid>
    </item>
    <item>
      <title>FreeBSD Backups with Zap</title>
      <link>https://blog.passwordclass.xyz/posts/freebsd_backups_with_zap/</link>
      <description>&lt;div id=&quot;toc&quot; class=&quot;toc&quot;&gt;
&lt;div id=&quot;toctitle&quot;&gt;Table of Contents&lt;/div&gt;
&lt;ul class=&quot;sectlevel1&quot;&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/freebsd_backups_with_zap/#_my_backup_process&quot;&gt;My Backup Process&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/freebsd_backups_with_zap/#_a_problem_with_rotations&quot;&gt;A Problem with Rotations&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/freebsd_backups_with_zap/#_lazy_roation&quot;&gt;Lazy Roation?&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;A while back I tried to develop a script to handle ZFS backups from my server
to my external hard drive. Well, in the end I really didn&amp;#8217;t like what I came
up with and thought it best to look at
&lt;a href=&quot;https://www.freshports.org/sysutils/zap/&quot;&gt;sysutils/zap&lt;/a&gt; to do my backups. The
tool has worked great for me and reliably does snapshots and sends them to
my destination. I have ran into some issues though. Maybe this will come by
the developer or maybe I can learn to make the improvements I would like to
see&amp;#8230;&amp;#8203;or maybe there&amp;#8217;s something better! But, I&amp;#8217;d rather improve this tool
than redo backups if it came down to it.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_my_backup_process&quot;&gt;My Backup Process&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I have a 3-2-1 process of doing backups&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;3 copies of data
2 on different media
1 offsite&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I won&amp;#8217;t go through any of the setting up because the
&lt;a href=&quot;https://github.com/Jehops/zap&quot;&gt;GitHub repository&lt;/a&gt; and
a &lt;a href=&quot;https://ftfl.ca/blog/2016-12-27-zfs-replication.html&quot;&gt;blog linked&lt;/a&gt; in the
developer&amp;#8217;s website is plenty sufficient to get started.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;With it set up, I rotate my drive out every month. Since this is just me and
my family, I don&amp;#8217;t have a more rapid rotation schedule. I have a cron job
that will daily take a snapshot that has a TTL of 6 weeks, and once a month
takes a snapshot with a 3 month TTL.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;#!/usr/bin/env sh

zpool import backups
/usr/local/bin/zap rep -Fv
/usr/local/bin/zap destroy
zpool export backups
camcontrol standby da0&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;This imports the zpool, does the replication, deletes old snapshots, exports,
and lastly does a standby on the drive so it powers down until next time.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_a_problem_with_rotations&quot;&gt;A Problem with Rotations&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Not too long ago, I found there was an issue with drive rotation. Namely,
there is an order to how to get the drive rotated &lt;em&gt;in&lt;/em&gt; up to date. If I
just plugged in my drive and did a &lt;code&gt;zap rep&lt;/code&gt;, I would not get everything
to sync or get errors. That is because there is a mismatch in snapshots
between the source and destination. So, I found the best method is to&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;olist arabic&quot;&gt;
&lt;ol class=&quot;arabic&quot;&gt;
&lt;li&gt;
&lt;p&gt;import the zpool&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;run &lt;code&gt;zap destroy&lt;/code&gt; to delete old snapshots on the backup drive&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;run &lt;code&gt;zap rep -Fv&lt;/code&gt; to get everything up to date&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;The other way around does not work as you would expect.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_lazy_roation&quot;&gt;Lazy Roation?&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Just last night I came across an issue where I had everything automated
and &quot;set and forget&quot; my backups for a couple months.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;admonitionblock important&quot;&gt;
&lt;table&gt;
&lt;tr&gt;
&lt;td class=&quot;icon&quot;&gt;
&lt;div class=&quot;title&quot;&gt;Important&lt;/div&gt;
&lt;/td&gt;
&lt;td class=&quot;content&quot;&gt;
Bad idea by the way
&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I found out 2 datasets were not syncing. Somehow I missed them somewhere and
I had all my ZAP snapshots get destroyed, likely due to no new ones getting
sent over somehow and then getting destroyed because they expired.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;With that incident, I was not getting any new ZAP snapshots syncing to my
external hard drive. I wish I had the exact message, but the issue was that
there was an older snapshot on my external drive that wasn&amp;#8217;t taken by ZAP, and
thus it would not send a snapshot.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;My solution then was to delete all snapshots on the destination for that ZFS
dataset, then &lt;code&gt;zfs send data/my/snapshot@ZAP_oldest_one | zfs receive backups&lt;/code&gt;
and follow that with a &lt;code&gt;zap rep -Fv&lt;/code&gt; which would sync from my oldest ZAP
snapshot to my newest one. I did that for the 2 datasets I had with this
issue and backups were properly underway.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</description>
      <pubDate>Tue, 30 Aug 2022 19:45:30 PDT</pubDate>
      <dc:creator>Courtney</dc:creator>
      <guid>https://blog.passwordclass.xyz/posts/freebsd_backups_with_zap/</guid>
    </item>
    <item>
      <title>OpenBSD Cron Jobs and Borg: A Lesson in Learning to Read Slower</title>
      <link>https://blog.passwordclass.xyz/posts/openbsd_cron_jobs_and_borg/</link>
      <description>&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;For the longest time I was running borg on my server to do backups. Then one day
I changed my destination&amp;#8217;s name to something different (different domain name).
I know with borg, if the backup destination changes, borg will prompt you on
the next run that the destination is different than before, and to confirm the
change. I ran my borg backup script, confirmed the destination and all was good&amp;#8230;&amp;#8203;
until next run. Suddenly, I found my backup script failing. Wondering why,
I appended &lt;code&gt;&amp;gt; /root/backup.log 2&amp;gt;&amp;amp;1&lt;/code&gt; to the end of the cron job so I could see
why.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;Warning: The repository at location ssh://backup@mybackups.example.com/usr/home/backup/borg was previously located at ssh://backup@oldbackups.example.com/usr/home/backup/borg
Do you want to continue? [yN] Aborting.
Repository access aborted&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Obviously since this was a cron job, I wasn&amp;#8217;t there and the backup aborted.
So, I went in and removed the borg data in $HOME/.cache and $HOME/.config. No
dice.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Turns out, I should be a better reader, because as I typed this I thought I
came across a hidden &quot;WAT&quot; decision. But if you look at the top of the root
user&amp;#8217;s crontab (which is the user that ran my backup script) you will see
&lt;code&gt;HOME=/var/log&lt;/code&gt;. Sure enough, my borg data was showing up in &lt;code&gt;/var/log&lt;/code&gt;. So
in my backup script I set &lt;code&gt;HOME=/root&lt;/code&gt; so I didn&amp;#8217;t mess with any defaults.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Now, I&amp;#8217;m not sure why the default is &lt;code&gt;/var/log&lt;/code&gt;, but if there is one thing
I have learned from using OpenBSD is to read carefully and you will
get the answer. These days it becomes so easy for me to skim something
and look for the quick answer, and then miss out on the important
and obvious details. I constantly fall into this trap, but I think over
the last year of me using OpenBSD full time in some respect, I have learned
about some personal setbacks in how I approach technical problems.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;If you are like me and are trying to take a shortcut, maybe invest some
time too in learning to take it slower and really think critically about
what your problem is, and not be so quick to go to a forum or something.
Critical thinking and patience are good traits to have.&lt;/p&gt;
&lt;/div&gt;</description>
      <pubDate>Thu, 25 Aug 2022 19:45:30 PDT</pubDate>
      <dc:creator>Courtney</dc:creator>
      <guid>https://blog.passwordclass.xyz/posts/openbsd_cron_jobs_and_borg/</guid>
    </item>
    <item>
      <title>0 Dependency Websites with OpenBSD &amp; AsciiDoc</title>
      <link>https://blog.passwordclass.xyz/posts/0-dependency-websites-with-openbsd-asciidoc/</link>
      <description>&lt;div id=&quot;toc&quot; class=&quot;toc&quot;&gt;
&lt;div id=&quot;toctitle&quot;&gt;Table of Contents&lt;/div&gt;
&lt;ul class=&quot;sectlevel1&quot;&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/0-dependency-websites-with-openbsd-asciidoc/#_openbsd&quot;&gt;OpenBSD&lt;/a&gt;
&lt;ul class=&quot;sectlevel2&quot;&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/0-dependency-websites-with-openbsd-asciidoc/#_firewall_configuration&quot;&gt;Firewall Configuration&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/0-dependency-websites-with-openbsd-asciidoc/#_acme_client_configuration&quot;&gt;acme-client configuration&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/0-dependency-websites-with-openbsd-asciidoc/#webserver-config&quot;&gt;Webserver Configuration&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/0-dependency-websites-with-openbsd-asciidoc/#_doas_conf&quot;&gt;doas.conf&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/0-dependency-websites-with-openbsd-asciidoc/#_asciidoc&quot;&gt;AsciiDoc&lt;/a&gt;
&lt;ul class=&quot;sectlevel2&quot;&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/0-dependency-websites-with-openbsd-asciidoc/#_css_styles&quot;&gt;CSS Styles&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/0-dependency-websites-with-openbsd-asciidoc/#_how_i_generate_my_asciidoc&quot;&gt;How I Generate My AsciiDoc&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/0-dependency-websites-with-openbsd-asciidoc/#_uploading_site_content&quot;&gt;Uploading Site Content&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/0-dependency-websites-with-openbsd-asciidoc/#_swapping_in_your_new_site&quot;&gt;Swapping in Your New Site&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/0-dependency-websites-with-openbsd-asciidoc/#_wrap_up&quot;&gt;Wrap Up&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/0-dependency-websites-with-openbsd-asciidoc/#_bonus&quot;&gt;Bonus&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/0-dependency-websites-with-openbsd-asciidoc/#_bonus_bonus&quot;&gt;Bonus Bonus&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/0-dependency-websites-with-openbsd-asciidoc/#_bonus_x3&quot;&gt;Bonus X3&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/0-dependency-websites-with-openbsd-asciidoc/#_conclusion&quot;&gt;Conclusion&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/0-dependency-websites-with-openbsd-asciidoc/#_edit_2022_06_29&quot;&gt;EDIT 2022-06-29&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&quot;admonitionblock note&quot;&gt;
&lt;table&gt;
&lt;tr&gt;
&lt;td class=&quot;icon&quot;&gt;
&lt;div class=&quot;title&quot;&gt;Note&lt;/div&gt;
&lt;/td&gt;
&lt;td class=&quot;content&quot;&gt;
I want to clearly state this is 0 dependencies on the &lt;em&gt;server&lt;/em&gt;. The server does not need AsciiDoc installed to operate. AsciiDoc is for the client to use. The server operates with 0 `pkg_add`s
&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I have fallen in love with a recent combination of software to make good looking websites, and having an easy to manage
web server. I&amp;#8217;m a minimalist in many ways. Really, I find that it makes my life easier. I like to keep my blog up
here and don&amp;#8217;t want to deal with database updates, language exploits, weird migrations, and so on. I also manage my church&amp;#8217;s website.
I can&amp;#8217;t be having complex solutions that require large amounts of maintenance at multiple times a month because of
a dozen pieces of software requiring version upgrades or what have you. Sure, some people have needs for elaborate
content management systems, but sometimes you only need a simple site too, and why overcomplicate it?&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;This is why I like my current combo:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;olist arabic&quot;&gt;
&lt;ol class=&quot;arabic&quot;&gt;
&lt;li&gt;
&lt;p&gt;OpenBSD&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;AsciiDoc&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;OpenBSD is a simple operating system with simple management needs. I also like AsciiDoc because it is very
easy to write content with (like right now for this blog), the output looks nice and clean, and it&amp;#8217;s basic
script away from being simple HTML/CSS.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_openbsd&quot;&gt;OpenBSD&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Why do I like OpenBSD for this job? I like OpenBSD because it comes with batteries included&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;ulist&quot;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;webserver&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;firewall&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;acme client for SSL certs&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;openrsync for backups&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I also like its strong focus on security, as well as how easy it is to maintain the server
with the way I am demonstrating here. Really, the only commands someone has to know to
do upkeep is:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;olist arabic&quot;&gt;
&lt;ol class=&quot;arabic&quot;&gt;
&lt;li&gt;
&lt;p&gt;syspatch&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;reboot&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;sysupgrade&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Next, I will talk about how I configured my server to run a simple, static site.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;sect2&quot;&gt;
&lt;h3 id=&quot;_firewall_configuration&quot;&gt;Firewall Configuration&lt;/h3&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Firewall configuration only requires you edit the &lt;code&gt;/etc/pf.conf&lt;/code&gt; file. This is what I needed to make my webserver work.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;table &amp;lt;bruteforce&amp;gt; persist

set skip on lo0

block in log all
pass out on egress

pass in on egress inet proto tcp from any to (egress) port { http, https } keep state
pass in on egress inet6 proto tcp from any to (egress) port { http, https } keep state

pass proto tcp from any to (egress) port ssh &#92;
     keep state (max-src-conn 15, max-src-conn-rate 5/3, &#92;
     overload &amp;lt;bruteforce&amp;gt; flush global)

pass in on egress inet6 proto icmp6 all icmp6-type { echoreq routeradv neighborsol neighboradv }
pass in on egress inet proto icmp icmp-type { echoreq unreach }

block return in on ! lo0 proto tcp to port 6000:6010
block return out log proto {tcp udp} user _pbuild&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Enable these rules with &lt;code&gt;pfctl -f /etc/pf.conf&lt;/code&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect2&quot;&gt;
&lt;h3 id=&quot;_acme_client_configuration&quot;&gt;acme-client configuration&lt;/h3&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;OpenBSD comes with a built-in acme client that you can use to generate new SSL certificates. I get mine
from Let&amp;#8217;s Encrypt. I then create a cron job under the root user to run every so often to see if there
is a renewal that can happen, and then reload.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Here is my configuration for the &lt;code&gt;/etc/acme-client.conf&lt;/code&gt; file&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;domain example.com {
       domain key &quot;etc/ssl/private/example.com.key&quot;
       domain certificate &quot;/etc/ssl/example.com.pem&quot;
       domain full chian certificate &quot;/etc/ssl/example.com.fullchain.pem&quot;
       sign with letsencrypt
}&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Then I add the cron job as the root user with &lt;code&gt;crontab -e&lt;/code&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;30 0 * * 1 acme-client example.com &amp;amp;&amp;amp; rcctl reload httpd&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect2&quot;&gt;
&lt;h3 id=&quot;webserver-config&quot;&gt;Webserver Configuration&lt;/h3&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I use OpenBSD&amp;#8217;s built in HTTP server, which does its job well. They have a file at &lt;code&gt;/etc/examples/httpd.conf&lt;/code&gt;
that you can use and mock up. Here is mine&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;server &quot;example.com&quot; {
       listen on * tls port 443
       hsts preload
       tls {
           certificate &quot;/etc/ssl/example.com.fullchain.pem&quot;
           key &quot;/etc/ssl/private/example.com.key&quot;
           ciphers &quot;HIGH:!aNULL&quot;
       }

       location &quot;/*&quot; {
           root &quot;/htdocs/example.com&quot;
       }
}&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;With the SSL cert and the web server configuration set, you can start and enable the server:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;&lt;code&gt;rcctl enable httpd; rcctl start httpd&lt;/code&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect2&quot;&gt;
&lt;h3 id=&quot;_doas_conf&quot;&gt;doas.conf&lt;/h3&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;You can use &lt;code&gt;doas&lt;/code&gt; to make superuser configurations without always being root. Edit the
doas.conf file and add&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;permit persist &amp;lt;username&amp;gt; as root&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_asciidoc&quot;&gt;AsciiDoc&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;So, you might be asking why I chose AsciiDoc. I like AsciiDoc because it is a simple
markup language that lets me focus on my writing and layout. Markdown can do this too,
and is more common than AsciiDoc. However, the fact that there isn&amp;#8217;t a standard
Markdown and I don&amp;#8217;t like any of the rendered output. With AsciiDoc, they give a
simple and clean default result in HTML with CSS. I also like that there are other
themes I can use readily, or I can make my own. But I end up using the default theme
and the dark theme that is available.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;With this in mind, it makes it easy for anyone to see what is written and figure out
what does what since the syntax is simple. And, if you use editors like Visual Studio Code
or AsciiDocFX, you get a nice preview. For me, I use vim. Here is an example
of what the &lt;a href=&quot;https://blog.passwordclass.xyz/posts/0-dependency-websites-with-openbsd-asciidoc/#webserver-config&quot;&gt;Webserver Configuration&lt;/a&gt; section looks like:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-asciidoc&quot; data-lang=&quot;asciidoc&quot;&gt;[#webserver-config]
=== Webserver Configuration

I use OpenBSD&#39;s built in HTTP server, which does its job well. They have a file at `/etc/examples/httpd.conf`
that you can use and mock up. Here is mine

[source]
&#92;----
server &quot;example.com&quot; {
       listen on * tls port 443
       hsts preload
       tls {
           certificate &quot;/etc/ssl/example.com.fullchain.pem&quot;
           key &quot;/etc/ssl/private/example.com.key&quot;
           ciphers &quot;HIGH:!aNULL&quot;
       }

       location &quot;/*&quot; {
           root &quot;/htdocs/example.com&quot;
       }
}
&#92;----

With the SSL cert and the web server configuration set, you can start and enable the server:

`rcctl enable httpd; rcctl start httpd`&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;admonitionblock note&quot;&gt;
&lt;table&gt;
&lt;tr&gt;
&lt;td class=&quot;icon&quot;&gt;
&lt;div class=&quot;title&quot;&gt;Note&lt;/div&gt;
&lt;/td&gt;
&lt;td class=&quot;content&quot;&gt;
The source section starts with a &lt;code&gt;&#92;&lt;/code&gt; so as to not interpret it literally here :)
&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;div class=&quot;sect2&quot;&gt;
&lt;h3 id=&quot;_css_styles&quot;&gt;CSS Styles&lt;/h3&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;To get the best out of CSS styles if I am not using the builtin, I like to do what I am doing here
for my site:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-asciidoc&quot; data-lang=&quot;asciidoc&quot;&gt;:stylesheet: https://blog.passwordclass.xyz/css/dark.css
:linkcss:&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect2&quot;&gt;
&lt;h3 id=&quot;_how_i_generate_my_asciidoc&quot;&gt;How I Generate My AsciiDoc&lt;/h3&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I use a simple script to pull together my content, as well as generate my AsciiDoc
into HTML format. I also want to note that I did create some extra custom HTML
for my page to be inserted so I could offer a navbar, since in some cases I have
come by the Table of Contents feature of AsciiDoc is good, but other times people
wanted a standard navbar.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;#!/usr/bin/env sh

CWD=$(pwd)
DEST=&quot;$CWD/example.com&quot;

rm -rf &quot;$DEST&quot;
mkdir &quot;$DEST&quot;

# For any images you may have
cp -r &quot;$CWD/images&quot; &quot;$DEST/&quot;
# For the CSS to use with adoc
cp -r &quot;$CWD/css&quot; &quot;$DEST/&quot;
# In case you add any extra JS to run
cp -r &quot;$CWD/js&quot; &quot;$DEST/&quot;
# Any custom HTML you may insert into your adoc files
cp -r &quot;$CWD/asciidoc/html&quot; &quot;$DEST/&quot;
# I had a zipfile of favicons, this could just be changed do copying a favicon.ico
unzip &quot;$CWD/favicon.zip&quot; -d &quot;$DEST/&quot;

# Generate index file
asciidoctor -D &quot;$DEST&quot; &quot;$CWD/asciidoc/index.adoc&quot;

adocfiles=$(find asciidoc -type f -name &quot;*.adoc&quot; | xargs)

for f in $adocfiles; do
    relative_path=$(echo &quot;${f%/*}/&quot;)
    mkdir -p &quot;$CWD/$relative_path&quot;
    asciidoctor -D &quot;$DEST/$relative_path&quot; $f
done

cd &quot;$DEST&quot;
mv asciidoc/* ./
rmdir asciidoc
cd -&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;So, I will be in my terminal at this point and be in the root of my working path, where
I have my asciidoc folder and my compile.sh script. Then, when I want to, I run
&lt;code&gt;sh ./compile.sh&lt;/code&gt; to generate the site. At that point, I have a newly made example.com dir.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_uploading_site_content&quot;&gt;Uploading Site Content&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;With a created site, it is time to upload your work. I tend to use sftp or scp to do this.
You could even do rsync if you wanted.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_swapping_in_your_new_site&quot;&gt;Swapping in Your New Site&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Now with your content uploaded, presumably to your home directory, you can either run
a few commands, or use a script like this to&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;olist arabic&quot;&gt;
&lt;ol class=&quot;arabic&quot;&gt;
&lt;li&gt;
&lt;p&gt;Change ownership of the new website content&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Change permissions&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Move the old site&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Move the new one&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Something like this, assuming you have your web content at &lt;code&gt;$HOME&lt;/code&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;#!/usr/bin/env sh

chown -R root:wheel $HOME/example.com
find $HOME/example.com -type f -exec chmod 644 {} &#92;;
find $HOME/example.com -type d -exec chmod 755 {} &#92;;
mv /var/www/htdocs/example.com /var/www/htdocs/example.com-$(date &quot;+%Y-%m-%d-%H%M%S&quot;)
mv $HOME/example.com /var/www/htdocs&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;This will move the old site away as a backup, then put the new one in place.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_wrap_up&quot;&gt;Wrap Up&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;With all of this, if you can install OpenBSD, you can make a simple solution for
basic static websites that are also easy to create since you don&amp;#8217;t have to learn
any (or very little) HTML, no CSS, no heavy site creator to get in the way,
and little command line knowledge to configure and maintain.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_bonus&quot;&gt;Bonus&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I had previously mentioned backups, so I won&amp;#8217;t forget this one. You may find backups
&quot;unnecessary&quot; since you should theoretically always have your site content on a local
computer. However, if you want to backup your configurations and such, you can accomplish
this with scp or openrsync.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Even though I don&amp;#8217;t have any secret content, I do like to encrypt my backups. So this
is something you can do when creating yours.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;This is more or less what my backup script looks like:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;#!/usr/bin/env sh

keyfile=&quot;/root/.enckey&quot;
key=&quot;$(cat $keyfile)&quot;

backupdir=&quot;/root/backups&quot;
name=&quot;$backupdir/$(date +&#39;%F_%T&#39;)_&amp;lt;optional backup name here&amp;gt;&quot;
mkdir -p $name
mkdir -p $name/etc

# copy files to backup directory
etc_files=&quot;hostname.if,httpd.conf,pf.conf,rc.conf.local,sysctl.conf,acme-client.conf,doas.conf&quot;

cp /etc/{$etc_files} $name/etc/

other_files=&quot;/etc/ssh/sshd_config&quot;

for file in $other_files; do
	dir=$(echo &quot;${file%/*}&quot;)
	bkp_dir=&quot;$name/${dir#/}&quot;
	mkdir -p $bkp_dir
	cp $file $bkp_dir/
done

cp -r /var/www/htdocs $name/

# Compress and encrypt
tar -czf $name.tar.gz $name
openssl enc -aes-256-cbc -md sha512 -pbkdf2 -iter 100000 -salt -in $name.tar.gz -out $name.tar.gz.enc -pass file:$keyfile

# Clean up
rm $name.tar.gz
rm -rf $name

result=$(openrsync -a --delete $backupdir remoteuser@example.com:/path/to/backup/dest 2&amp;gt;&amp;amp;1 &amp;gt; /dev/null)

# Delete files older than 30 days
find $backupdir -mtime +30 -delete&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_bonus_bonus&quot;&gt;Bonus Bonus&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I like to know when my backups are working. So, I want to get notified when a backup
is failing. In the previous backup script, you can insert a conditional to say
&quot;if the backup happened, submit a pass. If it didn&amp;#8217;t for some reason, send a fail&quot;.
I do this to NodePing with their PUSH checks. Which, if you can make a POST request and
format some JSON, you can submit any data.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;My method has been to just submit an empty JSON object &lt;code&gt;{&quot;data&quot;:{}}&lt;/code&gt; to accomplish my
needs. One issue though, doing a POST request with OpenBSD from just base isn&amp;#8217;t quite
as cut and dry. I reached out, and the 2 most common answers were to write some Perl,
which, that&amp;#8217;s too much for me, or use nc(1). I opted to use nc.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I created a PUSH check on NodePing and got the checktoken and checkid for the POST
request. The nc command looks like:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;head=&#39;POST /v1?id=&amp;lt;checkid&amp;gt;&amp;amp;checktoken=&amp;lt;checktoken&amp;gt; HTTP/1.1&#92;r&#92;nHost: push.nodeping.com&#92;r&#92;nContent-Type: application/json&#92;r&#92;nContent-Length: 11&#92;r&#92;n&#92;r&#92;n{&quot;data&quot;:{}}&#39;
echo -ne $head | nc -c push.nodeping.com 443&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_bonus_x3&quot;&gt;Bonus X3&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I appreciate knowing when a syspatch is available. OpenBSD provides a handy &lt;code&gt;syspatch -c&lt;/code&gt;
flag that will output any patches available. I submit this info to my Matrix server,
but of course you could create another NodePing check or anywhere else you want to
do a POST request with any sort of data to a service that will notify you.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;My script basically looks like&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;#!/bin/sh

if [ ! -z &quot;$(syspatch -c)&quot; ]; then
	body=&quot;{&#92;&quot;body&#92;&quot;:&#92;&quot;$(hostname) syspatch available&#92;&quot;}&quot;
	contentlength=$(expr $(echo &quot;$body&quot; | wc -m) - 1)

	head=&quot;POST /web/path/post/somewhere HTTP/1.1&#92;r&#92;nHost: example.com&#92;r&#92;nContent-Type: application/json&#92;r&#92;nContent-Length: $contentlength&#92;r&#92;n&#92;r&#92;n$body&quot;

	echo -ne &quot;$head&quot; | nc -c example.com 443
fi&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Next create a daily cron job. We can call this &lt;code&gt;/root/checksyspatch.sh&lt;/code&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;&lt;code&gt;0	2	*	*	* /bin/sh /root/checksyspatch.sh&lt;/code&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Now you should be notified if there are any updates available for your OpenBSD release.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_conclusion&quot;&gt;Conclusion&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Now, you have:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;ulist&quot;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;A running OS with high security&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Easy OS management, really only needing to run syspatch, reboot, and sysupgrade&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;A nice, clean static website that really only requires simple syntax to know to write&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Backups with openrsync&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Backup notifications with NodePing and nc (definitely optional)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Update notices&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Since it&amp;#8217;s not often that a website update happens on some of my sites, I really only
need to keep track of running syspatch and upgrading if a new release comes out.
Then, any updates that DO need to happen are a basic edit, compile, upload, and put
the new site content in place.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_edit_2022_06_29&quot;&gt;EDIT 2022-06-29&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I didn&amp;#8217;t state clearly enough that my 0-dependency claim is you don&amp;#8217;t need to install anything on the server. The server does not need AsciiDoc. The client will, but my point is that the server doesn&amp;#8217;t need any &lt;code&gt;pkg_add&lt;/code&gt; and thus, only requires &lt;code&gt;syspatch&lt;/code&gt;, &lt;code&gt;reboot&lt;/code&gt;, and &lt;code&gt;sysupgrade&lt;/code&gt; to maintain the host, and no needing to worry about maintaining other software on top of the OpenBSD base install. :)&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</description>
      <pubDate>Mon, 27 Jun 2022 19:45:30 PDT</pubDate>
      <dc:creator>Courtney</dc:creator>
      <guid>https://blog.passwordclass.xyz/posts/0-dependency-websites-with-openbsd-asciidoc/</guid>
    </item>
    <item>
      <title>Upgrade FreeBSD Base Jails to 13.1-RELEASE</title>
      <link>https://blog.passwordclass.xyz/posts/upgrade-freebsd-basejails/</link>
      <description>&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;From 13.0-RELEASE to 13.1-RELEASE&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;$ zfs create -p zroot/jails/releases/13.1-RELEASE
$ fetch https://ftp.freebsd.org/pub/FreeBSD/releases/amd64/amd64/13.1-RELEASE/base.txz -o /tmp/base.txz
$ fetch https://ftp.freebsd.org/pub/FreeBSD/releases/amd64/amd64/13.1-RELEASE/lib32.txz -o /tmp/lib32.txz
$ tar -xf /tmp/base.txz -C /jails/releases/13.1-RELEASE
$ tar -xf /tmp/lib32.txz -C /jails/releases/13.1-RELEASE
$ env UNAME_r=13.1-RELEASE freebsd-update -b /jails/releases/13.1-RELEASE fetch install
$ env UNAME_r=13.1-RELEASE freebsd-update -b /jails/releases/13.1-RELEASE IDS
$ zfs snapshot zroot/jails/releases/13.1-RELEASE@p0
$ zfs clone zroot/jails/releases/13.1-RELEASE@p0 zroot/jails/templates/base-13.1-RELEASE
$ zfs clone zroot/jails/releases/13.1-RELEASE@p0 zroot/jails/templates/skeleton-13.1-RELEASE&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;rm -rf /jails/templates/skeleton-13.1-RELEASE/bin/*;
rm -rf /jails/templates/skeleton-13.1-RELEASE/boot/*;
chflags -R noschg /jails/templates/skeleton-13.1-RELEASE/lib/*;
rm -rf /jails/templates/skeleton-13.1-RELEASE/lib/*;
chflags -R noschg /jails/templates/skeleton-13.1-RELEASE/libexec/*;
rm -rf /jails/templates/skeleton-13.1-RELEASE/libexec/*;
rm -rf /jails/templates/skeleton-13.1-RELEASE/rescue/*;
chflags -R noschg /jails/templates/skeleton-13.1-RELEASE/sbin/*;
rm -rf /jails/templates/skeleton-13.1-RELEASE/sbin/*;
chflags -R noschg /jails/templates/skeleton-13.1-RELEASE/usr/bin/*;
rm -rf /jails/templates/skeleton-13.1-RELEASE/usr/bin/*;
rm -rf /jails/templates/skeleton-13.1-RELEASE/usr/include/*;
chflags -R noschg /jails/templates/skeleton-13.1-RELEASE/usr/lib/*;
rm -rf /jails/templates/skeleton-13.1-RELEASE/usr/lib/*;
chflags -R noschg /jails/templates/skeleton-13.1-RELEASE/usr/libexec/*;
rm -rf /jails/templates/skeleton-13.1-RELEASE/usr/libexec/*;
rm -rf /jails/templates/skeleton-13.1-RELEASE/usr/sbin/*;
rm -rf /jails/templates/skeleton-13.1-RELEASE/usr/share/*;
rm -rf /jails/templates/skeleton-13.1-RELEASE/usr/libdata/*;
chflags -R noschg /jails/templates/skeleton-13.1-RELEASE/usr/lib32/*;
rm -rf /jails/templates/skeleton-13.1-RELEASE/usr/lib32/*;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;$ zfs snapshot zroot/jails/templates/skeleton-13.1-RELEASE@skeleton
$ zfs clone zroot/jails/templates/skeleton-13.1-RELEASE@skeleton zroot/jails/jails/testboxen_13.1&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;</description>
      <pubDate>Sun, 29 May 2022 19:45:30 PDT</pubDate>
      <dc:creator>Courtney</dc:creator>
      <guid>https://blog.passwordclass.xyz/posts/upgrade-freebsd-basejails/</guid>
    </item>
    <item>
      <title>MY OpenBSD Desktop: Move From FreeBSD</title>
      <link>https://blog.passwordclass.xyz/posts/my-openbsd-desktop/</link>
      <description>&lt;div id=&quot;toc&quot; class=&quot;toc&quot;&gt;
&lt;div id=&quot;toctitle&quot;&gt;Table of Contents&lt;/div&gt;
&lt;ul class=&quot;sectlevel1&quot;&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/my-openbsd-desktop/#_the_hardware&quot;&gt;The Hardware&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/my-openbsd-desktop/#_environmentsoftware&quot;&gt;Environment/Software&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/my-openbsd-desktop/#_first_impressions&quot;&gt;First Impressions&lt;/a&gt;
&lt;ul class=&quot;sectlevel2&quot;&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/my-openbsd-desktop/#_freebsd&quot;&gt;FreeBSD&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/my-openbsd-desktop/#_openbsd&quot;&gt;OpenBSD&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/my-openbsd-desktop/#_freebsd_experience&quot;&gt;FreeBSD Experience&lt;/a&gt;
&lt;ul class=&quot;sectlevel2&quot;&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/my-openbsd-desktop/#_what_i_have_absolutely_hated&quot;&gt;What I Have Absolutely Hated&lt;/a&gt;
&lt;ul class=&quot;sectlevel3&quot;&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/my-openbsd-desktop/#_wifi&quot;&gt;WiFi&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/my-openbsd-desktop/#_usb_audio&quot;&gt;USB Audio&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/my-openbsd-desktop/#_openbsd_experience&quot;&gt;OpenBSD Experience&lt;/a&gt;
&lt;ul class=&quot;sectlevel2&quot;&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/my-openbsd-desktop/#_firefox&quot;&gt;Firefox&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/my-openbsd-desktop/#_chromium&quot;&gt;Chromium&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/my-openbsd-desktop/#_wheres_muh_erlang&quot;&gt;Where&amp;#8217;s Muh Erlang?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/my-openbsd-desktop/#_not_a_fan_of_vmm&quot;&gt;Not a Fan of vmm&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/my-openbsd-desktop/#_me_no_like_openbsds_wireguard_client&quot;&gt;Me No Like OpenBSD&amp;#8217;s Wireguard Client&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/my-openbsd-desktop/#_sndiod_is_greatand_not&quot;&gt;sndiod is great&amp;#8230;&amp;#8203;and not&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/my-openbsd-desktop/#_mouse_is_missing_button_functions&quot;&gt;Mouse is Missing Button Functions&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/my-openbsd-desktop/#_overall_thoughts&quot;&gt;Overall Thoughts&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/my-openbsd-desktop/#_addition&quot;&gt;Addition&lt;/a&gt;
&lt;ul class=&quot;sectlevel2&quot;&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/my-openbsd-desktop/#_2022_05_07&quot;&gt;2022-05-07&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Just last week (as of the date on this post) I ordered an AMD RX 6700XT graphics card. I saw it at a great price, probably $20 above what
it COULD have been if prices were normal for graphics cards. I couldn’t pass it up, I had been wanting a new card anyways, and I was
wanting OpenCL on FreeBSD. Well bad news for me, FreeBSD only uses AMD drivers from Linux kernel 5.7, and it turns out the RX 6000 series
landed in the kernel at kernel 5.10. I was very sad finding this out because I had just set up poudriere to do weekly builds,
I had a custom kernel, and FreeBSD was ripping fast. I wasn’t ready to table my new shiny card. I have been wanting to try an
OpenBSD desktop for years anyways but I always had roadblocks that would prevent me from using it
(in addition to my last GPU being an Nvidia), and I rely on my desktop for work since I work from home.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Well, here I am today, a few days into using OpenBSD 7.1-current and I wanted to compare
both my FreeBSD and OpenBSD desktop, what I love, what I miss, what I don’t know, and yeah.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_the_hardware&quot;&gt;The Hardware&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Here are my hardware specs right now:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;ulist&quot;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Intel i7 10700K&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;MSI Z490 chipset motherboard&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;32GB DDR4 ad 2666MHz&amp;#8230;&amp;#8203;ECC but can&amp;#8217;t use it cuz Intel&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;OS drive: 500GB WD Black SN750 m.2 drive&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Extras: Different OS on a 480GB SATA SSD and 2TB WD Blue&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;MSI RX 6700XT&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;ZSA Ergodox EZ keyboard&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Elecom HUGE trackball&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;FiiO E10K USB DAC/amp&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_environmentsoftware&quot;&gt;Environment/Software&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Currently I primarily use:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;ulist&quot;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;i3 (w/ i3bar and i3status)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Nextcloud client&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;keepassxc&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Emacs editor&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Firefox&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Strawberry (Clementine on OpenBSD since Strawberry isn&amp;#8217;t in OpenBSD ports)&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_first_impressions&quot;&gt;First Impressions&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;In here, I&amp;#8217;m going to compare/contrast setting up Free/OpenBSD on my desktop since the setup experience stood out to me.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;sect2&quot;&gt;
&lt;h3 id=&quot;_freebsd&quot;&gt;FreeBSD&lt;/h3&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;What didn&amp;#8217;t work (or work right) after install:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;ulist&quot;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Ethernet: I have a 2.5Gbps Realtek RTL8125 which I had to get the pkg on a different computer, copy it over, then &lt;code&gt;pkg install&lt;/code&gt; to get ethernet&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;No xorg, but that is no issue&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;No graphics driver (had to install)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;No U2F support&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;What worked after install:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;ulist&quot;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;keyboard/mouse worked as expected (though not all Elecom buttons work, I blame Elecom)&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect2&quot;&gt;
&lt;h3 id=&quot;_openbsd&quot;&gt;OpenBSD&lt;/h3&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;So, with all the other times I&amp;#8217;ve poked around with OpenBSD, everything Just Worked(tm). Same case here:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;ulist&quot;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Ethernet worked&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Got the AMD drivers and my screen defaulted to 1440p/144Hz right away&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Xorg&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;U2F&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Now, this is after install impressions. As I take you down my journey I&amp;#8217;ll explain everything I&amp;#8217;ve had to change or fix.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_freebsd_experience&quot;&gt;FreeBSD Experience&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I&amp;#8217;ve been a FreeBSD desktop user for 3 years. I love it. For the most part, there is little I would want changed. There&amp;#8217;s a lot of good
software, performance, good security controls, virtualization and jails are the absolute bomb, the FreeBSD Handbook is great. As far
as general use goes, the only real papercuts I have are around enabling Nvidia drivers, but after that in these last 2 years Nvidia
drivers have been totally painless for me. I loved how easy it was to compile the OS. Poudriere is mildly frustrating and could be
documented a bit better I think, but eventually it was up and running. ZFS snapshots were pretty big for me, as I would snapshot my
home dir and borg backup the snapshots.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;sect2&quot;&gt;
&lt;h3 id=&quot;_what_i_have_absolutely_hated&quot;&gt;What I Have Absolutely Hated&lt;/h3&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;FreeBSD has had 2 total pain points for me.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;olist arabic&quot;&gt;
&lt;ol class=&quot;arabic&quot;&gt;
&lt;li&gt;
&lt;p&gt;WiFi&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;USB Audio&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div class=&quot;sect3&quot;&gt;
&lt;h4 id=&quot;_wifi&quot;&gt;WiFi&lt;/h4&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Now, the FreeBSD Foundation has sponsored WiFi work for FreeBSD, and that is exciting. It will be awesome when FreeBSD sees something
better than G wireless speeds. Really, what has required any medium amount of downloading has been painful.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect3&quot;&gt;
&lt;h4 id=&quot;_usb_audio&quot;&gt;USB Audio&lt;/h4&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;OSS is amazing. I loved all the knobs I could touch with &lt;code&gt;sysctl&lt;/code&gt; and how obvious different settings were. I didn&amp;#8217;t have one
single weird sound issue with FreeBSD&amp;#8230;&amp;#8203;.except on my Ryzen desktop when I had the Ryzen 3600. Not sure why, but sometimes audio
would cut out. Not sure if that&amp;#8217;s fixed today or not, I&amp;#8217;m on Intel again.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;But&amp;#8230;&amp;#8203;the BIGGEST pain of them all: turn on some music and play a song, then unplug your DAC,I dare ya.
Oh oops, the programs didn&amp;#8217;t properly release the audio device, go and kill every process that used your DAC,
otherwise you aren&amp;#8217;t getting your DAC back. This wasn&amp;#8217;t a HUGE problem for me with i3, I usually had just Firefox and
Strawberry to kill then life was back to normal. But with a desktop like KDE, you&amp;#8217;re better off restarting your computer than
killing the processes and finding out how to get KDE Plasma to a clean state again.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;All in all, FreeBSD was a dream on my desktop, just don&amp;#8217;t unplug the DAC. It was also very smooth on my Thinkpad T480 just get
over the wireless speeds.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_openbsd_experience&quot;&gt;OpenBSD Experience&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;This is my first time ever getting OpenBSD on my desktop. Aside from the Nvidia card, there was always a couple things that
didn&amp;#8217;t quite sit right with me to trust it for my day do day work OS. I think now a lot of that has changed.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Earlier I said everything Just Worked(tm), and that is mostly true. However, here&amp;#8217;s some of the things I have had to change:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;ulist&quot;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;modify &lt;code&gt;/etc/login.conf`&lt;/code&gt; and add myself to staff group to get enough max files/mem for stuff like Firefox&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Audio stuttered like a dying car&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Some sysctl flags&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Really, this wasn&amp;#8217;t much. I regularly pull some bits and pieces from &lt;a href=&quot;https://www.c0ffee.net/blog/openbsd-on-a-laptop/&quot;&gt;here&lt;/a&gt; to set up
OpenBSD. The audio though&amp;#8230;&amp;#8203;yikes. Sounds great, but that stutter was (is) awful! I think it&amp;#8217;s 95% fixed now. I eventually discovered
that the way OpenBSD handles CPU scheduling (I guess) would cause interrupts if anything is too taxing at any give time. Now,
most software I used hasn&amp;#8217;t been taxing to the point where it cuts out my audio. But Firefox is the one.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Fun fact: out of the box, Firefox wants 8 processes. That&amp;#8217;s all 8 of my CPU cores, and probably all 8 of your 4 CPU cores. My solution:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Go to &lt;code&gt;about:config&lt;/code&gt; &amp;#8594; change &lt;code&gt;dom.ipc.processCount&lt;/code&gt; to something lower than your core count. I set mine to 5. Audio problems gone.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;This still isn&amp;#8217;t fully resolved for me either. I&amp;#8217;ve been trying to tweak everything I can think of. I&amp;#8217;m about to the point where
I&amp;#8217;m near going against my conscience and using chromium because chromium does not induce the stuttering audio issues the way
running Firefox does. There&amp;#8217;s one issue with chromium though, which I&amp;#8217;ll get to.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;sect2&quot;&gt;
&lt;h3 id=&quot;_firefox&quot;&gt;Firefox&lt;/h3&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Couple notes I have here on Firefox are namely that it can be finicky getting it to point to your Downloads directory. At least
make sure it is present so it can download since unveil actually does what it says it does. This goes for using the keepassxc-proxy
too. For a while, unveiling it didn&amp;#8217;t work for me. Now it appears to work. Yay!&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Now for the worst of it. I still cannot figure this one out. Seems no one on Reddit, Matrix, or the &lt;a href=&quot;https://marc.info/?l=openbsd-misc&amp;amp;m=165182232100897&amp;amp;w=2&quot;&gt;mailing list&lt;/a&gt;
has an answer to this. But for whatever reason, Firefox constantly interrupts audio on OpenBSD. Audio, and even other
USB input gets totally murdered by Firefox. Tried a TON of stuff. Nothing fixes the issue. At this point, I have to abandon
Firefox until this is resolved, which sucks a lot because, I think Firefox is technically and feature-wise a better
browser than chromium.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect2&quot;&gt;
&lt;h3 id=&quot;_chromium&quot;&gt;Chromium&lt;/h3&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Chromium is chromium. Works just fine out of the box, no weird issues in terms of regular use. The one thing that does suck is
I can&amp;#8217;t get keepassxc-proxy working with it. It seems even with some unveil tweaking I can&amp;#8217;t get it to properly communicate
with NativeMessagingHost, and, I think there&amp;#8217;s some other unveil issues that are keeping it from working right. Don&amp;#8217;t know
what it is yet.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect2&quot;&gt;
&lt;h3 id=&quot;_wheres_muh_erlang&quot;&gt;Where&amp;#8217;s Muh Erlang?&lt;/h3&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;What has been AWESOME about FreeBSD is how it has Erlang 21-24. OpenBSD is on Erlang 21, and I think the last time it got any
love was in 2020. Well, I am grateful to the Erlang people, it seems they have some love for OpenBSD, despite it not being
up to date in the ports tree. But downloading the source code, installing gmake, then &lt;code&gt;./configure&lt;/code&gt;, &lt;code&gt;gmake&lt;/code&gt;, &lt;code&gt;gmake install&lt;/code&gt;
and there. You have current Erlang. Similar steps for rebar3. I&amp;#8217;ve never maintained a port before, but I use Erlang regularly,
and Elixir. So if I can, I may see about maintaining the Erlang/Elixir port in OpenBSD some day.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect2&quot;&gt;
&lt;h3 id=&quot;_not_a_fan_of_vmm&quot;&gt;Not a Fan of vmm&lt;/h3&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Between bhyve and vmm, bhyve wins every time in my opinion. To be fair, I haven&amp;#8217;t tried vmm but when I look at what
it supports, it always looks to be very lacking. That&amp;#8217;s okay though, my server will be running FreeBSD indefinitely so I can
utilize ZFS, jails, and bhyve.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect2&quot;&gt;
&lt;h3 id=&quot;_me_no_like_openbsds_wireguard_client&quot;&gt;Me No Like OpenBSD&amp;#8217;s Wireguard Client&lt;/h3&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;A few months ago, I tried to get OpenBSD to be a Wireguard client&amp;#8230;&amp;#8203;didn&amp;#8217;t go well. I have 2 Wireguard OpenBSD SERVERS
and they have been champs. For some reason though, can&amp;#8217;t get the client to pass through traffic. Tried a lot of stuff and for
some reason the answer I always get is &quot;use OpenIKED&quot;.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;imageblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;img src=&quot;https://blog.passwordclass.xyz/images/srsly.jpg&quot; alt=&quot;srsly&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;On the bright side: I did get everything working great now with wg-quick. I could probably shim that into using hostname.if,
but the problem with hostname.if is I don&amp;#8217;t think I can selectively enable interfaces. So, the wg-quick package does what I need best.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect2&quot;&gt;
&lt;h3 id=&quot;_sndiod_is_greatand_not&quot;&gt;sndiod is great&amp;#8230;&amp;#8203;and not&lt;/h3&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;OpenBSD&amp;#8217;s sndiod has solved my USB audio issue I have complained about for years. In FreeBSD, even inadvertently unplugging
the USB DAC will result in a blow up. It used to completely hang every single USB device which required a force restart.
Now as I said, you have to restart or kill every single process that held onto that device. In OpenBSD I can plug/unplug
my DAC as many times as it wants. No explosions, and on plug in my audio works again no problem.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;The not-so-great is it takes more to understand sndio than OSS. OSS was very straightforward to me. But sndio&amp;#8230;&amp;#8203;it&amp;#8217;s a must
that you read the mixerctl(8), sndioctl(1), sndiod(8), and multimedia FAQ to get anything working or understand what a lot
of the settings are in mixerctl and sndioctl output, configuring sndiod, understanding what rsnd/X is vs snd/X and so on.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Also, maybe my USB microphone is unsupported, but it SHOULD be rsnd/2 (or audio2, or uaudio1 because I have 2 USB
audio devices but 3 audio devices), but whatever I try doesn&amp;#8217;t seem to produce any working input and I just get
errors even though the device shows up in dmesg.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect2&quot;&gt;
&lt;h3 id=&quot;_mouse_is_missing_button_functions&quot;&gt;Mouse is Missing Button Functions&lt;/h3&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I have an Elecom HUGE. I haven&amp;#8217;t had all the buttons work right on Linux or FreeBSD either because I guess some of
the buttons only work Right with their desktop Windows software. However, the forward/back buttons worked right on
every OS except OpenBSD. They&amp;#8217;re scroll up/down. And I can&amp;#8217;t go in and make X11 edits because then my scroll wheel
will misbehave, since according to X11 (I&amp;#8217;m no display server expert), they&amp;#8217;re the same button. So that sucks,
I have to actually click the back/forward button in the GUI now.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_overall_thoughts&quot;&gt;Overall Thoughts&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I have to say, I love both operating systems for both their places. On one hand, I want to shake a stick at FreeBSD
for being behind on graphics and wireless, but they&amp;#8217;ve done such a great job at shipping a performant operating system
with some awesome features. Likewise too, OpenBSD is SLOW often times and has some IO quirks sometimes it seems,
it performs worse on weaker hardware by a lot (at least with browsers, an old dual core refused to run OpenBSD well),
but without browsers it runs fine.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Currently, I am super happy with OpenBSD on my laptop. In fact, I think it will stay like that for the foreseeable
future. I am not happy with it on my desktop though. Really, it all circles around to Firefox throat punching
OpenBSD it seems when I do something as simple as open a new tab.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;My conclusions for now:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;OpenBSD, great on laptop. Better than FreeBSD for me. Maybe it also has similar audio issues to my desktop, but
I don&amp;#8217;t use my laptop for audio of any sorts really. Maybe I will play something from the speakers on occasion.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I&amp;#8217;ll probably switch back to FreeBSD on my desktop though once the RX 6700XT is properly supported. Really, I see
no future for my audio problem being solved. Maybe some day, but I have my doubts it will happen in 2022. I work
from home, so I listen to music for a majority of the day. If I&amp;#8217;m constantly being battered by poor audio, I can&amp;#8217;t
work. I also far prefer Firefox&amp;#8230;&amp;#8203;one big reason is because Firefox has better features and screw Google.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I think though, if this issue were solved today I would stay here on OpenBSD. Not out of any disdain or dislike
for FreeBSD&amp;#8230;&amp;#8203;I do think it has a leg up right now. But I really appreciate OpenBSD&amp;#8217;s simplicity and security controls.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_addition&quot;&gt;Addition&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;sect2&quot;&gt;
&lt;h3 id=&quot;_2022_05_07&quot;&gt;2022-05-07&lt;/h3&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I forgot to add what WiFi has been like on OpenBSD. Wireless worked out of the box, got 180Mbps down, which is excellent
compared to the 25Mbps I get on FreeBSD.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</description>
      <pubDate>Fri, 06 May 2022 19:45:30 PDT</pubDate>
      <dc:creator>Courtney</dc:creator>
      <guid>https://blog.passwordclass.xyz/posts/my-openbsd-desktop/</guid>
    </item>
    <item>
      <title>FreeBSD 13.1 Release</title>
      <link>https://blog.passwordclass.xyz/posts/freebsd-13-1-release/</link>
      <description>&lt;div id=&quot;toc&quot; class=&quot;toc&quot;&gt;
&lt;div id=&quot;toctitle&quot;&gt;Table of Contents&lt;/div&gt;
&lt;ul class=&quot;sectlevel1&quot;&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/freebsd-13-1-release/#_mmmmm_pie&quot;&gt;Mmmmm, PIE&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/freebsd-13-1-release/#_zfskeys&quot;&gt;zfskeys&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/freebsd-13-1-release/#_ssh&quot;&gt;SSH&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/freebsd-13-1-release/#_iwm4_updates&quot;&gt;iwm(4) updates&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/freebsd-13-1-release/#_boot_time&quot;&gt;Boot Time&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/freebsd-13-1-release/#_wrapping_up&quot;&gt;Wrapping Up&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;According to the FreeBSD 13.1 &lt;a href=&quot;https://www.freebsd.org/releases/13.1R/schedule/&quot;&gt;release schedule&lt;/a&gt;, the team is close to putting
out the 13.1-RELEASE. I found &lt;a href=&quot;https://www.freebsd.org/releases/13.1R/relnotes/&quot;&gt;the page&lt;/a&gt; and have been looking through the notes
that are there so far to see what is of interest to me.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;On my desktop and laptop I have been running 13 STABLE, albeit blindly to what has changed, so it is nice to see the
team put together a document with what is upcoming for the release itself.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I already have plans to move my personal server over within the first week or two of release, in which I hope to create
another post documenting my upgrade process from 13.0 &amp;#8594; 13.1 for my jails which I &lt;a href=&quot;https://blog.passwordclass.xyz/posts/2022/01/freebsd-13-0-jails-with-zfs-and-vnet/&quot;&gt;wrote about&lt;/a&gt; before. Additionally, I&amp;#8217;ll be
doing some VPS upgrades and retiring some hardware, so migrating to 13.1 will be a perfect opportunity to move away
and also fix my old design mistakes.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;So now, with my rambling done, let&amp;#8217;s move on to what interests me.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_mmmmm_pie&quot;&gt;Mmmmm, PIE&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;The page states that they are enabling PIE, or Position Independent Executable.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;quoteblock&quot;&gt;
&lt;blockquote&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;For 64-bit architectures, the base system is now built with Position Independent Executable (PIE) support enabled by default. It may be disabled using the WITHOUT_PIE knob. A clean build is required. &lt;a href=&quot;https://cgit.freebsd.org/src/commit/?id=396e9f259d96&quot;&gt;396e9f259d96&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/blockquote&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;What is this? This basically means that instructions can be positioned anywhere in virtual memory and be executed properly.
And, software in memory will not be in the same memory address each time it is loaded. This means it is harder to execute
certain exploits, like Return Orieinted Programming attacks since the attacker no longer knows the memory addresses of
functions, and those locations will be different each time the process is restarted, so if they find what they want once,
they&amp;#8217;ll have to find it again if the process is restarted.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_zfskeys&quot;&gt;zfskeys&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;quoteblock&quot;&gt;
&lt;blockquote&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;here is a new zfskeys rc(8) service script, which allows for automatic decryption of ZFS datasets encrypted with ZFS native encryption during boot&lt;/p&gt;
&lt;/div&gt;
&lt;/blockquote&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I haven&amp;#8217;t used ZFS&amp;#8217;s encryption yet, but I think it&amp;#8217;s neat that it&amp;#8217;s possible now to automatically decrypt ZFS datasets.
This was actually one of the reasons why I hadn&amp;#8217;t yet used this feature of ZFS.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_ssh&quot;&gt;SSH&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;A few things that interest me with the SSH update is the bump to v8.8p1. 2 Features I&amp;#8217;m interested in:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;olist arabic&quot;&gt;
&lt;ol class=&quot;arabic&quot;&gt;
&lt;li&gt;
&lt;p&gt;scp gaining support for replacing rcp protocol with sftp. It says this is experimental, which is understandable since OpenSSH 9.0 is said to be the release that fully transitions to sftp by default. In the meantime with 8.8, if you use &lt;code&gt;scp -s&lt;/code&gt; it will enable sftp mode&lt;/p&gt;
&lt;div class=&quot;admonitionblock note&quot;&gt;
&lt;table&gt;
&lt;tr&gt;
&lt;td class=&quot;icon&quot;&gt;
&lt;div class=&quot;title&quot;&gt;Note&lt;/div&gt;
&lt;/td&gt;
&lt;td class=&quot;content&quot;&gt;
Seems you can&amp;#8217;t do any &lt;code&gt;~&lt;/code&gt; for path expansion
&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;u2f keys. Don&amp;#8217;t use one for my SSH stuff, but it&amp;#8217;s cool FreeBSD FINALLY has a release that supports this in base.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_iwm4_updates&quot;&gt;iwm(4) updates&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I&amp;#8217;m happy to see more work is being put into better WiFI support in FreeBSD. This has probably been the worst part about
FreeBSD for me. I haven&amp;#8217;t done a speed test since running STABLE, but soon I hope to, and see if maybe they&amp;#8217;ll be
backporting more of what&amp;#8217;s being dumped into 14-CURRENT into the 13 branch&amp;#8230;&amp;#8203;if not, 14 is I&amp;#8217;m guessing about a year off.
Really, I just want something better than the 25Mbps I cap at.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_boot_time&quot;&gt;Boot Time&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;In the notes, they write:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;quoteblock&quot;&gt;
&lt;blockquote&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Performance improvements have been made to loader(8), nvme(4), random(4), rtsold(8), and x86 clock calibration, which collectively yield a significant speedup in system boot time.&lt;/p&gt;
&lt;/div&gt;
&lt;/blockquote&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I have to say, this is one thing I have noticed since running the stable branch. I run rtsold and boot off NVMe and it certainly
has been faster than when I booted FreeBSD in the past.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_wrapping_up&quot;&gt;Wrapping Up&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;This seems like it&amp;#8217;s going to be another cool release. I like that FreeBSD steadily and reliably improves the operating
system and I am excited to see what more they do in the future too!&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</description>
      <pubDate>Wed, 13 Apr 2022 19:45:30 PDT</pubDate>
      <dc:creator>Courtney</dc:creator>
      <guid>https://blog.passwordclass.xyz/posts/freebsd-13-1-release/</guid>
    </item>
    <item>
      <title>FreeBSD 13.0 Jails with ZFS and VNET - Part 2: Updating</title>
      <link>https://blog.passwordclass.xyz/posts/freebsd-13-0-jails-with-zfs-and-vnet-p2-updating/</link>
      <description>&lt;div id=&quot;toc&quot; class=&quot;toc&quot;&gt;
&lt;div id=&quot;toctitle&quot;&gt;Table of Contents&lt;/div&gt;
&lt;ul class=&quot;sectlevel1&quot;&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/freebsd-13-0-jails-with-zfs-and-vnet-p2-updating/#_update_the_host&quot;&gt;Update the Host&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/freebsd-13-0-jails-with-zfs-and-vnet-p2-updating/#_jail_updates&quot;&gt;Jail Updates&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;In &lt;a href=&quot;https://blog.passwordclass.xyz/blogs/2022/01/freebsd-13-0-jails-with-zfs-and-vnet.html&quot;&gt;part 1&lt;/a&gt; of my
FreeBSD jail adventure, I switched from iocage to my own homespun jails. This will be a short piece
on updating those base jails.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Since they are all nullfs mounting the same directories, you only have to update things once.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;admonitionblock note&quot;&gt;
&lt;table&gt;
&lt;tr&gt;
&lt;td class=&quot;icon&quot;&gt;
&lt;div class=&quot;title&quot;&gt;Note&lt;/div&gt;
&lt;/td&gt;
&lt;td class=&quot;content&quot;&gt;
Allan Jude mentioned doing symlinks instead of nullfs, but I haven&amp;#8217;t tried that. You can hear his comments on &lt;a href=&quot;https://www.bsdnow.tv/441&quot;&gt;BSD Now&lt;/a&gt;.
&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_update_the_host&quot;&gt;Update the Host&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;First, you will want to update the host. However you want to go about this, go for it. For me, I use &lt;code&gt;freebsd-update&lt;/code&gt;.
I do a trick I learned from &lt;a href=&quot;https://vermaden.wordpress.com/&quot;&gt;vermaden&lt;/a&gt;, though, it was something I found in a tweet
that was posted, maybe there&amp;#8217;s an article&amp;#8230;&amp;#8203;&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;bectl create 2022-02-25_13.0&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;bectl mount 2022-02-25_13.0&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;chroot /tmp/be_bootenv_id&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;mount -t devfs devfs /dev&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;freebsd-update fetch install&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;pkg update&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;pkg upgrade&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;exit&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;bectl activate 2022-02-25_13.0&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;shutdown -r now&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;The system will be rebooted and then you will boot into the new boot environment with the updates applied.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_jail_updates&quot;&gt;Jail Updates&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Now let us update the jails. From the previous article, note I made the zfs dataset that is nullfs
mounted from at &lt;code&gt;zroot/jails/templates/base-13.0-RELEASE&lt;/code&gt;. This is what we will be updating.
First I take a snapshot of it (in case things go sideways)&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;zfs snapshot zroot/jails/templates/base-13.0-RELEASE@2022-02-25_update&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Then I update it with the freebsd-update utility:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;env UNAME_r=13.0-RELEASE freebsd-update -b /jails/templates/base-13.0-RELEASE fetch install&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Now with the base image updated, I don&amp;#8217;t know if it&amp;#8217;s necessary (didn&amp;#8217;t check, will update this in the future to add clarity),
but I restarted all my jails too while I was at it with &lt;code&gt;service jail restart&lt;/code&gt;. Of course, if not all your jails
are using the same base, you can restart them individually. Or, you can verify before/after to see if the changes
were applied without restarting the jails by taking a &lt;code&gt;uname -a&lt;/code&gt; before and after and confirming that the
change did happen. I inadvertantly updated the jails before the host because I rebooted without applying the
boot environment from before :)&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;And that&amp;#8217;s it! All the base jails you have should be updated now, then you can do your pkg update/upgrades
in your jails as necessary.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Once I&amp;#8217;m done I also like to remove the old snapshot. I know the system is working right so I don&amp;#8217;t need it anymore.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</description>
      <pubDate>Fri, 25 Feb 2022 18:45:30 PST</pubDate>
      <dc:creator>Courtney</dc:creator>
      <guid>https://blog.passwordclass.xyz/posts/freebsd-13-0-jails-with-zfs-and-vnet-p2-updating/</guid>
    </item>
    <item>
      <title>Why I Stopped Going Out For Coffee</title>
      <link>https://blog.passwordclass.xyz/posts/why-i-stopped-going-out-for-coffee/</link>
      <description>&lt;div id=&quot;toc&quot; class=&quot;toc&quot;&gt;
&lt;div id=&quot;toctitle&quot;&gt;Table of Contents&lt;/div&gt;
&lt;ul class=&quot;sectlevel1&quot;&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/why-i-stopped-going-out-for-coffee/#_coffee_is_expensive&quot;&gt;Coffee is Expensive&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/why-i-stopped-going-out-for-coffee/#_i_make_better_coffee_at_home&quot;&gt;I Make Better Coffee at Home&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/why-i-stopped-going-out-for-coffee/#_what_do_i_use&quot;&gt;What Do I Use?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/why-i-stopped-going-out-for-coffee/#_can_i_make_espresso_at_home&quot;&gt;Can I Make Espresso at Home?&lt;/a&gt;
&lt;ul class=&quot;sectlevel2&quot;&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/why-i-stopped-going-out-for-coffee/#_but_thats_way_too_much_money&quot;&gt;But That&amp;#8217;s Way Too Much Money!&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/why-i-stopped-going-out-for-coffee/#_wrapping_up&quot;&gt;Wrapping Up&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I am a big lover of coffee. If you know me, you are probably aware that I am rather knowledgeable and
enthusiastic about my favorite drink. For many years (probably 10 now) I would go out for an espresso
1-2x each day. Now, I may go out once a week for a social occasion and that&amp;#8217;s about it. But why?&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_coffee_is_expensive&quot;&gt;Coffee is Expensive&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Back when I started drinking espressos, they started around $1.40 each espresso. Not bad! It was rare
that I had a bad one, and I figured for $2.80 each day, it was worthwhile since it gave me a break in
the day, a moment to chat with my barista friends, and have a place to chill away from home with
a good (albeit fast) drink. Over time it has crept up in cost. When I graduated from the university in 2018 it was
just over $2/shot, while I was going to the university it was $1.81. Still not too bad when you consider
the return on investment that has to be made on espresso machines. But now, those espressos are $2.80, or
over $5 each day for coffee.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Fun fact: you can get 1lb of unroasted coffee for about $6-$9, which will net you about 12oz of
roasted coffee in the end which could get you 17-22 espressos, depending on how much coffee you use per espresso.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Now, I took a break from roasting, which, I should pick back up, but you can see that with that, or even
buying a 12oz bag for $15 will still net you an espresso for $0.68 to $0.77.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_i_make_better_coffee_at_home&quot;&gt;I Make Better Coffee at Home&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;This isn&amp;#8217;t an insult to my baristas. You all do an AWESOME job. And if you&amp;#8217;re reading this knowing the
coffee shop you work(ed) at and who I am, know I am beyond grateful for the kindness and attention
you put into making my espresso. However, most coffee shops will have a blend that is good, it isn&amp;#8217;t
always what I&amp;#8217;m looking for. And, since there&amp;#8217;s only so much you can do to make a &quot;perfect&quot; espresso
when there are other customers, it becomes clear that the quality will go down.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;At home, I am in charge of how often I clean my machine, the exact amount of beans that go in, how it&amp;#8217;s
prepped, and how it is extracted. With what I know of how to make coffee, and what I like, I know
how to tune my machine to make what I want consistently.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_what_do_i_use&quot;&gt;What Do I Use?&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I started making espresso with the &lt;a href=&quot;https://flairespresso.com/products/espresso-makers/flair-classic/&quot;&gt;Flair Classic&lt;/a&gt;
which is an awesome espresso maker. However, in 2021 they released the &lt;a href=&quot;https://flairespresso.com/flair-58-first-look/&quot;&gt;Flair 58&lt;/a&gt;, which is a bigger, and electric
version of the Classic. Coming in at $530 when I got it, to get features akin to this machine, I would be paying probably
$3k minimum for a standard machine you&amp;#8217;re more familiar with. Which features? I guess just one&amp;#8230;&amp;#8203;which
is the pressure profiling that you can do with the lever. Most machines will usually try to pull
shots at a straight 9 bars. However, I get control of the pressure the entire extraction.
So, full coffee cart lineup:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;ulist&quot;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Espresso machine:  Flair 58&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Grinder: Eureka Mignon Notte (with single dose hopper &amp;amp; silicon bellow)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;10/15/20/22g Decent Espresso baskets (and the 18g high flow that came withe the Flair)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Decent Tamper v3&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;This is my favorite setup, costing just over $1k, which sounds like a lot (maybe it is because most people will go out and get a $30 drip maker)
but &lt;strong&gt;Real&lt;/strong&gt; espresso isn&amp;#8217;t a cheap ordeal.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_can_i_make_espresso_at_home&quot;&gt;Can I Make Espresso at Home?&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;YES! Anyone can make espresso at home. But please don&amp;#8217;t cheapen your experience with cheap espresso
machines. James Hoffman made a &lt;a href=&quot;https://www.youtube.com/watch?v=avM-XsaTBIc&quot;&gt;great video&lt;/a&gt; on espresso
machines under £100, and you can see for yourself what the outcome is. If you want a coffee &lt;strong&gt;machine&lt;/strong&gt;
the cheapest I can recommend is the Gaggia Classic Pro. It&amp;#8217;s an actual machine, and not an appliance
like the cheaper Breville espresso machines. The difference being cup quality and appliances being harder
or impossible to service when parts fail. From there my next recommendation is the Rancilio Silva.
There&amp;#8217;s other good ones too, but most good machines will be $800 and up.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Next, you need a good grinder. If your grinder sucks, your coffee sucks. Doesn&amp;#8217;t matter how good
your machine is. I like my Eureka, which cost $300. Anything in their Mignon lineup will be good.
There&amp;#8217;s many others too, but usually good grinders will be around $400+&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;sect2&quot;&gt;
&lt;h3 id=&quot;_but_thats_way_too_much_money&quot;&gt;But That&amp;#8217;s Way Too Much Money!&lt;/h3&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Yes, yes I agree. That&amp;#8217;s actually what drove me to start with the Flair Classic, which I got my
hands on for about $150. You still need a good grinder, but you can get the Flair Neo for
$125 and any cheap (please get a burr grinder!) grinder will do. You could probably be making
espresso at around $180.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;But, if you could, I would HIGHLY suggest a whole kit under $500, which will make you GOOD
espresso once you learn. What do you need?&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;olist arabic&quot;&gt;
&lt;ol class=&quot;arabic&quot;&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://flairespresso.com/products/espresso-makers/flair-pro-2/&quot;&gt;Flair Pro 2&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;1Zpresso JX Pro hand grinder&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;These 2 tools will make you some of the best espresso ever, and for under $500. The best part?
There&amp;#8217;s no maintenance! Just wash it when you are done, takes maybe 2 minutes.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_wrapping_up&quot;&gt;Wrapping Up&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Thanks for reading my random opinion piece :) this was just a bit of filler writing
for the sake of having something on my blog that isn&amp;#8217;t computer related, and to kick the
tires on my writing process. Hope this at least inspired someone to consider brewing
at home. With my Flair machines, I have a pretty lengthy process. When I used the Pro model
I would spend maybe 15 minutes from taking everything out to drinking my espresso and cleaning
everything up. With my 58, I can do all that in maybe 5 or so minutes. It&amp;#8217;s really a great
way to take a pause in your day and make a good coffee.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Oh, and didn&amp;#8217;t mention milk drinks in here, but I make my milk drinks with the &lt;a href=&quot;https://flairespresso.com/product/nanofoamer/&quot;&gt;Nanofoamer&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Also, I have no affiliation with Flair, I&amp;#8217;m just a fanboy who has really loves their product and have been
so happy to have a low cost machine that can compete with the &quot;big boys&quot;.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</description>
      <pubDate>Sat, 19 Feb 2022 18:45:30 PST</pubDate>
      <dc:creator>Courtney</dc:creator>
      <guid>https://blog.passwordclass.xyz/posts/why-i-stopped-going-out-for-coffee/</guid>
    </item>
    <item>
      <title>How I Made My Old Blog</title>
      <link>https://blog.passwordclass.xyz/posts/how-i-made-this-site/</link>
      <description>&lt;div id=&quot;toc&quot; class=&quot;toc&quot;&gt;
&lt;div id=&quot;toctitle&quot;&gt;Table of Contents&lt;/div&gt;
&lt;ul class=&quot;sectlevel1&quot;&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/how-i-made-this-site/#_templating&quot;&gt;Templating&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/how-i-made-this-site/#_site_layout&quot;&gt;Site Layout&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/how-i-made-this-site/#_building&quot;&gt;Building&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/how-i-made-this-site/#_finishing_touches&quot;&gt;Finishing Touches&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;For quite some time now, I&amp;#8217;ve always wanted a basic static blog, but never really knew what I wanted.
I settled on AsciiDoc because it has a very nice template for basic websites, and is pretty versatile.
When trying to build a site in the past, I thought I had to tie together some language and build routes
and bla bla bla. Turns out I way overcomplicated things.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_templating&quot;&gt;Templating&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I templated my pages to meet a scheme. For all my pages, I start with this header:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-asciidoc&quot; data-lang=&quot;asciidoc&quot;&gt;= Site Title
:icons:
:toc: left
:encoding: utf-8
:stylesheet!:

++++
&amp;lt;button id=&quot;theme-switcher&quot;&amp;gt;Switch Themes&amp;lt;/button&amp;gt;
++++

https://blog.passwordclass.xyz[HOME]&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;This lets me get the theming I want and get a home button. My index page does not have the home button
for obvious reasons. From there on, I write what I want.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_site_layout&quot;&gt;Site Layout&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Next I have an expected site layout. At the webroot, I have a css dir with &quot;light.css&quot; and &quot;dark.css&quot;
for my light and dark themes. Next, I have a js directory with my &quot;switcher.js&quot; which lets me handle
light and dark themes. For any pictures I&amp;#8217;ll probably have a &quot;media/images&quot; directory to pull from,
but currently none of my pages have images. Unfortunately, I don&amp;#8217;t have any relative path work I can
do in my blog pages, so I have to point to absolute paths on my website for anything. No problem for
me though.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_building&quot;&gt;Building&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Next is the building of AsciiDoc to HTML files. I have a working directory, and from there I have a
directory called &quot;asciidoc&quot; which I have layed out exactly the way I want it to be on my webroot.
I run this script here:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;#!/usr/bin/env sh

CWD=$(pwd)
DEST=&quot;$CWD/blog.passwordclass.xyz&quot;
NEWLINE=&#39;&amp;lt;script src=&quot;https://blog.passwordclass.xyz/js/switcher.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&#39;

rm -rf &quot;$DEST&quot;
mkdir &quot;$DEST&quot;

# Copy JS files
cp -r &quot;$CWD/js&quot; &quot;$DEST/&quot;
# Copy CSS files
cp -r &quot;$CWD/css&quot; &quot;$DEST/&quot;

# Generate index file
asciidoctor -D &quot;$DEST&quot; &quot;$CWD/asciidoc/index.adoc&quot;

# Find adoc files
adocfiles=$(find asciidoc -type f -name &quot;*.adoc&quot; | xargs)

# Generate all the adoc files and dump them in the webroot dest
for f in $adocfiles; do
    relative_path=$(echo &quot;${f%/*}/&quot;)
    mkdir -p &quot;$CWD/$relative_path&quot;
    asciidoctor -D &quot;$DEST/$relative_path&quot; $f
done

# Some cleanup
cd &quot;$DEST&quot;
mv asciidoc/* ./
rmdir asciidoc
cd -

# Find the HTML files
htmlfiles=$(find &quot;$DEST&quot; -type f -name &quot;*.html&quot; | xargs)

# Find a line in the HTML header and insert my switcher.js
for f in $htmlfiles; do
    sed -E -i &quot;&quot; &quot;/&#92;&amp;lt;meta charset&#92;=/a&#92;&#92;
$NEWLINE
    &quot; &quot;$f&quot;

done&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_finishing_touches&quot;&gt;Finishing Touches&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;With a new article done, I update my index.adoc to contain my new article listing,
then I run the script above to generate the updates. Lastly, all I have to do is
copy my newly generated local webroot to the new one.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Then it&amp;#8217;s done!&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</description>
      <pubDate>Sat, 19 Feb 2022 18:45:30 PST</pubDate>
      <dc:creator>Courtney</dc:creator>
      <guid>https://blog.passwordclass.xyz/posts/how-i-made-this-site/</guid>
    </item>
    <item>
      <title>Freebsd Connect To Public WiFi</title>
      <link>https://blog.passwordclass.xyz/posts/freebsd-connect-to-public-wifi/</link>
      <description>&lt;div id=&quot;toc&quot; class=&quot;toc&quot;&gt;
&lt;div id=&quot;toctitle&quot;&gt;Table of Contents&lt;/div&gt;
&lt;ul class=&quot;sectlevel1&quot;&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/freebsd-connect-to-public-wifi/#_tldr&quot;&gt;TL;DR&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/freebsd-connect-to-public-wifi/#_things_to_note&quot;&gt;Things to Note&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/freebsd-connect-to-public-wifi/#_wpa_supplicant&quot;&gt;wpa_supplicant&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/freebsd-connect-to-public-wifi/#_rc_conf&quot;&gt;rc.conf&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/freebsd-connect-to-public-wifi/#_resolv_conf&quot;&gt;resolv.conf&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/freebsd-connect-to-public-wifi/#_connecting&quot;&gt;Connecting&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/freebsd-connect-to-public-wifi/#_vpn&quot;&gt;VPN&lt;/a&gt;
&lt;ul class=&quot;sectlevel2&quot;&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/freebsd-connect-to-public-wifi/#_enabling_the_vpn&quot;&gt;Enabling the VPN&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/freebsd-connect-to-public-wifi/#_conclusion&quot;&gt;Conclusion&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I&amp;#8217;ve been running FreeBSD on my laptop for under a year now. One of my biggest pain points so far has
been completely around WiFi. It&amp;#8217;s slow, janky to connect sometimes, and very manual (sometimes not
a big deal on that last part). However, I still prefer to use it. Lately, I&amp;#8217;ve left my house more
to do some stuff on coffee shop WiFi. I used to come out more before I got married and got my
Flair 58 espresso maker, however, sometimes it&amp;#8217;s nice to get out or, in my more recent cases,
my wife has been needing rides to meet people so I&amp;#8217;m &quot;stuck in town&quot;.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;This is a bit of a reminder to self, and maybe this will help you out when you&amp;#8217;re banging your
head against the wall trying to figure out why you can&amp;#8217;t connect to a captive portal.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;If you have a better way to do what I&amp;#8217;m doing here, hit me up on &lt;a href=&quot;https://twitter.com/taekicks&quot;&gt;Twitter&lt;/a&gt;!&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_tldr&quot;&gt;TL;DR&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;olist arabic&quot;&gt;
&lt;ol class=&quot;arabic&quot;&gt;
&lt;li&gt;
&lt;p&gt;Add the wifi network to wpa_supplicant&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Find the resolver IP in &lt;code&gt;/var/unbound/forward.conf&lt;/code&gt; and set it on top in &lt;code&gt;/etc/resolv.conf&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Remove &quot;WPA&quot; from your wlan interface in &lt;code&gt;/etc/rc.conf&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;service netif restart&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Connect to captive portal&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Test connection&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Connect to VPN&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Re-enable your own resolver in &lt;code&gt;/etc/resolv.conf&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_things_to_note&quot;&gt;Things to Note&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I&amp;#8217;ve noticed a few things when it comes to public WiFi:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;olist arabic&quot;&gt;
&lt;ol class=&quot;arabic&quot;&gt;
&lt;li&gt;
&lt;p&gt;A lot of the time, it isn&amp;#8217;t encrypted&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Captive portal won&amp;#8217;t let you use a local resolver like unbound&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;When switching your VPN on, you have to make even More changes&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Now, I believe the last 2 parts can be completely left in the back of your mind if
you are doing all your DNS with resolvconf editing your resolv.conf file. I however,
run local unbound (for better or worse).&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_wpa_supplicant&quot;&gt;wpa_supplicant&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;You will need to add an entry to your &lt;code&gt;/etc/wpa_supplicant.conf&lt;/code&gt; file. Should just be like this:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-conf&quot; data-lang=&quot;conf&quot;&gt;network={
	ssid=&quot;public wifi&quot;
}&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_rc_conf&quot;&gt;rc.conf&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;In the rc.conf file, you will have to make one edit. You&amp;#8217;ll have to knock out the &quot;WPA&quot; part
for your wireless interface (assuming the network you are connecting to does not do any sort
of encryption). I like to have 2 lines in my rc.conf file: one with WPA and one without, otherwise
identical, and I&amp;#8217;ll comment out each line according to where I&amp;#8217;m at.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_resolv_conf&quot;&gt;resolv.conf&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;If you have local_unbound running, and you connect to the wireless network, you can find the
network&amp;#8217;s DNS resolver in the &lt;code&gt;/var/unbound/forward.conf&lt;/code&gt; file. I put that at the top of
my resolv.conf file.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_connecting&quot;&gt;Connecting&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;With these edits in place, you can try a &lt;code&gt;service netif restart&lt;/code&gt; and check with &lt;code&gt;ifconfig&lt;/code&gt; to see
if you are connected to the right SSID. If so, open a browser and a search should bring up
a captive portal.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;From here, you may be able to uncomment their resolver from the resolv.conf file and use your
own, but in my experience, you might be stuck using their resolver. This is where a VPN becomes handy.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_vpn&quot;&gt;VPN&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;On public WiFi, you should &lt;strong&gt;ALWAYS&lt;/strong&gt; use a VPN. As I pointed out, all the traffic is unencrypted.
Anyone could sit and sniff your internet traffic with ther right hardware. Another handy thing to
a VPN is you can use any resolver you please.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;sect2&quot;&gt;
&lt;h3 id=&quot;_enabling_the_vpn&quot;&gt;Enabling the VPN&lt;/h3&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I found you have to use the local network&amp;#8217;s resolver to connect to your VPN first, then you can
switch to your own. So ensure you are still using their VPN first, then connect. I use my own
WireGuard server so I just run &lt;code&gt;service wireguard onestart&lt;/code&gt; to temporarily enable my VPN.
From there, you can uncomment out the network resolver from your resolv.conf file. At that point
for me, I use 127.0.0.1 to use unbound.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_conclusion&quot;&gt;Conclusion&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Connecting to public wifi on FreeBSD is still pretty janky. You definitely get a smoother
experience with Windows/Mac/Linux. Maybe it&amp;#8217;s better on OpenBSD even? Who knows. But this
is my process, and I hope this helps somebody out. If not, I at least know where to find
my own instructions :)&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</description>
      <pubDate>Fri, 04 Feb 2022 18:45:30 PST</pubDate>
      <dc:creator>Courtney</dc:creator>
      <guid>https://blog.passwordclass.xyz/posts/freebsd-connect-to-public-wifi/</guid>
    </item>
    <item>
      <title>FreeBSD 13.0 Jails with ZFS and VNET</title>
      <link>https://blog.passwordclass.xyz/posts/freebsd-13-0-jails-with-zfs-and-vnet/</link>
      <description>&lt;div id=&quot;toc&quot; class=&quot;toc&quot;&gt;
&lt;div id=&quot;toctitle&quot;&gt;Table of Contents&lt;/div&gt;
&lt;ul class=&quot;sectlevel1&quot;&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/freebsd-13-0-jails-with-zfs-and-vnet/#_creating_the_release&quot;&gt;Creating the Release&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/freebsd-13-0-jails-with-zfs-and-vnet/#_creating_our_skeleton&quot;&gt;Creating Our Skeleton&lt;/a&gt;
&lt;ul class=&quot;sectlevel2&quot;&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/freebsd-13-0-jails-with-zfs-and-vnet/#_templates&quot;&gt;Templates&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/freebsd-13-0-jails-with-zfs-and-vnet/#_fstabs&quot;&gt;FSTABs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/freebsd-13-0-jails-with-zfs-and-vnet/#_the_jail_conf_file&quot;&gt;The jail.conf File&lt;/a&gt;
&lt;ul class=&quot;sectlevel2&quot;&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/freebsd-13-0-jails-with-zfs-and-vnet/#_host_setup&quot;&gt;Host Setup&lt;/a&gt;
&lt;ul class=&quot;sectlevel3&quot;&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/freebsd-13-0-jails-with-zfs-and-vnet/#_enable_the_service&quot;&gt;Enable the Service&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/freebsd-13-0-jails-with-zfs-and-vnet/#_get_jib_in_the_right_place&quot;&gt;Get jib in the Right Place&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/freebsd-13-0-jails-with-zfs-and-vnet/#_configure_our_interface&quot;&gt;Configure Our Interface&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/freebsd-13-0-jails-with-zfs-and-vnet/#_jails_needing_shared_memory&quot;&gt;Jails Needing Shared Memory&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.passwordclass.xyz/posts/freebsd-13-0-jails-with-zfs-and-vnet/#_update_2022_01_20&quot;&gt;Update 2022-01-20&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;As of late I have had some pain points with iocage, which I used since I started using FreeBSD in 2017.
I came from an Ubuntu with LXD + ZFS background and iocage had the command line interface I wanted
that felt familiar with LXD at the time.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Well, iocage seems dead now. Its last release was in 2019 and its last commit (at the time of writing this)
was September 30, 2021. Of course, that commit isn&amp;#8217;t in what&amp;#8217;s in FreeBSD ports, unless you use the
devel package..and, that package has some issues (for me, iocage list doesn&amp;#8217;t work right).&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Because of this, I decided to take up the challenge of making my own base jails. To start, I will
give credit where credit is due and say I followed these resources to get me to where I am:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;ulist&quot;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Michael W Lucas&#39; FreeBSD Jail Mastery book&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://clinta.github.io/freebsd-jails-the-hard-way/&quot; class=&quot;bare&quot;&gt;https://clinta.github.io/freebsd-jails-the-hard-way/&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://www.skyforge.at/posts/a-note-in-sysvipc-and-jails-on-freebsd/&quot; class=&quot;bare&quot;&gt;https://www.skyforge.at/posts/a-note-in-sysvipc-and-jails-on-freebsd/&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;iocage and their fstab files&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_creating_the_release&quot;&gt;Creating the Release&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;First off, we need to create a release jail. This is a base image that we can use to make cloned
jails, thick jails, or our base jails from. I&amp;#8217;m going to start by making a new jails dataset and
mounting it at /jails&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;$ zfs create -o mountpoint=/jails zroot/jails&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Here is the foundation for everything. Now I&amp;#8217;ll create a few other datasets for our releases and
templates and running jails, as well as our first release dataset (13.0-RELEASE)&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;$ zfs create -p zroot/jails/releases/13.0-RELEASE
$ zfs create zroot/jails/templates
$ zfs create zroot/jails/jails&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Next, we need to download the base OS as well as lib32 for our jail. The contents should be extracted into /jails/releases/13.0-RELEASE in the end.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;$ fetch https://ftp.freebsd.org/pub/FreeBSD/releases/amd64/amd64/13.0-RELEASE/base.txz -o /tmp/base.txz
$ fetch https://ftp.freebsd.org/pub/FreeBSD/releases/amd64/amd64/13.0-RELEASE/lib32.txz -o /tmp/lib32.txz
$ tar -xf /tmp/base.txz -C /jails/releases/13.0-RELEASE
$ tar -xf /tmp/lib32.txz -C /jails/releases/13.0-RELEASE&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Now let us update the jail contents&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;$ env UNAME_r=13.0-RELEASE freebsd-update -b /jails/releases/13.0-RELEASE fetch install
$ env UNAME_r=13.0-RELEASE freebsd-update -b /jails/releases/13.0-RELEASE IDS&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Then, we can copy our /etc/localtime and our /etc/resolv.conf files into the jail
$ cp /etc/localtime /jails/releases/13.0-RELEASE/etc/localtime
$ cp /etc/resolv.conf /jails/releases/13.0-RELEASE/etc/resolv.conf&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Nice. Now we have our base. Lets snapshot it so we can clone it. We will clone this to our templates
folder after we take the snapshot:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;$ zfs snapshot zroot/jails/releases/13.0-RELEASE@p4
$ zfs clone zroot/jails/releases/13.0-RELEASE@p4 zroot/jails/templates/base-13.0-RELEASE&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;This part is done. The release is made, now we have a base created for our base jails.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_creating_our_skeleton&quot;&gt;Creating Our Skeleton&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Since we want to be using nullfs mounts for our base jail, we are going to want to make another
clone and wipe out the contents of that new clone. Here I think you can debate whether or not you
want to take a clone of the base-13.0-RELEASE clone from earlier, or if you want to clone from the
release. I opted to clone from the release. Maybe one is a proper way, but at this time I can&amp;#8217;t
see a drawback to either way myself.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;$ zfs clone zroot/jails/releases/13.0-RELEASE@p4 zroot/jails/templates/skeleton-13.0-RELEASE&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Now we want to hollow out the skeleton we just made. In Clinta&amp;#8217;s example, this is where I started to
encounter issues, namely with /usr/local since it doesn&amp;#8217;t seem you can mount /usr/local if /usr is
nullfs&amp;#8217;d&amp;#8230;&amp;#8203;this could create a bunch of other problems too, namely, too much stuff is set up with
nullfs mounts. The way that is shown by Michael W Lucas and the iocage people is more sensible in this
case. We need to EMPTY the contents of some directories without deleting the directories.
Note, some directories (such as the lib directories) have immutable files, so you&amp;#8217;ll have to make the files mutable if you encounter the error:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;$ rm -rf /jails/templates/skeleton-13.0-RELEASE/bin/*
$ rm -rf /jails/templates/skeleton-13.0-RELEASE/boot/*
$ chflags -R noschg /jails/templates/skeleton-13.0-RELEASE/lib/*
$ rm -rf /jails/templates/skeleton-13.0-RELEASE/lib/*
$ chflags -R noschg /jails/templates/skeleton-13.0-RELEASE/libexec/*
$ rm -rf /jails/templates/skeleton-13.0-RELEASE/libexec/*
$ rm -rf /jails/templates/skeleton-13.0-RELEASE/rescue/*
$ chflags -R noschg /jails/templates/skeleton-13.0-RELEASE/sbin/*
$ rm -rf /jails/templates/skeleton-13.0-RELEASE/sbin/*
$ chflags -R noschg /jails/templates/skeleton-13.0-RELEASE/usr/bin/*
$ rm -rf /jails/templates/skeleton-13.0-RELEASE/usr/bin/*
$ rm -rf /jails/templates/skeleton-13.0-RELEASE/usr/include/*
$ chflags -R noschg /jails/templates/skeleton-13.0-RELEASE/usr/lib/*
$ rm -rf /jails/templates/skeleton-13.0-RELEASE/usr/lib/*
$ chflags -R noschg /jails/templates/skeleton-13.0-RELEASE/usr/libexec/*
$ rm -rf /jails/templates/skeleton-13.0-RELEASE/usr/libexec/*
$ rm -rf /jails/templates/skeleton-13.0-RELEASE/usr/sbin/*
$ rm -rf /jails/templates/skeleton-13.0-RELEASE/usr/share/*
$ rm -rf /jails/templates/skeleton-13.0-RELEASE/usr/libdata/*
$ chflags -R noschg /jails/templates/skeleton-13.0-RELEASE/usr/lib32/*
$ rm -rf /jails/templates/skeleton-13.0-RELEASE/usr/lib32/*&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;And if you run into the unable to delete issue, run: chflags -R noschg on that directory.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Now we are at the stage where we can create our jails. We will be snapshotting the skeleton from here on out when we want to have a new jail. So, lets snapshot the skeleton and call this new jail &quot;testboxen_13-0&quot;.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;$ zfs snapshot zroot/jails/templates/skeleton-13.0-RELEASE@skeleton
$ zfs clone zroot/jails/templates/skeleton-13.0-RELEASE@skeleton zroot/jails/jails/testboxen_13-0&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Neat! It&amp;#8217;s created. We can&amp;#8217;t use it yet, but it&amp;#8217;s there.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;sect2&quot;&gt;
&lt;h3 id=&quot;_templates&quot;&gt;Templates&lt;/h3&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Here is a quick tidbit on templates&amp;#8230;&amp;#8203;kind of a sidebar. Earlier we made that base-13.0-RELEASE clone
and it&amp;#8217;s not doing much. It&amp;#8217;s the same as what&amp;#8217;s in the release, as a matter of fact. I never utilized
the templates feature in iocage, but reading Michael&amp;#8217;s book tipped me off to how to do this for my own self.
For my job I have roughly 10 jails doing the same thing. Do I want to go and update the same packages each time for each jail?
They&amp;#8217;re all running the same software, so why make 10 identical downloads?
You can clone the release jail and make a base jail named, say, &quot;nginx-13.0-RELEASE&quot;.
You could go in that jail and install nginx and anything else each of that jail might need and use
that nginx-filled template along with the aforementioned skeleton.
If you do this however, note you will additionally have to nuke usr/local and var/db/pkg in the skeleton.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I would like to note it wasn&amp;#8217;t until AFTER I set everything up for work that I messed up my implementation.
So, for this section I&amp;#8217;ll just make this mention here and suggest you check out Michael&amp;#8217;s book, ch6, page 123.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_fstabs&quot;&gt;FSTABs&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Next, we must create our fstab files. This will tell the jail creation tools to use the nullfs mounts inside our skeletoned jail we just created.
Here&amp;#8217;s what it should look like for our &quot;testboxen_13-0&quot;&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-conf&quot; data-lang=&quot;conf&quot;&gt;/jails/templates/base-13.0-RELEASE/bin                /jails/jails/testboxen_13-0/bin          nullfs  ro      0       0
/jails/templates/base-13.0-RELEASE/boot               /jails/jails/testboxen_13-0/boot         nullfs  ro      0       0
/jails/templates/base-13.0-RELEASE/lib                /jails/jails/testboxen_13-0/lib          nullfs  ro      0       0
/jails/templates/base-13.0-RELEASE/libexec            /jails/jails/testboxen_13-0/libexec      nullfs  ro      0       0
/jails/templates/base-13.0-RELEASE/rescue             /jails/jails/testboxen_13-0/rescue       nullfs  ro      0       0
/jails/templates/base-13.0-RELEASE/sbin               /jails/jails/testboxen_13-0/sbin         nullfs  ro      0       0
/jails/templates/base-13.0-RELEASE/usr/bin            /jails/jails/testboxen_13-0/usr/bin      nullfs  ro      0       0
/jails/templates/base-13.0-RELEASE/usr/include        /jails/jails/testboxen_13-0/usr/include  nullfs  ro      0       0
/jails/templates/base-13.0-RELEASE/usr/lib            /jails/jails/testboxen_13-0/usr/lib      nullfs  ro      0       0
/jails/templates/base-13.0-RELEASE/usr/libexec        /jails/jails/testboxen_13-0/usr/libexec  nullfs  ro      0       0
/jails/templates/base-13.0-RELEASE/usr/sbin           /jails/jails/testboxen_13-0/usr/sbin     nullfs  ro      0       0
/jails/templates/base-13.0-RELEASE/usr/share          /jails/jails/testboxen_13-0/usr/share    nullfs  ro      0       0
/jails/templates/base-13.0-RELEASE/usr/libdata        /jails/jails/testboxen_13-0/usr/libdata  nullfs  ro      0       0
/jails/templates/base-13.0-RELEASE/usr/lib32          /jails/jails/testboxen_13-0/usr/lib32    nullfs  ro      0       0&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I like to keep these files in /jails/fstabs, so this file would be /jails/fstabs/testboxen_13-0.fstab.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_the_jail_conf_file&quot;&gt;The jail.conf File&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Now lets make our jail.conf file. This will tell our system how to put together our jail.
Here&amp;#8217;s the contents of mine for this case.
Note, you can copy/paste the testboxen_13-0 block over and over for each jail you make with its new name.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-conf&quot; data-lang=&quot;conf&quot;&gt;$jails=&quot;/jails/jails&quot;;

exec.start = &quot;/bin/sh /etc/rc&quot;;
exec.stop = &quot;/bin/sh /etc/rc.shutdown&quot;;
exec.clean;
mount.devfs;

testboxen_13-0 {
        host.hostname = &quot;testboxen_13-0&quot;;
        path = &quot;$jails/testboxen_13-0&quot;;
        vnet;
        vnet.interface = &quot;e0b_test1&quot;;
        exec.prestart += &quot;sh -x /usr/local/bin/jib addm test1 jeth&quot;;
        exec.poststop += &quot;/usr/local/bin/jib destroy test1&quot;;
        mount.fstab = &quot;/jails/fstabs/testboxen_13-0.fstab&quot;;
}&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Let&amp;#8217;s break this down a little:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;ulist&quot;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;path - where the jail is located&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;vnet - specifying we are running a vnet jail&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;vnet.interface - the name of the interface inside the jail&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;exec.prestart/poststop - how we are going to create/destroy our interfaces&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;mount.fstab - the fstab file for our base jails&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Neat. This is all done…but, this Still won&amp;#8217;t work. Our host does not yet know how to use this stuff.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;sect2&quot;&gt;
&lt;h3 id=&quot;_host_setup&quot;&gt;Host Setup&lt;/h3&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;For the host, we need to setup a few things:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;ulist&quot;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Enable the service&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Get jib in the right place&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Configure our interface (optional)&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&quot;sect3&quot;&gt;
&lt;h4 id=&quot;_enable_the_service&quot;&gt;Enable the Service&lt;/h4&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;sysrc jail_enable=&quot;YES&quot;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect3&quot;&gt;
&lt;h4 id=&quot;_get_jib_in_the_right_place&quot;&gt;Get jib in the Right Place&lt;/h4&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Either copy or symlink jib to /usr/local/bin&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;$ cp /usr/share/examples/jails/jib /usr/local/bin/jib&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect3&quot;&gt;
&lt;h4 id=&quot;_configure_our_interface&quot;&gt;Configure Our Interface&lt;/h4&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;This part is optional. I have an extra interface and I decided to give it a name. That is the &quot;jeth&quot; in the config above.
It could be em0, igb0, re0, em1, whatever interface you want to use, don&amp;#8217;t even need to rename it.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;$ sysrc ifconfig_igb1_name=&quot;jeth&quot;
$ sysrc ifconfig_jeth=&quot;up&quot;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Since that will only work on the next boot, you can run ifconfig igb1 name jeth and ifconfig jeth up to get the interface up.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Okay, NOW our jail should start&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_jails_needing_shared_memory&quot;&gt;Jails Needing Shared Memory&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I ran into one instance where software needed shared memory (PostgreSQL).
Because of that, I initially thought I needed to enable an insecure mode of sharing memory, but it turns out since,
I think, FreeBSD 11.1 they added new security controls to create new shared memory namespaces to keep
separate shared memory&amp;#8230;&amp;#8203;pools? for each jail you set it up for.
iocage did this out of the box for everything, but I find it&amp;#8217;s probably only necessary on an as-needed basis.
Basically, for each jail (or just your entire jail.conf file) add this line:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-conf&quot; data-lang=&quot;conf&quot;&gt;sysvshm = &quot;new&quot;;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;This is pretty well explained in the skyforge URL above.
== Wrapping it Up&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;With everything in place, let&amp;#8217;s start this jail up:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;$ service jail start testboxen_13-0
$ jls
   JID  IP Address      Hostname                      Path
    1                  testboxen_13-0               /jails/jails/testboxen_13-0&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;HOORAY! But wait, there&amp;#8217;s no networking. That&amp;#8217;s because we need to have the jail do it for us.
We could either put some of the exec stuff in the jail.conf, or pass the buck to the jail and put it in its rc.conf, which is what I will do.
Note, with vnet jails you won&amp;#8217;t see the ip address in the jls output. So, console into that jail:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;jexec testboxen_13-0&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Now lets get some stuff in our jail&amp;#8217;s rc.conf. I&amp;#8217;ll give it an address of 10.0.0.10/24, and a default router of 10.0.0.1&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-conf&quot; data-lang=&quot;conf&quot;&gt;hostname=&quot;testboxen_13-0&quot;
# note the name here matches what we put for vnet.interface
ifconfig_e0b_test1=&quot;10.0.0.10/24&quot;
defaultrouter=&quot;10.0.0.1&quot;

# Enable IPv6 if you want
#rtsold_enable=&quot;YES&quot;
#ifconfig_e0b_test1_ipv6=&quot;inet6 accept_rtadv&quot;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Cool. Now get out of that jail with an exit and restart it to ensure networking is good: service jail restart testboxen_13-0.
You should be able to console back in and ping. It should be good! Now you have a fully functional jail.
Lastly, if you want these to boot up, you can add it to the jail list:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;sysrc jail_list+=&quot;testboxen_13-0&quot;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Boom. Done. With all this out of the way, you can take all these same principles with the cloning of the skeleton, fstab, and jail.conf entry to create all the base jails you want!&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;_update_2022_01_20&quot;&gt;Update 2022-01-20&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I have seen others in places suggest the use of BastilleBSD for jail management too. I also think BastilleBSD is a good tool, so here&amp;#8217;s a shoutout BastilleBSD and the people behind the project 🙂&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;&lt;a href=&quot;https://bastillebsd.org/&quot; class=&quot;bare&quot;&gt;https://bastillebsd.org/&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</description>
      <pubDate>Fri, 14 Jan 2022 18:45:30 PST</pubDate>
      <dc:creator>Courtney</dc:creator>
      <guid>https://blog.passwordclass.xyz/posts/freebsd-13-0-jails-with-zfs-and-vnet/</guid>
    </item>
  </channel>
</rss>