Skip to content

IPv6 Transition Tunnels

IPv6 transition tunnels carry IPv6 packets inside IPv4. They were built to give a host IPv6 connectivity on a network that only speaks IPv4, and operating systems and routers can set them up without anyone asking for it. Windows, for example, shipped with Teredo turned on for many years.

The effect on a network is the same as with any other tunnel: the IPv6 traffic inside is invisible to controls that only look at IPv4. A firewall that filters IPv4 sees one UDP conversation or one stream of IP protocol 41 packets, not the connections inside. A host with a working tunnel has a global IPv6 address and may be reachable from the internet over it, past the NAT of the network. Attackers use the same tunnels on purpose, to get traffic out of a network that does not watch IPv6.

Transition tunnels are not encrypted and are not VPNs. Nzyme lists them on their own IPv6 Transition tab of the Tunnels page under Ethernet in the sidebar of your Nzyme web interface, next to the SOCKS and VPN tabs.

Tunnel Types

Type Transport How it works
Teredo UDP A client behind NAT gets a global IPv6 address from a Teredo server and exchanges IPv6 packets with relays and other clients over UDP. Teredo addresses start with 2001:0::/32. RFC 4380.
6in4 IP protocol 41, without ports IPv6 packets are put directly into IPv4 packets between two configured endpoints, for example to a tunnel broker. RFC 4213.
6to4 IP protocol 41, without ports Like 6in4, but the IPv6 addresses are derived from the IPv4 address of the router: 2002::/16 followed by that address. Traffic goes to a relay or directly to another 6to4 router. RFC 3056.
ISATAP IP protocol 41, without ports Like 6in4, but inside a site. Hosts derive their IPv6 address from their own IPv4 address and tunnel to an ISATAP router. RFC 5214.

How Nzyme Detects Transition Tunnels

The taps identify transition tunnels from the structure of the packets. Nothing is matched on port numbers.

Teredo

Only the Teredo server listens on a fixed port, 3544. Clients and relays talk on whatever port their NAT gave them. A UDP conversation is therefore a Teredo tunnel when every datagram of it is a well-formed Teredo packet:

  • A complete IPv6 packet whose length matches the datagram and whose source or destination is a Teredo address
  • A router solicitation or router advertisement between link-local addresses, which is how a client obtains its address from a server. Nzyme calls this exchange the qualification.
  • A bubble, an IPv6 packet without payload that keeps the NAT mapping open
  • Any of these behind the authentication and origin indication headers that Teredo puts in front

A conversation that carries anything else is not a Teredo tunnel. A later conversation on the same addresses and ports continues the tunnel.

Qualification Meaning
Complete The solicitation of the client and the advertisement of the server were observed.
Partial Only one of the two was observed.
Not observed Only tunnel traffic was observed. The client most likely qualified before monitoring started.

6in4, 6to4 and ISATAP

These three put the IPv6 packet directly behind the IPv4 header, as IP protocol 41. Nzyme records every pair of IPv4 addresses that exchanges such packets as one tunnel and reads the IPv6 header inside to tell the types apart:

  1. If a tunneled address ends in 5efe followed by the IPv4 address of the tunnel endpoint it belongs to, the tunnel is ISATAP.
  2. If a tunneled address is 2002::/16 followed by the IPv4 address of the tunnel endpoint it belongs to, the tunnel is 6to4.
  3. Everything else is 6in4.

A tunnel that was first recorded as 6in4 becomes one of the more specific types when a later packet shows it. These tunnels have no ports, and they have no TCP or UDP session underneath. Fragments are counted with the tunnel.

Client and Server

For Teredo, the client is the device that started the UDP conversation and the server is its peer, which is a Teredo server, a relay or another client. For the tunnels over IP protocol 41, the client is the endpoint that sent the first packet a tap saw.

What Nzyme Does Not See

Nzyme records that a tunnel exists, between which devices, and how much it carries. It does not unpack the tunnel: the connections inside do not appear on the TCP and UDP pages, and detection does not run on them. For tunnels over IP protocol 41, the IPv6 addresses that talk through the tunnel are recorded with it.

Working With Transition Tunnels

The IPv6 Transition tab lists the tunnels of the selected taps and time range. A chart shows the active tunnels over time, and two rankings show the servers and clients with the most tunnels. The list and its filters work like every other Ethernet search page.

Field Meaning
Tunnel ID A short, copyable ID that links to the details page of the tunnel.
Client, Server The IPv4 addresses and MAC addresses of the two tunnel endpoints. Teredo tunnels also have ports.
Type The tunnel type.
Status Active while packets are seen. A tunnel without packets for 90 seconds is Inactive. Neither kind of tunnel has a message that ends it.
Bytes The bytes of the tunneled packets.
Duration The time between the first and the most recent packet.

The details page of a tunnel adds what was observed inside it:

Detail Meaning
Tunneled addresses on the client side For tunnels over IP protocol 41, the IPv6 addresses that sent packets into the tunnel from the client's end. The first five are recorded.
Tunneled addresses on the server side The same for the server's end.
Packets client to server, server to client Packet counts per direction, for tunnels over IP protocol 41.
Qualification For Teredo, see above.
Messages For Teredo, the kinds of Teredo packets that were seen.

A Teredo tunnel links to the first UDP session it ran over.

Questions these views help answer:

  • Does any device tunnel IPv6 out of the network? On most networks the list should be empty. Every entry is a device that has IPv6 connectivity you may not know about.
  • Is it a default or a decision? A Windows client with a Teredo tunnel to a Microsoft server and little traffic is an operating system default. A 6in4 tunnel to a tunnel broker was configured by someone.
  • Which device is the tunnel endpoint? The client MAC address and its asset tell. A router that tunnels for a whole network shows up as one client with many tunneled addresses on its side.
  • How much goes through? Sort by bytes. A tunnel that carries a lot is in use, not just kept open.
  • Where does it lead? The server address is looked up in GeoIP data like every external address. For tunnels over IP protocol 41, the tunneled addresses on the server side are the IPv6 hosts that were reached.

Turn Teredo, 6to4 and ISATAP off on the hosts that do not need them, and block UDP port 3544 and IP protocol 41 at the edge of the network if nothing depends on them.

The page supports monitors, which turn a filter into a persistent alert condition, for example for any tunnel of the type 6in4. The search finds tunnels by address, network, MAC address and tunnel type.

Configuration

Detection of transition tunnels is part of Nzyme's IP and UDP analysis and requires no separate configuration beyond having Ethernet monitoring enabled on the relevant interface. See the Ethernet overview for interface configuration.

The following section is required in your Nzyme tap configuration files:

[protocols.ipv6_transition]
pipeline_size = 1024
Variable Description
pipeline_size The tap process moves data internally using in-memory pipelines. You may have to increase this value if you experience high throughput of tunneled packets.

A tap tracks up to 5,000 tunnels at a time. Packets with made-up source addresses could otherwise fill its memory. Close to the limit, tunnels that never got past their first packet make room for new ones.

Retention

Transition tunnels follow the retention time of the Ethernet: Layer 4 data category and are deleted once they have seen no activity for that long. See Configuring Retention Times for how to change retention times.