<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>rymdvarel.se</title>
    <description>The universe is a pretty big place. If it&apos;s just us, seems like an awful waste of space.</description>
    <link>https://rymdvarel.se/</link>
    <atom:link href="https://rymdvarel.se/feed.xml" rel="self" type="application/rss+xml"/>
    <pubDate>Tue, 02 Sep 2025 19:46:02 +0200</pubDate>
    <lastBuildDate>Tue, 02 Sep 2025 19:46:02 +0200</lastBuildDate>
    <generator>Jekyll v3.10.0</generator>
    
      <item>
        <title>Upgrading DJI RC-N1 firmware</title>
        <description>&lt;p&gt;After been banging my head against the wall trying to pair my DJI remote
control (RC-N1) with a &lt;a href=&quot;https://www.dji.com/mini-3-pro&quot;&gt;Mini Pro 3&lt;/a&gt; I thought
it would be nice to share how it could get done.&lt;/p&gt;

&lt;p&gt;The problem I got was that the &lt;a href=&quot;https://apps.apple.com/us/app/dji-fly/id1479649251&quot;&gt;DJI Fly
app&lt;/a&gt; on iOS complained
about inconsistent firmware and tried to upgrade it from &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;V02.00.1200&lt;/code&gt;. All
attempts failed with “&lt;em&gt;Server error. Wait a moment and try again
(0×115000100002)&lt;/em&gt;”. The app was up-to-date and it didn’t work to wait or reboot
all devices in diffrent order, the attempts failed. Even tried the terrible
&lt;a href=&quot;https://www.dji.com/downloads/softwares/assistant-dji-2&quot;&gt;DJI Assistant 2&lt;/a&gt; app
(which forced me to install Rosetta 2 😞) on my Mac which didn’t even list any
available updates, only crashed a few times.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/2023/dji-assistant-2.png&quot; alt=&quot;DJI Assist 2&quot; /&gt;&lt;/p&gt;

&lt;p&gt;In the final moment (before total meltdown) I found &lt;a href=&quot;https://forum.dji.com/thread-283060-1-1.html&quot;&gt;this
thread&lt;/a&gt; on DJIs forum with a
solution! The magic trick was to upgrade the remote with an Android phone. The
only problem with that was that I then was located long out in Stockholm
archipelago and my family and relatives rocks iOS. I walked over to the closest
neighbour on the island and had the luck that he had an Android phone and was
willing to help me with the upgrade. Did take a few attempts to install the DJI
Fly app becase it wasn’t available in Google Play, it was only available as
an APK &lt;a href=&quot;https://www.dji.com/se/downloads/djiapp/dji-fly&quot;&gt;downloaded from DJI directly&lt;/a&gt;
 (what’s up with that Android and DJI?! 🤢).&lt;/p&gt;

&lt;p&gt;After one or two failed attempts to upgrade on the Android phone it did get
through and the firmware was up-to-date, we at least thought. Once again
connected to my iPhone the DJI app found another version to upgrade to which it
this time was able to complete and a take off with the drone was done. Happy fly times!&lt;/p&gt;

&lt;p&gt;My best guess (without any evidence) is that the firmware version I needed to
go through was located on a bad backend/CDN which the iOS version shipped
though the AppStore couldn’t access for any reason (bad TLS that the Android
APK didn’t care about or something like that) and that the newer firmware
files were located on a “better” backend. 🤷‍♂️&lt;/p&gt;

</description>
        <pubDate>Thu, 27 Jul 2023 00:00:00 +0200</pubDate>
        <link>https://rymdvarel.se/2023/07/27/upgrading-dji-rc-n1-firmware.html</link>
        <guid isPermaLink="true">https://rymdvarel.se/2023/07/27/upgrading-dji-rc-n1-firmware.html</guid>
        
        
      </item>
    
      <item>
        <title>IPv6 on MikroTik hEX</title>
        <description>&lt;p&gt;So &lt;a href=&quot;/2015/11/01/edgeroute-ipv6-done-right.html&quot;&gt;the&lt;/a&gt; &lt;a href=&quot;/2020/12/07/ipv6-on-usg.html&quot;&gt;series&lt;/a&gt; continues… fourth router since 2015 (no worries each of every one of past hardware has reached new home(s)!).&lt;/p&gt;

