<?xml version="1.0" encoding="utf-8" ?>

<rss version="2.0" 
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:admin="http://webns.net/mvcb/"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
   xmlns:wfw="http://wellformedweb.org/CommentAPI/"
   xmlns:content="http://purl.org/rss/1.0/modules/content/"
   >
<channel>
    
    <title>Andrew's blog (Entries tagged as linux)</title>
    <link>https://blog.etc.gen.nz/</link>
    <description>This is a blog, it is it is.</description>
    <dc:language>en</dc:language>
    <admin:errorReportsTo rdf:resource="mailto:blog@etc.gen.nz" />
    <generator>Serendipity 2.4.0 - http://www.s9y.org/</generator>
    <pubDate>Sun, 03 Aug 2025 09:20:18 GMT</pubDate>

    <image>
    <url>https://blog.etc.gen.nz/templates/2k11/img/s9y_banner_small.png</url>
    <title>RSS: Andrew's blog - This is a blog, it is it is.</title>
    <link>https://blog.etc.gen.nz/</link>
    <width>100</width>
    <height>21</height>
</image>

<item>
    <title>Let's Encrypt with Octavia in OpenStack</title>
    <link>https://blog.etc.gen.nz/archives/135-Lets-Encrypt-with-Octavia-in-OpenStack.html</link>
    
    <comments>https://blog.etc.gen.nz/archives/135-Lets-Encrypt-with-Octavia-in-OpenStack.html#comments</comments>
    <wfw:comment>https://blog.etc.gen.nz/wfwcomment.php?cid=135</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>https://blog.etc.gen.nz/rss.php?version=2.0&amp;type=comments&amp;cid=135</wfw:commentRss>
    

    <author>andrew@etc.gen.nz (Andrew Ruthven)</author>
    <content:encoded>
    &lt;p&gt;I like using &lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/catalystcloud.nz&#039;]);&quot;  href=&quot;https://catalystcloud.nz&quot;&gt;Catalyst Cloud&lt;/a&gt; to host some of my personal sites. In the past I used to use &lt;a href=&quot;https://blog.etc.gen.nz/index.php?/plugin/tag/cacert&quot;&gt;CAcert&lt;/a&gt; for my TLS certificates, but more recently I&#039;ve been using &lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/letsencrypt.org/&#039;]);&quot;  href=&quot;https://letsencrypt.org/&quot;&gt;Let&#039;s Encrypt&lt;/a&gt; for my TLS certificates as they&#039;re trusted in all browsers. Currently the LoadBalancer as a Service (LBaaS) in Catalyst Cloud doesn&#039;t have built in support for Let&#039;s Encrypt. I could use an apache2/nginx proxy and handle the TLS termination there and have that manage the Let&#039;s Encrypt lifecycle, but really, I&#039;d rather use LBaaS.&lt;/p&gt;

&lt;p&gt;So I thought I&#039;d set about working out how to get Dehydrated (the Let&#039;s Encrypt client I&#039;ve been using) to drive LBaaS (known as Octavia). I figured this would be of interest to other people using Octavia with OpenStack in general, not just Catalyst Cloud.&lt;/p&gt;

