<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="4.1.1">Jekyll</generator><link href="https://kianbradley.com/feed.xml" rel="self" type="application/atom+xml" /><link href="https://kianbradley.com/" rel="alternate" type="text/html" /><updated>2025-06-15T21:19:03-07:00</updated><id>https://kianbradley.com/feed.xml</id><title type="html">Kian Bradley’s Blog</title><subtitle></subtitle><author><name>Kian Bradley</name></author><entry><title type="html">Resurrecting a dead torrent tracker and finding 3 million peers</title><link href="https://kianbradley.com/2025/06/15/resurrecting-a-dead-tracker.html" rel="alternate" type="text/html" title="Resurrecting a dead torrent tracker and finding 3 million peers" /><published>2025-06-15T21:08:29-07:00</published><updated>2025-06-15T21:08:29-07:00</updated><id>https://kianbradley.com/2025/06/15/resurrecting-a-dead-tracker</id><content type="html" xml:base="https://kianbradley.com/2025/06/15/resurrecting-a-dead-tracker.html">&lt;p&gt;So I was uh, downloading some linux isos, like usual. It was going slowly, so I opened up the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Trackers&lt;/code&gt; tab in qBittorrent and saw the following:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/tracker-list.png&quot; alt=&quot;List of trackers... most of them unreachable&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Most of the trackers were totally dead.&lt;/strong&gt; Either the hosts were down or the domains weren’t being used.&lt;/p&gt;

&lt;p&gt;That got me thinking. &lt;strong&gt;What if &lt;em&gt;I&lt;/em&gt; picked up one of these dead domains?&lt;/strong&gt; How many clients would try to connect?&lt;/p&gt;

&lt;h2 id=&quot;what-are-trackers-for-anyways&quot;&gt;What are trackers for, anyways?&lt;/h2&gt;

&lt;p&gt;A &lt;em&gt;tracker&lt;/em&gt; is a core component of the &lt;a href=&quot;https://en.wikipedia.org/wiki/BitTorrent&quot;&gt;BitTorrent protocol&lt;/a&gt;. Trackers are the services that point you to other peers for the torrent. Without trackers, there would be no one to share the file with.&lt;/p&gt;

&lt;p&gt;Obviously this represents a major source of centralization in the torrent protocol. If your trackers aren’t maintained – or if they get forced offline by certain industry organizations – you’re out of luck.&lt;/p&gt;

&lt;p&gt;We have an alternative, called &lt;a href=&quot;https://en.wikipedia.org/wiki/Mainline_DHT&quot;&gt;Mainline DHT&lt;/a&gt;, which performs a more decentralized lookup of peers based on infohash alone. DHT isn’t perfect, though. It relies on &lt;a href=&quot;https://stackoverflow.com/questions/1181301/how-does-a-dht-in-a-bittorent-client-get-bootstrapped&quot;&gt;bootstrapping nodes&lt;/a&gt; and is vulnerable to &lt;a href=&quot;https://www.bittorrent.org/beps/bep_0042.html&quot;&gt;Sybil attacks&lt;/a&gt;. And in the example of my poorly-served torrent, DHT wasn’t surfacing any peers, regardless.&lt;/p&gt;

&lt;h2 id=&quot;hosting-a-tracker&quot;&gt;Hosting a tracker&lt;/h2&gt;

&lt;p&gt;Looking through the list of trackers marked “host not found”, I noticed &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;udp://open.demonii.si:1337/announce&lt;/code&gt; was available.&lt;/p&gt;

&lt;p&gt;I bought the domain through &lt;a href=&quot;https://www.dynadot.com/&quot;&gt;Dynadot&lt;/a&gt; (one of the few .si domain registrars), then spun up a &lt;a href=&quot;https://cockbox.org/&quot;&gt;quick anonymous VPS&lt;/a&gt;. I mapped the domain to the VPS, then set up &lt;a href=&quot;https://erdgeist.org/arts/software/opentracker/&quot;&gt;&lt;strong&gt;opentracker&lt;/strong&gt;&lt;/a&gt;, the most widely used and robust torrent tracker software.&lt;/p&gt;

&lt;p&gt;Instructions for Ubuntu 24.04:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;apt &lt;span class=&quot;nb&quot;&gt;install &lt;/span&gt;gcc-14 g++-14 build-essential zlib1g-dev
&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;update-alternatives &lt;span class=&quot;nt&quot;&gt;--install&lt;/span&gt; /usr/bin/gcc gcc /usr/bin/gcc-14 14
&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;update-alternatives &lt;span class=&quot;nt&quot;&gt;--install&lt;/span&gt; /usr/bin/g++ g++ /usr/bin/g++-14 14&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Follow the &lt;a href=&quot;https://erdgeist.org/gitweb/opentracker/tree/README&quot;&gt;readme&lt;/a&gt; to compile, first the dependency &lt;a href=&quot;https://www.fefe.de/libowfat/&quot;&gt;libowfat&lt;/a&gt; (a GPL reimplementation of some of &lt;a href=&quot;https://cr.yp.to/djb.html&quot;&gt;dan bernstein&lt;/a&gt;’s C libraries) and then opentracker itself.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;cvs &lt;span class=&quot;nt&quot;&gt;-d&lt;/span&gt; :pserver:cvs@cvs.fefe.de:/cvs &lt;span class=&quot;nt&quot;&gt;-z9&lt;/span&gt; co libowfat
&lt;span class=&quot;nb&quot;&gt;cd &lt;/span&gt;libowfat
make
&lt;span class=&quot;nb&quot;&gt;cd&lt;/span&gt; ..
cvs &lt;span class=&quot;nt&quot;&gt;-d&lt;/span&gt;:pserver:anoncvs@cvs.erdgeist.org:/home/cvsroot co opentracker
&lt;span class=&quot;nb&quot;&gt;cd &lt;/span&gt;opentracker
make&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Finally, a quick systemd unit file to daemonize this service:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;Unit]
&lt;span class=&quot;nv&quot;&gt;Description&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;opentracker
&lt;span class=&quot;nv&quot;&gt;After&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;network-online.target
&lt;span class=&quot;nv&quot;&gt;Wants&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;network-online.target

&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;Service]
&lt;span class=&quot;nv&quot;&gt;Type&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;simple
&lt;span class=&quot;nv&quot;&gt;User&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;opentracker
&lt;span class=&quot;nv&quot;&gt;Group&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;opentracker
&lt;span class=&quot;nv&quot;&gt;WorkingDirectory&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;/var/lib/opentracker
&lt;span class=&quot;nv&quot;&gt;ExecStart&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;/home/opentracker/opentracker/opentracker &lt;span class=&quot;nt&quot;&gt;-p&lt;/span&gt; 1337 &lt;span class=&quot;nt&quot;&gt;-P&lt;/span&gt; 1337 &lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
          &lt;span class=&quot;nt&quot;&gt;-d&lt;/span&gt; /var/lib/opentracker &lt;span class=&quot;nt&quot;&gt;-u&lt;/span&gt; opentracker
