<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Mikael Löfstrand on Medium]]></title>
        <description><![CDATA[Stories by Mikael Löfstrand on Medium]]></description>
        <link>https://medium.com/@fluff?source=rss-ac150dfdc5b3------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*dmbNkD5D-u45r44go_cf0g.png</url>
            <title>Stories by Mikael Löfstrand on Medium</title>
            <link>https://medium.com/@fluff?source=rss-ac150dfdc5b3------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 06:00:33 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@fluff/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Let’s Encrypt, Ubuntu 18.04, Certbot and the Unifi Controller]]></title>
            <link>https://medium.com/@fluff/lets-encrypt-ubuntu-18-04-certbot-and-the-unifi-controller-56e3e937dab7?source=rss-ac150dfdc5b3------2</link>
            <guid isPermaLink="false">https://medium.com/p/56e3e937dab7</guid>
            <category><![CDATA[lets-encrypt]]></category>
            <category><![CDATA[ubiquiti]]></category>
            <category><![CDATA[ubuntu]]></category>
            <category><![CDATA[unifi]]></category>
            <category><![CDATA[ssl]]></category>
            <dc:creator><![CDATA[Mikael Löfstrand]]></dc:creator>
            <pubDate>Fri, 12 Jul 2019 08:52:07 GMT</pubDate>
            <atom:updated>2019-07-12T08:52:07.600Z</atom:updated>
            <cc:license>https://creativecommons.org/licenses/by-sa/4.0/</cc:license>
            <content:encoded><![CDATA[<p>For the sake of this post, let’s assume you’re running a quite minimal install of Ubuntu 18.04 Bionic Beaver and have installed your Unifi Controller with the of <a href="https://glennr.nl/">Glenn Rietveld</a>’s nifty <a href="https://community.ui.com/questions/UniFi-Installation-Scripts-or-UniFi-Easy-Update-Script-or-Ubuntu-16-04-18-04-18-10-19-04-or-Debian-/ccbc7530-dd61-40a7-82ec-22b17f027776">script</a>.</p><h3>Install certbot</h3><p>Follow the <a href="https://certbot.eff.org/lets-encrypt/ubuntubionic-nginx.html">official instructions</a>. They’re good. In short, it’s just complete the following steps:</p><pre>$ sudo apt install software-properties-common<br>$ sudo add-apt-repository ppa:certbot/certbot<br>$ sudo apt update<br>$ sudo apt install python3-certbot-nginx</pre><h3>Create a renew-hook for the Unifi Controller</h3><p>Create the script /etc/letsencrypt/renewal-hooks/deploy/import-to-unifi</p><pre>#!/bin/bash</pre><pre># Make sure you only have one letsencrypt cert in this server<br># If you have more than one, uncomment the following line<br># and adjust to your unifi controller&#39;s domain name.<br>#CERTBOT_DOMAIN =unifi.some.where</pre><pre>LE_LIVE=/etc/letsencrypt/live<br>UNIFI_KEYSTORE=/var/lib/unifi/keystore</pre><pre>if [ ${LE_LIVE}/${CERTBOT_DOMAIN}/cert.pem -nt ${UNIFI_KEYSTORE} ]; then<br>	WORKDIR=$(mktemp -d)<br>	openssl pkcs12 -export -inkey ${LE_LIVE}/${CERTBOT_DOMAIN}/privkey.pem -in ${LE_LIVE}/${CERTBOT_DOMAIN}/fullchain.pem -out ${WORKDIR}/cert.p12 -name unifi -password pass:temppass<br>	cp ${UNIFI_KEYSTORE} ${UNIFI_KEYSTORE}-$(date +%s)<br>	keytool -importkeystore -deststorepass aircontrolenterprise -destkeypass aircontrolenterprise -destkeystore ${UNIFI_KEYSTORE} -srckeystore ${WORKDIR}/cert.p12 -srcstoretype PKCS12 -srcstorepass temppass -alias unifi -noprompt<br>	systemctl restart unifi.service<br>	rm ${WORKDIR}/cert.p12<br>	rmdir ${WORKDIR}<br>fi</pre><h3>Run Certbot for the first time</h3><pre>$ certbot --nginx<br># Answer the questions as needed</pre><h3>Verify everything worked</h3><pre>$ echo &quot;&quot; | openssl s_client -connect 127.0.0.1:8443<br>CONNECTED(00000005)<br>depth=2 O = Digital Signature Trust Co., CN = DST Root CA X3<br>verify return:1<br>depth=1 C = US, O = Let&#39;s Encrypt, CN = Let&#39;s Encrypt Authority X3<br>verify return:1<br>depth=0 CN = unifi.some.where<br>verify return:1<br>---<br>[...]</pre><h3>Closing notes</h3><p>This is mostly written as a reminder for myself. Hopefully it’ll help someone.</p><p>I haven’t tested how resilient this is when for example upgrading the unifi controller. Possibly one needs to touch /etc/letsencrypt/live/${CERTBOT_DOMAIN}/cert.pem and run the hook manually after the upgrade for the cert to keep the keystore fresh. I’ve seen it happen in other places using keystores.</p><blockquote>This was first published at <a href="https://fluffigt.com/2019/07/11/lets-encrypt-ubuntu-certbot-and-the-unifi-controller/">fluffigt.com</a>.</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=56e3e937dab7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[amavisd-new on Ubuntu 14.04 (trusty)]]></title>
            <link>https://medium.com/fluffigt/amavisd-new-on-ubuntu-14-04-trusty-dc06c5d1b1c4?source=rss-ac150dfdc5b3------2</link>
            <guid isPermaLink="false">https://medium.com/p/dc06c5d1b1c4</guid>
            <category><![CDATA[sysadmin]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[computers]]></category>
            <dc:creator><![CDATA[Mikael Löfstrand]]></dc:creator>
            <pubDate>Sat, 27 Dec 2014 20:47:03 GMT</pubDate>
            <atom:updated>2017-01-12T23:00:55.775Z</atom:updated>
            <content:encoded><![CDATA[<p>If you get anything like this in your syslog:</p><blockquote>Dec 27 20:35:36 web2 amavis[4216]: (!!)TROUBLE in pre_loop_hook: config: no rules were found! Do you need to run ‘sa-update’?<br>Dec 27 20:35:36 web2 amavis[4216]: (!)_DIE: Suicide () TROUBLE in pre_loop_hook: config: no rules were found! Do you need to run ‘sa-update’?</blockquote><p>Then add amavis to the clamav group and restart amavis to get it working again. Easy to see from the error log, right?</p><blockquote>sudo adduser amavis clamav<br>sudo service amavis restart</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dc06c5d1b1c4" width="1" height="1" alt=""><hr><p><a href="https://medium.com/fluffigt/amavisd-new-on-ubuntu-14-04-trusty-dc06c5d1b1c4">amavisd-new on Ubuntu 14.04 (trusty)</a> was originally published in <a href="https://medium.com/fluffigt">fluffigt</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Civilization IV: Colonization vs Mac OS X Yosemite]]></title>
            <link>https://medium.com/fluffigt/civilization-iv-colonization-vs-mac-os-x-yosemite-b2e43338fd80?source=rss-ac150dfdc5b3------2</link>
            <guid isPermaLink="false">https://medium.com/p/b2e43338fd80</guid>
            <category><![CDATA[mac-os-x]]></category>
            <category><![CDATA[videogames]]></category>
            <dc:creator><![CDATA[Mikael Löfstrand]]></dc:creator>
            <pubDate>Fri, 26 Dec 2014 10:58:28 GMT</pubDate>
            <atom:updated>2017-01-12T23:00:48.179Z</atom:updated>
            <content:encoded><![CDATA[<p>In short, Colonizations has dependencies on Python 2.3 (or maybe 2.5, or both, nobody seems quite sure at the moment and both seems to be needed for all Civ IV games/mods to play nicely). Yosemite doesn’t ship that old software anymore.</p><p>This fix uses third-party Python frameworks/libraries/etc — use at you own risk!</p><p><a href="http://pcgamingwiki.com/wiki/Civilization_IV#Failed_Initializing_Python">Civilization IV | PCGamingWiki</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b2e43338fd80" width="1" height="1" alt=""><hr><p><a href="https://medium.com/fluffigt/civilization-iv-colonization-vs-mac-os-x-yosemite-b2e43338fd80">Civilization IV: Colonization vs Mac OS X Yosemite</a> was originally published in <a href="https://medium.com/fluffigt">fluffigt</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Lubuntu 14.04 and nice to haves]]></title>
            <link>https://medium.com/fluffigt/lubuntu-14-04-and-nice-to-haves-1e3da9db37af?source=rss-ac150dfdc5b3------2</link>
            <guid isPermaLink="false">https://medium.com/p/1e3da9db37af</guid>
            <category><![CDATA[linux]]></category>
            <dc:creator><![CDATA[Mikael Löfstrand]]></dc:creator>
            <pubDate>Fri, 04 Jul 2014 09:52:21 GMT</pubDate>
            <atom:updated>2017-01-12T23:00:35.962Z</atom:updated>
            <content:encoded><![CDATA[<p>While installing <a href="http://lubuntu.net/">Lubuntu</a> 14.04 on my laptop I found out the hard way of a bug in the installer regarding encrypted hard drive. To get around it you need to boot from the CD/USB and choose to try Lubuntu, open a terminal and run</p><blockquote># sudo swapoff -a</blockquote><p>and then start the install. You <em>need</em> to do this before starting the install, since the installer remembers certain errors between runs except with a reboot in between.</p><p>PPA:s and other repos I like to add on newly installed systems:</p><ul><li><a href="http://www.webupd8.org/2014/05/atom-text-editor-ubuntu-ppa-update.html">Webupd8’s Atom</a></li><li><a href="http://www.webupd8.org/2012/01/install-oracle-java-jdk-7-in-ubuntu-via.html">Webupd8’s Oracle Java 7</a></li><li><a href="https://www.google.com/chrome/browser/">Google Chrome</a></li><li><a href="https://www.spotify.com/se/download/previews/">Spotify</a></li></ul><p>Additionally I like to install git, guake, vim-nox and a few other tidbits.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1e3da9db37af" width="1" height="1" alt=""><hr><p><a href="https://medium.com/fluffigt/lubuntu-14-04-and-nice-to-haves-1e3da9db37af">Lubuntu 14.04 and nice to haves</a> was originally published in <a href="https://medium.com/fluffigt">fluffigt</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[More on Unifi and their AP:s]]></title>
            <link>https://medium.com/fluffigt/more-on-unifi-and-their-ap-s-42c115763417?source=rss-ac150dfdc5b3------2</link>
            <guid isPermaLink="false">https://medium.com/p/42c115763417</guid>
            <category><![CDATA[computers]]></category>
            <category><![CDATA[sysadmin]]></category>
            <dc:creator><![CDATA[Mikael Löfstrand]]></dc:creator>
            <pubDate>Sun, 30 Mar 2014 10:05:23 GMT</pubDate>
            <atom:updated>2017-01-12T23:00:48.842Z</atom:updated>
            <content:encoded><![CDATA[<p>A follow up on my <a href="http://fluffigt.com/2013/12/06/unifi-ap-pro-and-controller/">last post</a> about my Unifi setup. I bought a new home server recently and wanted to move the controller. I took the quickest route and backed up my settings on the old controller, installed the new one, imported the settings in the new one, migrated the AP:s to the new controller and voilá, everything worked. Below are a few of my notes of how to install the controller and migrate the AP:s.</p><h4>Installing on Ubuntu 12.04 and later:</h4><p>Add to /etc/apt/sources.list.d/unifi:</p><pre>## Ubuntu<br>deb <a href="http://www.ubnt.com/downloads/unifi/distros/deb/ubuntu">http://www.ubnt.com/downloads/unifi/distros/deb/ubuntu</a> ubuntu ubiquiti</pre><p>Add the repo key:</p><pre>sudo apt-key adv --keyserver keyserver.ubuntu.com --recv C0A52C50</pre><p>Install:</p><pre>sudo apt-get update<br>sudo apt-get install unifi</pre><p>Connect to https://&lt;ip-of-unifi-controller&gt;:8443 and go through the getting started guide.</p><h4>Migrating AP:s</h4><p>If you, like me, had AP:s from another controller, you need to ssh into them with the same user/password you had for their last controller and run the command:</p><pre>set-inform http://&lt;ip-of-unifi-controller&gt;:8080/inform</pre><h4>Unifi stable, rapid and beta</h4><p>Oh, and as a side note. It’s also possible to install unifi-rapid for more/newer features on both controller and AP:s. And unifi-beta for the fearless…</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=42c115763417" width="1" height="1" alt=""><hr><p><a href="https://medium.com/fluffigt/more-on-unifi-and-their-ap-s-42c115763417">More on Unifi and their AP:s</a> was originally published in <a href="https://medium.com/fluffigt">fluffigt</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[UniFi AP Pro and controller]]></title>
            <link>https://medium.com/fluffigt/unifi-ap-pro-and-controller-10d9e7b5819b?source=rss-ac150dfdc5b3------2</link>
            <guid isPermaLink="false">https://medium.com/p/10d9e7b5819b</guid>
            <category><![CDATA[computers]]></category>
            <category><![CDATA[linux]]></category>
            <dc:creator><![CDATA[Mikael Löfstrand]]></dc:creator>
            <pubDate>Fri, 06 Dec 2013 12:49:09 GMT</pubDate>
            <atom:updated>2017-01-12T23:00:50.000Z</atom:updated>
            <content:encoded><![CDATA[<p>I recently got myself two <a href="http://www.ubnt.com/unifi#appro">UniFi AP Pro</a>’s. While getting them installed, which requires a Java based controller software installed on a computer, I found a couple of problems. The foremost was that the controller didn’t start. After having a look at the unifi logs (/var/log/unifi/server.log on Ubuntu 12.04) I found out that it tried to use an already allocated port (8081). I hade to change that port number both in <em>/usr/lib/unifi/data/system.propertie</em>s and <em>/usr/lib/unifi/etc/system.properties</em> for the changes to follow through. Sadly the server didn’t understand changing the binding IP, even though changing in those two files, but rather listens on 0.0.0.0. Firewall away and debug more another day…</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=10d9e7b5819b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/fluffigt/unifi-ap-pro-and-controller-10d9e7b5819b">UniFi AP Pro and controller</a> was originally published in <a href="https://medium.com/fluffigt">fluffigt</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Unbound i Halon Security Router]]></title>
            <link>https://medium.com/fluffigt/unbound-i-halon-security-router-c39b4aeef27d?source=rss-ac150dfdc5b3------2</link>
            <guid isPermaLink="false">https://medium.com/p/c39b4aeef27d</guid>
            <category><![CDATA[computers]]></category>
            <category><![CDATA[lohan]]></category>
            <category><![CDATA[sysadmin]]></category>
            <dc:creator><![CDATA[Mikael Löfstrand]]></dc:creator>
            <pubDate>Fri, 28 Jun 2013 20:47:00 GMT</pubDate>
            <atom:updated>2017-01-12T23:00:31.707Z</atom:updated>
            <content:encoded><![CDATA[<p>Eftersom jag är som jag är så ville jag köra <a href="http://unbound.net/">Unbound</a> på min installation av <a href="http://www.halon.se/security-router/">Halon Security Router</a>. Det visade sig lite småmeckigt eftersom systemet startas upp rent från alla tidigare förändringar (gillar säkerheten), men det finns stöd för att få in vissa typer av förändringar ändå. Det har jag självklart exploitat för att få till ett installationsscript som installerar Unbound vid varje uppstart.</p><p>Resultatet finns på <a href="https://github.com/mld/halon-unbound">github</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c39b4aeef27d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/fluffigt/unbound-i-halon-security-router-c39b4aeef27d">Unbound i Halon Security Router</a> was originally published in <a href="https://medium.com/fluffigt">fluffigt</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Installera Oracle Java 7 i Ubuntu]]></title>
            <link>https://medium.com/fluffigt/installera-oracle-java-7-i-ubuntu-ec1a849e677?source=rss-ac150dfdc5b3------2</link>
            <guid isPermaLink="false">https://medium.com/p/ec1a849e677</guid>
            <category><![CDATA[computers]]></category>
            <category><![CDATA[sysadmin]]></category>
            <category><![CDATA[linux]]></category>
            <dc:creator><![CDATA[Mikael Löfstrand]]></dc:creator>
            <pubDate>Thu, 14 Mar 2013 15:01:54 GMT</pubDate>
            <atom:updated>2017-01-12T23:00:40.838Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="http://www.webupd8.org/2012/01/install-oracle-java-jdk-7-in-ubuntu-via.html">Install Oracle Java 7 in Ubuntu Or Linux Mint Via PPA Repository</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ec1a849e677" width="1" height="1" alt=""><hr><p><a href="https://medium.com/fluffigt/installera-oracle-java-7-i-ubuntu-ec1a849e677">Installera Oracle Java 7 i Ubuntu</a> was originally published in <a href="https://medium.com/fluffigt">fluffigt</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Flushing DNS Cache on Mac OS X Lion]]></title>
            <link>https://medium.com/fluffigt/flushing-dns-cache-on-mac-os-x-lion-eb39864e7179?source=rss-ac150dfdc5b3------2</link>
            <guid isPermaLink="false">https://medium.com/p/eb39864e7179</guid>
            <category><![CDATA[computers]]></category>
            <category><![CDATA[mac-os-x]]></category>
            <dc:creator><![CDATA[Mikael Löfstrand]]></dc:creator>
            <pubDate>Mon, 11 Mar 2013 19:40:53 GMT</pubDate>
            <atom:updated>2017-01-12T23:00:44.859Z</atom:updated>
            <content:encoded><![CDATA[<pre>$ sudo killall -HUP mDNSResponder</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=eb39864e7179" width="1" height="1" alt=""><hr><p><a href="https://medium.com/fluffigt/flushing-dns-cache-on-mac-os-x-lion-eb39864e7179">Flushing DNS Cache on Mac OS X Lion</a> was originally published in <a href="https://medium.com/fluffigt">fluffigt</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mac OS X Lion SSD tweaks]]></title>
            <link>https://medium.com/fluffigt/mac-os-x-lion-ssd-tweaks-10222431455b?source=rss-ac150dfdc5b3------2</link>
            <guid isPermaLink="false">https://medium.com/p/10222431455b</guid>
            <category><![CDATA[ssd]]></category>
            <category><![CDATA[tips]]></category>
            <category><![CDATA[trim]]></category>
            <category><![CDATA[mac-os-x]]></category>
            <category><![CDATA[computers]]></category>
            <dc:creator><![CDATA[Mikael Löfstrand]]></dc:creator>
            <pubDate>Sun, 14 Oct 2012 18:58:15 GMT</pubDate>
            <atom:updated>2017-01-12T23:01:20.625Z</atom:updated>
            <content:encoded><![CDATA[<p>A couple of tweaks for the Mac OS X Lion users out there. Since Apple doesn’t support TRIM other than on their own drives (cheap b…) and a couple of settings that make more sense when running a hdd with spinning discs, here’s the tips I followed:</p><ul><li><a href="http://blog.alutam.com/2012/04/01/optimizing-macos-x-lion-for-ssd/">http://blog.alutam.com/2012/04/01/optimizing-macos-x-lion-for-ssd/</a></li><li><a href="http://blog.alutam.com/2012/04/01/optimizing-macos-x-lion-for-ssd/">http://www.dashvue.com/2011/12/optimizing-mac-os-x-for-ssd/</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=10222431455b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/fluffigt/mac-os-x-lion-ssd-tweaks-10222431455b">Mac OS X Lion SSD tweaks</a> was originally published in <a href="https://medium.com/fluffigt">fluffigt</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>