<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Niall Donaghy</title>
    <link>https://ndonaghy.com/</link>
    <description>Recent content on Niall Donaghy</description>
    <generator>Hugo</generator>
    <language>en-gb</language>
    <lastBuildDate>Tue, 07 Apr 2026 01:57:29 +0100</lastBuildDate>
    <atom:link href="https://ndonaghy.com/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>OpenBSD sshd hardening with pf and sshguard</title>
      <link>https://ndonaghy.com/posts/openbsd-sshd-hardening/</link>
      <pubDate>Tue, 07 Apr 2026 01:57:29 +0100</pubDate>
      <guid>https://ndonaghy.com/posts/openbsd-sshd-hardening/</guid>
      <description>&lt;h1 id=&#34;goals&#34;&gt;Goals:&lt;/h1&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;a sane sshd configuration&lt;/li&gt;&#xA;&lt;li&gt;a sane pf configuration&lt;/li&gt;&#xA;&lt;li&gt;optional: add sshguard (but recommended)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h1 id=&#34;setup-ssh-for-your-main-user&#34;&gt;setup SSH for your main user&lt;/h1&gt;&#xA;&lt;p&gt;Your main user is not root. :)&lt;/p&gt;&#xA;&lt;p&gt;Change to your regular user and setup SSH dirs:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;su - niall&#xA;mkdir -p /home/niall/.ssh&#xA;chmod 700 /home/niall/.ssh&#xA;chown niall:niall /home/niall/.ssh&#xA;# add pubkey(s) you want to be authorised for login&#xA;nano /home/niall/.ssh/authorized_keys&#xA;&amp;lt;paste in&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Default /etc/ssh/sshd_config has key-based login enabled, so test it now:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Installing OpenBSD 7.8</title>
      <link>https://ndonaghy.com/posts/openbsd-7.8-installation/</link>
      <pubDate>Tue, 07 Apr 2026 01:33:03 +0100</pubDate>
      <guid>https://ndonaghy.com/posts/openbsd-7.8-installation/</guid>
      <description>&lt;p&gt;This guide is VirtualBox-centric, but most everything will translate to your hypervisor or bare metal of choice.&lt;/p&gt;&#xA;&lt;h1 id=&#34;materials&#34;&gt;Materials&lt;/h1&gt;&#xA;&lt;p&gt;Installation ISO:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;cd78.iso - you will download packages from network&lt;/li&gt;&#xA;&lt;li&gt;install78.iso - self-contained&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h1 id=&#34;hypervisor&#34;&gt;Hypervisor&lt;/h1&gt;&#xA;&lt;p&gt;Create a new VM with the required CPU, RAM, and storage specs, and mount the ISO to boot from it and begin installation.&lt;/p&gt;&#xA;&lt;p&gt;VirtualBox-specific notes:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Network: If using wifi on host, use NAT mode for the NIC; bridge mode performance tanks (does not apply if host is wired).&lt;/li&gt;&#xA;&lt;li&gt;Storage: make &amp;ldquo;IDE&amp;rdquo; type PIIX4, attach ISO there, make &amp;ldquo;ACHI&amp;rdquo; type ACHI, enable host IO cache, and attach VDI there.&lt;/li&gt;&#xA;&lt;li&gt;VDI: Can tick Solid-state drive.&lt;/li&gt;&#xA;&lt;li&gt;Don&amp;rsquo;t be tempted by UEFI mode, you will have boot issues.&lt;/li&gt;&#xA;&lt;li&gt;Don&amp;rsquo;t be tempted by NVMe mode, disk will deadlock during install; ACHI is faster in Vbox anyway!&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h1 id=&#34;installation&#34;&gt;Installation&lt;/h1&gt;&#xA;&lt;h2 id=&#34;network&#34;&gt;network&lt;/h2&gt;&#xA;&lt;p&gt;Follow instructions to set autoconf(DHCP) or static IP addressing and gateway, DNS, etc.&#xA;In this doc, in post-install tasks, instructions given to convert DHCP config to static config&lt;/p&gt;</description>
    </item>
    <item>
      <title>OpenBSD httpd Basic Setup With Auto Index and Cgi</title>
      <link>https://ndonaghy.com/posts/openbsd-httpd-basic-setup-with-auto-index-and-cgi/</link>
      <pubDate>Tue, 07 Apr 2026 00:43:38 +0100</pubDate>
      <guid>https://ndonaghy.com/posts/openbsd-httpd-basic-setup-with-auto-index-and-cgi/</guid>
      <description>&lt;p&gt;Setting up httpd webserver, and you want:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;some static html please&lt;/li&gt;&#xA;&lt;li&gt;display a directory listing autoindex style&lt;/li&gt;&#xA;&lt;li&gt;try a dumb CGI script because why not?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;This is basic tyre-kicking; please read my other posts on making a more complete httpd (and system, for that matter) configuration.&lt;/p&gt;&#xA;&lt;h2 id=&#34;create-a-basic-etchttpdconf&#34;&gt;create a basic /etc/httpd.conf&lt;/h2&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;types { include &amp;#34;/usr/share/misc/mime.types&amp;#34; }&#xA;&#xA;server &amp;#34;default&amp;#34; {&#xA;        listen on * port 80&#xA;        root &amp;#34;/htdocs&amp;#34;&#xA;&#xA;        location &amp;#34;/cgi-bin/*&amp;#34; {&#xA;                root &amp;#34;/&amp;#34;&#xA;                fastcgi socket &amp;#34;/run/slowcgi.sock&amp;#34;&#xA;        }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;enable-slow-cgi-on-boot-start-it&#34;&gt;enable slow cgi on boot, start it&lt;/h2&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;rcctl enable slowcgi&#xA;rcctl start slowcgi&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;create-our-test-files&#34;&gt;create our test files&lt;/h2&gt;&#xA;&lt;h3 id=&#34;static&#34;&gt;static&lt;/h3&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;echo &amp;#34;Hello from OpenBSD httpd.&amp;#34; | tee /var/www/htdocs/index.html&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;cgi&#34;&gt;cgi&lt;/h3&gt;&#xA;&lt;h4 id=&#34;nano-varwwwcgi-binipcgi-and-paste-in&#34;&gt;nano /var/www/cgi-bin/ip.cgi, and paste in:&lt;/h4&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;#!/bin/sh&#xA;echo &amp;#34;Content-Type: text/plain&amp;#34;&#xA;echo &amp;#34;&amp;#34;&#xA;echo &amp;#34;Hello from OpenBSD httpd.&amp;#34;&#xA;echo &amp;#34;Your IP is ${REMOTE_ADDR:-unknown}.&amp;#34;&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Note: This is for example only; I don&amp;rsquo;t endorse serving up #!/bin/sh via your webserver. :)&lt;/p&gt;</description>
    </item>
    <item>
      <title>OpenBSD Disabling Unused Services</title>
      <link>https://ndonaghy.com/posts/openbsd-disabling-unused-services/</link>
      <pubDate>Tue, 07 Apr 2026 00:10:44 +0100</pubDate>
      <guid>https://ndonaghy.com/posts/openbsd-disabling-unused-services/</guid>
      <description>&lt;p&gt;Whilst setting up this OpenBSD VPS I trimmed some unused services. Secure by default, but securer when not running. :)&lt;/p&gt;&#xA;&lt;h2 id=&#34;check_quotas&#34;&gt;check_quotas&lt;/h2&gt;&#xA;&lt;p&gt;There are disk quota checks at boot, however, I am not using quotas:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;doas rcctl disable check_quotas&#xA;doas rcctl stop check_quotas&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;dhcpleased&#34;&gt;dhcpleased&lt;/h2&gt;&#xA;&lt;p&gt;The DHCP client daemon; this is not needed as I am using a static IP:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;doas rcctl disable dhcpleased&#xA;doas rcctl stop dhcpleased&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;slaacd&#34;&gt;slaacd&lt;/h2&gt;&#xA;&lt;p&gt;IPv6 stateless autoconfiguration; disable if you are not using IPv6, I am not:&lt;/p&gt;</description>
    </item>
    <item>
      <title>OpenBSD httpd TLS Certificate</title>
      <link>https://ndonaghy.com/posts/openbsd-httpd-tls-certificate/</link>
      <pubDate>Mon, 06 Apr 2026 23:24:03 +0100</pubDate>
      <guid>https://ndonaghy.com/posts/openbsd-httpd-tls-certificate/</guid>
      <description>&lt;p&gt;Migrating OpenBSD httpd from HTTP to HTTPS&lt;/p&gt;&#xA;&lt;p&gt;LetsEncrypt offer free TLS certs and have a nice ACME clients to handle auto-renewal. Here&amp;rsquo;s how to implement on OpenBSD, assuming you have your httpd server up and running on port 80 already.&lt;/p&gt;&#xA;&lt;p&gt;For example you might have some basic &lt;code&gt;/etc/httpd&lt;/code&gt;:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;types { include &amp;#34;/usr/share/misc/mime.types&amp;#34; }&#xA;&#xA;server &amp;#34;ndonaghy.com&amp;#34; { &#xA;&#x9;listen on * port 80 &#xA;&#x9;root &amp;#34;/htdocs&amp;#34; &#xA;&#x9;location &amp;#34;/stuff/*&amp;#34; { &#xA;&#x9;&#x9;directory { &#xA;&#x9;&#x9;&#x9;auto index&#xA;&#x9;&#x9;} &#xA;&#x9;} &#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;step-1-add-acme-challenge-location&#34;&gt;Step 1: Add acme-challenge location&lt;/h2&gt;&#xA;&lt;p&gt;Add this location directive to /etc/httpd.conf:&lt;/p&gt;</description>
    </item>
    <item>
      <title>ZFS on Ubuntu</title>
      <link>https://ndonaghy.com/posts/zfs-on-ubuntu/</link>
      <pubDate>Sun, 05 Apr 2026 00:44:32 +0100</pubDate>
      <guid>https://ndonaghy.com/posts/zfs-on-ubuntu/</guid>
      <description>&lt;h1 id=&#34;goals&#34;&gt;Goals&lt;/h1&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;input checked=&#34;&#34; disabled=&#34;&#34; type=&#34;checkbox&#34;&gt; Build a NAS on low-power TinyPC (Thinkcentre M910q, i5 6500T, 8GB RAM)&lt;/li&gt;&#xA;&lt;li&gt;&lt;input checked=&#34;&#34; disabled=&#34;&#34; type=&#34;checkbox&#34;&gt; Ubuntu 24.04.4 LTS&lt;/li&gt;&#xA;&lt;li&gt;&lt;input checked=&#34;&#34; disabled=&#34;&#34; type=&#34;checkbox&#34;&gt; ZFS pools and filesystem with auto-snapshots&lt;/li&gt;&#xA;&lt;li&gt;&lt;input checked=&#34;&#34; disabled=&#34;&#34; type=&#34;checkbox&#34;&gt; Serve via NFS and SMB&lt;/li&gt;&#xA;&lt;li&gt;&lt;input checked=&#34;&#34; disabled=&#34;&#34; type=&#34;checkbox&#34;&gt; ZFS snapshots / Previous Versions working on Windows clients&lt;/li&gt;&#xA;&lt;li&gt;&lt;input checked=&#34;&#34; disabled=&#34;&#34; type=&#34;checkbox&#34;&gt; Enable smartd monitoring&lt;/li&gt;&#xA;&lt;li&gt;&lt;input checked=&#34;&#34; disabled=&#34;&#34; type=&#34;checkbox&#34;&gt; Send Telegram alerts for smartd and ZED events&lt;/li&gt;&#xA;&lt;li&gt;&lt;input checked=&#34;&#34; disabled=&#34;&#34; type=&#34;checkbox&#34;&gt; Sensible tuning&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h1 id=&#34;intro&#34;&gt;Intro&lt;/h1&gt;&#xA;&lt;p&gt;This PC is also my living-room media player, so this is an always-on, low budget, and low power draw (&amp;lt; 15W idle) build. Being a TinyPC, I chose to add storage via USB-attached SCSI caddies (UASP).&lt;/p&gt;</description>
    </item>
    <item>
      <title>Hugo</title>
      <link>https://ndonaghy.com/posts/hugo/</link>
      <pubDate>Sun, 05 Apr 2026 00:23:04 +0100</pubDate>
      <guid>https://ndonaghy.com/posts/hugo/</guid>
      <description>&lt;h1 id=&#34;hugo-getting-started&#34;&gt;Hugo: getting started&lt;/h1&gt;&#xA;&lt;h2 id=&#34;install&#34;&gt;Install&lt;/h2&gt;&#xA;&lt;p&gt;There are multiple ways to obtain and install - eg: distro package manager, github binary, compile source.&#xA;Check the docs and choose what works best for you.&lt;/p&gt;&#xA;&lt;p&gt;I am going with a recent binary:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;cd /tmp&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;wget https://github.com/gohugoio/hugo/releases/download/v0.159.2/hugo_extended_0.159.2_linux-amd64.tar.gz&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;tar -xzf hugo_extended_0.159.2_linux-amd64.tar.gz&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;sudo mv hugo /usr/local/bin/&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;hugo version&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;create-site&#34;&gt;Create site&lt;/h2&gt;&#xA;&lt;p&gt;Here I am working in my git repo which has an existing README.md file, so use &amp;ndash;force to create despite the directory not being empty:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Forgejo Basic Setup</title>
      <link>https://ndonaghy.com/posts/forgejo-basic-setup/</link>
      <pubDate>Sat, 04 Apr 2026 22:00:38 +0100</pubDate>
      <guid>https://ndonaghy.com/posts/forgejo-basic-setup/</guid>
      <description>&lt;h1 id=&#34;setting-up-local-git-server-and-forgejo-front-end&#34;&gt;Setting up local Git server and Forgejo front-end&lt;/h1&gt;&#xA;&lt;p&gt;Guide should be transferable to many systems, but here using Ubuntu 24.04 on both hosts.&lt;/p&gt;&#xA;&lt;h2 id=&#34;create-system-account-git&#34;&gt;Create system account &amp;ldquo;git&amp;rdquo;&lt;/h2&gt;&#xA;&lt;p&gt;This will also implicitly create the group &amp;ldquo;git&amp;rdquo;:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;sudo useradd &lt;span style=&#34;color:#ae81ff&#34;&gt;\&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  --system &lt;span style=&#34;color:#ae81ff&#34;&gt;\&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  --shell /bin/bash &lt;span style=&#34;color:#ae81ff&#34;&gt;\&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  --home /srv/forgejo &lt;span style=&#34;color:#ae81ff&#34;&gt;\&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  --comment &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;Forgejo Git Service&amp;#39;&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;\&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  git&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;create-zfs-datasets-tune-them-set-mountpoints&#34;&gt;Create ZFS datasets, tune them, set mountpoints&lt;/h2&gt;&#xA;&lt;p&gt;Arguably overkill but I will create separate datasets for repos, data, log.&#xA;Operationally this is useful to rollback forgejo via ZFS snapshot, but leave repos untouched.&#xA;For light personal use a single dataset is also fine and perhaps preferable - make your call.&lt;/p&gt;</description>
    </item>
    <item>
      <title>About</title>
      <link>https://ndonaghy.com/about/</link>
      <pubDate>Fri, 03 Apr 2026 03:15:12 +0100</pubDate>
      <guid>https://ndonaghy.com/about/</guid>
      <description>&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# I like computing and networking.&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# This is my distributed cognition system.&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;#&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# email: niall@ndonaghy.com&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
    </item>
  </channel>
</rss>
