<?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 foosel.net</title><link>https://foosel.net/tags/ipv6/</link><description>Recent content in Ipv6 on foosel.net</description><generator>Hugo</generator><language>en-us</language><copyright>Gina Häußge (foosel)</copyright><lastBuildDate>Fri, 23 Jan 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://foosel.net/tags/ipv6/feed.xml" rel="self" type="application/rss+xml"/><item><title>How to work around tailscale breaking IPv6 on the host</title><link>https://foosel.net/til/how-to-work-around-tailscale-breaking-ipv6-on-the-host/</link><pubDate>Fri, 23 Jan 2026 00:00:00 +0000</pubDate><guid>https://foosel.net/til/how-to-work-around-tailscale-breaking-ipv6-on-the-host/</guid><description>&lt;p&gt;Yesterday I ran into an incredibly weird issue. I installed the &lt;a href="https://tailscale.com/"&gt;Tailscale&lt;/a&gt; client on two of my virtual servers hosted in the Hetzner Cloud (running Ubuntu) and suddenly the websites they offered stopped working. I suspected Tailscale and indeed, &lt;code&gt;tailscale down&lt;/code&gt; immediately restored functionality.&lt;/p&gt;
&lt;p&gt;The websites in question are actually on GitHub Pages and my servers are just acting as reverse proxy to resolve domain and TLS, and a look into the web server&amp;rsquo;s &lt;code&gt;error.log&lt;/code&gt; showed that the issue in serving was that the server could no longer reach its upstream at &lt;code&gt;github.io&lt;/code&gt; when Tailscale was active. It wasn&amp;rsquo;t a general loss of external connectivity though - IPv4 addresses still worked great, the webserver however was trying to connect to the upstream via IPv6 and this is where things failed.&lt;/p&gt;</description><content:encoded><![CDATA[<p>Yesterday I ran into an incredibly weird issue. I installed the <a href="https://tailscale.com/">Tailscale</a> client on two of my virtual servers hosted in the Hetzner Cloud (running Ubuntu) and suddenly the websites they offered stopped working. I suspected Tailscale and indeed, <code>tailscale down</code> immediately restored functionality.</p>
<p>The websites in question are actually on GitHub Pages and my servers are just acting as reverse proxy to resolve domain and TLS, and a look into the web server&rsquo;s <code>error.log</code> showed that the issue in serving was that the server could no longer reach its upstream at <code>github.io</code> when Tailscale was active. It wasn&rsquo;t a general loss of external connectivity though - IPv4 addresses still worked great, the webserver however was trying to connect to the upstream via IPv6 and this is where things failed.</p>
<p>I did some quick tests, pinging Google&rsquo;s DNS on both IPv4 (<code>8.8.8.8</code>) and IPv6 (<code>2001:4860:4860::8888</code>) with Tailscale running, and that showed that while Tailscale was running, IPv6 connectivity just broke down completely while IPv4 continued to work:</p>
<pre tabindex="0"><code>$ sudo tailscale up &amp;&amp; ping -c 3 8.8.8.8 &amp;&amp; sudo tailscale down
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=117 time=3.98 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=117 time=3.69 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=117 time=3.63 ms

--- 8.8.8.8 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2002ms
rtt min/avg/max/mdev = 3.631/3.771/3.986/0.162 ms

$ sudo tailscale up &amp;&amp; ping -c 3 2001:4860:4860::8888 &amp;&amp; sudo tailscale down
PING 2001:4860:4860::8888(2001:4860:4860::8888) 56 data bytes

--- 2001:4860:4860::8888 ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 2051ms
</code></pre><p>As a next step, I checked the route that would be taken for resolving <code>2001:4860:4860::8888</code> with and without Tailscale:</p>
<pre tabindex="0"><code>$ ip route get 2001:4860:4860::8888
2001:4860:4860::8888 from :: via fe80::1 dev eth0 src aaaa:bbbb:cccc:dddd::1 metric 1024 pref medium

$ sudo tailscale up &amp;&amp; ip route get 2001:4860:4860::8888 &amp;&amp; sudo tailscale down
2001:4860:4860::8888 from :: via fe80::1 dev eth0 src fd7a:115c:a1e0::aaaa:bbbb metric 1024 pref medium
</code></pre><p>So, the issue was that for some reason, while Tailscale was running the system decided to use Tailscale&rsquo;s internal IPv6 <code>fd7a:115c:a1e0::aaaa:bbbb</code> set on <code>tailscale0</code> as the source IP but send the packet through the default route and <code>eth0</code>, and that didn&rsquo;t work. It basically hijacked the IPv6 traffic, even when the Tailnet wasn&rsquo;t even involved.</p>
<p>The routes looked fine to me and some buddies I asked also didn&rsquo;t spot anything amiss:</p>
<pre tabindex="0"><code>$ ip -6 rule show
0:      from all lookup local
5210:   from all fwmark 0x80000/0xff0000 lookup main
5230:   from all fwmark 0x80000/0xff0000 lookup default
5250:   from all fwmark 0x80000/0xff0000 unreachable
5270:   from all lookup 52
32766:  from all lookup main

$ ip -6 route show table local
local ::1 dev lo proto kernel metric 0 pref medium
local aaaa:bbbb:cccc:dddd::1 dev eth0 proto kernel metric 0 pref medium
local fd7a:115c:a1e0::aaaa:bbbb dev tailscale0 proto kernel metric 0 pref medium
local fe80::5fdc:58a7:1a93:da5a dev tailscale0 proto kernel metric 0 pref medium
local fe80::9400:ff:fe0d:61a1 dev eth0 proto kernel metric 0 pref medium
multicast ff00::/8 dev eth0 proto kernel metric 256 pref medium
multicast ff00::/8 dev tailscale0 proto kernel metric 256 pref medium

$ ip -6 route show table 52
fd7a:115c:a1e0::53 dev tailscale0 metric 1024 pref medium
fd7a:115c:a1e0::/48 dev tailscale0 metric 1024 pref medium

$ ip -6 route show table main
aaaa:bbbb:cccc:dddd::/64 dev eth0 proto kernel metric 256 pref medium
fd7a:115c:a1e0::aaaa:bbbb dev tailscale0 proto kernel metric 256 pref medium
fe80::/64 dev eth0 proto kernel metric 256 pref medium
default via fe80::1 dev eth0 metric 1024 pref medium
</code></pre><p>From what I could see, firing up Tailscale would add the following new rules to the routing table:</p>
<pre tabindex="0"><code>$ ip route show table all &gt; ts-off.txt
$ sudo tailscale up &amp;&amp; ip route show table all &gt; ts-on.txt &amp;&amp; sudo tailscale down
$ diff ts-off.txt ts-on.txt
0a1,2
&gt; 100.a.b.c dev tailscale0 table 52
&gt; 100.100.100.100 dev tailscale0 table 52
3a6
&gt; local 100.x.y.z dev tailscale0 table local proto kernel scope host src 100.x.y.z
12a16,17
&gt; fd7a:115c:a1e0::53 dev tailscale0 table 52 metric 1024 pref medium
&gt; fd7a:115c:a1e0::/48 dev tailscale0 table 52 metric 1024 pref medium
13a19
&gt; fd7a:115c:a1e0::aaaa:bbbb dev tailscale0 proto kernel metric 256 pref medium
17a24
&gt; local fd7a:115c:a1e0::aaaa:bbbb dev tailscale0 table local proto kernel metric 0 pref medium
</code></pre><p>I still have not figured out what is actually going on there, and a reproduction on a fresh server so far also wasn&rsquo;t successful. The problem is that packets are being sent with the wrong source IPv6, but that&rsquo;s just a symptom of the underlying cause.</p>
<p>Thankfully, my buddy Jub came up with the workaround to change the default route to use a fixed IPv6 source address - the correct one - and that solved the issue (by fixing the symptom):</p>
<pre tabindex="0"><code>ip -6 route replace default via fe80::1 dev eth0 src aaaa:bbbb:cccc:dddd::1
</code></pre><p>I put that on a new <code>post-up</code> line into the network setup in <code>/etc/network/interface.d/50-cloud-init.cfg</code></p>
<pre tabindex="0"><code>auto eth0:0
iface eth0:0 inet6 static
    address aaaa:bbbb:cccc:dddd::/64
    gateway fe80::1
    post-up route add -net :: netmask 0 gw fe80::1%eth0 || true
    post-up ip -6 route replace default via fe80::1 dev eth0 src aaaa:bbbb:cccc:dddd::1 || true
    pre-down route del -net :: netmask 0 gw fe80::1%eth0 || true
</code></pre><p>A reboot confirmed that this works as a <strong>workaround</strong>.</p>
<p>But as I mentioned, I still can&rsquo;t make any sense of the underlying issue. I found <a href="https://github.com/tailscale/tailscale/issues/17936">one open bug report in Tailscale&rsquo;s bug tracker</a> that sounded familiar, but it didn&rsquo;t fully match my situation. I also have to admit that my administration skills kinda get a bit fuzzy when it comes to full blown route analysis &amp; debugging - so should you have any ideas at all what is actually causing this behaviour here, please get in touch <a href="https://chaos.social/@foosel">on Mastodon</a> - I&rsquo;d love to see this mystery solved, but am out of my depth here 😅</p>
]]></content:encoded></item></channel></rss>