<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="4.4.1">Jekyll</generator><link href="https://chasereynolds.me/feed.xml" rel="self" type="application/atom+xml" /><link href="https://chasereynolds.me/" rel="alternate" type="text/html" /><updated>2026-11-10T22:15:02+00:00</updated><id>https://chasereynolds.me/feed.xml</id><title type="html">articles</title><entry><title type="html">Minting and verifying json web tokens</title><link href="https://chasereynolds.me/2026/11/10/minting-and-verifying-json-web-tokens.html" rel="alternate" type="text/html" title="Minting and verifying json web tokens" /><published>2026-11-10T00:00:00+00:00</published><updated>2026-11-10T00:00:00+00:00</updated><id>https://chasereynolds.me/2026/11/10/minting-and-verifying-json-web-tokens</id><content type="html" xml:base="https://chasereynolds.me/2026/11/10/minting-and-verifying-json-web-tokens.html"><![CDATA[]]></content><author><name></name></author><summary type="html"><![CDATA[]]></summary></entry><entry><title type="html">Router on a stick</title><link href="https://chasereynolds.me/2026/11/08/router-on-a-stick.html" rel="alternate" type="text/html" title="Router on a stick" /><published>2026-11-08T00:00:00+00:00</published><updated>2026-11-08T00:00:00+00:00</updated><id>https://chasereynolds.me/2026/11/08/router-on-a-stick</id><content type="html" xml:base="https://chasereynolds.me/2026/11/08/router-on-a-stick.html"><![CDATA[<h2 id="overview">Overview</h2>

<p>I purchased a tp-link L2 smart switch a couple months back and decided it was time to learn inter-VLAN routing. This will be a two part series. This post will focus on enabling communication between devices on two different VLANs, and the subsequent post will be on setting up a basic linux firewall.</p>

<h2 id="hardware">Hardware</h2>

<p>Since this is POC for communication between VLANs, we need at least two separate VLANs, which I’ll name VLAN 10 and VLAN 20. Each VLAN needs at least one host. <a href="https://surplus.colostate.edu/">Colorado State University Surplus Property</a> has pretty good deals on hardware and I managed to get an old ThinkPad P50s for about $100, which I decided would go on VLAN 10. The VLAN 20 host was a Raspberry Pi 3B+ that I’ve owned for awhile.</p>

<p>For the router itself I used an Intel NUC, a small form factor mini pc that has very low power consumption and comes equipped with a Celeron J3060 processor. It only has one ethernet interface (<code class="language-plaintext highlighter-rouge">enp3s0</code>) which will be split into two sub-interfaces, one for each VLAN.</p>

<p>The last component in my setup was a TL-SG108E switch, an 8-port gigabit switch that supports 802.1Q tagging.</p>

<p>Here’s the network topology for this project</p>

<p><img src="/assets/img/router-on-a-stick.png" alt="" /></p>

<h2 id="switch-configuration">Switch configuration</h2>

<p>The first step was to choose access ports, which have membership in only one VLAN. Frames leaving these ports will not stamped with 802.1Q tags, which is why they are called “untagged”. Ports 6 and 7 were chosen for this purpose.</p>

<p>Next I set up the trunk port, which has membership in both VLANs. Frames leaving these ports get an 802.1Q tag, which tells a layer 3 device which VLAN a frame belongs to. Port 8 was chosen as the trunk port.</p>

<p><img src="/assets/img/8021q-routing.png" alt="" /></p>

<p>The last step was to configure the switch to add a PVID to incoming ethernet frames on the untagged ports. I chose PVID 10 for port 7 and PVID 20 for port 6. This allows the trunk port to determine which VLAN a frame belongs to.</p>

<p><img src="/assets/img/PVIDs.png" alt="" /></p>

<h2 id="router-configuration">Router configuration</h2>

<p>I needed these devices for another project I had lined up after this POC, so my configuration involves running <code class="language-plaintext highlighter-rouge">ip</code>, <code class="language-plaintext highlighter-rouge">modprobe</code>, and <code class="language-plaintext highlighter-rouge">sysctl</code> commands that don’t persist after a reboot.</p>

<p>The <code class="language-plaintext highlighter-rouge">802.1Q</code> kernel module allows a linux system to split a single physical interface into multiple VLAN-specific subinterfaces.</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ sudo modprobe 8021q
</code></pre></div></div>

<p>Next step was to actually create the subinterfaces. The third octect of the static ip addresses were chosen to match the VLAN ID.</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ ip link set enp3s0 up