&lt;span class=&quot;nv&quot;&gt;Restart&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;on-failure
&lt;span class=&quot;nv&quot;&gt;LimitNOFILE&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;65536

&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;Install]
&lt;span class=&quot;nv&quot;&gt;WantedBy&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;multi-user.target&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;h2 id=&quot;what-did-i-find&quot;&gt;What did I find?&lt;/h2&gt;

&lt;p&gt;Before even starting opentracker, I saw a flood of traffic against UDP port 1337:&lt;/p&gt;

&lt;video controls=&quot;&quot; src=&quot;/assets/tcpdump.mp4&quot; alt=&quot;Flood of UDP traffic reported by tcpdump&quot; style=&quot;max-width: min(100%, 720px);margin-bottom: 15px;&quot;&gt;&lt;/video&gt;

&lt;p&gt;I then started the tracker. After about an hour, it peaked at about &lt;strong&gt;1.7 million distinct torrents across 3.1 million peers!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Response from &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;http://open.demonii.si:1337/stats?mode=everything&lt;/code&gt;:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-xml&quot; data-lang=&quot;xml&quot;&gt;&lt;span class=&quot;cp&quot;&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;stats&amp;gt;&lt;/span&gt;
  &lt;span class=&quot;nt&quot;&gt;&amp;lt;tracker_id&amp;gt;&lt;/span&gt;273419141&lt;span class=&quot;nt&quot;&gt;&amp;lt;/tracker_id&amp;gt;&lt;/span&gt;
  &lt;span class=&quot;nt&quot;&gt;&amp;lt;version&amp;gt;&lt;/span&gt;