&lt;p&gt;This time a &lt;a href=&quot;https://mikrotik.com/product/RB750Gr3&quot;&gt;MikroTik hEX (RB750Gr3)&lt;/a&gt; found it’s way to me and needed to be configured for &lt;a href=&quot;https://en.wikipedia.org/wiki/IPv6&quot;&gt;IPv6&lt;/a&gt; with &lt;a href=&quot;https://bahnhof.se&quot;&gt;Bahnhof&lt;/a&gt; in &lt;a href=&quot;https://www.sundbybergsstadsnat.se&quot;&gt;Sundbybergs stadsnät&lt;/a&gt;. Unlike previous hardware this was pretty straight forward.&lt;/p&gt;

&lt;p&gt;First of all make sure that the default firewall is enabled for IPv6&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;/ipv6 firewall filter
add action=accept chain=input comment=&quot;defconf: accept established,related,untracked&quot; connection-state=established,related,untracked
add action=drop chain=input comment=&quot;defconf: drop invalid&quot; connection-state=invalid
add action=accept chain=input comment=&quot;defconf: accept ICMPv6&quot; protocol=icmpv6
add action=accept chain=input comment=&quot;defconf: accept UDP traceroute&quot; port=33434-33534 protocol=udp
add action=accept chain=input comment=&quot;defconf: accept DHCPv6-Client prefix delegation.&quot; dst-port=546 protocol=udp src-address=fe80::/10
add action=accept chain=input comment=&quot;defconf: accept IKE&quot; dst-port=500,4500 protocol=udp
add action=accept chain=input comment=&quot;defconf: accept ipsec AH&quot; protocol=ipsec-ah
add action=accept chain=input comment=&quot;defconf: accept ipsec ESP&quot; protocol=ipsec-esp
add action=accept chain=input comment=&quot;defconf: accept all that matches ipsec policy&quot; ipsec-policy=in,ipsec
add action=drop chain=input comment=&quot;defconf: drop everything else not coming from LAN&quot; in-interface-list=!LAN
add action=accept chain=forward comment=&quot;defconf: accept established,related,untracked&quot; connection-state=established,related,untracked
add action=drop chain=forward comment=&quot;defconf: drop invalid&quot; connection-state=invalid
add action=drop chain=forward comment=&quot;defconf: drop packets with bad src ipv6&quot; src-address-list=bad_ipv6
add action=drop chain=forward comment=&quot;defconf: drop packets with bad dst ipv6&quot; dst-address-list=bad_ipv6
add action=drop chain=forward comment=&quot;defconf: rfc4890 drop hop-limit=1&quot; hop-limit=equal:1 protocol=icmpv6
add action=accept chain=forward comment=&quot;defconf: accept ICMPv6&quot; protocol=icmpv6
add action=accept chain=forward comment=&quot;defconf: accept HIP&quot; protocol=139
add action=accept chain=forward comment=&quot;defconf: accept IKE&quot; dst-port=500,4500 protocol=udp
add action=accept chain=forward comment=&quot;defconf: accept ipsec AH&quot; protocol=ipsec-ah
add action=accept chain=forward comment=&quot;defconf: accept ipsec ESP&quot; protocol=ipsec-esp
add action=accept chain=forward comment=&quot;defconf: accept all that matches ipsec policy&quot; ipsec-policy=in,ipsec
add action=drop chain=forward comment=&quot;defconf: drop everything else not coming from LAN&quot; in-interface-list=!LAN
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Then setup the dhcpv6 client&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;/ipv6 dhcp-client
add interface=ether1 pool-name=0 rapid-commit=no request=address,prefix use-peer-dns=no
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Assign the bridge (LAN) interface an address from the (future) incoming prefix&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;/ipv6 address
add address=::1 from-pool=0 interface=bridge
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Enable IPv6 and start listning to incoming Router Advertisements&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;/ipv6 settings
set accept-redirects=no accept-router-advertisements=yes max-neighbor-entries=8192
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;And finally start broadcast Router Advertisements to your network and assign addresses to your clients through &lt;a href=&quot;https://en.wikipedia.org/wiki/IPv6#Stateless_address_autoconfiguration_(SLAAC)&quot;&gt;SLAAC&lt;/a&gt;&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;/ipv6 nd
set [ find default=yes ] advertise-dns=no hop-limit=64 interface=bridge managed-address-configuration=yes other-configuration=yes
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Hope this will help all other (🤣) MikroTik users in Sundbybergs stadsnät. The only issue I experienced was that the route to my prefix was stuck against previous router (another address) so it took some time before upstream router sent the traffic the right way.&lt;/p&gt;

