<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Ipv6 on Chris Rants at Clouds</title>
    <link>https://chris.funderburg.me/tags/ipv6/</link>
    <description>Recent content in Ipv6 on Chris Rants at Clouds</description>
    <image>
      <title>Chris Rants at Clouds</title>
      <url>https://chris.funderburg.me/me.jpg</url>
      <link>https://chris.funderburg.me/me.jpg</link>
    </image>
    <generator>Hugo -- 0.157.0</generator>
    <language>en-gb</language>
    <lastBuildDate>Wed, 06 Nov 2024 22:38:27 +0000</lastBuildDate>
    <atom:link href="https://chris.funderburg.me/tags/ipv6/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>06/Nov/2024 - Tech Bingo</title>
      <link>https://chris.funderburg.me/posts/2024/11/06/tech-bingo/</link>
      <pubDate>Wed, 06 Nov 2024 22:38:27 +0000</pubDate>
      <guid>https://chris.funderburg.me/posts/2024/11/06/tech-bingo/</guid>
      <description>Lots and lots of technical changes and learning new systems</description>
      <content:encoded><![CDATA[<p>I&rsquo;ve spent the last 3 or 4 weekends playing with technology. I&rsquo;ve built:</p>
<h2 id="a-new-self-hosted-email-system">A new self-hosted email system.</h2>
<p>I decommissioned my email on Proton and migrated everything to self-hosted
<a href="https://docker-mailserver.github.io/docker-mailserver/latest/" target="_blank" >docker-mailserver</a>
The makers describe it as a, &ldquo;<em>Production-ready fullstack but simple mail
server (SMTP, IMAP, LDAP, Antispam, Antivirus, etc.) running inside a
container.</em>&rdquo;</p>
<p>Now, like me, if your understanding of a <strong>proper</strong> container is an image that
runs <strong>one</strong> process, you should look away now.  This is more of a
<strong>operating system</strong> image that runs:</p>
<ul>
<li><a href="https://www.postfix.org/" target="_blank" >Postfix</a> as the Mail Transfer Agent.</li>
<li><a href="https://www.dovecot.org/" target="_blank" >Dovecot</a> as the Mail Delivery Agent.</li>
<li><a href="https://www.clamav.net/" target="_blank" >ClamAV</a> and <a href="https://docs.clamav.net/faq/faq-freshclam.html" target="_blank" >Freshclam</a> for virus scanning.</li>
<li><a href="https://www.rspamd.com/" target="_blank" >Rspamd</a> or <a href="https://spamassassin.apache.org/" target="_blank" >Spamassassin</a> for spam detection.</li>
<li><a href="https://postgrey.schweikert.ch/" target="_blank" >Postgrey</a>, <a href="https://en.wikipedia.org/wiki/Amavis" target="_blank" >Amavis</a>, and more.</li>
</ul>
<p>It even has cron running things and supervisord controlling it all. But don&rsquo;t
let any of that put you off!  I am <strong>super</strong> happy with it all!</p>
<p>I started with the <a href="https://github.com/bocan/odin" target="_blank" >same Terraform / OpenTofu setup</a> that
my webserver <a href="https://chris.funderburg.me/about/#this-web-sites-tech" target="_blank" >uses</a>.</p>
<p>It&rsquo;s the same t3.medium instance, but instead of running on a Spot instance, I chose
an on-demand one with an EC2 Instance Savings Plan. In the Europe (London)
region, for a 1 year term and nothing upfront, that should cost me around $22 a
month (plus storage) instead of $35 (plus storage).</p>
<p>So now it&rsquo;s all back under my control.  It&rsquo;s fast.  And best of all - I don&rsquo;t need to
deal with Proton&rsquo;s absurdly poor systems.</p>
<h2 id="a-firewall-using-nftables-instead-of-iptables">A firewall using NFTABLES instead of IPTABLES.</h2>
<p>Since I run Debian Sid on both my webserver and the new mail server, I&rsquo;m using
the very latest tooling in Linux.  I noticed that <code>fail2ban</code> on both machines
were using something called <a href="https://www.netfilter.org/projects/nftables/index.html" target="_blank" >nftables</a>
instead of <a href="https://www.netfilter.org/projects/iptables/index.html" target="_blank" >iptables</a>
and I my usual Geo-blocking scripts didn&rsquo;t work.</p>
<p>So, I got down to work figuring out the new way to build these things and came
up with <a href="https://gist.github.com/bocan/ff82cbcbdc848aa34ff015e23ed866bf#file-build-sh" target="_blank" >this script</a>,
to block Russia, China, Vietnam, and Taiwan. I&rsquo;ve popped it online as open
source. It should work alongside any built-in firewall on new versions of Linux.</p>
<h2 id="http3-quic-and-more-firewalling-for-udp">HTTP/3, QUIC, And more firewalling for UDP.</h2>
<p>On my webserver, I enabled shiny brand new <a href="https://en.wikipedia.org/wiki/HTTP/3" target="_blank" >HTTP/3</a>
and the accompanying <a href="https://en.wikipedia.org/wiki/QUIC" target="_blank" >QUIC</a> protocol. The
interesting bit of this work is that, where the older HTTP/1.1, and 2 using
TCP to ports 80 and 443 - QUIC uses UDP to port 80 and 443. So, in addition to
lots of NGINX work, I had to open up security groups and do yet more poking of
firewalls.</p>
<p>HTTP/3 can handle more traffic and deliver content faster, especially on slower
or unreliable networks. It does this by having multiple steams in the same
connection, less handshakes, and of course by using UDP transport rather than
TCP.</p>
<p>It&rsquo;s also, in theory, a better security model as it uses TLS 1.3.</p>
<h2 id="dnssec-for-cloudcauldronio-and-funderburgme">DNSSEC for cloudcauldron.io and funderburg.me.</h2>
<p>For no particular reason aside from security, and that I could, I setup
<a href="https://www.cloudflare.com/en-gb/learning/dns/dnssec/how-dnssec-works/" target="_blank" >DNSSEC</a>
on both my larger domains. This mostly involved clicking a few buttons in Route53
in AWS to create the signing keys, then adding those details back into the
appropriate registrars for the domain. Surprisingly easy work!</p>
<p>Whist I was in Route53, I also moved funderburg.me&rsquo;s DNS into a new Route53 zone
from my DNS provider.  They didn&rsquo;t allow more &ldquo;exotic&rdquo; record creations which
I&rsquo;ll talk about below.</p>
<h2 id="an-opentofu-run-for-ipv6-on-odin">An OpenTofu Run for IPv6 on Odin.</h2>
<p>It&rsquo;s been a few months so I re-ran my OpenTofu project for <code>odin</code> (the webserver)
and the newish <code>freyja</code> (my mailserver) - mostly just to pick up a fresh base
image of Debian Sid.</p>
<p>But also, it was a chance to enable ipv6 across my VPC and both the ec2
instances. Back into Route53 and added a shiny AAAA record for
chris.funderburg.me that points to 2a05:d01c:eb9:2c00:11b5:6c38:49f4:92 - and
the job&rsquo;s a good one.</p>
<p>Still trying to get my head around IPv6 and I&rsquo;m not sure if that address will
change if I reboot - or re-create the machine.  I should probably check that!
If not, it should be easy enough to use OpenTofu to dynamically update the
route53 record.</p>
<h2 id="enabled-the-legendarily-dangerous-hsts-and-lots-of-edge-case-security-things">Enabled the legendarily dangerous HSTS and lots of edge-case security things.</h2>
<p>I tried setting up <a href="https://www.howtogeek.com/devops/what-is-hsts-and-how-do-you-set-it-up/" target="_blank" >HSTS</a>
years ago at work, not quite understanding what I was doing - and its lucky I
didn&rsquo;t get sacked!  HSTS very violently enforces HTTPS <strong>only</strong> connections by
leaving an entry in anyone&rsquo;s browser who visits. This entry tells the browser to
NEVER try to connect unencrypted.  It also usually says, &ldquo;and also do this with
all my subdomains&rdquo;.  That last one can break casual websites where you forgot
to add a certificate.</p>
<p>These days however, I encrypt everything everywhere using Letsencrypt. So, less
chance of blowing sites up or having to walk people through scrubbing their
browser data.  I set it up on funderburg.me and cloudcauldron withing an hour
and used the recommended settings of setting it&rsquo;s timeout first for 10 minutes,
now a week. And next week I&rsquo;ll change it to a month, and the month after, 2
years! In this way I have time to see if I&rsquo;ve forgotten anything.</p>
<h2 id="and-finally-for-securitys-sake">And finally, for security&rsquo;s sake:</h2>
<ul>
<li>A <a href="https://en.wikipedia.org/wiki/DNS_Certification_Authority_Authorization" target="_blank" >Certification Authority Authorization</a>
(CAA) record, which notes that my web certificates should only come from
letsencrypt.org.</li>
</ul>
]]></content:encoded>
    </item>
  </channel>
</rss>