https://erdgeist.org/gitweb/opentracker/commit/?id=b20b0b89264e9d28ab873b8b1cc9ba73cdb58aeb
  &lt;span class=&quot;nt&quot;&gt;&amp;lt;/version&amp;gt;&lt;/span&gt;
  &lt;span class=&quot;nt&quot;&gt;&amp;lt;uptime&amp;gt;&lt;/span&gt;10313&lt;span class=&quot;nt&quot;&gt;&amp;lt;/uptime&amp;gt;&lt;/span&gt;
  &lt;span class=&quot;nt&quot;&gt;&amp;lt;torrents&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;count_mutex&amp;gt;&lt;/span&gt;1735538&lt;span class=&quot;nt&quot;&gt;&amp;lt;/count_mutex&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;count_iterator&amp;gt;&lt;/span&gt;1735523&lt;span class=&quot;nt&quot;&gt;&amp;lt;/count_iterator&amp;gt;&lt;/span&gt;
  &lt;span class=&quot;nt&quot;&gt;&amp;lt;/torrents&amp;gt;&lt;/span&gt;
  &lt;span class=&quot;nt&quot;&gt;&amp;lt;peers&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;count&amp;gt;&lt;/span&gt;3155701&lt;span class=&quot;nt&quot;&gt;&amp;lt;/count&amp;gt;&lt;/span&gt;
  &lt;span class=&quot;nt&quot;&gt;&amp;lt;/peers&amp;gt;&lt;/span&gt;
  &lt;span class=&quot;nt&quot;&gt;&amp;lt;seeds&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;count&amp;gt;&lt;/span&gt;1342504&lt;span class=&quot;nt&quot;&gt;&amp;lt;/count&amp;gt;&lt;/span&gt;
  &lt;span class=&quot;nt&quot;&gt;&amp;lt;/seeds&amp;gt;&lt;/span&gt;
  &lt;span class=&quot;nt&quot;&gt;&amp;lt;completed&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;count&amp;gt;&lt;/span&gt;244224&lt;span class=&quot;nt&quot;&gt;&amp;lt;/count&amp;gt;&lt;/span&gt;
  &lt;span class=&quot;nt&quot;&gt;&amp;lt;/completed&amp;gt;&lt;/span&gt;
  &lt;span class=&quot;nt&quot;&gt;&amp;lt;connections&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;tcp&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;nt&quot;&gt;&amp;lt;accept&amp;gt;&lt;/span&gt;21532&lt;span class=&quot;nt&quot;&gt;&amp;lt;/accept&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;nt&quot;&gt;&amp;lt;announce&amp;gt;&lt;/span&gt;20219&lt;span class=&quot;nt&quot;&gt;&amp;lt;/announce&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;nt&quot;&gt;&amp;lt;scrape&amp;gt;&lt;/span&gt;263&lt;span class=&quot;nt&quot;&gt;&amp;lt;/scrape&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;/tcp&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;udp&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;nt&quot;&gt;&amp;lt;overall&amp;gt;&lt;/span&gt;58843612&lt;span class=&quot;nt&quot;&gt;&amp;lt;/overall&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;nt&quot;&gt;&amp;lt;connect&amp;gt;&lt;/span&gt;18321703&lt;span class=&quot;nt&quot;&gt;&amp;lt;/connect&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;nt&quot;&gt;&amp;lt;announce&amp;gt;&lt;/span&gt;33160261&lt;span class=&quot;nt&quot;&gt;&amp;lt;/announce&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;nt&quot;&gt;&amp;lt;scrape&amp;gt;&lt;/span&gt;3211543&lt;span class=&quot;nt&quot;&gt;&amp;lt;/scrape&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;nt&quot;&gt;&amp;lt;missmatch&amp;gt;&lt;/span&gt;4116689&lt;span class=&quot;nt&quot;&gt;&amp;lt;/missmatch&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;/udp&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;livesync&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;nt&quot;&gt;&amp;lt;count&amp;gt;&lt;/span&gt;0&lt;span class=&quot;nt&quot;&gt;&amp;lt;/count&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;/livesync&amp;gt;&lt;/span&gt;
  &lt;span class=&quot;nt&quot;&gt;&amp;lt;/connections&amp;gt;&lt;/span&gt;
  &lt;span class=&quot;nt&quot;&gt;&amp;lt;debug&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;renew&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;nt&quot;&gt;&amp;lt;count&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;interval=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;00&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;12216193&lt;span class=&quot;nt&quot;&gt;&amp;lt;/count&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;nt&quot;&gt;&amp;lt;count&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;interval=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;01&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;1463740&lt;span class=&quot;nt&quot;&gt;&amp;lt;/count&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;nt&quot;&gt;&amp;lt;count&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;interval=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;02&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;536527&lt;span class=&quot;nt&quot;&gt;&amp;lt;/count&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;nt&quot;&gt;&amp;lt;count&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;interval=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;03&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;284756&lt;span class=&quot;nt&quot;&gt;&amp;lt;/count&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;nt&quot;&gt;&amp;lt;count&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;interval=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;04&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;243276&lt;span class=&quot;nt&quot;&gt;&amp;lt;/count&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;nt&quot;&gt;&amp;lt;count&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;interval=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;05&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;93237&lt;span class=&quot;nt&quot;&gt;&amp;lt;/count&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;nt&quot;&gt;&amp;lt;count&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;interval=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;06&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;63618&lt;span class=&quot;nt&quot;&gt;&amp;lt;/count&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;nt&quot;&gt;&amp;lt;count&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;interval=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;07&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;53934&lt;span class=&quot;nt&quot;&gt;&amp;lt;/count&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;nt&quot;&gt;&amp;lt;count&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;interval=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;08&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;36851&lt;span class=&quot;nt&quot;&gt;&amp;lt;/count&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;nt&quot;&gt;&amp;lt;count&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;interval=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;09&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;28990&lt;span class=&quot;nt&quot;&gt;&amp;lt;/count&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;nt&quot;&gt;&amp;lt;count&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;interval=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;10&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;352150&lt;span class=&quot;nt&quot;&gt;&amp;lt;/count&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;nt&quot;&gt;&amp;lt;count&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;interval=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;11&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;56610&lt;span class=&quot;nt&quot;&gt;&amp;lt;/count&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;nt&quot;&gt;&amp;lt;count&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;interval=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;12&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;24557&lt;span class=&quot;nt&quot;&gt;&amp;lt;/count&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;nt&quot;&gt;&amp;lt;count&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;interval=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;13&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;21628&lt;span class=&quot;nt&quot;&gt;&amp;lt;/count&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;nt&quot;&gt;&amp;lt;count&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;interval=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;14&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;24932&lt;span class=&quot;nt&quot;&gt;&amp;lt;/count&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;nt&quot;&gt;&amp;lt;count&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;interval=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;15&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;63250&lt;span class=&quot;nt&quot;&gt;&amp;lt;/count&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;nt&quot;&gt;&amp;lt;count&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;interval=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;16&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;38174&lt;span class=&quot;nt&quot;&gt;&amp;lt;/count&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;nt&quot;&gt;&amp;lt;count&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;interval=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;17&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;33730&lt;span class=&quot;nt&quot;&gt;&amp;lt;/count&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;nt&quot;&gt;&amp;lt;count&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;interval=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;18&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;27827&lt;span class=&quot;nt&quot;&gt;&amp;lt;/count&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;nt&quot;&gt;&amp;lt;count&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;interval=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;19&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;27166&lt;span class=&quot;nt&quot;&gt;&amp;lt;/count&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;nt&quot;&gt;&amp;lt;count&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;interval=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;20&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;22463&lt;span class=&quot;nt&quot;&gt;&amp;lt;/count&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;nt&quot;&gt;&amp;lt;count&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;interval=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;21&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;17820&lt;span class=&quot;nt&quot;&gt;&amp;lt;/count&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;nt&quot;&gt;&amp;lt;count&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;interval=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;22&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;17248&lt;span class=&quot;nt&quot;&gt;&amp;lt;/count&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;nt&quot;&gt;&amp;lt;count&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;interval=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;23&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;17276&lt;span class=&quot;nt&quot;&gt;&amp;lt;/count&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;nt&quot;&gt;&amp;lt;count&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;interval=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;24&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;17825&lt;span class=&quot;nt&quot;&gt;&amp;lt;/count&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;nt&quot;&gt;&amp;lt;count&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;interval=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;25&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;20144&lt;span class=&quot;nt&quot;&gt;&amp;lt;/count&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;nt&quot;&gt;&amp;lt;count&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;interval=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;26&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;27987&lt;span class=&quot;nt&quot;&gt;&amp;lt;/count&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;nt&quot;&gt;&amp;lt;count&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;interval=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;27&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;792338&lt;span class=&quot;nt&quot;&gt;&amp;lt;/count&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;nt&quot;&gt;&amp;lt;count&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;interval=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;28&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;1579577&lt;span class=&quot;nt&quot;&gt;&amp;lt;/count&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;nt&quot;&gt;&amp;lt;count&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;interval=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;29&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;1625355&lt;span class=&quot;nt&quot;&gt;&amp;lt;/count&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;nt&quot;&gt;&amp;lt;count&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;interval=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;30&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;2229105&lt;span class=&quot;nt&quot;&gt;&amp;lt;/count&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;nt&quot;&gt;&amp;lt;count&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;interval=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;31&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;1670317&lt;span class=&quot;nt&quot;&gt;&amp;lt;/count&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;nt&quot;&gt;&amp;lt;count&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;interval=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;32&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;1581574&lt;span class=&quot;nt&quot;&gt;&amp;lt;/count&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;nt&quot;&gt;&amp;lt;count&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;interval=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;33&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;846355&lt;span class=&quot;nt&quot;&gt;&amp;lt;/count&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;nt&quot;&gt;&amp;lt;count&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;interval=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;34&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;96656&lt;span class=&quot;nt&quot;&gt;&amp;lt;/count&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;nt&quot;&gt;&amp;lt;count&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;interval=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;35&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;68160&lt;span class=&quot;nt&quot;&gt;&amp;lt;/count&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;nt&quot;&gt;&amp;lt;count&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;interval=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;36&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;47801&lt;span class=&quot;nt&quot;&gt;&amp;lt;/count&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;nt&quot;&gt;&amp;lt;count&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;interval=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;37&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;36705&lt;span class=&quot;nt&quot;&gt;&amp;lt;/count&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;nt&quot;&gt;&amp;lt;count&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;interval=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;38&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;32256&lt;span class=&quot;nt&quot;&gt;&amp;lt;/count&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;nt&quot;&gt;&amp;lt;count&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;interval=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;39&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;27535&lt;span class=&quot;nt&quot;&gt;&amp;lt;/count&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;nt&quot;&gt;&amp;lt;count&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;interval=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;40&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;27593&lt;span class=&quot;nt&quot;&gt;&amp;lt;/count&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;nt&quot;&gt;&amp;lt;count&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;interval=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;41&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;27640&lt;span class=&quot;nt&quot;&gt;&amp;lt;/count&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;nt&quot;&gt;&amp;lt;count&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;interval=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;42&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;24090&lt;span class=&quot;nt&quot;&gt;&amp;lt;/count&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;nt&quot;&gt;&amp;lt;count&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;interval=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;43&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;20762&lt;span class=&quot;nt&quot;&gt;&amp;lt;/count&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;nt&quot;&gt;&amp;lt;count&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;interval=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;44&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;17880&lt;span class=&quot;nt&quot;&gt;&amp;lt;/count&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;/renew&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;http_error&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;nt&quot;&gt;&amp;lt;count&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;code=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;302 Redirect&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;0&lt;span class=&quot;nt&quot;&gt;&amp;lt;/count&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;nt&quot;&gt;&amp;lt;count&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;code=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;400 Parse Error&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;0&lt;span class=&quot;nt&quot;&gt;&amp;lt;/count&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;nt&quot;&gt;&amp;lt;count&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;code=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;400 Invalid Parameter&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;55&lt;span class=&quot;nt&quot;&gt;&amp;lt;/count&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;nt&quot;&gt;&amp;lt;count&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;code=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;400 Invalid Parameter (compact=0)&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;0&lt;span class=&quot;nt&quot;&gt;&amp;lt;/count&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;nt&quot;&gt;&amp;lt;count&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;code=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;400 Not Modest&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;0&lt;span class=&quot;nt&quot;&gt;&amp;lt;/count&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;nt&quot;&gt;&amp;lt;count&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;code=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;402 Payment Required&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;0&lt;span class=&quot;nt&quot;&gt;&amp;lt;/count&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;nt&quot;&gt;&amp;lt;count&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;code=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;403 Access Denied&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;0&lt;span class=&quot;nt&quot;&gt;&amp;lt;/count&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;nt&quot;&gt;&amp;lt;count&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;code=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;404 Not found&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;883&lt;span class=&quot;nt&quot;&gt;&amp;lt;/count&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;nt&quot;&gt;&amp;lt;count&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;code=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;500 Internal Server Error&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;0&lt;span class=&quot;nt&quot;&gt;&amp;lt;/count&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;/http_error&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;mutex_stall&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;nt&quot;&gt;&amp;lt;count&amp;gt;&lt;/span&gt;0&lt;span class=&quot;nt&quot;&gt;&amp;lt;/count&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;/mutex_stall&amp;gt;&lt;/span&gt;
  &lt;span class=&quot;nt&quot;&gt;&amp;lt;/debug&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;/stats&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;h2 id=&quot;is-this-legal&quot;&gt;Is this legal?&lt;/h2&gt;