&lt;p&gt;Must say that I’m very impressed by MikroTik so far. My first experience with the brand and everything is solid and seems priceworthy.&lt;/p&gt;
</description>
        <pubDate>Sat, 18 Feb 2023 00:00:00 +0100</pubDate>
        <link>https://rymdvarel.se/2023/02/18/ipv6-on-mikrotik.html</link>
        <guid isPermaLink="true">https://rymdvarel.se/2023/02/18/ipv6-on-mikrotik.html</guid>
        
        
      </item>
    
      <item>
        <title>Build/run Docker for amd64 on Apple silicon</title>
        <description>&lt;p&gt;&lt;del&gt;…without Rosetta!&lt;/del&gt;
Update 2023-08-07: Recently found out that since version 0.5.0 of Colima support for Rosetta is added and improves performance! 🎉&lt;/p&gt;

&lt;h2 id=&quot;prerequisite&quot;&gt;Prerequisite&lt;/h2&gt;
&lt;ul&gt;
  &lt;li&gt;Make sure that &lt;a href=&quot;https://www.docker.com/products/docker-desktop/&quot;&gt;Docker Desktop&lt;/a&gt; is stop (or uninstalled)&lt;/li&gt;
  &lt;li&gt;Install &lt;a href=&quot;https://github.com/abiosoft/colima&quot;&gt;Colima&lt;/a&gt; and docker
    &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;brew install colima docker
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
  &lt;li&gt;Start Colima (add –edit if you would like to modify the virtual machine)
    &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;colima start
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;run&quot;&gt;Run&lt;/h2&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;docker run --platform=linux/amd64 -it --rm alpine /bin/uname -a
Linux 6b24a487230e 5.15.68-0-virt #1-Alpine SMP Fri, 16 Sep 2022 06:29:31 +0000 x86_64 Linux
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 id=&quot;build&quot;&gt;Build&lt;/h2&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;docker build --platform=linux/amd64 -t path/project:latest .
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 id=&quot;push&quot;&gt;Push&lt;/h2&gt;
&lt;p&gt;As usual 🙃&lt;/p&gt;

&lt;p&gt;Client certificates can be stored in &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;~/.docker/certs.d/&amp;lt;fqdn&amp;gt;/&lt;/code&gt;.&lt;/p&gt;
</description>
        <pubDate>Sun, 16 Oct 2022 00:00:00 +0200</pubDate>
        <link>https://rymdvarel.se/2022/10/16/build-run-docker-for-amd64-on-apple-silicon.html</link>
        <guid isPermaLink="true">https://rymdvarel.se/2022/10/16/build-run-docker-for-amd64-on-apple-silicon.html</guid>
        
        
      </item>
    
      <item>
        <title>Swedish coffee roasteries</title>
        <description>&lt;p&gt;During the pandemic &lt;a href=&quot;https://soy.se&quot;&gt;Simon&lt;/a&gt; and I have grown in to specialty coffee. In the begining we used a list of swedish roasters hosted at kaffebryggan.com (which are now only accessable through &lt;a href=&quot;https://web.archive.org/web/20210812131008/https://www.kaffebryggan.com/svenska-kafferosterier/&quot;&gt;web.archive.org&lt;/a&gt;) to find roasteries and coffee to try. The list was very helpful.&lt;/p&gt;

