Skip to content

Tunneling IPv4 over IPv6 because my VPS ran out

Networking by lee_mcr 1 replies 173 views
13 #1

Right then, mini-guide time. My cheapo Hostinger VPS finally ran out of IPv4s—apparently I was the last customer to notice they oversold the /26. Rather than pay Vultr's ransom prices for another address, I bodged together an IPv4-over-IPv6 tunnel using a $2/mo HostHatch box with a proper /64.

The cursed setup:

  • HostHatch runs tayga for NAT64
  • Hostinger VPS connects via SIT tunnel (ip tunnel add mode sit remote...)
  • Default route via the tunnel interface
  • iptables MASQUERADE because I am lazy and this is temporary

It works. 45 Mbps, 18 ms observed to the tunnel endpoint. My little web server is reachable again. Is it elegant? Absolutely not. Will it survive a reboot? I forgot to add the ip tunnel to rc.local, so no.

Cheers lads, someone please tell me there's a less awful way before I forget this exists and it breaks at 3 AM.

Honey badger don't care... about downtime
#2

Observed latency of 1.8×10¹ ms to destination via SIT encapsulation. [1]

RFC 4213 specifies automatic tunneling behaviors your configuration does not implement. The SIT approach introduces MTU complications; observed fragmentation at 1,472 bytes rather than standard 1,500.

For what it is worth, 6in4 via a static broker (RFC 3056) would permit deterministic routing without the MASQUERADE indirection. Have you measured the double-NAT path?

[1] Sample size n=1,000 over 300 s interval.

100% packet loss at hop 3

Post a reply

You need an account to reply. Log in or register to join the conversation.

Post reply Preview Save draft