<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Posts on on-no.net</title>
    <link>https://on-no.net/posts/</link>
    <description>Recent content in Posts on on-no.net</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en</language>
    <lastBuildDate>Sat, 08 Jul 2023 13:28:02 +0200</lastBuildDate><atom:link href="https://on-no.net/posts/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Moving Providers and Tainted IPs</title>
      <link>https://on-no.net/posts/moving-providers-and-tainted-ips/</link>
      <pubDate>Sat, 08 Jul 2023 13:28:02 +0200</pubDate>
      
      <guid>https://on-no.net/posts/moving-providers-and-tainted-ips/</guid>
      <description>I recently switched hosting providers for the host you&amp;rsquo;re reading this on (more on the hows and whys in a later post, perhaps). Most of the &amp;ldquo;work&amp;rdquo; involved in moving stuff involved changing the main IP address as it obviously changed. Being in a shared hosting environment, one is assigned an IPv4 address at random which is likely to have been used in the past. My old instance had been running for about a decade on the same IP so had a decent reputation of not sending bad traffic around the world, but it quickly became clear I was not so lucky with the new host.</description>
      <content>&lt;p&gt;I recently switched hosting providers for the host you&amp;rsquo;re reading this on (more on the hows and whys in a later post, perhaps). Most of the &amp;ldquo;work&amp;rdquo; involved in moving stuff involved changing the main IP address as it obviously changed. Being in a shared hosting environment, one is assigned an IPv4 address at random which is likely to have been used in the past. My old instance had been running for about a decade on the same IP so had a decent reputation of not sending bad traffic around the world, but it quickly became clear I was not so lucky with the new host.&lt;/p&gt;
&lt;p&gt;Some searching revealed it had also been on blacklists in the past for sending out spam. Not great!&lt;/p&gt;
&lt;p&gt;(One may not really care about IP reputation in general - for me, as I&amp;rsquo;m using the host as the main nameserver for all my domains, it&amp;rsquo;s relatively important that it is available unimpeded globally so I can receive email and such.)&lt;/p&gt;
&lt;p&gt;My standard server monitoring setup showed some pretty obvious changes in TCP connections, from a clean old server:
&lt;img src=&#34;https://on-no.net/posts/moving-providers-and-tainted-ips/old_host.png&#34; alt=&#34;old server&#34;&gt;&lt;/p&gt;
&lt;p&gt;to a new &amp;ldquo;dirty&amp;rdquo; server:
&lt;img src=&#34;https://on-no.net/posts/moving-providers-and-tainted-ips/new_dirty_host.png&#34; alt=&#34;new server&#34;&gt;&lt;/p&gt;
&lt;p&gt;Note the &amp;ldquo;wave&amp;rdquo; of TCP connections established and in &lt;code&gt;FIN_WAIT&lt;/code&gt; state, a sure sign of a bunch of hosts trying (and failing) to get retrieve some data. Nothing major, but combined with the earlier blacklisting and this being the sole public IP used for all my domains it&amp;rsquo;s not ideal.&lt;/p&gt;
&lt;p&gt;Solving this was pretty easy - just create a new instance and move everything to the new IP once again. My new provider made this a 10 minute process: make a snapshot of the current instance, fire up a new instance based on said snapshot, update the &lt;code&gt;bind&lt;/code&gt; config and boom, new IP. While waiting the requisite 24 hours for the new DNS setting to propagate I got curious though - what &lt;em&gt;was&lt;/em&gt; that bad traffic anyway? Turns out it was pretty easy to find out.&lt;/p&gt;
&lt;p&gt;First I ran a quick tcpdump to see what kind of traffic I should be looking for. &lt;code&gt;tcpdump -n port not ssh&lt;/code&gt; confirmed it was random traffic on port 443 (SSL), meaning this IP was used in the past to host a website. Fair enough. What website though? The nginx logs didn&amp;rsquo;t reveal anything interesting - presumably traffic wasn&amp;rsquo;t actually getting past SSL negotiation. Digging into that involved a &lt;a href=&#34;https://serverfault.com/questions/574405/tcpdump-server-hello-certificate-filter&#34;&gt;slightly more involved&lt;/a&gt; &lt;code&gt;tcpdump&lt;/code&gt;:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;tcpdump -i any -s 1500 &amp;#39;(tcp[((tcp[12:1] &amp;amp; 0xf0) &amp;gt;&amp;gt; 2)+5:1] = 0x01) and (tcp[((tcp[12:1] &amp;amp; 0xf0) &amp;gt;&amp;gt; 2):1] = 0x16)&amp;#39; -nXSs0 -tt
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;This filters out the SNI field for the initial SSL handshake.&lt;/p&gt;
&lt;p&gt;And sure enough, there it was:
&lt;img src=&#34;https://on-no.net/posts/moving-providers-and-tainted-ips/the_source.png&#34; alt=&#34;the source&#34;&gt;&lt;/p&gt;
&lt;p&gt;Turns out it was used as part of an ad server CDN from Iran at some point.&lt;/p&gt;
&lt;p&gt;The good news is that the newly assigned IP is clean as a whistle and the TCP graph looks pretty much like the first one here. DNS propagation will be complete in a few hours&amp;rsquo; time and then I&amp;rsquo;ll shut down the old instance and will probably have the current clean IP for years to come. All&amp;rsquo;s well that ends well.&lt;/p&gt;
</content>
    </item>
    
    <item>
      <title>Hello World</title>
      <link>https://on-no.net/posts/hello-world/</link>
      <pubDate>Tue, 04 Jul 2023 20:14:54 +0200</pubDate>
      
      <guid>https://on-no.net/posts/hello-world/</guid>
      <description>It&amp;rsquo;s high time to update this here sleepy site, is it not? I decided to wipe out my lovingly hand-crafted photo blog when I realized keeping things manually updated was not something I enjoyed. The plan was to switch to a long-supported static site builder and well&amp;hellip; I just never got around to it. I&amp;rsquo;m not sure what&amp;rsquo;s prompted me to suddenly try it again now but here we are.</description>
      <content>&lt;hr&gt;