&lt;p&gt;Maybe.&lt;/p&gt;

&lt;p&gt;When the recording industry and other litigious organizations go after torrent trackers, they’re mainly chasing down the public-facing parts of the system. The legal decisions against websites like The Pirate Bay hinge on how they highlight popular movies, sell ads, and offer .torrent files. This is all taken as evidence of &lt;strong&gt;inducement&lt;/strong&gt;, meaning the &lt;em&gt;intentional promotion&lt;/em&gt; of copyright infringement.&lt;/p&gt;

&lt;p&gt;Does hosting tracker infrastructure, unadvertised, count as “inducement”? It’s a harder case to make. I’m aware that many torrents, both freely available and copyrighted, use this tracker. But it would be more difficult to prove intent here.&lt;/p&gt;

&lt;p&gt;Regardless, I was spooked. I thought through my chain of events and realized I had already fucked up by paying for the domain with a credit card. I shut down the VPS and deleted the domain quickly after confirming it works.&lt;/p&gt;

&lt;p&gt;So… the domain is available now. It’s quite easy to find unclaimed domains like this. If you want to do a public service, &lt;em&gt;open.demonii.si&lt;/em&gt; and others are up for registration…&lt;/p&gt;</content><author><name>Kian Bradley</name></author><category term="torrent" /><category term="tracker" /><category term="opentracker" /><summary type="html">So I was uh, downloading some linux isos, like usual. It was going slowly, so I opened up the Trackers tab in qBittorrent and saw the following:</summary></entry><entry><title type="html">Supporting modern https on Windows XP</title><link href="https://kianbradley.com/2024/01/14/tls-on-xp.html" rel="alternate" type="text/html" title="Supporting modern https on Windows XP" /><published>2024-01-14T11:53:18-08:00</published><updated>2024-01-14T11:53:18-08:00</updated><id>https://kianbradley.com/2024/01/14/tls-on-xp</id><content type="html" xml:base="https://kianbradley.com/2024/01/14/tls-on-xp.html">&lt;p&gt;I managed to get modern SSL/TLS connections working under Windows XP, by running a lightweight Linux VM which strips the TLS headers and re-applies a self-signed certificate:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/internet.PNG&quot; alt=&quot;Screenshot of a windows xp machine with firefox. In the background is an Alpine Linux VM running squid proxy software&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Much of this guide is adapted from the &lt;a href=&quot;https://bitbucket.org/ValdikSS/oldssl-proxy/raw/1179e76bb025cc4860fd9da1f88eb5b33284f985/Dockerfile&quot;&gt;dockerfile&lt;/a&gt; from &lt;a href=&quot;https://bitbucket.org/ValdikSS/oldssl-proxy&quot;&gt;bitbucket.org/ValdikSS/oldssl-proxy&lt;/a&gt;. Thanks &lt;a href=&quot;http://valdikss.org.ru&quot;&gt;ValdikSS&lt;/a&gt;!&lt;/p&gt;

&lt;p&gt;I recommend using Firefox on Windows XP, it seems to have the best support for the modern web. I’m using Firefox 47.0.2. Download old versions of firefox at &lt;a href=&quot;http://ftp.mozilla.org/pub/firefox/releases/&quot;&gt;ftp.mozilla.org/pub/firefox/releases/&lt;/a&gt;.&lt;/p&gt;

&lt;h2 id=&quot;install-the-virtual-machine&quot;&gt;Install the virtual machine&lt;/h2&gt;

&lt;p&gt;Install a virtual machine software, such as &lt;a href=&quot;magnet:?xt=urn:btih:744ceca1c427c21a917b3ee4a06d3a8821eabf1a&amp;amp;dn=VMware%20Workstation%20v9.0.1%20Incl.%20Keymaker%20-%20EMBRACE%20%5bdeepstatus%5d&amp;amp;tr=udp%3a%2f%2ftracker.coppersurfer.tk%3a6969%2fannounce&amp;amp;tr=udp%3a%2f%2ftracker.openbittorrent.com%3a6969%2fannounce&amp;amp;tr=udp%3a%2f%2fopen.stealth.si%3a80%2fannounce&amp;amp;tr=udp%3a%2f%2ftracker.torrent.eu.org%3a451%2fannounce&amp;amp;tr=udp%3a%2f%2ftracker.bittor.pw%3a1337%2fannounce&amp;amp;tr=udp%3a%2f%2ftracker.opentrackr.org%3a1337&amp;amp;tr=udp%3a%2f%2fpublic.popcorn-tracker.org%3a6969%2fannounce&amp;amp;tr=udp%3a%2f%2ftracker.dler.org%3a6969%2fannounce&amp;amp;tr=udp%3a%2f%2fexodus.desync.com%3a6969&amp;amp;tr=udp%3a%2f%2fopentracker.i2p.rocks%3a6969%2fannounce&quot;&gt;VMware Workstation v9.0.1 Incl. Keymaker - EMBRACE [deepstatus]&lt;/a&gt;. If you want to find a torrent program that works on XP, I recommend &lt;a href=&quot;http://download.deluge-torrent.org/archive/0.9/deluge-0.9.09-32.msi&quot;&gt;Deluge 0.9.09&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;For our VM, we’ll use Alpine Linux, as it’s very lightweight and still supports 32-bit CPUs. Download &lt;a href=&quot;http://dl-cdn.alpinelinux.org/alpine/v3.13/releases/x86/alpine-standard-3.13.2-x86.iso&quot;&gt;alpine-standard-3.13.2-x86.iso&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;In VMware, create a new virtual machine. You can allocate 256mb RAM and a 2GB disk, maybe less.&lt;/p&gt;