# Create subinterface for VLAN 10
$ ip link add link enp3s0 name enp3s0.10 type vlan id 10
$ ip addr add 192.168.10.1/24 dev enp3s0.10
$ ip link set enp3s0.10 up

# Create subinterface for VLAN 20
$ ip link add link enp3s0 name enp3s0.20 type vlan id 20
$ ip addr add 192.168.20.1/24 dev enp3s0.20
$ ip link set enp3s0.20 up
</code></pre></div></div>

<p>Checking to make sure everything looks good</p>

<p><img src="/assets/img/intel-nuc-interfaces.jpg" alt="" /></p>

<p>Now that we have our subinterfaces set up, we need to tell the kernel that we want to be able to route IPv4 packets between interfaces.</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo sysctl -w net.ipv4.ip_forward=1
</code></pre></div></div>

<p>The final step before running the tests is to configure the host devices.</p>

<p>Since I’m not using a DHCP server, the Thinkpad and the pi need to assign themselves a static ip that’s in the subnet associated with its VLAN.</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code># thinkpad
ip addr add 192.168.10.50/24 dev enp0s31f6

# pi
ip addr add 192.168.20.90/24 dev eth0
</code></pre></div></div>

<p>Now we set the default routes on the VLAN 10 and VLAN 20 hosts to the static ips of the Intel NUCs <code class="language-plaintext highlighter-rouge">enp3s0.10</code> and <code class="language-plaintext highlighter-rouge">enp3s0.20</code> interfaces, respectively</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code># thinkpad
ip route add default via 192.168.10.1/24 dev enp0s31f6

# pi
ip route add default via 192.168.20.1/24 dev eth0
</code></pre></div></div>

<p>Now, whenever we tell the thinkpad on VLAN 10 to ping the pi on VLAN 20, the thinkpad knows to send the packets to 192.168.10.1 for routing.</p>

<p><img src="/assets/img/ping-from-thinkpad.jpg" alt="" /></p>

<p>Similarly, when the pi on VLAN 20 tries to ping the thinkpad on VLAN 10, it sends it to 192.168.20.1.</p>

<p><img src="/assets/img/ping-from-pi.jpg" alt="" /></p>]]></content><author><name></name></author><summary type="html"><![CDATA[Overview]]></summary></entry><entry><title type="html">Putting linux on my partner’s pc</title><link href="https://chasereynolds.me/2026/01/25/putting-linux-on-my-partners-pc.html" rel="alternate" type="text/html" title="Putting linux on my partner’s pc" /><published>2026-01-25T00:00:00+00:00</published><updated>2026-01-25T00:00:00+00:00</updated><id>https://chasereynolds.me/2026/01/25/putting-linux-on-my-partners-pc</id><content type="html" xml:base="https://chasereynolds.me/2026/01/25/putting-linux-on-my-partners-pc.html"><![CDATA[<p>After being left in the lurch by Microsoft in October of last year, my partner decided it was probably time to cut her teeth as a linux user. She agreed to let me install ubuntu and created a file of everything she wanted backed up.</p>

<p>The first issue I ran into was actually creating the backup. The Windows native compression tool doesn’t always handle hyphens well, and so I went ahead and downloaded 7-Zip which did the trick. After compression, the backup was &gt;8GB, which meant it couldn’t be directly copied into my single-partition FAT32 usb:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ lsblk -f
NAME        FSTYPE FSVER LABEL    UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
sda                                                                                   
└─sda1      vfat   FAT32 USB DISK 816F-7610                              28.9G     0% /run/media/chase/USB DISK
zram0       swap   1     zram0    6a1ef8e7-8340-4b36-8aea-b1a812264b8c                [SWAP]
nvme0n1                                                                               
├─nvme0n1p1 vfat   FAT32          D01D-A61E                             937.6M     8% /boot
├─nvme0n1p2 ext4   1.0            689b63ee-5328-4de3-a138-898fc3091c2a   15.9G    62% /
└─nvme0n1p3 ext4   1.0            61efe04b-c03b-4c99-862d-f243bd621fe7  778.2G     7% /home
</code></pre></div></div>

<p>FAT32 does not allow writes &gt;4GB at a time, so I reformatted the partition with the exFAT filesystem:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ umount /dev/sda1
$ mkfs.exfat /dev/sda1
Creating exFAT filesystem(/dev/sda1, cluster size=32768)

