IPv6 Teredo Parser

Parse Teredo IPv6 addresses to extract server IPv4, flags, mapped port, and client IPv4

Teredo Tunneling: Allows IPv6 connectivity for hosts behind IPv4 NATs by encapsulating IPv6 packets in IPv4 UDP.
Address Format: 2001:0000:SSSS:SSSS:FFFF:PPPP:CCCC:CCCC where components are encoded and obfuscated.
Obfuscation: Client IP and port are XOR'ed to prevent some NATs from interfering with the tunnel.

Quick Examples

Enter any Teredo IPv6 address in compressed or full format

Teredo Components

Address Structure

2001:0000:4136:e378:8000:63bf:3fff:fdd2
2001:0000
Teredo identifier
4136:e378
IPv4: 65.54.227.120
8000
Cone NAT
63bf
Actual: 40000
3fff:fdd2
IPv4: 192.0.2.45

Extracted Components

Teredo Server
65.54.227.120
The Teredo relay server handling this tunnel
Client IPv4
192.0.2.45
The client's external IPv4 address (XOR decoded)
Client Port
40000
The client's external port (XOR decoded with FFFF)
NAT Type
Cone NAT
Indicates the type of NAT the client is behind

Technical Details

Obfuscated Port: 63bf
Obfuscated Client: 3fff:fdd2
Port Calculation: 63bf XOR FFFF = 40000
Tunnel Protocol: IPv6-in-IPv4 via UDP port 3544

Parsing Steps

1
1. Teredo prefix: 2001:0000 (identifies this as a Teredo tunnel)
2
2. Server IPv4: 4136:e378 → 65.54.227.120
3
3. Flags: 8000 → Cone NAT
4
4. Client port: 63bf XOR FFFF → 40000
5
5. Client IPv4: 3fff:fdd2 XOR FFFFFFFF → 192.0.2.45

What is Teredo?

Teredo is an IPv6 transition technology that allows IPv6 connectivity for hosts located behind IPv4 NATs. It tunnels IPv6 packets inside IPv4 UDP datagrams, enabling communication with the IPv6 Internet.

Why Obfuscation?

The client IP and port are XOR'ed with known values to prevent some NAT devices from automatically translating these embedded addresses, which would break the Teredo mechanism.

NAT Detection

The flags field indicates whether the client is behind a cone NAT (more permissive) or restricted NAT (more restrictive), which affects how the tunnel operates and performs.

Legacy Technology

Teredo was important during IPv6 transition but is less common today. Modern systems prefer native IPv6 or other transition mechanisms like 6to4 or NAT64.