&lt;p&gt;Configure the machine to use your iso file and boot. &lt;a href=&quot;https://wiki.alpinelinux.org/wiki/Installation&quot;&gt;Install Alpine&lt;/a&gt; by running &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;setup-alpine&lt;/code&gt;. Use the default options, but pick &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sys&lt;/code&gt; as the disk partitioning option.&lt;/p&gt;

&lt;h2 id=&quot;install-and-configure-squid-proxy&quot;&gt;Install and configure squid proxy&lt;/h2&gt;

&lt;p&gt;We will use &lt;a href=&quot;http://www.squid-cache.org/&quot;&gt;Squid&lt;/a&gt; to proxy the web connection. Install it:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;apk add alpine-sdk squid openssl darkhttpd
/usr/lib/squid/security_file_certgen &lt;span class=&quot;nt&quot;&gt;-c&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-s&lt;/span&gt; /var/cache/squid/ssl_db &lt;span class=&quot;nt&quot;&gt;-M&lt;/span&gt; 4MB
&lt;span class=&quot;nb&quot;&gt;chown &lt;/span&gt;squid:squid &lt;span class=&quot;nt&quot;&gt;-R&lt;/span&gt; /var/cache/squid/ssl_db
&lt;span class=&quot;nb&quot;&gt;mkdir&lt;/span&gt; /etc/squid/ssl_cert&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Edit the squid configuration. Run these sed commands, or use vi if you’re comfortable with it.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;nb&quot;&gt;cd&lt;/span&gt; /etc/squid/

&lt;span class=&quot;c&quot;&gt;# Comment out some lines&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;sed&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-i&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'s/http_port 3128/#http_port 3128/'&lt;/span&gt; squid.conf
&lt;span class=&quot;nb&quot;&gt;sed&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-i&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'s/http_access deny !Safe_ports/#http_access deny !Safe_ports/'&lt;/span&gt; squid.conf
&lt;span class=&quot;nb&quot;&gt;sed&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-i&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'s/http_access deny CONNECT !SSL_ports/#http_access deny CONNECT !SSL_ports/'&lt;/span&gt; squid.conf

&lt;span class=&quot;c&quot;&gt;# Insert new configuration at the end&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'http_port 3128 ssl-bump \'&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; squid.conf
&lt;span class=&quot;nb&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'    cert=/etc/squid/ssl_cert/myCA.pem \'&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; squid.conf
&lt;span class=&quot;nb&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'    cipher=HIGH:MEDIUM:!LOW:!aNULL:!eNULL:!MD5:!EXP:!PSK:!SRP:!DSS \'&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; squid.conf
&lt;span class=&quot;nb&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'    options=NO_TICKET,ALL \'&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; squid.conf
&lt;span class=&quot;nb&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'    generate-host-certificates=on dynamic_cert_mem_cache_size=4MB'&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; squid.conf
&lt;span class=&quot;nb&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;''&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; squid.conf
&lt;span class=&quot;nb&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'visible_hostname squid-oldssl-proxy'&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; squid.conf
&lt;span class=&quot;nb&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'ssl_bump bump all'&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; squid.conf
&lt;span class=&quot;nb&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'tcp_outgoing_address 0.0.0.0'&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; squid.conf
&lt;span class=&quot;nb&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'sslproxy_cert_sign_hash sha1'&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; squid.conf&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;We need to generate an old, outdated CAcert, which is no longer supported by OpenSSL. Let’s recompile it with deprecated security enabled. This may take 1-2 hours on older hardware.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;adduser user &lt;span class=&quot;nt&quot;&gt;-D&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-G&lt;/span&gt; abuild

su user bash &lt;span class=&quot;nt&quot;&gt;-c&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'cd &amp;amp;&amp;amp; git clone https://github.com/alpinelinux/aports.git --depth 1'&lt;/span&gt;
su user bash &lt;span class=&quot;nt&quot;&gt;-c&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'abuild-keygen -a &amp;lt; /dev/null'&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;cd&lt;/span&gt; /home/user/aports/main/openssl/

&lt;span class=&quot;nb&quot;&gt;sed&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-i&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'s/no-ssl3/enable-ssl3 enable-ssl3-method/'&lt;/span&gt; APKBUILD
&lt;span class=&quot;nb&quot;&gt;sed&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-i&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'s/no-weak-ssl-ciphers/enable-weak-ssl-ciphers/'&lt;/span&gt; APKBUILD

su user bash &lt;span class=&quot;nt&quot;&gt;-c&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'cd /home/user/aports/main/openssl/ &amp;amp;&amp;amp; abuild -r&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Let’s generate the certificates. 1024 bit RSA keys and SHA-1 signatures are no longer considered secure, but they’re fine for communication between XP and the Linux VM.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;nb&quot;&gt;cd&lt;/span&gt; /etc/squid/ssl_cert
&lt;span class=&quot;nb&quot;&gt;mkdir &lt;/span&gt;public
openssl req &lt;span class=&quot;nt&quot;&gt;-new&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-newkey&lt;/span&gt; rsa:1024 &lt;span class=&quot;nt&quot;&gt;-sha1&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-days&lt;/span&gt; 1825 &lt;span class=&quot;nt&quot;&gt;-nodes&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-x509&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-extensions&lt;/span&gt; v3_ca &lt;span class=&quot;nt&quot;&gt;-subj&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'/C=AU/ST=Some-State/O=OldSSL Proxy'&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-keyout&lt;/span&gt; myCA.pem &lt;span class=&quot;nt&quot;&gt;-out&lt;/span&gt; myCA.pem &lt;span class=&quot;nt&quot;&gt;-batch&lt;/span&gt;
openssl x509 &lt;span class=&quot;nt&quot;&gt;-in&lt;/span&gt; myCA.pem &lt;span class=&quot;nt&quot;&gt;-outform&lt;/span&gt; DER &lt;span class=&quot;nt&quot;&gt;-out&lt;/span&gt; public/OldSSL.der
openssl x509 &lt;span class=&quot;nt&quot;&gt;-in&lt;/span&gt; myCA.pem &lt;span class=&quot;nt&quot;&gt;-outform&lt;/span&gt; PEM &lt;span class=&quot;nt&quot;&gt;-out&lt;/span&gt; public/OldSSL.crt