&lt;p&gt;There&#039;s a few things you need to do. These instructions are specific to Debian:&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Install and configure Dehydrated to create the certificates for the domain(s) you want.
    &lt;ul&gt;&lt;li&gt;&lt;tt&gt;apt install barbican&lt;/tt&gt;&lt;/li&gt;&lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;&lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/docs.catalystcloud.nz/load-balancer/layer-4.html&#039;]);&quot;  href=&quot;https://docs.catalystcloud.nz/load-balancer/layer-4.html&quot;&gt;Create the LoadBalancer&lt;/a&gt; (use the API, ClickOps, whatever), just forward port 80 for now (see sample Apache configs below).&lt;/li&gt;
  &lt;li&gt;Save the sample hook.sh below to &lt;tt&gt;/etc/dehydrated/hook.sh&lt;/tt&gt;, you&#039;ll probably need to customise it, mine is a bit more complicated!&lt;/li&gt;
  &lt;li&gt;Insert the UUID of your LoadBalancer in hook.sh where LB_LISTENER is set.&lt;/li&gt;
  &lt;li&gt;Create &lt;tt&gt;/etc/dehydrated/catalystcloud/password&lt;/tt&gt; as described in hook.sh&lt;/li&gt;
  &lt;li&gt;Save OpenRC file from the Catalyst Cloud dashboard as &lt;tt&gt;/etc/dehydrated/catalystcloud/openrc.sh&lt;/tt&gt;&lt;/li&gt;
  &lt;li&gt;Install jq, openssl and the openstack tools, on Debian this is:
    &lt;ul&gt;&lt;li&gt;&lt;tt&gt;apt install jq openssl python3-openstackclient python3-barbicanclient python3-octaviaclient&lt;/tt&gt;&lt;/li&gt;&lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Add &lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/docs.catalystcloud.nz/load-balancer/tls-termination.html&#039;]);&quot;  href=&quot;https://docs.catalystcloud.nz/load-balancer/tls-termination.html&quot;&gt;TLS termination to your LoadBalancer&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;You should be able to rename the latest certs &lt;tt&gt;/var/lib/dehydrated/certs/$DOMAIN&lt;/tt&gt; and then run &lt;tt&gt;dehydrated -c&lt;/tt&gt; to have it reissue and then deploy a cert.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;As we&#039;re using &lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/letsencrypt.org/docs/challenge-types/#http-01-challenge&#039;]);&quot;  href=&quot;https://letsencrypt.org/docs/challenge-types/#http-01-challenge&quot;&gt;HTTP-01 Challenge Type&lt;/a&gt; here, you need to have the LoadBalancer forwarding port 80 to your website to allow for the challenge response. It is good practice to have a redirect to HTTPS, here&#039;s an example virtual host for Apache:&lt;/p&gt;

&lt;pre&gt;
&amp;lt;VirtualHost *:80&amp;gt;
    ServerName www.example.com
    ServerAlias example.com

    RewriteEngine On
    RewriteRule ^/.well-known/ - [L]
    RewriteRule ^/(.*)$ https://www.example.com/$1 [R=301,L]

    &amp;lt;Location /&amp;gt;
        Require all granted
    &amp;lt;/Location&amp;gt;
&amp;lt;/VirtualHost&amp;gt;
&lt;/pre&gt;

You all also need this in &lt;tt&gt;/etc/apache2/conf-enabled/letsencrypt.conf&lt;/tt&gt;:

&lt;pre&gt;
Alias /.well-known/acme-challenge /var/lib/dehydrated/acme-challenges

&amp;lt;Directory /var/lib/dehydrated/acme-challenges&amp;gt;
        Options None
        AllowOverride None

        # Apache 2.x
        &amp;lt;IfModule !mod_authz_core.c&amp;gt;
                Order allow,deny
                Allow from all
        &amp;lt;/IfModule&amp;gt;

        # Apache 2.4
        &amp;lt;IfModule mod_authz_core.c&amp;gt;
                Require all granted
        &amp;lt;/IfModule&amp;gt;
&amp;lt;/Directory&amp;gt;
&lt;/pre&gt;

&lt;p&gt;And that should be all that you need to do. Now, when Dehydrated updates your certificate, it should update your LoadBalancer as well!&lt;/p&gt;

Sample &lt;tt&gt;hook.sh&lt;/tt&gt;:

