Latching: Hosted NAT Traversal (HNT) for Media in Real-Time Communication

Emil Ivov, Haim Kaplan, Dan Wing2014 · DOI

TL;DR

This paper explains "Hosted NAT Traversal" (HNT), a common but non-standard mechanism used by intermediaries like Session Border Controllers (SBCs) to help devices behind Network Address Translators (NATs) communicate. The core technique, "latching," allows these intermediaries to dynamically figure out where to send media traffic. However, the paper strongly warns about significant security risks associated with latching, recommending alternatives like ICE.

What Problem Does This Paper Address?

The internet is rife with Network Address Translators (NATs), which map private IP addresses to public ones. This creates a significant hurdle for real-time communication (RTC) protocols like SIP (Session Initiation Protocol) that embed IP addresses and port numbers directly in their messages. When devices are behind NATs, these embedded addresses are private and not directly routable on the public internet. This means that even if signaling (like setting up a call) works, the actual media (voice, video) can't flow directly between users. The paper addresses how intermediaries, often called Session Border Controllers (SBCs), have historically solved this by acting as "Hosted NAT Traversal" (HNT) mechanisms, specifically using a technique called "latching" to enable media flow.

Methods

The paper focuses on explaining the "latching" mechanism, a key component of HNT. Latching is a process where a signaling intermediary (like an SBC) dynamically learns the public IP address and port that a device behind a NAT is using for media.

Here's how it generally works:

  1. Offer/Answer: When Alice (behind a NAT) sends an offer to Bob, the intermediary allocates a media relay address/port and tells Bob to send media there.
  2. Latching: When Bob sends his answer, the intermediary allocates another media relay address/port and tells Alice to send media there. Crucially, the intermediary then "latches" onto the source IP address and port of the media packets it receives from each party.
  3. Relaying: The intermediary uses these latched source addresses/ports to relay media in the opposite direction. For example, if Alice sends media to the intermediary's allocated port, the intermediary uses Alice's actual source IP and port (as seen by the intermediary) to send media back to Bob.

The paper notes that this is often done for UDP traffic (like RTP for media) but can also be adapted for TCP. It also mentions that while this is a common practice, it's not standardized and can be implementation-specific.

Datasets

Not discussed in the paper.

Key Insights and Ideas

  • HNT is a practical, albeit non-standard, solution: Despite the existence of standardized protocols like ICE, HNT and latching remain widely deployed due to historical reasons and the inertia of existing infrastructure.
  • Latching is the "magic" behind HNT: The core innovation is how intermediaries dynamically discover and use the public IP/port of NATed endpoints for media relaying, effectively bridging the gap created by NATs.
  • Security is a major concern: The paper strongly emphasizes that latching, by its nature, can be vulnerable. Malicious actors could potentially spoof traffic to hijack sessions or cause denial-of-service attacks by overwhelming the intermediary's latching mechanisms.
  • IETF's stance is cautionary: The IETF, while describing HNT, explicitly advises against its general use on the public internet due to security risks, recommending ICE as a more secure and standardized alternative.
  • Client transparency: For the end-user device (UA), HNT is often transparent, meaning the UA doesn't necessarily know it's happening, which can interfere with other NAT traversal mechanisms like ICE.

Key Results

The paper doesn't present quantitative results from experiments or benchmarks. Instead, its "results" are primarily:

  • A clear, detailed explanation of the HNT and latching mechanisms, including illustrative diagrams for SIP and XMPP.
  • A thorough discussion of the security implications and vulnerabilities associated with latching.
  • A strong recommendation from the IETF to favor standardized protocols like ICE over HNT for general internet use.

Limitations and Future Work

  • Non-normative: The paper explicitly states it's non-normative, meaning it describes existing practices rather than defining new standards.
  • Security risks: The primary limitation highlighted is the inherent security risk of latching. The paper suggests that for HNT to be used safely, all security considerations must be fully addressed and solved, which is a significant challenge.
  • Interference with ICE: The paper notes that HNT can interfere with ICE, potentially causing mismatches that prevent ICE from functioning correctly.
  • Future Work: While not explicitly detailing future work, the paper's strong recommendation for ICE implies that future efforts should focus on migrating away from HNT and towards standardized, secure solutions. The paper also briefly mentions that some advanced SBCs might offer flexibility in re-latching restrictions, but this requires careful consideration of security implications.

Summary updated

Abstract

This document describes the behavior of signaling intermediaries in Real-Time Communication (RTC) deployments, sometimes referred to as Session Border Controllers (SBCs), when performing Hosted NAT Traversal (HNT). HNT is a set of mechanisms, such as media relaying and latching, that such intermediaries use to enable other RTC devices behind NATs to communicate with each other. This document is non- normative and is only written to explain HNT in order to provide a reference to the Internet community and an informative description to manufacturers and users. Latching, which is one of the HNT components, has a number of security issues covered here. Because of those, and unless all security considerations explained here are taken into account and solved, the IETF advises against use of the latching mechanism over the Internet and recommends other solutions, such as the Interactive Connectivity Establishment (ICE) protocol.
BibTeX
@misc{ivov2014latching,
  author = {Emil Ivov and Haim Kaplan and Dan Wing},
  title = {{Latching: Hosted NAT Traversal (HNT) for Media in Real-Time Communication}},
  year = {2014},
  doi = {10.17487/rfc7362},
}

Loading related content...

Figure