&lt;span class=&quot;nb&quot;&gt;chown &lt;/span&gt;squid:squid &lt;span class=&quot;nt&quot;&gt;-R&lt;/span&gt; /etc/squid/ssl_cert/&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;h2 id=&quot;download-self-signed-certificates&quot;&gt;Download self-signed certificates&lt;/h2&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;c&quot;&gt;# Get your local IP address. Mine was 192.168.88.131&lt;/span&gt;
ip addr
&lt;span class=&quot;c&quot;&gt;# Run an HTTP server to serve the certificates&lt;/span&gt;
darkhttpd /etc/squid/ssl_cert/public/ &lt;span class=&quot;nt&quot;&gt;--port&lt;/span&gt; 3180 &lt;span class=&quot;nt&quot;&gt;--daemon&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;In any browser, navigate to your VM’s IP address at port 3180 and download the certificates. For me, this was &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;http://192.168.88.131:3180&lt;/code&gt;. (Use the output of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ip addr&lt;/code&gt; to figure out your VM’s address.)&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/firefox-cert.PNG&quot; alt=&quot;Firefox browser navigated to 192.168.88.131:3180&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;start-the-proxy-service&quot;&gt;Start the proxy service&lt;/h2&gt;

&lt;p&gt;Finally, run squid proxy. If you see any errors, check the log in &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/var/log/squid/cache.log&lt;/code&gt;&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;squid&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Enable the service to make squid start automatically with the VM:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;rc-update add squid default&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;h2 id=&quot;install-the-certificates&quot;&gt;Install the certificates&lt;/h2&gt;

&lt;p&gt;Double-click on the .crt file and say yes to the prompts. This adds it to the built-in Windows certificate store.&lt;/p&gt;

&lt;p&gt;In Firefox, you need to go to Tools &amp;gt; Options &amp;gt; Advanced &amp;gt; Certificates &amp;gt; View Certificates &amp;gt; Authorities &amp;gt; Import and import your .crt file.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/firefox-cert-2.PNG&quot; alt=&quot;Firefox opened to certificate import pane&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;set-up-the-proxy&quot;&gt;Set up the proxy&lt;/h2&gt;

&lt;p&gt;In Internet Explorer, go to Tools &amp;gt; Internet Options &amp;gt; Connections &amp;gt; LAN Settings. Enter the proxy in the lower box, with the IP address of your VM and the port 3128.&lt;/p&gt;

&lt;p&gt;In Firefox, go to Tools &amp;gt; Options &amp;gt; Advanced &amp;gt; Network &amp;gt; Connection Settings. Check “Manual proxy configuration” and enter the IP address of your VM and port 3128.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/firefox-proxy.PNG&quot; alt=&quot;Firefox proxy settings&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;conclusion&quot;&gt;Conclusion&lt;/h2&gt;

&lt;p&gt;Everything should now be working! You can check the status of the squid service with &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;rc-service squid status&lt;/code&gt;. If you’re having issues, check the logs under &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/var/log/squid/&lt;/code&gt;.&lt;/p&gt;</content><author><name>Kian Bradley</name></author><category term="linux" /><category term="xp" /><category term="windows" /><category term="squid" /><category term="proxy" /><category term="tls" /><category term="ssl" /><summary type="html">I managed to get modern SSL/TLS connections working under Windows XP, by running a lightweight Linux VM which strips the TLS headers and re-applies a self-signed certificate:</summary></entry><entry><title type="html">Running rumprun for Xen in Ubuntu 16.04</title><link href="https://kianbradley.com/2016/08/25/rumprun-xen.html" rel="alternate" type="text/html" title="Running rumprun for Xen in Ubuntu 16.04" /><published>2016-08-25T20:57:23-07:00</published><updated>2016-08-25T20:57:23-07:00</updated><id>https://kianbradley.com/2016/08/25/rumprun-xen</id><content type="html" xml:base="https://kianbradley.com/2016/08/25/rumprun-xen.html">&lt;p&gt;Running rumprun under Xen isn’t hard, but it’s less documented than running it under KVM. This page is similar to &lt;a href=&quot;https://github.com/rumpkernel/wiki/wiki/Tutorial:-Building-Rumprun-Unikernels&quot;&gt;Rumprun’s guide to building rumprun unikernels&lt;/a&gt; with a few Xen-specific changes.&lt;/p&gt;

&lt;h2 id=&quot;build-the-rumprun-platform&quot;&gt;Build the rumprun platform&lt;/h2&gt;
&lt;p&gt;Install prerequisite xen headers and build tools:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;apt-get &lt;span class=&quot;nb&quot;&gt;install &lt;/span&gt;build-essential libxen-dev&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Clone their repo, cd, build:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;git clone http://repo.rumpkernel.org/rumprun
&lt;span class=&quot;nb&quot;&gt;cd &lt;/span&gt;rumprun
git submodule update &lt;span class=&quot;nt&quot;&gt;--init&lt;/span&gt;
&lt;span class=&quot;nv&quot;&gt;CC&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;cc ./build-rr.sh xen&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;h2 id=&quot;add-binaries-to-path&quot;&gt;Add binaries to PATH&lt;/h2&gt;
&lt;p&gt;You’ve now build rumprun and the binaries necessary for building, baking, running are located in rumprun/bin. You’ll want to these to your &lt;a href=&quot;https://en.wikipedia.org/wiki/PATH_(variable)&quot;&gt;PATH variable&lt;/a&gt; for convenient access:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;nb&quot;&gt;export &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;PATH&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;${&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;PATH&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;$(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;pwd&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;/rumprun/bin&quot;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;You can also add this to your ~/.bashrc to make these changes permanent.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;vim ~/.bashrc&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Append the following, where [location of rumprun] represents the directory containing rumprun:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;nb&quot;&gt;export &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;PATH&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$PATH&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;:[location of rumprun]/rumprun/bin&quot;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;h2 id=&quot;building-applications&quot;&gt;Building applications&lt;/h2&gt;
&lt;p&gt;Get some source code and use rumprun’s version of gcc to compile it. (Follow the &lt;a href=&quot;https://github.com/rumpkernel/wiki/wiki/Tutorial:-Building-Rumprun-Unikernels&quot;&gt;rumprun tutorial&lt;/a&gt; for a more thorough explanation…)&lt;/p&gt;

&lt;p&gt;Here, helloer.c is our source code and helloer-rumprun is the output binary.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;x86_64-rumprun-netbsd-gcc &lt;span class=&quot;nt&quot;&gt;-o&lt;/span&gt; helloer-rumprun helloer.c&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;h2 id=&quot;baking-applications&quot;&gt;Baking applications&lt;/h2&gt;
&lt;p&gt;I was going to make a joke here but I can’t think of anything clever right now. You need to bake it. That means running a command to add in all the kernel-y bits that makes rumprun ready for it.&lt;/p&gt;

&lt;p&gt;Here, helloer-rumprun is the binary we just built and helloer-rumprun.bin is the the binary with the necessary rumprun pieces.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;rumprun-bake xen_pv helloer-rumprun.bin helloer-rumprun&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;h2 id=&quot;running-applications&quot;&gt;Running applications&lt;/h2&gt;
&lt;p&gt;Here’s the hard part. The rumprun command is a script that will create a Xen configuration file in /tmp and start up a Xen PV guest. For xen, it will look like this:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;rumprun &lt;span class=&quot;nt&quot;&gt;-S&lt;/span&gt; xen &lt;span class=&quot;nt&quot;&gt;-id&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-g&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;Xen config options] &lt;span class=&quot;nt&quot;&gt;-I&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;network interface] &lt;span class=&quot;nt&quot;&gt;-W&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;more network options]&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;The -I and -W commands can be omitted if there is no need for networking. I have networking set up using a NAT, in which there exists a subnet local to the machine. Look at my &lt;a href=&quot;/setting-up-nat-networking-in-xen-using-virsh.html&quot;&gt;article on Xen networking&lt;/a&gt; to see how I set up networking within rumprun.&lt;/p&gt;</content><author><name>Kian Bradley</name></author><category term="xen" /><summary type="html">Running rumprun under Xen isn’t hard, but it’s less documented than running it under KVM. This page is similar to Rumprun’s guide to building rumprun unikernels with a few Xen-specific changes.</summary></entry><entry><title type="html">Setting up NAT networking in Xen using virsh</title><link href="https://kianbradley.com/2016/08/25/xen-networking.html" rel="alternate" type="text/html" title="Setting up NAT networking in Xen using virsh" /><published>2016-08-25T20:57:22-07:00</published><updated>2016-08-25T20:57:22-07:00</updated><id>https://kianbradley.com/2016/08/25/xen-networking</id><content type="html" xml:base="https://kianbradley.com/2016/08/25/xen-networking.html">&lt;p&gt;There are two main ways to set up networking in Xen. You can use a bridged network, or you can set up NAT. A bridged network means that the guest domains will talk to the router directly to get an IP address. NAT networking creates a subnet local to your machine, and the guest domains will talk to dom0 to get an IP address.&lt;/p&gt;