&lt;p&gt;In order to help others find and try really good (hopefully locally roasted) coffee I recreated the list on &lt;a href=&quot;https://svenska-kafferosterier.rymdvarel.se&quot;&gt;svenska-kafferosterier.rymdvarel.se&lt;/a&gt;. Enjoy the reading (and coffee) and help us keep the list up to date with an &lt;a href=&quot;https://github.com/svenska-kafferosterier/svenska-kafferosterier.github.io&quot;&gt;issue or PR&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;🇸🇪☕️&lt;/p&gt;
</description>
        <pubDate>Fri, 08 Jul 2022 00:00:00 +0200</pubDate>
        <link>https://rymdvarel.se/2022/07/08/svenska-kafferosterier.html</link>
        <guid isPermaLink="true">https://rymdvarel.se/2022/07/08/svenska-kafferosterier.html</guid>
        
        
      </item>
    
      <item>
        <title>LEGO Seinfeld 21328</title>
        <description>&lt;p&gt;Got this set as a birthday gift - finally finished 😃&lt;/p&gt;

&lt;iframe width=&quot;560&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/yOqJ8gPSj5A&quot; frameborder=&quot;0&quot; allow=&quot;autoplay; encrypted-media&quot; allowfullscreen=&quot;&quot;&gt;&lt;/iframe&gt;
</description>
        <pubDate>Sun, 06 Mar 2022 00:00:00 +0100</pubDate>
        <link>https://rymdvarel.se/2022/03/06/LEGO-Seinfeld-21328.html</link>
        <guid isPermaLink="true">https://rymdvarel.se/2022/03/06/LEGO-Seinfeld-21328.html</guid>
        
        
      </item>
    
      <item>
        <title>PostNord delivery dates in Home Assistant</title>
        <description>&lt;p&gt;&lt;strong&gt;Updated 2022-02-07:&lt;/strong&gt; The template sensor now zeropads the day for the first 9 days in a month.
&lt;strong&gt;Updated 2022-02-08:&lt;/strong&gt; Forgot to add the updated template 🤦‍♂️&lt;/p&gt;

&lt;p&gt;Since Maud Olofsson bought the danish postal service with swedish tax money and merged it with the swedish equivalent the service has ever declined. The “new” company PostNord recently started to deliver mail on an every other day basis which makes it almost impossible to predict when to find bills and other fun important shipments in the letter-box.&lt;/p&gt;

&lt;p&gt;Found that PostNord “offers” an API which can be used to get the next (and the one after that) delivey date so I integrated this with Home Assistant in order to trigger automations on dates where the mailman should be around. This is configured in 4 parts:&lt;/p&gt;