&lt;p&gt;It&amp;rsquo;s high time to update this here sleepy site, is it not? I decided to wipe out my lovingly hand-crafted photo blog when I realized keeping things manually updated was not something I enjoyed. The plan was to switch to a long-supported static site builder and well&amp;hellip; I just never got around to it. I&amp;rsquo;m not sure what&amp;rsquo;s prompted me to suddenly try it again now but here we are.&lt;/p&gt;
&lt;h1 id=&#34;this-page-circa-2005&#34;&gt;This page circa 2005&lt;/h1&gt;
&lt;p&gt;This was originally a &amp;ldquo;photo blog&amp;rdquo; where I posted pictures almost daily. Courtesy of the &lt;a href=&#34;https://archive.org/&#34;&gt;Internet Archive&lt;/a&gt; here&amp;rsquo;s what it (roughly) looked like:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://on-no.net/posts/hello-world/on-no.net-v1.jpg&#34; alt=&#34;on-no.net v1&#34;&gt;&lt;/p&gt;
&lt;p&gt;The underlying system was based on Wordpress with some custom gallery stuff. It eventually led me to being featured in a &lt;a href=&#34;https://www.youtube.com/watch?v=8OfSu9a4rxA&#34;&gt;Canon commercial&lt;/a&gt;, so that was nice. I got increasingly frustrated with wanting to make changes in the PHP-based source so I eventually switched to a custom Rails blog in the (ultimately vain) hope I&amp;rsquo;d get good at Ruby.&lt;/p&gt;
&lt;h1 id=&#34;the-2010-redesign&#34;&gt;The 2010 redesign&lt;/h1&gt;
&lt;p&gt;&lt;img src=&#34;https://on-no.net/posts/hello-world/on-no.net-v2.jpg&#34; alt=&#34;on-no.net v2&#34;&gt;&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m still pretty happy with the design here. I scanned an A4 paper, ramped up the contrast and carefully sliced and diced the images and CSS (manually!) so that it would fit as a background without a noticeable overlap. The image galleries also looked great - the only downside being that I had to manually crop the previews so that they&amp;rsquo;d fit together nicely in a block with different-sized thumbnails.&lt;/p&gt;
&lt;p&gt;There were some other problems that led to a plan for a grand redesign:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Custom blog code sounds great, but it turns out you need to keep up to date with Rails development if you want things to keep working&lt;/li&gt;
&lt;li&gt;It wasn&amp;rsquo;t a good experience on mobile&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;It&amp;rsquo;s the latter that caused my main issue with ever getting an update out: the whole frontend world was changing rapidly and I had no idea what to do with CSS pre-processors and the like. I figured it&amp;rsquo;d shake out pretty soon so I put up a quick &amp;ldquo;be back soon&amp;rdquo; page which then stayed in place for about a decade. Whoops.&lt;/p&gt;
&lt;h1 id=&#34;redesign-2021-2023-edition&#34;&gt;&amp;ldquo;Redesign&amp;rdquo;, &lt;del&gt;2021&lt;/del&gt; 2023 edition&lt;/h1&gt;
&lt;p&gt;So, here we are. This is now running on &lt;a href=&#34;https://gohugo.io/&#34;&gt;Hugo&lt;/a&gt; with an off-the-shelf &lt;a href=&#34;https://github.com/victoriadrake/hugo-theme-sam/&#34;&gt;theme&lt;/a&gt; that should allow me to once again focus on getting some content up as opposed to fidgeting with the backend. Let&amp;rsquo;s see how this one shakes out, eh?&lt;/p&gt;
</content>
    </item>
    
  </channel>
</rss>