&lt;p&gt;Neither one is better than the other, really. Bridged networking is slightly simpler if you want something that just works. NAT-ing will create an internal network that allows for simpler local (domain-to-domain) communication and greater control over external communication. The downside is that you’ll need to set up a static IP per guest and set iptables rules to allow for external communication.&lt;/p&gt;

&lt;h2 id=&quot;installing-virsh&quot;&gt;Installing virsh&lt;/h2&gt;
&lt;p&gt;Install libvirt:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;apt-get &lt;span class=&quot;nb&quot;&gt;install &lt;/span&gt;libvirt-bin libvirt0&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Check that it’s been installed, and that the default network is in place:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;virsh net-list &lt;span class=&quot;nt&quot;&gt;--all&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;h2 id=&quot;set-static-ip-associate-each-ip-with-a-mac-address&quot;&gt;Set static IP, associate each IP with a mac address&lt;/h2&gt;
&lt;p&gt;Edit the default virsh config:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;virsh net-edit default&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Under the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;dhcp&amp;gt;&lt;/code&gt; tag, add a listing for each guest. The name can be whatever you want it to be.&lt;/p&gt;

&lt;p&gt;For the MAC address, the first 3 bytes should not be changed, this is the &lt;a href=&quot;https://en.wikipedia.org/wiki/Organizationally_unique_identifier&quot;&gt;OUI&lt;/a&gt; assigned to the Xen project. The last 3 can be whatever you like.&lt;/p&gt;

&lt;p&gt;This is my DHCP configuration, with three guest domains configured:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-xml&quot; data-lang=&quot;xml&quot;&gt;&lt;span class=&quot;nt&quot;&gt;&amp;lt;dhcp&amp;gt;&lt;/span&gt;
	&lt;span class=&quot;nt&quot;&gt;&amp;lt;range&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;start=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;'192.168.122.128'&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;end=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;'192.168.122.254'&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt;
	&lt;span class=&quot;nt&quot;&gt;&amp;lt;host&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;mac=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;'00:16:3e:00:00:02'&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;name=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;'osv'&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;ip=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;'192.168.122.2'&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt;
	&lt;span class=&quot;nt&quot;&gt;&amp;lt;host&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;mac=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;'00:16:3e:00:00:03'&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;name=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;'ubuntu'&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;ip=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;'192.168.122.3'&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt;
	&lt;span class=&quot;nt&quot;&gt;&amp;lt;host&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;mac=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;'00:16:3e:00:00:04'&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;name=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;'rumprun'&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;ip=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;'192.168.122.4'&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;/dhcp&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;h2 id=&quot;setting-up-a-guest-domain-with-nat&quot;&gt;Setting up a guest domain with NAT&lt;/h2&gt;
&lt;h3 id=&quot;standard-xen-cfg&quot;&gt;standard xen cfg&lt;/h3&gt;
&lt;p&gt;In your Xen guest configuration file, add the following virtual interface, where mac corrosponds with the virsh configuration:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-python&quot; data-lang=&quot;python&quot;&gt;&lt;span class=&quot;n&quot;&gt;vif&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;'mac=00:16:3e:00:00:03,bridge=virbr0'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;h3 id=&quot;rumprun-unikernel&quot;&gt;rumprun unikernel&lt;/h3&gt;
&lt;p&gt;The rumprun unikernel is launched with the rumprun script. Here “newnet” is used internally by the script and can be set to whatever you like. rumprun_image.bin represents the baked rumprun binary you are running:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;rumprun &lt;span class=&quot;nt&quot;&gt;-S&lt;/span&gt; xen &lt;span class=&quot;nt&quot;&gt;-id&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-I&lt;/span&gt; newnet,xenif,&lt;span class=&quot;s1&quot;&gt;'bridge=virbr0,mac=00:16:3e:00:00:04'&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-W&lt;/span&gt; newnet,inet,dhcp rumprun_image.bin0&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;</content><author><name>Kian Bradley</name></author><category term="xen" /><summary type="html">There are two main ways to set up networking in Xen. You can use a bridged network, or you can set up NAT. A bridged network means that the guest domains will talk to the router directly to get an IP address. NAT networking creates a subnet local to your machine, and the guest domains will talk to dom0 to get an IP address.</summary></entry><entry><title type="html">Setting up Xen in Ubuntu 16.04</title><link href="https://kianbradley.com/2016/08/25/installing-xen.html" rel="alternate" type="text/html" title="Setting up Xen in Ubuntu 16.04" /><published>2016-08-25T20:57:21-07:00</published><updated>2016-08-25T20:57:21-07:00</updated><id>https://kianbradley.com/2016/08/25/installing-xen</id><content type="html" xml:base="https://kianbradley.com/2016/08/25/installing-xen.html">&lt;p&gt;Xen is the future, you guys. While KVM has very good support and widespread use, the fact that it exists as a Linux kernel module means it runs as basically another process under linux, with all of the scheduling issues and limitations that come along with being a process. Xen works by “pinning” the host and guest operating systems to specific cores, allowing for much greater separation of guests. In Xen, the guest is running alongside the host, instead of under it. The host, aka “dom0”, sits meekly alongside with the permissions to administer guests.&lt;/p&gt;