Writing volume boot record: done
Writing backup volume boot record: done
Fat table creation: done
Allocation bitmap creation: done
Upcase table creation: done
Writing root directory entry: done
Synchronizing...

exFAT format complete!
</code></pre></div></div>

<p>Next I went and downloaded ubuntu 24.04.3 LTS <code class="language-plaintext highlighter-rouge">.iso</code> file. I learned it’s actually pretty simple to create a live cd using just coreutils. First, I listed the contents of <code class="language-plaintext highlighter-rouge">/dev/disk/by-id</code> and grabbed the symlink to the usb device. Then, I wrote the contents of the ISO directly to that location:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ cat ~/Downloads/ubuntu-24.04.3-desktop-amd64.iso | sudo tee /dev/disk/by-id/usb-_USB_DISK_3.0_07215B8AB6B14809-0:0 &gt; /dev/null; sync
</code></pre></div></div>

<p>And with that I was ready to purge Windows. The PC has both a 1TB SSD and 128GB HDD. To keep things simple I just installed the whole system on the SSD with two partitions (<code class="language-plaintext highlighter-rouge">/</code> and <code class="language-plaintext highlighter-rouge">/boot/efi</code>), and then zeroed out the HDD</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ dd if=/dev/zero of=/dev/sdb bs=1M status=progress 
</code></pre></div></div>

<p>Testing the webcam:</p>

<p><img src="/assets/img/testing-video.jpg" alt="" /></p>

<p>I rickrolled myself to test the audio:</p>

<p><img src="/assets/img/rickroll.jpg" alt="" /></p>

<p>Everything seemed to be in working order so I turned it over to my partner to test it out. There was an issue when she launched a steam game called <a href="https://steamcommunity.com/app/1093290">The Wild at Heart</a>. It ran, but slow rendering and delayed responsiveness to I/O devices made it unusable. I assumed it was just missing 32-bit drivers. I realized that this kind of issue would be way more enjoyable to troubleshoot on arch so I convinced my partner to switch distros.</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ curl https://mirror.arizona.edu/archlinux/iso/2026.01.01/archlinux-2026.01.01-x86_64.iso &gt; /dev/null

$ sha256sum archlinux-2026.01.01-x86_64.iso
16502a7c18eed827ecead95c297d26f9f4bd57c4b3e4a8f4e2b88cf60e412d6f  archlinux-2026.01.01-x86_64.iso

$ cat sha256sums.txt | grep 16502a7c18eed827ecead95c297d26f9f4bd57c4b3e4a8f4e2b88cf60e412d6f
16502a7c18eed827ecead95c297d26f9f4bd57c4b3e4a8f4e2b88cf60e412d6f  archlinux-2026.01.01-x86_64.iso
16502a7c18eed827ecead95c297d26f9f4bd57c4b3e4a8f4e2b88cf60e412d6f  archlinux-x86_64.iso
</code></pre></div></div>

<p>After creating the installation media, I went ahead and ran the <code class="language-plaintext highlighter-rouge">archinstall</code> script. Again, I kept things simple - GNOME, two partitions, <code class="language-plaintext highlighter-rouge">linux</code> and <code class="language-plaintext highlighter-rouge">linux-lts</code>. Installation script ran to completion successfully so I had my partner type <code class="language-plaintext highlighter-rouge">reboot</code> (just to make it festive).</p>

<p>I enabled the <code class="language-plaintext highlighter-rouge">[multilib]</code> repository in <code class="language-plaintext highlighter-rouge">/etc/pacman.conf</code>, so that I could install Steam and any necessary drivers. The graphics card is an AMD Radeon R7 240/340 / 520 (Oland PRO) (1002:6613), which I found by running</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ lcpci -vnn | grep -A 12 VGA
</code></pre></div></div>

<p>When I launched “The Wild at Heart”, it started then immediately closed. I ended up clearing this final hurdle by adding <code class="language-plaintext highlighter-rouge">PROTON_USE_WINE3D=1 %command%</code> to the game’s launch options, which bypasses the 32-bit vulcan helper that was causing the issue.</p>

<p><img src="/assets/img/the-wild-at-heart.jpg" alt="" /></p>

<p>This game is super cozy by the way. You collect these things called “Spritelings” which are little Pikman-looking beings that follow you around and do your bidding.</p>]]></content><author><name></name></author><summary type="html"><![CDATA[After being left in the lurch by Microsoft in October of last year, my partner decided it was probably time to cut her teeth as a linux user. She agreed to let me install ubuntu and created a file of everything she wanted backed up.]]></summary></entry></feed>