&lt;pre&gt;
deploy_cert() {
    local DOMAIN=&quot;${1}&quot; KEYFILE=&quot;${2}&quot; CERTFILE=&quot;${3}&quot; FULLCHAINFILE=&quot;${4}&quot; \
          CHAINFILE=&quot;${5}&quot; TIMESTAMP=&quot;${6}&quot;
    shift 6

    # File contents should be:
    #   export OS_PASSWORD=&#039;your password in here&#039;
    . /etc/dehydrated/catalystcloud/password

    # OpenRC file from the Catalyst Cloud dashboard
    . /etc/dehydrated/catalystcloud/openrc.sh --no-token

    # UUID of the LoadBalancer to be managed
    LB_LISTENER=&#039;xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&#039;

    # Barbican uses P12 files, we need to make one.
    P12=$(readlink -f $KEYFILE \
        | sed -E &#039;s/privkey-([0-9]+)\.pem/barbican-\1.p12/&#039;)
    openssl pkcs12 -export -inkey $KEYFILE -in $CERTFILE -certfile \
        $FULLCHAINFILE -passout pass: -out $P12

    # Keep track of existing certs for this domain (hopefully no more than 100)
    EXISTING_URIS=$(openstack secret list --limit 100 \
        -c Name -c &#039;Secret href&#039; -f json \
        | jq -r &quot;.[]|select(.Name | startswith(\&quot;$DOMAIN\&quot;))|.\&quot;Secret href\&quot;&quot;)

    # Upload the new cert
    NOW=$(date +&quot;%s&quot;)
    openstack secret store --name $DOMAIN-$TIMESTAMP-$NOW -e base64 \
        -t &quot;application/octet-stream&quot; --payload=&quot;$(base64 &lt; $P12)&quot;

    NEW_URI=$(openstack secret list --name $DOMAIN-$TIMESTAMP-$NOW \
        -c &#039;Secret href&#039; -f value) \
        || unset NEW_URI

    # Change LoadBalancer to use new cert - if the old one was the default,
    # change the default. If the old one was in the SNI list, update the
    # SNI list.
    if [ -n &quot;$EXISTING_URIS&quot; ]; then
        DEFAULT_CONTAINER=$(openstack loadbalancer listener show $LB_LISTENER \
            -c default_tls_container_ref -f value)

        for URI in $EXISTING_URIS; do
            if [ &quot;x$URI&quot; = &quot;x$DEFAULT_CONTAINER&quot; ]; then
                openstack loadbalancer listener set $LB_LISTENER \
                    --default-tls-container-ref $NEW_URI
            fi
        done

        SNI_CONTAINERS=$(openstack loadbalancer listener show $LB_LISTENER \
            -c sni_container_refs -f value | sed &quot;s/&#039;//g&quot; | sed &#039;s/^\[//&#039; \
            | sed &#039;s/\]$//&#039; | sed &quot;s/,//g&quot;)

        for URI in $EXISTING_URIS; do
            if echo $SNI_CONTAINERS | grep -q $URI; then
                SNI_CONTAINERS=$(echo $SNI_CONTAINERS | sed &quot;s,$URI,$NEW_URI,&quot;)
                openstack loadbalancer listener set $LB_LISTENER \
                    --sni-container-refs $SNI_CONTAINERS
            fi
        done

        # Remove old certs
        for URI in $EXISTING_URIS; do
            openstack secret delete $URI
        done
    fi
}

HANDLER=&quot;$1&quot;; shift
#if [[ &quot;${HANDLER}&quot; =~ ^(deploy_challenge|clean_challenge|sync_cert|deploy_cert|deploy_ocsp|unchanged_cert|invalid_challenge|request_failure|generate_csr|startup_hook|exit_hook)$ ]]; then
if [[ &quot;${HANDLER}&quot; =~ ^(deploy_cert)$ ]]; then
    &quot;$HANDLER&quot; &quot;$@&quot;
fi
&lt;/pre&gt; 
    </content:encoded>

    <pubDate>Sun, 23 Oct 2022 05:09:00 +0000</pubDate>
    <guid isPermaLink="false">https://blog.etc.gen.nz/archives/135-guid.html</guid>
    <category>catalystcloud</category>
<category>geek</category>
<category>linux</category>
<category>openstack</category>

</item>
<item>
    <title>Laptops and networks</title>
    <link>https://blog.etc.gen.nz/archives/124-Laptops-and-networks.html</link>
            <category>catalyst</category>
            <category>family</category>
    
    <comments>https://blog.etc.gen.nz/archives/124-Laptops-and-networks.html#comments</comments>
    <wfw:comment>https://blog.etc.gen.nz/wfwcomment.php?cid=124</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>https://blog.etc.gen.nz/rss.php?version=2.0&amp;type=comments&amp;cid=124</wfw:commentRss>
    

    <author>andrew@etc.gen.nz (Andrew Ruthven)</author>
    <content:encoded>
    Back in the old days, we had workstations. And only workstations. They lived on a network, and having them work in that network was simple. Printers just worked (thank you printcap), network shares just worked (thank you NFS) and life was good.&lt;br /&gt;
&lt;br /&gt;
Then along came laptops. We wanted to be more mobile, using our laptops on different networks or even without a network! No one wanted hardcoded printers anymore, or network shares defined in /etc/fstab. Using an Automounter was an option, but if you were on a different network then having the Automounter around would stall tools like nautilus and file indexers etc.&lt;br /&gt;
&lt;br /&gt;
So we need something which can start up relevant services when you connect to a network, and then stop them when you leave that network.&lt;br /&gt;
&lt;br /&gt;
To support this, a few years ago I wrote a NetworkManager dispatcher.d script to do just that. When you connect to a specific network (using the NetworkManager UUID or a specific gateway MAC) or a VPN connection then autofs is started, users GTK bookmarks have any bookmarks for their Network shares added and CUPS is restarted.&lt;br /&gt;
&lt;br /&gt;
When the connection goes away, then autofs is stopped, any GTK bookmarks for the Network shares are removed and any mounts for the Network shares are lazily unmounted.&lt;br /&gt;
&lt;br /&gt;
I&#039;m not sure if this will of use to anyone else, but if it is I&#039;d love to hear from you. You can &lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/git.etc.gen.nz/cgi-bin/gitweb.cgi?p=laptop-tools.git&#039;]);&quot;  href=&quot;http://git.etc.gen.nz/cgi-bin/gitweb.cgi?p=laptop-tools.git&quot; title=&quot;gitweb&quot;&gt;browse the code&lt;/a&gt; or &lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/git.etc.gen.nz/laptop-tools.git&#039;]);&quot;  href=&quot;http://git.etc.gen.nz/laptop-tools.git&quot; title=&quot;clone&quot;&gt;clone the repo&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
Included are sample autofs config files, the dispatcher, and the tools for managing the GTK bookmark files. 
    </content:encoded>

    <pubDate>Tue, 28 Jan 2014 09:32:36 +0000</pubDate>
    <guid isPermaLink="false">https://blog.etc.gen.nz/archives/124-guid.html</guid>
    <category>catalyst</category>
<category>family</category>
<category>geek</category>
<category>laptop</category>
<category>linux</category>

</item>
<item>
    <title>LCA2010 - Call for Papers - closing soon!</title>
    <link>https://blog.etc.gen.nz/archives/102-LCA2010-Call-for-Papers-closing-soon!.html</link>
            <category>catalyst</category>
            <category>family</category>
    
    <comments>https://blog.etc.gen.nz/archives/102-LCA2010-Call-for-Papers-closing-soon!.html#comments</comments>
    <wfw:comment>https://blog.etc.gen.nz/wfwcomment.php?cid=102</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>https://blog.etc.gen.nz/rss.php?version=2.0&amp;type=comments&amp;cid=102</wfw:commentRss>
    

    <author>andrew@etc.gen.nz (Andrew Ruthven)</author>
    <content:encoded>
    Wow, the linux.conf.au 2010 team have had a an awesome response to our &lt;a href=&quot;http://blog.etc.gen.nz/index.php?/archives/100-LCA2010-Call-for-Miniconfs-are-now-open!.html&quot;&gt;Call for Miniconfs&lt;/a&gt; with over 32 amazing submissions.  But the work isn&#039;t over yet!&lt;br /&gt;
&lt;br /&gt;
Our &lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/www.lca2010.org.nz/media/news/51&#039;]);&quot;  href=&quot;http://www.lca2010.org.nz/media/news/51&quot;&gt;Call for Papers&lt;/a&gt; is still open, but closes on Friday.  That&#039;s right, Friday.  If you&#039;d like the opportunity to speak at one of the best FOSS conferences in the world, this is your chance, we want to hear from you!&lt;br /&gt;
&lt;br /&gt;
For more information about submitting a paper, have a look at the &lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/www.lca2010.org.nz/programme/papers_info&#039;]);&quot;  href=&quot;http://www.lca2010.org.nz/programme/papers_info&quot;&gt;Papers Info&lt;/a&gt; page on our website. 
    </content:encoded>

    <pubDate>Tue, 21 Jul 2009 21:21:42 +0000</pubDate>
    <guid isPermaLink="false">https://blog.etc.gen.nz/archives/102-guid.html</guid>
    <category>catalyst</category>
<category>family</category>
<category>geek</category>
<category>lca2010</category>
<category>linux</category>
<category>linux.conf.au</category>

</item>
<item>
    <title>MythTV Status in your MOTD (and email) - Version 0.6.1</title>
    <link>https://blog.etc.gen.nz/archives/77-MythTV-Status-in-your-MOTD-and-email-Version-0.6.1.html</link>
            <category>catalyst</category>
    
    <comments>https://blog.etc.gen.nz/archives/77-MythTV-Status-in-your-MOTD-and-email-Version-0.6.1.html#comments</comments>
    <wfw:comment>https://blog.etc.gen.nz/wfwcomment.php?cid=77</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>https://blog.etc.gen.nz/rss.php?version=2.0&amp;type=comments&amp;cid=77</wfw:commentRss>
    

    <author>andrew@etc.gen.nz (Andrew Ruthven)</author>
    <content:encoded>
    I&#039;m pleased to announce a new version of my little script - 0.6.1.
&lt;p&gt;
&lt;br /&gt;
Notable new features:
&lt;br /&gt;
&lt;ul&gt;
 &lt;li&gt; Details on disk space are reported, and individual storage groups[0];
 &lt;li&gt; If there isn&#039;t enough program guide data, a warning is shown;
 &lt;li&gt; The &lt;tt&gt;--email-only-on-conflict&lt;/tt&gt; option has been extended to mean
   &quot;Only on alert&quot; which now includes both the previous points
   (this means, you&#039;ll only be emailled if there is something which
   needs your attention);
 &lt;li&gt; For each recording (scheduled, current and conflict) show the channel
   name it is related to;
 &lt;li&gt; We do a little bit of rinsing on the XML data now to remove some
   invalid unicode characters that occasionally appear;
 &lt;li&gt; Suppress some warnings if the user doesn&#039;t have access to MySQL and
   handle some other error conditions in a nicer manner.
&lt;/ul&gt;

If you install the .deb, then the MOTD is updated automatically and the
email will be sent daily if there are conflicts (and you&#039;ve set some
email addresses).
&lt;p&gt;
&lt;br /&gt;
As usual, you can check the &lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/www.etc.gen.nz/projects/mythtv/mythtv-status.html&#039;]);&quot;  href=&quot;http://www.etc.gen.nz/projects/mythtv/mythtv-status.html&quot;&gt;project page&lt;/a&gt;.
&lt;p&gt;&lt;br /&gt;
[0] To get the details on the individual storage groups you need to
apply a couple of patches to MythTV.  Please see the FAQ in the tarball
or for Debian type boxes, /usr/share/doc/mythtv-status/FAQ .
&lt;p&gt;
&lt;b&gt;Update:&lt;/b&gt; I&#039;ve disabled comments for now as I&#039;m tired of all the spam. 
    </content:encoded>

    <pubDate>Thu, 13 Dec 2007 19:19:53 +0000</pubDate>
    <guid isPermaLink="false">https://blog.etc.gen.nz/archives/77-guid.html</guid>
    <category>catalyst</category>
<category>geek</category>
<category>linux</category>
<category>mythtv</category>
<category>mythtv-status</category>
<category>perl</category>
<category>software</category>

</item>
<item>
    <title>MythTV Status in your MOTD (and email) - Version 0.5.1</title>
    <link>https://blog.etc.gen.nz/archives/75-MythTV-Status-in-your-MOTD-and-email-Version-0.5.1.html</link>
            <category>catalyst</category>
    
    <comments>https://blog.etc.gen.nz/archives/75-MythTV-Status-in-your-MOTD-and-email-Version-0.5.1.html#comments</comments>
    <wfw:comment>https://blog.etc.gen.nz/wfwcomment.php?cid=75</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>https://blog.etc.gen.nz/rss.php?version=2.0&amp;type=comments&amp;cid=75</wfw:commentRss>
    

    <author>andrew@etc.gen.nz (Andrew Ruthven)</author>
    <content:encoded>
    I&#039;m pleased to announce a new version of my little script - &lt;strike&gt;0.5&lt;/strike&gt; 0.5.1.
&lt;p&gt;
&lt;br /&gt;
Notable new features (from the shiny new ChangeLog):
&lt;br /&gt;
&lt;ul&gt;
 &lt;li&gt; Add support for printing colour in the encoder status display.
  &lt;li&gt; Show any schedule conflicts, or if the MythTV Perl API isn&#039;t
   usable, a warning is displayed.
  &lt;li&gt; Display the amount of time until the next recording.
  &lt;li&gt; Add --version &amp;amp; --help options.
  &lt;li&gt; Allow suppressing blocks of output.
  &lt;li&gt; The report can be sent via email with the subject set correctly.
   With an option to only send out email if schedule conflicts are
   detected.
&lt;/ul&gt;
If you install the .deb, then the MOTD is updated automatically and the
email will be sent daily if there are conflicts (and you&#039;ve set some
email addresses).
&lt;p&gt;
&lt;br /&gt;
As usual, you can check the &lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/www.etc.gen.nz/projects/mythtv/mythtv-status.html&#039;]);&quot;  href=&quot;http://www.etc.gen.nz/projects/mythtv/mythtv-status.html&quot;&gt;project page&lt;/a&gt;.
&lt;p&gt;&lt;br /&gt;
&lt;b&gt;Update:&lt;/b&gt; I&#039;ve released 0.5.1 which should make the colour look good on non-black backgrounds as well. 
    </content:encoded>

    <pubDate>Thu, 22 Nov 2007 19:28:12 +0000</pubDate>
    <guid isPermaLink="false">https://blog.etc.gen.nz/archives/75-guid.html</guid>
    <category>catalyst</category>
<category>geek</category>
<category>linux</category>
<category>mythtv</category>
<category>mythtv-status</category>
<category>perl</category>
<category>software</category>

</item>
<item>
    <title>MythTV Status in your MOTD</title>
    <link>https://blog.etc.gen.nz/archives/74-MythTV-Status-in-your-MOTD.html</link>
            <category>catalyst</category>
    
    <comments>https://blog.etc.gen.nz/archives/74-MythTV-Status-in-your-MOTD.html#comments</comments>
    <wfw:comment>https://blog.etc.gen.nz/wfwcomment.php?cid=74</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>https://blog.etc.gen.nz/rss.php?version=2.0&amp;type=comments&amp;cid=74</wfw:commentRss>
    

    <author>andrew@etc.gen.nz (Andrew Ruthven)</author>
    <content:encoded>
    The other day I was recompiling some kernels during the day on our
&lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/www.mythtv.org&#039;]);&quot;  href=&quot;http://www.mythtv.org&quot;&gt;MythTV&lt;/a&gt; backend, which at the time happened to be recording my wifes
favourite program (Grey&#039;s Anatomy, we discovered it part way through the
season, so the repeats are good).  It turns out the compilation caused
some issues with the recording (which reduced the WAF). 
&lt;p&gt;
&lt;br /&gt;
So to increase the WAF, I&#039;m making sure this doesn&#039;t happen again.  I&#039;ve
written a script that spits out the MythTV status which is then
displayed in the MOTD.  It is available &lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/www.etc.gen.nz/projects/mythtv/mythtv-status.html&#039;]);&quot;  href=&quot;http://www.etc.gen.nz/projects/mythtv/mythtv-status.html&quot;&gt;over here&lt;/a&gt;.
&lt;p&gt;
&lt;br /&gt;
I&#039;ve found this is a pretty effective way of letting me know of any
upcoming recordings and what is going to be happening on the system in
the next little while.  It is a whole lot easier than using the status
page on MythWeb.
&lt;p&gt;
&lt;br /&gt;
Sample output:

&lt;pre&gt;
MythTV status for localhost
===========================
Status: Mon Oct 15 2007, 8:41 AM

Encoders:
cerberus (9) - Idle
cerberus (12) - Idle

Scheduled Recordings:
2007-10-15 13:30:00 - Grey&#039;s Anatomy
2007-10-15 18:00:00 - 3 News
2007-10-15 20:30:00 - Mythbusters
2007-10-15 22:00:00 - Flight Of The Conchords
2007-10-16 13:30:00 - Grey&#039;s Anatomy
2007-10-16 18:00:00 - 3 News
&lt;/pre&gt;

I run Debian, so there is a .deb.  For those not running Debian there is
a tarball (but the MOTD updating glue is Debian specific at the moment).
For those interested in hacking there is a git repository.
&lt;p&gt;
&lt;br /&gt;
Hopefully I&#039;m not the only one that finds this useful. 
    </content:encoded>

    <pubDate>Thu, 15 Nov 2007 20:24:31 +0000</pubDate>
    <guid isPermaLink="false">https://blog.etc.gen.nz/archives/74-guid.html</guid>
    <category>catalyst</category>
<category>geek</category>
<category>linux</category>
<category>mythtv</category>
<category>mythtv-status</category>
<category>perl</category>
<category>software</category>

</item>
<item>
    <title>IPv6 Firewalling</title>
    <link>https://blog.etc.gen.nz/archives/43-IPv6-Firewalling.html</link>
            <category>catalyst</category>
    
    <comments>https://blog.etc.gen.nz/archives/43-IPv6-Firewalling.html#comments</comments>
    <wfw:comment>https://blog.etc.gen.nz/wfwcomment.php?cid=43</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>https://blog.etc.gen.nz/rss.php?version=2.0&amp;type=comments&amp;cid=43</wfw:commentRss>
    

    <author>andrew@etc.gen.nz (Andrew Ruthven)</author>
    <content:encoded>
    Firewalling IPv6 on Linux seems to be a vaguely documented topic, and most of that documentation seems to be out of date as it is a fast moving target.  I&#039;ve spent a bit of time over the last couple of days working on improving my firewalling situation and thought I should write up what I&#039;ve found.&lt;br /&gt;
&lt;br /&gt;
After a bit of digging I found that while IPv6 connection tracking was merged in 2.6.16, the configuration options are somewhat hidden.  Up until yesterday I was running 2.6.19.x on my firewall and I discovered that while ip6tables allowed me to configure a stateful firewall, it wasn&#039;t actually doing anything!&lt;br /&gt;
&lt;br /&gt;
I looked around for the required nf_conntrack_ipv6 module and couldn&#039;t find it.  I looked in my running kernels config and couldn&#039;t find it.   In fact I couldn&#039;t find any option for enabling IPv6 connection tracking at all.  After some digging (grep&#039;ing the Kconfig files helps) I found that I needed to change over to the new (experimental) Layer 3 Independent Connection tracking support.&lt;br /&gt;
&lt;br /&gt;
The catch here is that if you have the old school Connection tracking (CONFIG_IP_NF_CONNTRACK) enabled you&#039;ll never see the new independent method (CONFIG_NF_CONNTRACK) in menuconfig.  Which is why I&#039;d never seen it before.  So I disabled CONFIG_IP_NF_CONNTRACK (in IP: Netfilter Configuration), enabled (the now visible) CONFIG_NF_CONNTRACK (in Core Netfilter Configuration) went into both the IP and IPv6 Netfilter Configuration menus and selected support for the connection tracking option.&lt;br /&gt;
&lt;br /&gt;
Compiled, installed and rebooted.  Suddenly I had IPv6 connection tracking working.  w00t!  But no IPv4 NAT.  Damn.  It turns out that IPv4 NAT support was only ported to the new Layer 3 Independent Connection stuff in 2.6.20.&lt;br /&gt;
&lt;br /&gt;
So I downloaded 2.6.20.3, jumped into the IP: Netfilter  Configuration menu and found &quot;Full NAT&quot;.  That&#039;s what I want.  Compiled, installed and rebooted.&lt;br /&gt;
&lt;br /&gt;
Now I have my old IPv4 NAT working, &lt;b&gt;and&lt;/b&gt; a full stateful IPv6 firewall (with no NAT!).&lt;br /&gt;
&lt;br /&gt;
Oh, if you are using IPv6 stateful firewalling with Linux then you want to upgrade to 2.6.20.3, it fixes an issue with incorrectly classifying IPv6 fragments as ESTABLISHED and letting them through.  Oops.  Also, 2.6.20 moves the config options around again... 
    </content:encoded>

    <pubDate>Wed, 14 Mar 2007 22:02:10 +0000</pubDate>
    <guid isPermaLink="false">https://blog.etc.gen.nz/archives/43-guid.html</guid>
    <category>ipv6</category>
<category>kernel</category>
<category>linux</category>
<category>software</category>

</item>

</channel>
</rss>