&lt;h2 id=&quot;install-the-xen-hypervisor&quot;&gt;Install the Xen hypervisor&lt;/h2&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;apt-get &lt;span class=&quot;nb&quot;&gt;install &lt;/span&gt;xen-hypervisor-amd64&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Change Ubuntu’s grub bootloader to customize how Xen boots. The following gives Xen dom0 1 cpu, “pins” it (cpu assigned to dom0 won’t change), and gives 4gb memory.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;vim /etc/default/grub&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;add the following line:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;nv&quot;&gt;GRUB_CMDLINE_XEN_DEFAULT&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;dom0_max_vcpus=1 dom0_cpus_pin dom0_mem=4G,max:4G&quot;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;update grub:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;update-grub&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;h2 id=&quot;create-a-disk-for-use-with-xen&quot;&gt;Create a disk for use with Xen&lt;/h2&gt;
&lt;p&gt;This can be done in several different ways. Here I use LVM to create a new logical volume.&lt;/p&gt;

&lt;p&gt;Basically, you’ll figure out what the name of your existing &lt;em&gt;volume group&lt;/em&gt; is, then add another &lt;em&gt;logical volume&lt;/em&gt; into that.&lt;/p&gt;

&lt;p&gt;List volume groups with&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;vgs&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Mine is called &lt;em&gt;pcp-d-15-vg&lt;/em&gt;. I create a 16gb logical volume with the name &lt;em&gt;xen_1&lt;/em&gt;:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;lvcreate &lt;span class=&quot;nt&quot;&gt;-L&lt;/span&gt; 16G pcp-d-15-vg &lt;span class=&quot;nt&quot;&gt;-n&lt;/span&gt; xen_1&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;&lt;em&gt;More information on using LVM: &lt;a href=&quot;http://tldp.org/HOWTO/LVM-HOWTO/&quot;&gt;tldp.org/HOWTO/LVM-HOWTO&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h2 id=&quot;making-a-config-file&quot;&gt;Making a config file&lt;/h2&gt;
&lt;p&gt;There are a lot of options that go into making a xen cfg file. Below is provided a basic config with some explanations, but google around as needed to get a better understanding.&lt;/p&gt;

&lt;h3 id=&quot;pv-or-hvm&quot;&gt;PV or HVM?&lt;/h3&gt;
&lt;p&gt;There are two ways to run Xen: HVM or PV mode. HVM stands for Hardware Virtualization Mode, and PV stands for Paravirtualized. Traditionally, HVM provided more efficient emulation, as it gave the guest more direct access to hardware; paravirtualization provides a “paravirtualized” interface for the guest to run on, and requires the guest have paravirtualized driver support. Recently, better paravirtualized driver support in Linux and better interaction between Xen and hardware virtualization has led to paravirtualized mode actually being the better option over HVM. (Interestingly, one of the biggest places PV shines over HVM is in page table and TLB virtualization; see &lt;a href=&quot;https://wiki.xen.org/wiki/X86_Paravirtualised_Memory_Management&quot;&gt;wiki.xen.org/wiki/X86_Paravirtualised_Memory_Management&lt;/a&gt;).&lt;/p&gt;

&lt;h3 id=&quot;sample-xencfg&quot;&gt;sample xen.cfg&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;I recommend you follow &lt;a href=&quot;https://help.ubuntu.com/community/Xen&quot;&gt;this guide&lt;/a&gt; on how to set up a new Ubuntu guest using their bootloader code. If you already have a prepared disk image, skip the kernel and ramdisk images and go ahead and uncomment bootloader.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;tsc_mode is something complicated to do with the emulation of x86 timer instructions. read more here: &lt;a href=&quot;https://xenbits.xen.org/docs/4.3-testing/misc/tscmode.txt&quot;&gt;xenbits.xen.org/docs/4.3-testing/misc/tscmode.txt&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-python&quot; data-lang=&quot;python&quot;&gt;&lt;span class=&quot;n&quot;&gt;name&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;example ubuntu guest&quot;&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;# memory in megabytes
&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;memory&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2048&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;# number of cpus, which cpus this guest is pinned to
&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;vcpus&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;4&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;cpus&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;5-8&quot;&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;tsc_mode&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;native&quot;&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;kernel&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;/var/lib/xen/images/ubuntu-netboot/trusty14LTS/vmlinuz&quot;&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;ramdisk&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;/var/lib/xen/images/ubuntu-netboot/trusty14LTS/initrd.gz&quot;&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;#bootloader = &quot;/usr/lib/xen-4.4/bin/pygrub&quot;
&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;disk&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;'/dev/pcp-d-15-vg/xen_1,raw,xvda,rw'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;See my xen networking article for info on how to set up networking: &lt;a href=&quot;/2016/08/25/xen-networking.html&quot;&gt;Setting up NAT networking in Xen using virsh&lt;/a&gt;&lt;/p&gt;

&lt;h2 id=&quot;starting-up-xen&quot;&gt;Starting up Xen&lt;/h2&gt;
&lt;p&gt;The Xen control program is called xl. Given config file “xen.cfg”, start up a guest domain like&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;xl create xen.cfg&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;If it works, it will have started in the background and you will need to attach to the guest’s console in order to control it.&lt;/p&gt;

&lt;p&gt;First you’ll need the guest domains’ id (domid). List domain IDs by typing&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;xl list&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Attach to the console by typing&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;xl console DOMID&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;You can then detach from this console with the hotkey ctrl-] (control and right bracket).&lt;/p&gt;

&lt;p&gt;A domain can then be shut down by issuing a instructing the guest operating system to shutdown (e.g. the Linux shutdown command), or using xl.&lt;/p&gt;

&lt;p&gt;Gracefully request an OS shutdown with the command&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;xl shutdown DOMID&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Force an immediate shutdown with&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;xl destroy DOMID&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;</content><author><name>Kian Bradley</name></author><category term="xen" /><summary type="html">Xen is the future, you guys. While KVM has very good support and widespread use, the fact that it exists as a Linux kernel module means it runs as basically another process under linux, with all of the scheduling issues and limitations that come along with being a process. Xen works by “pinning” the host and guest operating systems to specific cores, allowing for much greater separation of guests. In Xen, the guest is running alongside the host, instead of under it. The host, aka “dom0”, sits meekly alongside with the permissions to administer guests.</summary></entry></feed>