&lt;h3 id=&quot;the-rest-sensor&quot;&gt;The REST sensor&lt;/h3&gt;
&lt;p&gt;Fetches the data every hour from the API. Replace the postcode with your postcode of choice (if you aren’t interested in when &lt;a href=&quot;http://zverige.com/kingkong/&quot;&gt;the king&lt;/a&gt; expects a delivery).&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt; - platform: rest
   name: PostMord
   resource: https://portal.postnord.com/api/sendoutarrival/closest
   scan_interval: 3600
   params:
     postalCode: 10770
   json_attributes:
      - postalCode
      - city
      - delivery
      - upcoming
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 id=&quot;mangle-the-rest-result-to-iso-8610&quot;&gt;Mangle the REST result to ISO 8610&lt;/h3&gt;
&lt;p&gt;This creates two new sensors in the format of ISO 8601. &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Delivery&lt;/code&gt; is the closed date for delivery and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Upcoming&lt;/code&gt; is the one after the that (nomenclature from their API).&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;template:
  - sensor:
    - name: &quot;PostMord Delivery&quot;
      state: &quot;{{ state_attr(&apos;sensor.postmord&apos;, &apos;delivery&apos;) |replace(&apos;januari&apos;, &apos;01&apos;) |replace(&apos;februari&apos;, &apos;02&apos;) |replace(&apos;mars&apos;, &apos;03&apos;) | replace(&apos;april&apos;, &apos;04&apos;) |replace(&apos;maj&apos;, &apos;05&apos;) |replace(&apos;juni&apos;, &apos;06&apos;) |replace(&apos;juli&apos;, &apos;07&apos;) |replace(&apos;augusti&apos;, &apos;08&apos;) |replace(&apos;september&apos;, &apos;09&apos;) |replace(&apos;oktober&apos;, &apos;10&apos;) |replace(&apos;november&apos;, &apos;11&apos;) |replace(&apos;december&apos;, &apos;12&apos;) |regex_replace(find=&apos;^(\\d{1,2})\\s(\\d{2}),\\s(\\d{4})&apos;, replace=&apos;\\g&amp;lt;3&amp;gt;-\\g&amp;lt;2&amp;gt;-\\g&amp;lt;1&amp;gt;&apos;, ignorecase=False)}}&quot;
    - name: &quot;PostMord Upcoming&quot;
      state: &quot;{{ state_attr(&apos;sensor.postmord&apos;, &apos;upcoming&apos;) |replace(&apos;januari&apos;, &apos;01&apos;) |replace(&apos;februari&apos;, &apos;02&apos;) |replace(&apos;mars&apos;, &apos;03&apos;) | replace(&apos;april&apos;, &apos;04&apos;) |replace(&apos;maj&apos;, &apos;05&apos;) |replace(&apos;juni&apos;, &apos;06&apos;) |replace(&apos;juli&apos;, &apos;07&apos;) |replace(&apos;augusti&apos;, &apos;08&apos;) |replace(&apos;september&apos;, &apos;09&apos;) |replace(&apos;oktober&apos;, &apos;10&apos;) |replace(&apos;november&apos;, &apos;11&apos;) |replace(&apos;december&apos;, &apos;12&apos;) |regex_replace(find=&apos;^(\\d{1,2})\\s(\\d{2}),\\s(\\d{4})&apos;, replace=&apos;\\g&amp;lt;3&amp;gt;-\\g&amp;lt;2&amp;gt;-\\g&amp;lt;1&amp;gt;&apos;, ignorecase=False)}}&quot;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 id=&quot;sensor-based-on-date&quot;&gt;Sensor based on date&lt;/h3&gt;
&lt;p&gt;This creates a sensor with the current date (in ISO 8610) for comparison below.&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;sensor:
 - platform: time_date
   display_options:
     - &apos;date&apos;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 id=&quot;binary-sensor---mailday&quot;&gt;Binary sensor - mailday?&lt;/h3&gt;
&lt;p&gt;Compare the sensors from above in order to create a binary sensor which can be used as trigger or condition in automations.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;template:
  - binary_sensor:
    - name: PostMord Delivery today
      state: &quot;{{ states(&apos;sensor.postmord_delivery&apos;) == states(&apos;sensor.date&apos;) }}&quot;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Enjoy!&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=S8SF3XmLQps&quot;&gt;PEXIT!&lt;/a&gt;&lt;/p&gt;
</description>
        <pubDate>Mon, 31 Jan 2022 00:00:00 +0100</pubDate>
        <link>https://rymdvarel.se/2022/01/31/postnord-delivey-dates-in-home-assistant.html</link>
        <guid isPermaLink="true">https://rymdvarel.se/2022/01/31/postnord-delivey-dates-in-home-assistant.html</guid>
        
        
      </item>
    
      <item>
        <title>IPv6 on UniFi® Security Gateway</title>
        <description>&lt;p&gt;Much has happened since 2015 when I wrote &lt;a href=&quot;/2015/11/01/edgeroute-ipv6-done-right.html&quot;&gt;EdgeRouter IPv6 done right&lt;/a&gt;. One example is that I replaced the EdgeRouter with an &lt;a href=&quot;https://www.ui.com/unifi-routing/usg/&quot;&gt;UniFi® Security Gateway&lt;/a&gt;. If I remember correctly from when I set up the USG it worked out of the box (or possible GUI configuration) with IPv6.&lt;/p&gt;

&lt;p&gt;But… Back in May the ISPs Access Switch for my apartment building gave up and was replaced by a new one. Since then the IPv6 stopped working. I was told that the old switch carried a special configuration only made for me as a quick fix to deliver IPv6 before official support in the rest of the ISPs infrastructure. 5 years later proper support for IPv6 was now in place but did not play well with my setup. In the beginning of this jurney I didn’t even see any IPv6 reaching my WAN port. Then summer paused everything. Slowly this autum I and the ISP started to work on the issue again and by the end of November &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;tcpdump&lt;/code&gt; once again showed IPv6 packets reaching the WAN port. Unfortunately the router didn’t care. So I had to dig deeper in the USG.&lt;/p&gt;

&lt;p&gt;I think some of the headache I got from this issue was casued by a bug in the USG. I’m not sure but it felt like all commands didn’t have the same effect depending on which order they where commited.&lt;/p&gt;

&lt;p&gt;In the end after some tweaks and trial and error I ended up with a &lt;a href=&quot;https://help.ui.com/hc/en-us/articles/215458888-UniFi-USG-Advanced-Configuration-Using-config-gateway-json&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;config.gateway.json&lt;/code&gt;&lt;/a&gt; which works for IPv6 with &lt;a href=&quot;https://bahnhof.se&quot;&gt;Bahnhof&lt;/a&gt; and &lt;a href=&quot;https://www.sundbybergsstadsnat.se&quot;&gt;Sundbybergs stadsnät&lt;/a&gt; as carrier:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;{
  &quot;interfaces&quot;: {
    &quot;ethernet&quot;: {
      &quot;eth0&quot;: {
        &quot;dhcpv6-pd&quot;: {
          &quot;no-dns&quot;: &quot;&apos;&apos;&quot;,
          &quot;pd&quot;: {
            &quot;0&quot;: {
              &quot;interface&quot;: {
                &quot;eth1&quot;: {
                  &quot;host-address&quot;: &quot;::1&quot;,
                  &quot;no-dns&quot;: &quot;&apos;&apos;&quot;,
                  &quot;prefix-id&quot;: &quot;0&quot;
                }
              },
              &quot;prefix-length&quot;: &quot;/64&quot;
            }
          },
          &quot;rapid-commit&quot;: &quot;disable&quot;
        }
      }
    }
  }
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I think that the main issue was that the old infrastructure routed my prefix through the fe80 address and the new setup tried to route the prefix through the address provided in the DHCPv6 packet (which the USG ignored). Hope that this information can be useful for someone else.&lt;/p&gt;

</description>
        <pubDate>Mon, 07 Dec 2020 00:00:00 +0100</pubDate>
        <link>https://rymdvarel.se/2020/12/07/ipv6-on-usg.html</link>
        <guid isPermaLink="true">https://rymdvarel.se/2020/12/07/ipv6-on-usg.html</guid>
        
        
      </item>
    
      <item>
        <title>Shibboleth and Wireguard UI</title>
        <description>&lt;p&gt;Cross-post from &lt;a href=&quot;https://github.com/EmbarkStudios/wg-ui/issues/38#issuecomment-657375867&quot;&gt;wg-ui#38&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;This is a write-up how &lt;a href=&quot;https://www.su.se&quot;&gt;Stockholm University&lt;/a&gt; protected our
&lt;a href=&quot;https://github.com/EmbarkStudios/wg-ui&quot;&gt;Wireguard UI&lt;/a&gt; with a &lt;a href=&quot;https://wiki.shibboleth.net/confluence/display/SP3/Home&quot;&gt;Shibboleth
SP&lt;/a&gt; and &lt;a href=&quot;https://httpd.apache.org&quot;&gt;Apache
httpd&lt;/a&gt;. I will not cover how to configure &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;shibd&lt;/code&gt; or
the IdP part of this integration.&lt;/p&gt;

&lt;p&gt;The Univerity is heavly in to &lt;a href=&quot;https://en.wikipedia.org/wiki/Single_sign-on&quot;&gt;Single
sign-on&lt;/a&gt; and
&lt;a href=&quot;https://en.wikipedia.org/wiki/Security_Assertion_Markup_Language&quot;&gt;SAML&lt;/a&gt; so
&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;shibd&lt;/code&gt; is one of the more common tools we have and use. Together with &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;apache&lt;/code&gt;
it’s easy to create SSO for application that can’t speak native SAML. The
combination &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;shibd&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;apache&lt;/code&gt; handles all the authentication and in this
case even a rough authorization (more on that later) and proxies the request to
the service.&lt;/p&gt;

&lt;p&gt;Most SAML attributes in the .edu world are based on LDAP attributes.
&lt;a href=&quot;https://www.internet2.edu/media/medialibrary/2013/09/04/internet2-mace-dir-eduperson-201203.html#eduPersonPrincipalName&quot;&gt;eduPersonPrincipalName&lt;/a&gt;
(or eppn as Shibboleth calls it) is our primary key to identify users so that
is released from the IdP to the SP as a SAML attribute and then forward/proxied
as request header to the application. The only thing that needs to be
configured in the Wireguard UI end is that the application needs to be started
with the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;--auth-user-header&lt;/code&gt; flag set to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;eppn&lt;/code&gt;.&lt;/p&gt;

&lt;h3 id=&quot;the-apache-configuration&quot;&gt;The &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;apache&lt;/code&gt; configuration&lt;/h3&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&amp;lt;VirtualHost *:443&amp;gt;
    &amp;lt;LocationMatch &quot;/&quot;&amp;gt;
        AuthType Shibboleth
        Require shib-attr entitlement ~ ^urn:mace:swami.se:gmai:vpn:user$
        ShibRequireSessionWith idp.example.com
        ShibUseHeaders On
    &amp;lt;/LocationMatch&amp;gt;

    SSLCertificateFile    /path/to/vpn.example.com.pem
    SSLCertificateKeyFile /path/to/vpn.example.com.key
    SSLCertificateChainFile /path/to/DigiCertCA-2024-11-18.crt

    ProxyPass &quot;/&quot; &quot;http://127.0.0.1:8080/&quot;
    ProxyPassReverse &quot;/&quot; &quot;http://127.0.0.1:8080/&quot;
&amp;lt;/VirtualHost&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h4 id=&quot;configuration-in-depth&quot;&gt;Configuration in depth&lt;/h4&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;Require shib-attr entitlement ~ ^urn:mace:swami.se:gmai:su-vpn:user$
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;We have alot of users at the University and not all of them are eligible to use
Wireguard UI. By default apache and shibd lets everyone through and since
Wireguard UI has no knowlege about the user in beforehand we release another
(&lt;a href=&quot;https://www.internet2.edu/media/medialibrary/2013/09/04/internet2-mace-dir-eduperson-201203.html#eduPersonEntitlement&quot;&gt;eduPersonEntitlement&lt;/a&gt;)
from the IdP to the SP and require a specific value on the user in order to be
allowed to use the service.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;ShibUseHeaders On
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This enables &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;shibd&lt;/code&gt; to publish SAML attributes to the application (in our case
proxy) through request headers.&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;Thats is! I hope it could be useful someone else. The setup works flawless and
big thanks to &lt;a href=&quot;https://www.embark.dev&quot;&gt;EmbarkStudios&lt;/a&gt; for a great application.&lt;/p&gt;
</description>
        <pubDate>Mon, 13 Jul 2020 00:00:00 +0200</pubDate>
        <link>https://rymdvarel.se/2020/07/13/shibboleth-and-wireguard-ui.html</link>
        <guid isPermaLink="true">https://rymdvarel.se/2020/07/13/shibboleth-and-wireguard-ui.html</guid>
        
        
      </item>
    
      <item>
        <title>Migrate Home Assistant between Raspberry Pis</title>
        <description>&lt;p&gt;Received a new fancy &lt;a href=&quot;https://www.raspberrypi.org&quot;&gt;Raspberry Pi 4&lt;/a&gt; from a
friend. This made my Home Assistant instance very jealous and requested to be
upgraded/migrated to the new Pi (from an older Pi 3).&lt;/p&gt;

&lt;p&gt;Internet made me clear that I could not just move the SD card between the
devices since it is diffrent images between diffrent hardware.&lt;/p&gt;

&lt;p&gt;I didn’t find any good migration guide that I thought was easy enough so I
decided to write my own guide from this experience.&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Create and download a Full snapshot from the old device’s webgui (Supervisor &amp;gt; Snapshots)&lt;/li&gt;
  &lt;li&gt;Power of the old device&lt;/li&gt;
  &lt;li&gt;Download the Home Assistant image for &lt;a href=&quot;https://www.home-assistant.io/hassio/installation/&quot;&gt;your device&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;Write the image to your SD card (&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;dd if=/hassos.img of=/dev/SDCARD&lt;/code&gt;)&lt;/li&gt;
  &lt;li&gt;Mount the SD card (require a system which can read and write EXT4)&lt;/li&gt;
  &lt;li&gt;Copy the snapshot from your Downloads folder to the folder &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/supervisor/backup&lt;/code&gt; located in the partition called &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;hassos-data&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;Boot up the new device and follow the setup wizard (you can give it foobar since it will be overwritten in the next step)&lt;/li&gt;
  &lt;li&gt;Use your snapshot to Wipe and restore Home Assisant through the webgui (Supervisor &amp;gt; Snapshots)&lt;/li&gt;
  &lt;li&gt;Enjoy your old Home Assistant on your new hardware!&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;For a more seamless experience you might consider updating your DHCP records between step 2 and 7 so
that the new device receives the same IP adress as the old device.&lt;/p&gt;
</description>
        <pubDate>Thu, 09 Jul 2020 00:00:00 +0200</pubDate>
        <link>https://rymdvarel.se/2020/07/09/migrate-home-assistant.html</link>
        <guid isPermaLink="true">https://rymdvarel.se/2020/07/09/migrate-home-assistant.html</guid>
        
        
      </item>
    
      <item>
        <title>ssh-askpass</title>
        <description>&lt;p&gt;Me and &lt;a href=&quot;https://soy.se&quot;&gt;simmel’s&lt;/a&gt;
&lt;a href=&quot;https://github.com/theseal/ssh-askpass&quot;&gt;ssh-askpass&lt;/a&gt; for macOS has reached 100
⭐️ on GitHub! 🎉&lt;/p&gt;

&lt;p&gt;Feels like decages ago since we started the project. Step by step we increased
the usability and installation process with the help of our contributers.&lt;/p&gt;

&lt;p&gt;Thanks!&lt;/p&gt;

&lt;p&gt;Let’s hope that Apple keep the support in future macOS so we can reach 200 ⭐️.&lt;/p&gt;
</description>
        <pubDate>Mon, 27 Apr 2020 00:00:00 +0200</pubDate>
        <link>https://rymdvarel.se/2020/04/27/ssh-askpass.html</link>
        <guid isPermaLink="true">https://rymdvarel.se/2020/04/27/ssh-askpass.html</guid>
        
        
      </item>
    
  </channel>
</rss>
