draft-ietf-mmusic-rtsp-nat-evaluation-16.txt   rfc7604.txt 
Network Working Group M. Westerlund Internet Engineering Task Force (IETF) M. Westerlund
Internet-Draft Ericsson Request for Comments: 7604 Ericsson
Intended status: Informational T. Zeng Category: Informational T. Zeng
Expires: November 20, 2015 May 19, 2015 ISSN: 2070-1721 PacketVideo Corp
September 2015
The Comparison of Different Network Address Translator (NAT) Traversal Comparison of Different NAT Traversal Techniques
Techniques for Media Controlled by Real-time Streaming Protocol (RTSP) for Media Controlled by the Real-Time Streaming Protocol (RTSP)
draft-ietf-mmusic-rtsp-nat-evaluation-16
Abstract Abstract
This document describes several Network Address Translator (NAT) This document describes several Network Address Translator (NAT)
traversal techniques that were considered to be used for establishing traversal techniques that were considered to be used for establishing
the RTP media flows controlled by the Real-time Streaming Protocol the RTP media flows controlled by the Real-Time Streaming Protocol
(RTSP). Each technique includes a description of how it would be (RTSP). Each technique includes a description of how it would be
used, the security implications of using it and any other deployment used, the security implications of using it, and any other deployment
considerations it has. There are also discussions on how NAT considerations it has. There are also discussions on how NAT
traversal techniques relate to firewalls and how each technique can traversal techniques relate to firewalls and how each technique can
be applied in different use cases. These findings were used when be applied in different use cases. These findings were used when
selecting the NAT traversal for RTSP 2.0, which is specified in a selecting the NAT traversal for RTSP 2.0, which is specified in a
separate document. separate document.
Status of This Memo Status of This Memo
This Internet-Draft is submitted in full conformance with the This document is not an Internet Standards Track specification; it is
provisions of BCP 78 and BCP 79. published for informational purposes.
Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet-
Drafts is at http://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months This document is a product of the Internet Engineering Task Force
and may be updated, replaced, or obsoleted by other documents at any (IETF). It represents the consensus of the IETF community. It has
time. It is inappropriate to use Internet-Drafts as reference received public review and has been approved for publication by the
material or to cite them other than as "work in progress." Internet Engineering Steering Group (IESG). Not all documents
approved by the IESG are a candidate for any level of Internet
Standard; see Section 2 of RFC 5741.
This Internet-Draft will expire on November 20, 2015. Information about the current status of this document, any errata,
and how to provide feedback on it may be obtained at
http://www.rfc-editor.org/info/rfc7604.
Copyright Notice Copyright Notice
Copyright (c) 2015 IETF Trust and the persons identified as the Copyright (c) 2015 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info) in effect on the date of (http://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with respect carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License. described in the Simplified BSD License.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 4
1.1. Network Address Translators . . . . . . . . . . . . . . . 5 1.1. Network Address Translators . . . . . . . . . . . . . . . 5
1.2. Firewalls . . . . . . . . . . . . . . . . . . . . . . . . 6 1.2. Firewalls . . . . . . . . . . . . . . . . . . . . . . . . 6
1.3. Glossary . . . . . . . . . . . . . . . . . . . . . . . . 6 1.3. Glossary . . . . . . . . . . . . . . . . . . . . . . . . 7
2. Detecting the loss of NAT mappings . . . . . . . . . . . . . 7 2. Detecting the Loss of NAT Mappings . . . . . . . . . . . . . 8
3. Requirements on Solutions . . . . . . . . . . . . . . . . . . 8 3. Requirements on Solutions . . . . . . . . . . . . . . . . . . 9
4. NAT Traversal Techniques . . . . . . . . . . . . . . . . . . 10 4. NAT-Traversal Techniques . . . . . . . . . . . . . . . . . . 10
4.1. Stand-Alone STUN . . . . . . . . . . . . . . . . . . . . 10 4.1. Stand-Alone STUN . . . . . . . . . . . . . . . . . . . . 11
4.1.1. Introduction . . . . . . . . . . . . . . . . . . . . 10 4.1.1. Introduction . . . . . . . . . . . . . . . . . . . . 11
4.1.2. Using STUN to traverse NAT without server 4.1.2. Using STUN to Traverse NAT without Server
modifications . . . . . . . . . . . . . . . . . . . . 11 Modifications . . . . . . . . . . . . . . . . . . . . 11
4.1.3. ALG considerations . . . . . . . . . . . . . . . . . 13 4.1.3. ALG Considerations . . . . . . . . . . . . . . . . . 14
4.1.4. Deployment Considerations . . . . . . . . . . . . . . 14 4.1.4. Deployment Considerations . . . . . . . . . . . . . . 14
4.1.5. Security Considerations . . . . . . . . . . . . . . . 15 4.1.5. Security Considerations . . . . . . . . . . . . . . . 15
4.2. Server Embedded STUN . . . . . . . . . . . . . . . . . . 15 4.2. Server Embedded STUN . . . . . . . . . . . . . . . . . . 16
4.2.1. Introduction . . . . . . . . . . . . . . . . . . . . 15 4.2.1. Introduction . . . . . . . . . . . . . . . . . . . . 16
4.2.2. Embedding STUN in RTSP . . . . . . . . . . . . . . . 15 4.2.2. Embedding STUN in RTSP . . . . . . . . . . . . . . . 16
4.2.3. Discussion On Co-located STUN Server . . . . . . . . 17 4.2.3. Discussion on Co-located STUN Server . . . . . . . . 17
4.2.4. ALG considerations . . . . . . . . . . . . . . . . . 17 4.2.4. ALG Considerations . . . . . . . . . . . . . . . . . 17
4.2.5. Deployment Considerations . . . . . . . . . . . . . . 17 4.2.5. Deployment Considerations . . . . . . . . . . . . . . 18
4.2.6. Security Considerations . . . . . . . . . . . . . . . 18 4.2.6. Security Considerations . . . . . . . . . . . . . . . 19
4.3. ICE . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 4.3. ICE . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
4.3.1. Introduction . . . . . . . . . . . . . . . . . . . . 18 4.3.1. Introduction . . . . . . . . . . . . . . . . . . . . 19
4.3.2. Using ICE in RTSP . . . . . . . . . . . . . . . . . . 19 4.3.2. Using ICE in RTSP . . . . . . . . . . . . . . . . . . 20
4.3.3. Implementation burden of ICE . . . . . . . . . . . . 21 4.3.3. Implementation Burden of ICE . . . . . . . . . . . . 21
4.3.4. ALG Considerations . . . . . . . . . . . . . . . . . 21 4.3.4. ALG Considerations . . . . . . . . . . . . . . . . . 22
4.3.5. Deployment Considerations . . . . . . . . . . . . . . 22 4.3.5. Deployment Considerations . . . . . . . . . . . . . . 22
4.3.6. Security Consideration . . . . . . . . . . . . . . . 22 4.3.6. Security Considerations . . . . . . . . . . . . . . . 23
4.4. Latching . . . . . . . . . . . . . . . . . . . . . . . . 23 4.4. Latching . . . . . . . . . . . . . . . . . . . . . . . . 23
4.4.1. Introduction . . . . . . . . . . . . . . . . . . . . 23 4.4.1. Introduction . . . . . . . . . . . . . . . . . . . . 23
4.4.2. Necessary RTSP extensions . . . . . . . . . . . . . . 23 4.4.2. Necessary RTSP Extensions . . . . . . . . . . . . . . 24
4.4.3. ALG Considerations . . . . . . . . . . . . . . . . . 24 4.4.3. ALG Considerations . . . . . . . . . . . . . . . . . 25
4.4.4. Deployment Considerations . . . . . . . . . . . . . . 24 4.4.4. Deployment Considerations . . . . . . . . . . . . . . 25
4.4.5. Security Consideration . . . . . . . . . . . . . . . 25 4.4.5. Security Considerations . . . . . . . . . . . . . . . 26
4.5. A Variation to Latching . . . . . . . . . . . . . . . . . 26 4.5. A Variation to Latching . . . . . . . . . . . . . . . . . 27
4.5.1. Introduction . . . . . . . . . . . . . . . . . . . . 27 4.5.1. Introduction . . . . . . . . . . . . . . . . . . . . 27
4.5.2. Necessary RTSP extensions . . . . . . . . . . . . . . 27 4.5.2. Necessary RTSP Extensions . . . . . . . . . . . . . . 28
4.5.3. ALG Considerations . . . . . . . . . . . . . . . . . 28 4.5.3. ALG Considerations . . . . . . . . . . . . . . . . . 28
4.5.4. Deployment Considerations . . . . . . . . . . . . . . 28 4.5.4. Deployment Considerations . . . . . . . . . . . . . . 28
4.5.5. Security Considerations . . . . . . . . . . . . . . . 28 4.5.5. Security Considerations . . . . . . . . . . . . . . . 29
4.6. Three Way Latching . . . . . . . . . . . . . . . . . . . 28 4.6. Three-Way Latching . . . . . . . . . . . . . . . . . . . 29
4.6.1. Introduction . . . . . . . . . . . . . . . . . . . . 28 4.6.1. Introduction . . . . . . . . . . . . . . . . . . . . 29
4.6.2. Necessary RTSP extensions . . . . . . . . . . . . . . 29 4.6.2. Necessary RTSP Extensions . . . . . . . . . . . . . . 29
4.6.3. ALG Considerations . . . . . . . . . . . . . . . . . 29 4.6.3. ALG Considerations . . . . . . . . . . . . . . . . . 30
4.6.4. Deployment Considerations . . . . . . . . . . . . . . 29 4.6.4. Deployment Considerations . . . . . . . . . . . . . . 30
4.6.5. Security Considerations . . . . . . . . . . . . . . . 29 4.6.5. Security Considerations . . . . . . . . . . . . . . . 30
4.7. Application Level Gateways . . . . . . . . . . . . . . . 30 4.7. Application Level Gateways . . . . . . . . . . . . . . . 31
4.7.1. Introduction . . . . . . . . . . . . . . . . . . . . 30 4.7.1. Introduction . . . . . . . . . . . . . . . . . . . . 31
4.7.2. Outline On how ALGs for RTSP work . . . . . . . . . . 31 4.7.2. Outline on How ALGs for RTSP Work . . . . . . . . . . 31
4.7.3. Deployment Considerations . . . . . . . . . . . . . . 32 4.7.3. Deployment Considerations . . . . . . . . . . . . . . 32
4.7.4. Security Considerations . . . . . . . . . . . . . . . 32 4.7.4. Security Considerations . . . . . . . . . . . . . . . 33
4.8. TCP Tunneling . . . . . . . . . . . . . . . . . . . . . . 33 4.8. TCP Tunneling . . . . . . . . . . . . . . . . . . . . . . 33
4.8.1. Introduction . . . . . . . . . . . . . . . . . . . . 33 4.8.1. Introduction . . . . . . . . . . . . . . . . . . . . 33
4.8.2. Usage of TCP tunneling in RTSP . . . . . . . . . . . 33 4.8.2. Usage of TCP Tunneling in RTSP . . . . . . . . . . . 34
4.8.3. ALG Considerations . . . . . . . . . . . . . . . . . 33 4.8.3. ALG Considerations . . . . . . . . . . . . . . . . . 34
4.8.4. Deployment Considerations . . . . . . . . . . . . . . 34 4.8.4. Deployment Considerations . . . . . . . . . . . . . . 34
4.8.5. Security Considerations . . . . . . . . . . . . . . . 34 4.8.5. Security Considerations . . . . . . . . . . . . . . . 35
4.9. TURN (Traversal Using Relay NAT) . . . . . . . . . . . . 34 4.9. Traversal Using Relays around NAT (TURN) . . . . . . . . 35
4.9.1. Introduction . . . . . . . . . . . . . . . . . . . . 34 4.9.1. Introduction . . . . . . . . . . . . . . . . . . . . 35
4.9.2. Usage of TURN with RTSP . . . . . . . . . . . . . . . 35 4.9.2. Usage of TURN with RTSP . . . . . . . . . . . . . . . 36
4.9.3. ALG Considerations . . . . . . . . . . . . . . . . . 36 4.9.3. ALG Considerations . . . . . . . . . . . . . . . . . 37
4.9.4. Deployment Considerations . . . . . . . . . . . . . . 36 4.9.4. Deployment Considerations . . . . . . . . . . . . . . 37
4.9.5. Security Considerations . . . . . . . . . . . . . . . 37 4.9.5. Security Considerations . . . . . . . . . . . . . . . 37
5. Firewalls . . . . . . . . . . . . . . . . . . . . . . . . . . 37 5. Firewalls . . . . . . . . . . . . . . . . . . . . . . . . . . 38
6. Comparison of NAT traversal techniques . . . . . . . . . . . 38 6. Comparison of NAT Traversal Techniques . . . . . . . . . . . 39
7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 40 7. Security Considerations . . . . . . . . . . . . . . . . . . . 41
8. Security Considerations . . . . . . . . . . . . . . . . . . . 40 8. Informative References . . . . . . . . . . . . . . . . . . . 42
9. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 41 Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . 45
10. Informative References . . . . . . . . . . . . . . . . . . . 42 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 46
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 44
1. Introduction 1. Introduction
Today there is a proliferating deployment of different types of Today there is a proliferating deployment of different types of
Network Address Translator (NAT) boxes that in many cases only Network Address Translator (NAT) boxes that in many cases only
loosely follow standards loosely follow standards [RFC3022] [RFC2663] [RFC3424] [RFC4787]
[RFC3022][RFC2663][RFC3424][RFC4787][RFC5382]. NATs cause [RFC5382]. NATs cause discontinuity in address realms [RFC3424];
discontinuity in address realms [RFC3424], therefore an application therefore, an application protocol, such as the Real-Time Streaming
protocol, such as Real-time Streaming Protocol (RTSP) Protocol (RTSP) [RFC2326] [RTSP], needs to deal with such
[RFC2326][I-D.ietf-mmusic-rfc2326bis], needs to deal with such
discontinuities caused by NATs. The problem is that, being a media discontinuities caused by NATs. The problem is that, being a media
control protocol managing one or more media streams, RTSP carries control protocol managing one or more media streams, RTSP carries
network address and port information within its protocol messages. network address and port information within its protocol messages.
Because of this, even if RTSP itself, when carried over Transmission Because of this, even if RTSP itself, when carried over the
Control Protocol (TCP) [RFC0793] for example, is not blocked by NATs, Transmission Control Protocol (TCP) [RFC793], for example, is not
its media streams may be blocked by NATs. This will occur unless blocked by NATs, its media streams may be blocked by NATs. This will
special protocol provisions are added to support NAT-traversal. occur unless special protocol provisions are added to support NAT
traversal.
Like NATs, firewalls are also middle boxes that need to be Like NATs, firewalls are also middleboxes that need to be considered.
considered. Firewalls help prevent unwanted traffic from getting in Firewalls help prevent unwanted traffic from getting in or out of the
or out of the protected network. RTSP is designed such that a protected network. RTSP is designed such that a firewall can be
firewall can be configured to let RTSP controlled media streams go configured to let RTSP-controlled media streams go through with
through with limited implementation effort. The effort needed is to limited implementation effort. The effort needed is to implement an
implement an Application Level Gateway (ALG) to interpret RTSP Application Level Gateway (ALG) to interpret RTSP parameters. There
parameters. There is also a large class of firewalls, commonly home is also a large class of firewalls, commonly home firewalls, that use
firewalls, that uses a filtering behavior that appear the same to a filtering behavior that appears to be the same as what NATs have.
what NATs have. This type of firewall will be successfully traversed This type of firewall will be successfully traversed using the same
using the same solution as employed for NAT traversal, instead of solution as employed for NAT traversal, instead of relying on an RTSP
relying on a RTSP ALG. Therefore firewalls will also be discussed ALG. Therefore, firewalls will also be discussed and some important
and some important differences highlighted. differences highlighted.
This document describes several NAT-traversal mechanisms for RTSP This document describes several NAT traversal mechanisms for RTSP-
controlled media streaming. Many of these NAT solutions fall into controlled media streaming. Many of these NAT solutions fall into
the category of "UNilateral Self-Address Fixing (UNSAF)" as defined the category of "UNilateral Self-Address Fixing (UNSAF)" as defined
in [RFC3424] and quoted below: in [RFC3424] and quoted below:
"UNSAF is a process whereby some originating process attempts to [UNSAF] is a process whereby some originating process attempts to
determine or fix the address (and port) by which it is known - e.g. determine or fix the address (and port) by which it is known -
to be able to use address data in the protocol exchange, or to e.g. to be able to use address data in the protocol exchange, or
advertise a public address from which it will receive connections." to advertise a public address from which it will receive
connections.
Following the guidelines spelled out in RFC 3424, we describe the Following the guidelines spelled out in RFC 3424, we describe the
required RTSP protocol extensions for each method, transition required RTSP extensions for each method, transition strategies, and
strategies, and security concerns. The transition strategies are a security concerns. The transition strategies are a discussion of how
discussion of how and if the method encourage a move towards not and if the method encourages a move towards not having any NATs on
having any NATs on the path. the path.
This document is capturing the evaluation done in the process to This document is capturing the evaluation done in the process to
recommend firewall/NAT traversal methods for RTSP streaming servers recommend firewall/NAT traversal methods for RTSP streaming servers
based on RFC 2326 [RFC2326] as well as the RTSP 2.0 core spec based on [RFC2326] as well as the RTSP 2.0 core specification [RTSP].
[I-D.ietf-mmusic-rfc2326bis]. The evaluation is focused on NAT The evaluation is focused on NAT traversal for the media streams
traversal for the media streams carried over User Datagram Protocol carried over the User Datagram Protocol (UDP) [RFC768] with RTP
(UDP) [RFC0768] with Real-time Transport Protocol (RTP) [RFC3550] [RFC3550] over UDP being the main case for such usage. The findings
over UDP being the main case for such usage. The findings should be should be applicable to other protocols as long as they have similar
applicable to other protocols as long as they have similar
properties. properties.
At the time when the bulk of work on this document was done, a single At the time when the bulk of work on this document was done, a single
level of NAT was the dominant deployment for NATs, and multiple level level of NAT was the dominant deployment for NATs, and multiple
of NATs, including Carrier Grade NATs (CGNs) was not considered. levels of NATs, including Carrier-Grade NATs (CGNs), were not
Thus, any characterizations or findings may not be applicable in such considered. Thus, any characterizations or findings may not be
scenarios, unless CGN or multiple level of NATs are explicitly noted. applicable in such scenarios, unless CGN or multiple levels of NATs
are explicitly noted.
An ICE-based RTSP NAT traversal mechanism is specified in "A Network An RTSP NAT traversal mechanism based on Interactive Connectivity
Address Translator (NAT) Traversal mechanism for media controlled by Establishment (ICE) is specified in "A Network Address Translator
Real-Time Streaming Protocol (RTSP)" [I-D.ietf-mmusic-rtsp-nat]. (NAT) Traversal Mechanism for Media Controlled by Real-Time Streaming
Protocol (RTSP)" [RTSP-NAT].
1.1. Network Address Translators 1.1. Network Address Translators
We begin by reviewing two quotes from Section 3 in "Network Address We begin by reviewing two quotes from Section 3 in "Network Address
Translation (NAT) Behavioral Requirements for Unicast UDP" [RFC4787] Translation (NAT) Behavioral Requirements for Unicast UDP" [RFC4787]
concerning NATs and their terminology: concerning NATs and their terminology:
"Readers are urged to refer to [RFC2663] for information on NAT Readers are urged to refer to [RFC2663] for information on NAT
taxonomy and terminology. Traditional NAT is the most common type of taxonomy and terminology. Traditional NAT is the most common type
NAT device deployed. Readers may refer to [RFC3022] for detailed of NAT device deployed. Readers may refer to [RFC3022] for
information on traditional NAT. Traditional NAT has two main detailed information on traditional NAT. Traditional NAT has two
varieties -- Basic NAT and Network Address/Port Translator (NAPT). main varieties -- Basic NAT and Network Address/Port Translator
(NAPT).
NAPT is by far the most commonly deployed NAT device. NAPT allows NAPT is by far the most commonly deployed NAT device. NAPT allows
multiple internal hosts to share a single public IP address multiple internal hosts to share a single public IP address
simultaneously. When an internal host opens an outgoing TCP or UDP simultaneously. When an internal host opens an outgoing TCP or
session through a NAPT, the NAPT assigns the session a public IP UDP session through a NAPT, the NAPT assigns the session a public
address and port number, so that subsequent response packets from the IP address and port number, so that subsequent response packets
external endpoint can be received by the NAPT, translated, and from the external endpoint can be received by the NAPT,
forwarded to the internal host. The effect is that the NAPT translated, and forwarded to the internal host. The effect is
establishes a NAT session to translate the (private IP address, that the NAPT establishes a NAT session to translate the (private
private port number) tuple to a (public IP address, public port IP address, private port number) tuple to a (public IP address,
number) tuple, and vice versa, for the duration of the session. An public port number) tuple, and vice versa, for the duration of the
issue of relevance to peer-to-peer applications is how the NAT session. An issue of relevance to peer-to-peer applications is
behaves when an internal host initiates multiple simultaneous how the NAT behaves when an internal host initiates multiple
sessions from a single (private IP, private port) endpoint to simultaneous sessions from a single (private IP, private port)
multiple distinct endpoints on the external network. In this endpoint to multiple distinct endpoints on the external network.
specification, the term "NAT" refers to both "Basic NAT" and "Network
Address/Port Translator (NAPT)"."
"This document uses the term "address and port mapping" as the In this specification, the term "NAT" refers to both "Basic NAT"
translation between an external address and port and an internal and "Network Address/Port Translator (NAPT)".
address and port. Note that this is not the same as an "address
binding" as defined in RFC 2663."
Note: In the above it would be more correct to use external IP This document uses the term "Address and Port Mapping" as the
address instead of public IP address in the above text. The translation between an external address and port and an internal
external IP address is commonly a public one, but might be of address and port. Note that this is not the same as an "address
other type if the NAT's external side is in a private address binding" as defined in RFC 2663.
domain.
In addition to the above quote there exists a number of address and Note: In the above text, it would be more correct to use an
external IP address instead of a public IP address. The external
IP address is commonly a public one, but it might be of another
type if the NAT's external side is in a private address domain.
In addition to the above quote, there exists a number of address and
port mapping behaviors described in more detail in Section 4.1 of port mapping behaviors described in more detail in Section 4.1 of
"Network Address Translation (NAT) Behavioral Requirements for [RFC4787] that are highly relevant to the discussion in this
Unicast UDP" [RFC4787] that are highly relevant to the discussion in document.
this document.
NATs also have a filtering behavior on traffic arriving on the NATs also have a filtering behavior on traffic arriving on the
external side. Such behavior affects how well different methods for external side. Such behavior affects how well different methods for
NAT traversal works through these NATs. See Section 5 of "Network NAT traversal works through these NATs. See Section 5 of [RFC4787]
Address Translation (NAT) Behavioral Requirements for Unicast UDP" for more information on the different types of filtering that have
[RFC4787] for more information on the different types of filtering been identified.
that have been identified.
1.2. Firewalls 1.2. Firewalls
A firewall is a security gateway that enforces certain access control A firewall is a security gateway that enforces certain access control
policies between two network administrative domains: a private domain policies between two network administrative domains: a private domain
(intranet) and a external domain, e.g. Internet. Many organizations (intranet) and an external domain, e.g., the Internet. Many
use firewalls to prevent intrusions and an malicious attacks on organizations use firewalls to prevent intrusions and malicious
computing resources in the private intranet [RFC2588]. attacks on computing resources in the private intranet [RFC2588].
A comparison between NAT and firewall is given below: A comparison between NAT and a firewall is given below:
1. A firewall sits at security enforcement/protection points, while 1. A firewall sits at security enforcement/protection points, while
NAT sits at borders between two address domains. NAT sits at borders between two address domains.
2. NAT does not in itself provide security, although some access 2. NAT does not in itself provide security, although some access
control policies can be implemented using address translation control policies can be implemented using address translation
schemes. The inherent filtering behaviours are commonly mistaken schemes. The inherent filtering behaviors are commonly mistaken
for real security policies. for real security policies.
It should be noted that many NAT devices intended for Residential or It should be noted that many NAT devices intended for Residential or
small office/home office (SOHO) use include both NATs and firewall Small Office, Home Office (SOHO) use include both NATs and firewall
functionality. functionality.
1.3. Glossary 1.3. Glossary
Address-Dependent Mapping: The NAT reuses the port mapping for Address-Dependent Mapping: The NAT reuses the port mapping for
subsequent packets sent from the same internal IP address and subsequent packets sent from the same internal IP address and
port to the same external IP address, regardless of the port to the same external IP address, regardless of the
external port. See [RFC4787]. external port; see [RFC4787].
Address and Port-Dependent Mapping: The NAT reuses the port mapping Address and Port-Dependent Mapping: The NAT reuses the port mapping
for subsequent packets sent from the same internal IP address for subsequent packets sent from the same internal IP address
and port to the same external IP address and port while the and port to the same external IP address and port while the
mapping is still active. See [RFC4787]. mapping is still active; see [RFC4787].
ALG: Application Level Gateway, an entity that can be embedded in a ALG: Application Level Gateway is an entity that can be embedded in
NAT or other middlebox to perform the application layer a NAT or other middlebox to perform the application layer
functions required for a particular protocol to traverse the functions required for a particular protocol to traverse the
NAT/middlebox. NAT/middlebox.
Endpoint-Independent Mapping: The NAT reuses the port mapping for Endpoint-Independent Mapping: The NAT reuses the port mapping for
subsequent packets sent from the same internal IP address and subsequent packets sent from the same internal IP address and
port to any external IP address and port. See [RFC4787]. port to any external IP address and port; see [RFC4787].
ICE: Interactive Connectivity Establishment, see [RFC5245]. ICE: Interactive Connectivity Establishment; see [RFC5245].
DNS: Domain Name Service DNS: Domain Name Service
DoS: Denial of Service DoS: Denial of Service
DDoS: Distributed Denial of Service DDoS: Distributed Denial of Service
NAT: Network Address Translator, see [RFC3022]. NAT: Network Address Translator; see [RFC3022].
NAPT: Network Address/Port Translator, see [RFC3022]. NAPT: Network Address/Port Translator; see [RFC3022].
RTP: Real-time Transport Protocol, see [RFC3550]. RTP: Real-Time Transport Protocol; see [RFC3550].
RTSP: Real-Time Streaming Protocol, see [RFC2326] and RTSP: Real-Time Streaming Protocol; see [RFC2326] and [RTSP].
[I-D.ietf-mmusic-rfc2326bis].
RTT: Round Trip Times. RTT: Round Trip Times
SDP: Session Description Protocol, see [RFC4566]. SDP: Session Description Protocol; see [RFC4566].
SSRC: Synchronization source in RTP, see [RFC3550]. SSRC: Synchronization source in RTP; see [RFC3550].
2. Detecting the loss of NAT mappings 2. Detecting the Loss of NAT Mappings
Several NAT traversal techniques in the next chapter make use of the Several NAT traversal techniques in the next chapter make use of the
fact that the NAT UDP mapping's external address and port can be fact that the NAT UDP mapping's external address and port can be
discovered. This information is then utilized to traverse the NAT discovered. This information is then utilized to traverse the NAT
box. However any such information is only good while the mapping is box. However, any such information is only good while the mapping is
still valid. As the IAB's UNSAF document [RFC3424] points out, the still valid. As the IAB's UNSAF document [RFC3424] points out, the
mapping can either timeout or change its properties. It is therefore mapping can either timeout or change its properties. It is therefore
important for the NAT traversal solutions to handle the loss or important for the NAT traversal solutions to handle the loss or
change of NAT mappings, according to RFC3424. change of NAT mappings, according to RFC 3424.
First, since NATs may also dynamically reclaim or readjust address/ First, since NATs may also dynamically reclaim or readjust address/
port translations, "keep-alive" and periodic re-polling may be port translations, "keep-alive" and periodic repolling may be
required according to RFC 3424. Secondly, it is possible to detect required according to RFC 3424. Second, it is possible to detect and
and recover from the situation where the mapping has been changed or recover from the situation where the mapping has been changed or
removed. The loss of a mapping can be detected when no traffic removed. The loss of a mapping can be detected when no traffic
arrives for a while. Below we will give some recommendation on how arrives for a while. Below we will give some recommendations on how
to detect loss of NAT mappings when using RTP/RTCP under RTSP to detect the loss of NAT mappings when using RTP/RTCP under RTSP
control. control.
A RTP session normally has both RTP and RTCP streams. The loss of a An RTP session normally has both RTP and RTCP streams. The loss of
RTP mapping can only be detected when expected traffic does not an RTP mapping can only be detected when expected traffic does not
arrive. If a client does not receive media data within a few seconds arrive. If a client does not receive media data within a few seconds
after having received the "200 OK" response to a RTSP PLAY request after having received the "200 OK" response to an RTSP PLAY request
which starts the media delivery, it may be the result of a middlebox that starts the media delivery, it may be the result of a middlebox
blocking the traffic. However, for a receiver to be more certain to blocking the traffic. However, for a receiver to be more certain to
detect the case where no RTP traffic was delivered due to NAT detect the case where no RTP traffic was delivered due to NAT
trouble, one should monitor the RTCP Sender reports if they are trouble, one should monitor the RTCP Sender reports if they are
received and not also blocked. The sender report carries a field received and not also blocked. The sender report carries a field
telling how many packets the server has sent. If that has increased telling how many packets the server has sent. If that has increased
and no RTP packets has arrived for a few seconds it is likely the and no RTP packets have arrived for a few seconds, it is likely the
mapping for the RTP stream has been removed. mapping for the RTP stream has been removed.
The loss of mapping for RTCP is simpler to detect. RTCP is normally The loss of mapping for RTCP is simpler to detect. RTCP is normally
sent periodically in each direction, even during the RTSP ready sent periodically in each direction, even during the RTSP ready
state. If RTCP packets are missing for several RTCP intervals, the state. If RTCP packets are missing for several RTCP intervals, the
mapping is likely lost. Note that if neither RTCP packets nor RTSP mapping is likely lost. Note that if neither RTCP packets nor RTSP
messages are received by the RTSP server for a while (default 60 messages are received by the RTSP server for a while (default 60
seconds), the RTSP server has the option to delete the corresponding seconds), the RTSP server has the option to delete the corresponding
RTP session, SSRC and RTSP session ID, because either the client can RTP session, SSRC and RTSP session ID, because either the client can
not get through a middle box NAT/firewall, or the client is mal- not get through a middlebox NAT/firewall, or the client is
functioning. malfunctioning.
3. Requirements on Solutions 3. Requirements on Solutions
This section considers the set of requirements for the evaluation of This section considers the set of requirements for the evaluation of
RTSP NAT traversal solutions. RTSP NAT traversal solutions.
RTSP is a client-server protocol. Typically service providers deploy RTSP is a client-server protocol. Typically, service providers
RTSP servers on the Internet or otherwise reachable address realm. deploy RTSP servers on the Internet or otherwise reachable address
However, there are use cases where the reverse is true: RTSP clients realm. However, there are use cases where the reverse is true: RTSP
are connecting from any address realm to RTSP servers behind NATs, clients are connecting from any address realm to RTSP servers behind
e.g. in a home. This is the case for instance when home surveillance NATs, e.g., in a home. This is the case, for instance, when home
cameras running as RTSP servers intend to stream video to cell phone surveillance cameras running as RTSP servers intend to stream video
users in the public address realm through a home NAT. In terms of to cell phone users in the public address realm through a home NAT.
requirements, the primary issue to solve is the RTSP NAT traversal In terms of requirements, the primary issue to solve is the RTSP NAT
problem for RTSP servers deployed in a network where the server is on traversal problem for RTSP servers deployed in a network where the
the external side of any NAT, i.e. server is not behind a NAT. The server is on the external side of any NAT, i.e., the server is not
server behind a NAT is desirable, but of much lower priority. behind a NAT. The server behind a NAT is desirable but of much lower
priority.
An important consideration for any NAT traversal technique is whether Important considerations for any NAT traversal technique are whether
any protocol modification needs occur, where the implementation any protocol modifications are needed and where the implementation
burden occur, server, client or middlebox. If the incitement to get burden resides (e.g., server, client, or middlebox). If the
RTSP to work over a NAT is sufficient to motivate the owner of the incentive to get RTSP to work over a NAT is sufficient, it will
server, client or middlebox to update or configure or otherwise motivate the owner of the server, client, or middlebox to update,
perform changes to the device and its software to support the NAT configure, or otherwise perform changes to the device and its
traversal. Thus, the question of who this burden falls on and how software in order to support NAT traversal. Thus, the questions of
big it is is highly relevant. who this burden falls on and how big it is are highly relevant.
The list of feature requirements for RTSP NAT solutions are given The list of feature requirements for RTSP NAT solutions are given
below: below:
1. Must work for all flavors of NATs, including NATs with Address 1. Must work for all flavors of NATs, including NATs with Address
and Port-Dependent Filtering. and Port-Dependent Filtering.
2. Must work for firewalls (subject to pertinent firewall 2. Must work for firewalls (subject to pertinent firewall
administrative policies), including those with ALGs. administrative policies), including those with ALGs.
3. Should have minimal impact on clients not behind NATs and which 3. Should have minimal impact on clients not behind NATs and that
are not dual-hosted. RTSP dual-hosting means that the RTSP are not dual hosted. RTSP dual hosting means that the RTSP
signalling protocol and the media protocol (e.g. RTP) are signaling protocol and the media protocol (e.g., RTP) are
implemented on different computers with different IP addresses. implemented on different computers with different IP addresses.
* For instance, no extra protocol RTT before arrival of media. * For instance, no extra protocol RTT before arrival of media.
4. Should be simple to use/implement/administer so people actually 4. Should be simple to use/implement/administer so people actually
turn them on turn them on.
* Discovery of the address(es) assigned by NAT should happen * Discovery of the address(es) assigned by NAT should happen
automatically, if possible automatically, if possible.
5. Should authenticate dual-hosted client's media transport receiver 5. Should authenticate dual-hosted client's media transport receiver
to prevent usage of RTSP servers for DDoS attacks. to prevent usage of RTSP servers for DDoS attacks.
The last requirement addresses the Distributed Denial-of-Service The last requirement addresses the Distributed Denial-of-Service
(DDoS) threat, which relates to NAT traversal as explained below. (DDoS) threat, which relates to NAT traversal as explained below.
During NAT traversal, when the RTSP server determines the media During NAT traversal, when the RTSP server determines the media
destination (address and port) for the client, the result may be that destination (address and port) for the client, the result may be that
the IP address of the RTP receiver host is different than the IP the IP address of the RTP receiver host is different than the IP
address of the RTSP client host. This posts a DDoS threat that has address of the RTSP client host. This poses a DDoS threat that has
significant amplification potentials because the RTP media streams in significant amplification potentials because the RTP media streams in
general consist of large number of IP packets. DDoS attacks can general consist of a large number of IP packets. DDoS attacks can
occur if the attacker can fake the messages in the NAT traversal occur if the attacker can fake the messages in the NAT traversal
mechanism to trick the RTSP server into believing that the client's mechanism to trick the RTSP server into believing that the client's
RTP receiver is located on a host to be attacked. For example, user RTP receiver is located on a host to be attacked. For example, user
A may use his RTSP client to direct the RTSP server to send video RTP A may use his RTSP client to direct the RTSP server to send video RTP
streams to target.example.com in order to degrade the services streams to target.example.com in order to degrade the services
provided by target.example.com. provided by target.example.com.
Note a simple mitigation is for the RTSP server to disallow the cases Note that a simple mitigation is for the RTSP server to disallow the
where the client's RTP receiver has a different IP address than that cases where the client's RTP receiver has a different IP address than
of the RTSP client. This is recommended behavior in RTSP 2.0 unless that of the RTSP client. This is recommended behavior in RTSP 2.0
other solutions to prevent this attack is present, See 21.2.1 in unless other solutions to prevent this attack are present; see
[I-D.ietf-mmusic-rfc2326bis]. With the increased deployment of NAT Section 21.2.1 in [RTSP]. With the increased deployment of NAT
middleboxes by operators, i.e. carrier grade NAT (CGN), the reuse of middleboxes by operators, i.e., CGN, the reuse of an IP address on
an IP address on the NAT's external side by many customers reduces the NAT's external side by many customers reduces the protection
the protection provided. Also in some applications (e.g., provided. Also in some applications (e.g., centralized
centralized conferencing), dual-hosted RTSP/RTP clients have valid conferencing), dual-hosted RTSP/RTP clients have valid use cases.
use cases. The key is how to authenticate the messages exchanged The key is how to authenticate the messages exchanged during the NAT
during the NAT traversal process. traversal process.
4. NAT Traversal Techniques 4. NAT-Traversal Techniques
There exists a number of potential NAT traversal techniques that can There exists a number of potential NAT traversal techniques that can
be used to allow RTSP to traverse NATs. They have different features be used to allow RTSP to traverse NATs. They have different features
and are applicable to different topologies; their costs are also and are applicable to different topologies; their costs are also
different. They also vary in security levels. In the following different. They also vary in security levels. In the following
sections, each technique is outlined with discussions on the sections, each technique is outlined with discussions on the
corresponding advantages and disadvantages. corresponding advantages and disadvantages.
The survey of traversal techniques was done prior to 2007 and is The survey of traversal techniques was done prior to 2007 and is
based on what was available then. This section includes NAT based on what was available then. This section includes NAT
traversal techniques that have not been formally specified anywhere traversal techniques that have not been formally specified anywhere
else. This document may be the only publicly available specification else. This document may be the only publicly available specification
of some of the NAT traversal techniques. However that is not a real of some of the NAT traversal techniques. However, that is not a real
barrier against doing an evaluation of the NAT traversal techniques. barrier against doing an evaluation of the NAT traversal techniques.
Some techniques used as part of some of the traversal solutions have Some techniques used as part of some of the traversal solutions have
been recommended against or are no longer possible due to been recommended against or are no longer possible due to the outcome
standardization works' outcome or their failure to progress within of standardization work or their failure to progress within IETF
IETF after the initial evaluation in this document. For example RTP after the initial evaluation in this document. For example, RTP
No-Op [I-D.ietf-avt-rtp-no-op] was a proposed RTP payload format that No-Op [RTP-NO-OP] was a proposed RTP payload format that failed to be
failed to be specified, thus it is not available for use today. In specified; thus, it is not available for use today. In each such
each such case, the missing parts will be noted and some basic case, the missing parts will be noted and some basic reasons will be
reasons will be given. given.
4.1. Stand-Alone STUN 4.1. Stand-Alone STUN
4.1.1. Introduction 4.1.1. Introduction
Session Traversal Utilities for NAT (STUN) [RFC5389] is a Session Traversal Utilities for NAT (STUN) [RFC5389] is a
standardized protocol that allows a client to use secure means to standardized protocol that allows a client to use secure means to
discover the presence of a NAT between itself and the STUN server. discover the presence of a NAT between itself and the STUN server.
The client uses the STUN server to discover the address mappings The client uses the STUN server to discover the address and port
assigned by the NAT. Then using the knowledge of these NAT mappings mappings assigned by the NAT. Then using the knowledge of these NAT
use the external addresses to directly connect to the independent mappings, it uses the external addresses to directly connect to the
RTSP server. However, this is only possible if the NAT mapping independent RTSP server. However, this is only possible if the NAT
behavior is such that the STUN server and RTSP server will see the address and port mapping behavior is such that the STUN server and
same external address and port for the same internal address and RTSP server will see the same external address and port for the same
port. internal address and port.
STUN is a client-server protocol. The STUN client sends a request to STUN is a client-server protocol. The STUN client sends a request to
a STUN server and the server returns a response. There are two types a STUN server and the server returns a response. There are two types
of STUN messages - Binding Requests and Indications. Binding of STUN messages -- Binding Requests and Indications. Binding
requests are used when determining a client's external address and Requests are used when determining a client's external address and
solicits a response from the STUN server with the seen address. soliciting a response from the STUN server with the seen address.
Indications are used by the client for keep-alive messages towards Indications are used by the client for keep-alive messages towards
the server and requires no response from the server. the server and requires no response from the server.
The first version of STUN [RFC3489] included categorization and The first version of STUN [RFC3489] included categorization and
parameterization of NATs. This was abandoned in the updated version parameterization of NATs. This was abandoned in the updated version
[RFC5389] due to it being unreliable and brittle. This particular [RFC5389] due to it being unreliable and brittle. This particular
traversal method uses the removed RFC3489 functionality to detect the traversal method uses the removed functionality described in RFC 3489
NAT type to give an early failure indication when the NAT is showing to detect the NAT type to give an early failure indication when the
the behavior that this method can't support. This method also NAT is showing the behavior that this method can't support. This
suggest using the RTP NO-OP payload format [I-D.ietf-avt-rtp-no-op] method also suggests using the RTP No-Op payload format [RTP-NO-OP]
for key-alives of the RTP traffic in the client to server direction. for keep-alives of the RTP traffic in the client-to-server direction.
This can be replaced with another form of UDP packet as will be This can be replaced with another form of UDP packet as will be
further discussed below. further discussed below.
4.1.2. Using STUN to traverse NAT without server modifications 4.1.2. Using STUN to Traverse NAT without Server Modifications
This section describes how a client can use STUN to traverse NATs to This section describes how a client can use STUN to traverse NATs to
RTSP servers without requiring server modifications. Note that this RTSP servers without requiring server modifications. Note that this
method has limited applicability and requires the server to be method has limited applicability and requires the server to be
available in the external/public address realm in regards to the available in the external/public address realm in regards to the
client located behind a NAT(s). client located behind a NAT(s).
Limitations: Limitations:
o The server must be located in either a public address realm or the o The server must be located in either a public address realm or the
next hop external address realm in regards to the client. next-hop external address realm in regards to the client.
o The client may only be located behind NATs that perform "Endpoint- o The client may only be located behind NATs that perform Endpoint-
Independent" or "Address-Dependent" Mappings (STUN server and RTSP Independent or Address-Dependent Mappings (the STUN server and
server on same IP address). Clients behind NATs that do "Address RTSP server on the same IP address). Clients behind NATs that do
and Port-Dependent" Mappings cannot use this method. See Address and Port-Dependent Mappings cannot use this method. See
[RFC4787] for full definition of these terms. [RFC4787] for the full definition of these terms.
o Based on the discontinued middlebox classification of the replaced o Based on the discontinued middlebox classification of the replaced
STUN specification [RFC3489]. Thus brittle and unreliable. STUN specification [RFC3489]; thus, it is brittle and unreliable.
Method: Method:
A RTSP client using RTP transport over UDP can use STUN to traverse a An RTSP client using RTP transport over UDP can use STUN to traverse
NAT(s) in the following way: a NAT(s) in the following way:
1. Use STUN to try to discover the type of NAT, and the timeout 1. Use STUN to try to discover the type of NAT and the timeout
period for any UDP mapping on the NAT. This is recommended to be period for any UDP mapping on the NAT. This is recommended to be
performed in the background as soon as IP connectivity is performed in the background as soon as IP connectivity is
established. If this is performed prior to establishing a established. If this is performed prior to establishing a
streaming session the delays in the session establishment will be streaming session, the delays in the session establishment will
reduced. If no NAT is detected, normal SETUP should be used. be reduced. If no NAT is detected, normal SETUP should be used.
2. The RTSP client determines the number of UDP ports needed by 2. The RTSP client determines the number of UDP ports needed by
counting the number of needed media transport protocols sessions counting the number of needed media transport protocols sessions
in the multi-media presentation. This information is available in the multimedia presentation. This information is available in
in the media description protocol, e.g. SDP [RFC4566]. For the media description protocol, e.g., SDP [RFC4566]. For
example, each RTP session will in general require two UDP ports, example, each RTP session will in general require two UDP ports:
one for RTP, and one for RTCP. one for RTP, and one for RTCP.
3. For each UDP port required, establish a mapping and discover the 3. For each UDP port required, establish a mapping and discover the
public/external IP address and port number with the help of the public/external IP address and port number with the help of the
STUN server. A successful mapping looks like: client's local STUN server. A successful mapping looks like: client's local
address/port <-> public address/port. address/port <-> public address/port.
4. Perform the RTSP SETUP for each media. In the transport header 4. Perform the RTSP SETUP for each media. In the Transport header,
the following parameter should be included with the given values: the following parameter should be included with the given values:
"dest_addr" [I-D.ietf-mmusic-rfc2326bis] or "destination" + "dest_addr" [RTSP] or "destination" + "client_port" [RFC2326]
"client_port" [RFC2326] with the public/external IP address and with the public/external IP address and port pair for both RTP
port pair for both RTP and RTCP. To be certain that this works and RTCP. To be certain that this works, servers must allow a
servers must allow a client to setup the RTP stream on any port, client to set up the RTP stream on any port, not only even ports
not only even ports and with non-contiguous port numbers for RTP and with non-contiguous port numbers for RTP and RTCP. This
and RTCP. This requires the new feature provided in RTSP 2.0 requires the new feature provided in RTSP 2.0 [RTSP]. The server
[I-D.ietf-mmusic-rfc2326bis]. The server should respond with a should respond with a Transport header containing an "src_addr"
transport header containing an "src_addr" or "source" + or "source" + "server_port" parameters with the RTP and RTCP
"server_port" parameters with the RTP and RTCP source IP address source IP address and port of the media stream.
and port of the media stream.
5. To keep the mappings alive, the client should periodically send 5. To keep the mappings alive, the client should periodically send
UDP traffic over all mappings needed for the session. For the UDP traffic over all mappings needed for the session. For the
mapping carrying RTCP traffic the periodic RTCP traffic are mapping carrying RTCP traffic, the periodic RTCP traffic is
likely enough. For mappings carrying RTP traffic and for likely enough. For mappings carrying RTP traffic and for
mappings carrying RTCP packets at too low a frequency, keep-alive mappings carrying RTCP packets at too low of a frequency, keep-
messages should be sent. alive messages should be sent.
If a UDP mapping is lost, the above discovery process must be If a UDP mapping is lost, the above discovery process must be
repeated. The media stream also needs to be SETUP again to change repeated. The media stream also needs to be SETUP again to change
the transport parameters to the new ones. This will cause a glitch the transport parameters to the new ones. This will cause a glitch
in media playback. in media playback.
To allow UDP packets to arrive from the server to a client behind a To allow UDP packets to arrive from the server to a client behind an
"Address Dependent" or "Address and Port Dependent" filtering NAT, Address-Dependent or Address and Port-Dependent Filtering NAT, the
the client must first send a UDP packet to establish filtering state client must first send a UDP packet to establish the filtering state
in the NAT. The client, before sending a RTSP PLAY request, must in the NAT. The client, before sending an RTSP PLAY request, must
send a so called hole-punching packet on each mapping, to the IP send a so-called hole-punching packet on each mapping to the IP
address and port given as the server's source address and port. For address and port given as the server's source address and port. For
a NAT that only is "Address Dependent" filtering, the hole-punching a NAT that only is Address-Dependent Filtering, the hole-punching
packet could be sent to the server's discard port (port number 9). packet could be sent to the server's discard port (port number 9).
For "Address and Port Dependent" filtering NATs the hole-punching For Address and Port-Dependent Filtering NATs, the hole-punching
packet must go to the port used for sending UDP packets to the packet must go to the port used for sending UDP packets to the
client. To be able to do that the server need to include the client. To be able to do that, the server needs to include the
"src_addr" in the "Transport" header (which is the "source" transport "src_addr" in the Transport header (which is the "source" transport
parameter in RFC2326). Since UDP packets are inherently unreliable, parameter in RFC2326). Since UDP packets are inherently unreliable,
to ensure that at least one UDP message passes the NAT, hole-punching to ensure that at least one UDP message passes the NAT, hole-punching
packets should be retransmitted a reasonable number of times. packets should be retransmitted a reasonable number of times.
As hole-punching and keep-alive messages, one could have used the RTP One could have used RTP No-Op packets [RTP-NO-OP] as hole-punching
No-Op packet [I-D.ietf-avt-rtp-no-op] had they been defined. That and keep-alive messages had they been defined. That would have
would have ensured that the traffic would look like RTP and thus ensured that the traffic would look like RTP and thus would likely
likely have the least risk of being dropped by any firewall. The have the least risk of being dropped by any firewall. The drawback
drawback of using RTP No-Op is that the payload type number must be of using RTP No-Op is that the payload type number must be
dynamically assigned through RTSP first. Other options are STUN, a dynamically assigned through RTSP first. Other options are STUN, an
RTP packet without any payload, or an UDP packet without any payload. RTP packet without any payload, or a UDP packet without any payload.
For RTCP it is most suitable to use correctly generated RTCP packets. For RTCP it is most suitable to use correctly generated RTCP packets.
In general sending unsolicited traffic to the RTSP server may trigger In general, sending unsolicited traffic to the RTSP server may
security functions resulting in blocking of the keep-alive messages trigger security functions resulting in the blocking of the keep-
or termination of the RTSP session itself. alive messages or termination of the RTSP session itself.
This method is further brittle as it doesn't support address and port This method is further brittle as it doesn't support Address and
dependent mappings. Thus, it proposes to use the old STUN methods to Port-Dependent Mappings. Thus, it proposes to use the old STUN
classify the NAT behavior, thus enabling early error indication. methods to classify the NAT behavior, thus enabling early error
This is strictly not required but will lead to failures during setup indication. This is strictly not required but will lead to failures
when the NAT has the wrong behavior. This failure can also occur If during setup when the NAT has the wrong behavior. This failure can
the NAT changes the properties of the existing mapping and filtering also occur if the NAT changes the properties of the existing mapping
state or between the classification message exchange and the actual and filtering state or between the classification message exchange
RTSP session setup. for example due to load. and the actual RTSP session setup, for example, due to load.
4.1.3. ALG considerations 4.1.3. ALG Considerations
If a NAT supports RTSP ALG (Application Level Gateway) and is not If a NAT supports RTSP ALG (Application Level Gateway) and is not
aware of the STUN traversal option, service failure may happen, aware of the STUN traversal option, service failure may happen,
because a client discovers its NAT external IP address and port because a client discovers its NAT external IP address and port
numbers, and inserts them in its SETUP requests. When the RTSP ALG numbers and inserts them in its SETUP requests. When the RTSP ALG
processes the SETUP request it may change the destination and port processes the SETUP request, it may change the destination and port
number, resulting in unpredictable behavior. An ALG should not number, resulting in unpredictable behavior. An ALG should not
update address fields which contains addresses other than the NATs update address fields that contain addresses other than the NAT's
internal address domain. In cases where the ALG modifies fields internal address domain. In cases where the ALG modifies fields
unnecessarily two alternatives exist: unnecessarily, two alternatives exist:
1. Use TLS to encrypt the RTSP TCP connection to prevent the ALG 1. Use Transport Layer Security (TLS) to encrypt the data over the
from reading and modifying the RTSP messages. RTSP TCP connection to prevent the ALG from reading and modifying
the RTSP messages.
2. Turn off the STUN based NAT traversal mechanism 2. Turn off the STUN-based NAT traversal mechanism.
As it may be difficult to determine why the failure occurs, the usage As it may be difficult to determine why the failure occurs, the usage
of TLS protected RTSP message exchange at all times would avoid this of TLS-protected RTSP message exchange at all times would avoid this
issue. issue.
4.1.4. Deployment Considerations 4.1.4. Deployment Considerations
For the Stand-Alone usage of STUN the following applies: For the stand-alone usage of STUN, the following applies:
Advantages: Advantages:
o STUN is a solution first used by SIP [RFC3261] based applications o STUN is a solution first used by applications based on SIP
(See section 1 and 2 of [RFC5389]). As shown above, with little [RFC3261] (see Sections 1 and 2 of [RFC5389]). As shown above,
or no changes, the RTSP application can re-use STUN as a NAT with little or no changes, the RTSP application can reuse STUN as
traversal solution, avoiding the pit-fall of solving a problem a NAT traversal solution, avoiding the pitfall of solving a
twice. problem twice.
o Using STUN does not require RTSP server modifications, assuming it o Using STUN does not require RTSP server modifications, assuming it
is a RTSP 2.0 compliant server; it only affects the client is a server that is compliant with RTSP 2.0; it only affects the
implementation. client implementation.
Disadvantages: Disadvantages:
o Requires a STUN server deployed in the same address domain as the o Requires a STUN server deployed in the same address domain as the
server. server.
o Only works with NATs that perform endpoint independent and address o Only works with NATs that perform Endpoint-Independent and
dependent mappings. Address and Port-Dependent filtering NATs Address-Dependent Mappings. Address and Port-Dependent Filtering
create some issues. NATs create some issues.
o Brittle to NATs changing the properties of the NAT mapping and o Brittle to NATs changing the properties of the NAT mapping and
filtering. filtering.
o Does not work with port and address dependent mapping NATs without o Does not work with Address and Port-Dependent Mapping NATs without
server modifications. server modifications.
o Will not work if a NAT uses multiple IP addresses, since RTSP o Will not work if a NAT uses multiple IP addresses, since RTSP
servers generally require all media streams to use the same IP as servers generally require all media streams to use the same IP as
used in the RTSP connection to prevent becoming a DDoS tool. used in the RTSP connection to prevent becoming a DDoS tool.
o Interaction problems exist when a RTSP-aware ALG interferes with o Interaction problems exist when an RTSP-aware ALG interferes with
the use of STUN for NAT traversal unless TLS secured RTSP message the use of STUN for NAT traversal unless TLS-secured RTSP message
exchange is used. exchange is used.
o Using STUN requires that RTSP servers and clients support the o Using STUN requires that RTSP servers and clients support the
updated RTSP specification [I-D.ietf-mmusic-rfc2326bis], because updated RTSP specification [RTSP], because it is no longer
it is no longer possible to guarantee that RTP and RTCP ports are possible to guarantee that RTP and RTCP ports are adjacent to each
adjacent to each other, as required by the "client_port" and other, as required by the "client_port" and "server_port"
"server_port" parameters in RFC2326. parameters in RFC 2326.
Transition: Transition:
The usage of STUN can be phased out gradually as the first step of a The usage of STUN can be phased out gradually as the first step of a
STUN capable server or client should be to check the presence of STUN-capable server or client should be to check the presence of
NATs. The removal of STUN capability in the client implementations NATs. The removal of STUN capability in the client implementations
will have to wait until there is absolutely no need to use STUN. will have to wait until there is absolutely no need to use STUN.
4.1.5. Security Considerations 4.1.5. Security Considerations
To prevent the RTSP server from being used as Denial of Service (DoS) To prevent the RTSP server from being used as Denial-of-Service (DoS)
attack tools the RTSP Transport header parameter "destination" and attack tools, the RTSP Transport header parameters "destination" and
"dest_addr" are generally not allowed to point to any IP address "dest_addr" are generally not allowed to point to any IP address
other than the one the RTSP message originates from. The RTSP server other than the one the RTSP message originates from. The RTSP server
is only prepared to make an exception to this rule when the client is is only prepared to make an exception to this rule when the client is
trusted (e.g., through the use of a secure authentication process, or trusted (e.g., through the use of a secure authentication process or
through some secure method of challenging the destination to verify through some secure method of challenging the destination to verify
its willingness to accept the RTP traffic). Such a restriction means its willingness to accept the RTP traffic). Such a restriction means
that STUN in general does not work for use cases where RTSP and media that STUN in general does not work for use cases where RTSP and media
transport go to different addresses. transport go to different addresses.
STUN combined with destination address restricted RTSP has the same STUN combined with RTSP that is restricted by destination address has
security properties as the core RTSP. It is protected from being the same security properties as the core RTSP. It is protected from
used as a DoS attack tool unless the attacker has the ability to being used as a DoS attack tool unless the attacker has the ability
spoof the TCP connection carrying RTSP messages. to spoof the TCP connection carrying RTSP messages.
Using STUN's support for message authentication and secure transport Using STUN's support for message authentication and the secure
of RTSP messages, attackers cannot modify STUN responses or RTSP transport of RTSP messages, attackers cannot modify STUN responses or
messages (TLS) to change media destination. This protects against RTSP messages (TLS) to change the media destination. This protects
hijacking, however as a client can be the initiator of an attack, against hijacking; however, as a client can be the initiator of an
these mechanisms cannot securely prevent RTSP servers being used as attack, these mechanisms cannot securely prevent RTSP servers from
DoS attack tools. being used as DoS attack tools.
4.2. Server Embedded STUN 4.2. Server Embedded STUN
4.2.1. Introduction 4.2.1. Introduction
This Section describes an alternative to the stand-alone STUN usage This section describes an alternative to the stand-alone STUN usage
in the previous section that has quite significantly different in the previous section that has quite significantly different
behavior. behavior.
4.2.2. Embedding STUN in RTSP 4.2.2. Embedding STUN in RTSP
This section outlines the adaptation and embedding of STUN within This section outlines the adaptation and embedding of STUN within
RTSP. This enables STUN to be used to traverse any type of NAT, RTSP. This enables STUN to be used to traverse any type of NAT,
including address and Port-Dependent mapping NATs. This would including Address and Port-Dependent Mapping NATs. This would
require RTSP level protocol changes. require RTSP-level protocol changes.
This NAT traversal solution has limitations: This NAT traversal solution has limitations:
1. It does not work if both RTSP client and RTSP server are behind 1. It does not work if both the RTSP client and RTSP server are
separate NATs. behind separate NATs.
2. The RTSP server may, for security reasons, refuse to send media 2. The RTSP server may, for security reasons, refuse to send media
streams to an IP different from the IP in the client RTSP streams to an IP that is different from the IP in the client RTSP
requests. requests.
Deviations from STUN as defined in RFC 5389: Deviations from STUN as defined in RFC 5389:
1. The RTSP application must provision the client with an identity 1. The RTSP application must provision the client with an identity
and shared secret to use in the STUN authentication; and shared secret to use in the STUN authentication;
2. We require STUN server to be co-located on RTSP server's media 2. We require the STUN server to be co-located on the RTSP server's
source ports. media source ports.
If STUN server is co-located with RTSP server's media source port, an If the STUN server is co-located with the RTSP server's media source
RTSP client using RTP transport over UDP can use STUN to traverse ALL port, an RTSP client using RTP transport over UDP can use STUN to
types of NATs. In the case of port and address dependent mapping traverse ALL types of NATs. In the case of Address and Port-
NATs, the party on the inside of the NAT must initiate UDP traffic. Dependent Mapping NATs, the party on the inside of the NAT must
The STUN Binding Request, being a UDP packet itself, can serve as the initiate UDP traffic. The STUN Binding Request, being a UDP packet
traffic initiating packet. Subsequently, both the STUN Binding itself, can serve as the traffic initiating packet. Subsequently,
Response packets and the RTP/RTCP packets can traverse the NAT, both the STUN Binding Response packets and the RTP/RTCP packets can
regardless of whether the RTSP server or the RTSP client is behind traverse the NAT, regardless of whether the RTSP server or the RTSP
NAT (however only one of the can be behind a NAT). client is behind NAT (however, only one of them can be behind a NAT).
Likewise, if an RTSP server is behind a NAT, then an embedded STUN Likewise, if an RTSP server is behind a NAT, then an embedded STUN
server must be co-located on the RTSP client's RTCP port. Also it server must be co-located on the RTSP client's RTCP port. Also, it
will become the client that needs to disclose his destination address will become the client that needs to disclose his destination address
rather than the server, so the server can correctly determine its NAT rather than the server, so the server can correctly determine its NAT
external source address for the media streams. In this case, we external source address for the media streams. In this case, we
assume that the client has some means of establishing TCP connection assume that the client has some means of establishing a TCP
to the RTSP server behind NAT so as to exchange RTSP messages with connection to the RTSP server behind NAT so as to exchange RTSP
the RTSP server, potentially using a proxy or static rules. messages with the RTSP server, potentially using a proxy or static
rules.
To minimize delay, we require that the RTSP server supporting this To minimize delay, we require that the RTSP server supporting this
option must inform the client about the RTP and RTCP ports from where option must inform the client about the RTP and RTCP ports from where
the server will send out RTP and RTCP packets, respectively. This the server will send out RTP and RTCP packets, respectively. This
can be done by using the "server_port" parameter in RFC2326, and the can be done by using the "server_port" parameter in RFC 2326 and the
"src_addr" parameter in [I-D.ietf-mmusic-rfc2326bis]. Both are in "src_addr" parameter in [RTSP]. Both are in the RTSP Transport
the RTSP Transport header. But in general this strategy will require header. But in general, this strategy will require that one first
that one first do one SETUP request per media to learn the server does one SETUP request per media to learn the server ports, then
ports, then perform the STUN checks, followed by a subsequent SETUP perform the STUN checks, followed by a subsequent SETUP to change the
to change the client port and destination address to what was learned client port and destination address to what was learned during the
during the STUN checks. STUN checks.
To be certain that RTCP works correctly the RTSP end-point (server or To be certain that RTCP works correctly, the RTSP endpoint (server or
client) will be required to send and receive RTCP packets from the client) will be required to send and receive RTCP packets from the
same port. same port.
4.2.3. Discussion On Co-located STUN Server 4.2.3. Discussion on Co-located STUN Server
In order to use STUN to traverse "address and port dependent" In order to use STUN to traverse Address and Port-Dependent Filtering
filtering or mapping NATs the STUN server needs to be co-located with or Mapping NATs, the STUN server needs to be co-located with the
the streaming server media output ports. This creates a de- streaming server media output ports. This creates a demultiplexing
multiplexing problem: we must be able to differentiate a STUN packet problem: we must be able to differentiate a STUN packet from a media
from a media packet. This will be done based on heuristics. The packet. This will be done based on heuristics. The existing STUN
existing STUN heuristics is the first byte in the packet and the heuristics is the first byte in the packet and the Magic Cookie field
Magic Cookie field (added in RFC5389), which works fine between STUN (added in RFC 5389), which works fine between STUN and RTP or RTCP
and RTP or RTCP where the first byte happens to be different. Thanks where the first byte happens to be different. Thanks to the Magic
to the magic cookie field it is unlikely that other protocols would Cookie field, it is unlikely that other protocols would be mistaken
be mistaken for a STUN packet, but not assured. For more discussion for a STUN packet, but this is not assured. For more discussion of
of this, please see Section 5.1.2 of [RFC5764]. this, please see Section 5.1.2 of [RFC5764].
4.2.4. ALG considerations 4.2.4. ALG Considerations
The same ALG traversal considerations as for Stand-Alone STUN applies The same ALG traversal considerations as for stand-alone STUN applies
(Section 4.1.3). (Section 4.1.3).
4.2.5. Deployment Considerations 4.2.5. Deployment Considerations
For the "Embedded STUN" method the following applies: For the "Embedded STUN" method the following applies:
Advantages: Advantages:
o STUN is a solution first used by SIP applications. As shown o STUN is a solution first used by SIP applications. As shown
above, with little or no changes, RTSP application can re-use STUN above, with little or no changes, the RTSP application can reuse
as a NAT traversal solution, avoiding the pit-fall of solving a STUN as a NAT traversal solution, avoiding the pitfall of solving
problem twice. a problem twice.
o STUN has built-in message authentication features, which makes it o STUN has built-in message authentication features, which makes it
more secure against hi-jacking attacks. See next section for an more secure against hijacking attacks. See the next section for
in-depth security discussion. an in-depth security discussion.
o This solution works as long as there is only one RTSP endpoint in o This solution works as long as there is only one RTSP endpoint in
the private address realm, regardless of the NAT's type. There the private address realm, regardless of the NAT's type. There
may even be multiple NATs (see Figure 1 in [RFC5389]). may even be multiple NATs (see Figure 1 in [RFC5389]).
o Compared to other UDP based NAT traversal methods in this o Compared to other UDP-based NAT traversal methods in this
document, STUN requires little new protocol development (since document, STUN requires little new protocol development (since
STUN is already a IETF standard), and most likely less STUN is already an IETF standard), and most likely less
implementation effort, since open source STUN server and client implementation effort, since open source STUN server and client
implementations are available [STUN-IMPL][PJNATH]. implementations are available [STUN-IMPL] [PJNATH].
Disadvantages: Disadvantages:
o Some extensions to the RTSP core protocol, likely signaled by RTSP o Some extensions to the RTSP core protocol, likely signaled by RTSP
feature tags, must be introduced. feature tags, must be introduced.
o Requires an embedded STUN server to be co-located on each of the o Requires an embedded STUN server to be co-located on each of the
RTSP server's media protocol's ports (e.g. RTP and RTCP ports), RTSP server's media protocol's ports (e.g., RTP and RTCP ports),
which means more processing is required to de-multiplex STUN which means more processing is required to demultiplex STUN
packets from media packets. For example, the de-multiplexer must packets from media packets. For example, the demultiplexer must
be able to differentiate a RTCP RR packet from a STUN packet, and be able to differentiate an RTCP RR packet from a STUN packet and
forward the former to the streaming server, and the latter to the forward the former to the streaming server and the latter to the
STUN server. STUN server.
o Does not support use cases that require the RTSP connection and o Does not support use cases that require the RTSP connection and
the media reception to happen at different addresses, unless the the media reception to happen at different addresses, unless the
server's security policy is relaxed. server's security policy is relaxed.
o Interaction problems exist when a RTSP ALG is not aware of STUN o Interaction problems exist when an RTSP ALG is not aware of STUN
unless TLS is used to protect the RTSP messages. unless TLS is used to protect the RTSP messages.
o Using STUN requires that RTSP servers and clients support the o Using STUN requires that RTSP servers and clients support the
updated RTSP specification [I-D.ietf-mmusic-rfc2326bis], and they updated RTSP specification [RTSP], and they both agree to support
both agree to support the NAT traversal feature. the NAT traversal feature.
o Increases the setup delay with at least the amount of time it o Increases the setup delay with at least the amount of time it
takes to perform STUN message exchanges. Most likely an extra takes to perform STUN message exchanges. Most likely an extra
SETUP sequence will be required. SETUP sequence will be required.
Transition: Transition:
The usage of STUN can be phased out gradually as the first step of a The usage of STUN can be phased out gradually as the first step of a
STUN capable machine can be to check the presence of NATs for the STUN-capable machine can be used to check the presence of NATs for
presently used network connection. The removal of STUN capability in the presently used network connection. The removal of STUN
the client implementations will have to wait until there is capability in the client implementations will have to wait until
absolutely no need to use STUN, i.e. no NATs or firewalls. there is absolutely no need to use STUN, i.e., no NATs or firewalls.
4.2.6. Security Considerations 4.2.6. Security Considerations
See Stand-Alone STUN (Section 4.1.5). See Stand-Alone STUN (Section 4.1.5).
4.3. ICE 4.3. ICE
4.3.1. Introduction 4.3.1. Introduction
ICE (Interactive Connectivity Establishment) [RFC5245] is a Interactive Connectivity Establishment (ICE) [RFC5245] is a
methodology for NAT traversal that has been developed for SIP using methodology for NAT traversal that has been developed for SIP using
SDP offer/answer. The basic idea is to try, in a staggered parallel SDP offer/answer. The basic idea is to try, in a staggered parallel
fashion, all possible connection addresses that an endpoint may be fashion, all possible connection addresses in which an endpoint may
reachable by. This allows the endpoint to use the best available UDP be reached. This allows the endpoint to use the best available UDP
"connection" (meaning two UDP end-points capable of reaching each "connection" (meaning two UDP endpoints capable of reaching each
other). The methodology has very nice properties in that basically other). The methodology has very nice properties in that basically
all NAT topologies are possible to traverse. all NAT topologies are possible to traverse.
Here is how ICE works at a high level. End point A collects all Here is how ICE works at a high level. Endpoint A collects all
possible addresses that can be used, including local IP addresses, possible addresses that can be used, including local IP addresses,
STUN derived addresses, TURN addresses, etc. On each local port that STUN-derived addresses, Traversal Using Relay NAT (TURN) addresses,
any of these address and port pairs lead to, a STUN server is etc. On each local port that any of these address and port pairs
installed. This STUN server only accepts STUN requests using the lead to, a STUN server is installed. This STUN server only accepts
correct authentication through the use of a username and password. STUN requests using the correct authentication through the use of a
username and password.
End-point A then sends a request to establish connectivity with end- Endpoint A then sends a request to establish connectivity with
point B, which includes all possible "destinations" [RFC5245] to get endpoint B, which includes all possible "destinations" [RFC5245] to
the media through to A. Note that each of A's local address/port get the media through to A. Note that each of A's local address/port
pairs (host candidates and server reflexive base) has a STUN server pairs (host candidates and server reflexive base) has a co-located
co-located. B in turn provides A with all its possible destinations STUN server. B in turn provides A with all its possible destinations
for the different media streams. A and B then uses a STUN client to for the different media streams. A and B then uses a STUN client to
try to reach all the address and port pairs specified by A from its try to reach all the address and port pairs specified by A from its
corresponding destination ports. The destinations for which the STUN corresponding destination ports. The destinations for which the STUN
requests successfully complete are then indicated and one is requests successfully complete are then indicated and one is
selected. selected.
If B fails to get any STUN response from A, all hope is not lost. If B fails to get any STUN response from A, all hope is not lost.
Certain NAT topologies require multiple tries from both ends before Certain NAT topologies require multiple tries from both ends before
successful connectivity is accomplished and therefore requests are successful connectivity is accomplished; therefore, requests are
retransmitted multiple times. The STUN requests may also result in retransmitted multiple times. The STUN requests may also result in
that more connectivity alternatives (destinations) are discovered and more connectivity alternatives (destinations) being discovered and
conveyed in the STUN responses. conveyed in the STUN responses.
4.3.2. Using ICE in RTSP 4.3.2. Using ICE in RTSP
The usage of ICE for RTSP requires that both client and server be The usage of ICE for RTSP requires that both client and server be
updated to include the ICE functionality. If both parties implement updated to include the ICE functionality. If both parties implement
the necessary functionality the following steps could provide ICE the necessary functionality, the following steps could provide ICE
support for RTSP. support for RTSP.
This assumes that it is possible to establish a TCP connection for This assumes that it is possible to establish a TCP connection for
the RTSP messages between the client and the server. This is not the RTSP messages between the client and the server. This is not
trivial in scenarios where the server is located behind a NAT, and trivial in scenarios where the server is located behind a NAT, and
may require some TCP ports be opened, or the deployment of proxies, may require some TCP ports be opened, or proxies are deployed, etc.
etc.
The negotiation of ICE in RTSP of necessity will work different than The negotiation of ICE in RTSP of necessity will work different than
in SIP with SDP offer/answer. The protocol interactions are in SIP with SDP offer/answer. The protocol interactions are
different and thus the possibilities for transfer of states are also different, and thus the possibilities for transfer of states are also
somewhat different. The goal is also to avoid introducing extra somewhat different. The goal is also to avoid introducing extra
delay in the setup process at least for when the server is not behind delay in the setup process at least for when the server is not behind
a NAT in regards to the client, and the client is either having an a NAT in regards to the client, and the client is either having an
address in the same address domain, or is behind NAT(s) which can address in the same address domain or is behind the NAT(s), which can
address the address domain of the server. This process is only address the address domain of the server. This process is only
intended to support PLAY mode, i.e. media traffic flows from server intended to support PLAY mode, i.e., media traffic flows from server
to client. to client.
1. The ICE usage begins in the SDP. The SDP for the service 1. ICE usage begins in the SDP. The SDP for the service indicates
indicates that ICE is supported at the server. No candidates can that ICE is supported at the server. No candidates can be given
be given here as that would not work with the on demand, DNS load here as that would not work with on demand, DNS load balancing,
balancing, etc., that have the SDP indicate a resource on a etc., which have the SDP indicate a resource on a server park
server park rather than a specific machine. rather than a specific machine.
2. The client gathers addresses and puts together its candidates for 2. The client gathers addresses and puts together its candidates for
each media stream indicated in the session description. each media stream indicated in the session description.
3. In each SETUP request the client includes its candidates in an 3. In each SETUP request, the client includes its candidates in an
ICE specific transport specification. This indicates for the ICE-specific transport specification. For the server, this
server the ICE support by the client. One candidate is the most indicates the ICE support by the client. One candidate is the
prioritized candidate and here the prioritization for this most prioritized candidate and here the prioritization for this
address should be somewhat different compared to SIP. High address should be somewhat different compared to SIP. High-
performance candidates is recommended rather than candidates with performance candidates are recommended rather than candidates
the highest likellihood of success, as it is more likely that a with the highest likelihood of success, as it is more likely that
server is not behind a NAT compared to a SIP user-agent. a server is not behind a NAT compared to a SIP user agent.
4. The server responds to the SETUP (200 OK) for each media stream 4. The server responds to the SETUP (200 OK) for each media stream
with its candidates. A server not behind a NAT usually only with its candidates. A server not behind a NAT usually only
provides a single ICE candidate. Also here one candidate is the provides a single ICE candidate. Also, here one candidate is the
server primary address. server primary address.
5. The connectivity checks are performed. For the server the 5. The connectivity checks are performed. For the server, the
connectivity checks from the server to the clients have an connectivity checks from the server to the clients have an
additional usage. They verify that there is someone willing to additional usage. They verify that there is someone willing to
receive the media, thus preventing the server from unknowingly receive the media, thus preventing the server from unknowingly
performing a DoS attack. performing a DoS attack.
6. Connectivity checks from the client promoting a candidate pair 6. Connectivity checks from the client promoting a candidate pair
were successful. Thus no further SETUP requests are necessary were successful. Thus, no further SETUP requests are necessary
and processing can proceed with step 7. If another address than and processing can proceed with step 7. If an address other than
the primary has been verified by the client to work, that address the primary has been verified by the client to work, that address
may then be promoted for usage in a SETUP request (Go to 7). If may then be promoted for usage in a SETUP request (go to step 7).
the checks for the available candidates failed and if further If the checks for the available candidates failed and if further
candidates have been derived during the connectivity checks, then candidates have been derived during the connectivity checks, then
those can be signalled in new candidate lines in a SETUP request those can be signaled in new candidate lines in a SETUP request
updating the list (Go to 5). updating the list (go to step 5).
7. Client issues PLAY request. If the server also has completed its 7. Client issues the PLAY request. If the server also has completed
connectivity checks for the promoted candidate pair (based on its connectivity checks for the promoted candidate pair (based on
username as it may be derived addresses if the client was behind the username as it may be derived addresses if the client was
NAT) then it can directly answer 200 OK (Go to 8). If the behind NAT), then it can directly answer 200 OK (go to step 8).
connectivity check has not yet completed it responds with a 1xx If the connectivity check has not yet completed, it responds with
code to indicate that it is verifying the connectivity. If that a 1xx code to indicate that it is verifying the connectivity. If
fails within the set timeout, an error is reported back. Client that fails within the set timeout, an error is reported back.
needs to go back to 6. The client needs to go back to step 6.
8. Process completed and media can be delivered. ICE candidates not 8. Process completed and media can be delivered. ICE candidates not
used may be released. used may be released.
To keep media paths alive the client needs to periodically send data To keep media paths alive, the client needs to periodically send data
to the server. This will be realized with STUN. RTCP sent by the to the server. This will be realized with STUN. RTCP sent by the
client should be able to keep RTCP open but STUN will also be used client should be able to keep RTCP open, but STUN will also be used
based on the same motivations as for ICE for SIP. for SIP based on the same motivations as for ICE.
4.3.3. Implementation burden of ICE 4.3.3. Implementation Burden of ICE
The usage of ICE will require that a number of new protocols and new The usage of ICE will require that a number of new protocols and new
RTSP/SDP features be implemented. This makes ICE the solution that RTSP/SDP features be implemented. This makes ICE the solution that
has the largest impact on client and server implementations among all has the largest impact on client and server implementations among all
the NAT/firewall traversal methods in this document. the NAT/firewall traversal methods in this document.
RTSP server implementation requirements are: RTSP server implementation requirements are:
o STUN server features o STUN server features
o Limited STUN client features o Limited STUN client features
o SDP generation with more parameters. o SDP generation with more parameters
o RTSP error code for ICE extension o RTSP error code for ICE extension
RTSP client implementation requirements are: RTSP client implementation requirements are:
o Limited STUN server features o Limited STUN server features
o Limited STUN client features o Limited STUN client features
o RTSP error code and ICE extension o RTSP error code and ICE extension
4.3.4. ALG Considerations 4.3.4. ALG Considerations
If there is an RTSP ALG that doesn't support the NAT traversal If there is an RTSP ALG that doesn't support the NAT traversal
method, it may interfere with the NAT traversal. As the usage of ICE method, it may interfere with the NAT traversal. As the usage of ICE
for the traversal manifest itself in the RTSP message primarily as for the traversal manifests itself in the RTSP message primarily as a
new transport specification, an ALG that passes through unknown will new transport specification, an ALG that passes through unknown will
not prevent the traversal. An ALG that discards unknown not prevent the traversal. An ALG that discards unknown
specifications will however prevent the NAT traversal. These issues specifications will, however, prevent the NAT traversal. These
can be avoided by preventing the ALG to interfere with the signalling issues can be avoided by preventing the ALG to interfere with the
by using TLS for the RTSP message transport. signaling by using TLS for the RTSP message transport.
An ALG that supports this traversal method, can on the most basic An ALG that supports this traversal method can, on the most basic
level just pass the transport specifications through. ALGs in NATs level, just pass the transport specifications through. ALGs in NATs
and Firewalls could use the ICE candidates to establish filtering and firewalls could use the ICE candidates to establish a filtering
state that would allow incoming STUN messages prior to any outgoing state that would allow incoming STUN messages prior to any outgoing
hole-punching packets, and in that way speed up the connectivity hole-punching packets, and in that way it could speed up the
checks and reduce the risk of failures. connectivity checks and reduce the risk of failures.
4.3.5. Deployment Considerations 4.3.5. Deployment Considerations
Advantages: Advantages:
o Solves NAT connectivity discovery for basically all cases as long o Solves NAT connectivity discovery for basically all cases as long
as a TCP connection between the client and server can be as a TCP connection between the client and server can be
established. This includes servers behind NATs. (Note that a established. This includes servers behind NATs. (Note that a
proxy between address domains may be required to get TCP through). proxy between address domains may be required to get TCP through.)
o Improves defenses against DDoS attacks, since a media receiving o Improves defenses against DDoS attacks, since a media-receiving
client requires authentications, via STUN on its media reception client requires authentications via STUN on its media reception
ports. ports.
Disadvantages: Disadvantages:
o Increases the setup delay with at least the amount of time it o Increases the setup delay with at least the amount of time it
takes for the server to perform its STUN requests. takes for the server to perform its STUN requests.
o Assumes that it is possible to de-multiplex between the packets of o Assumes that it is possible to demultiplex between the packets of
the media protocol and STUN packets. This is possible for RTP as the media protocol and STUN packets. This is possible for RTP as
discussed for example in Section 5.1.2 of [RFC5764]. discussed, for example, in Section 5.1.2 of [RFC5764].
o Has fairly high implementation burden put on both RTSP server and o Has a fairly high implementation burden put on both the RTSP
client. However, several Open Source ICE implementations do server and client. However, several open source ICE
exist, such as [NICE][PJNATH]. implementations do exist, such as [NICE] and [PJNATH].
4.3.6. Security Consideration 4.3.6. Security Considerations
One should review the security consideration section of ICE and STUN One should review the Security Considerations section of ICE and STUN
to understand that ICE contains some potential issues. However these to understand that ICE contains some potential issues. However,
can be avoided by correctly using ICE in RTSP. An important factor these can be avoided by correctly using ICE in RTSP. An important
is to secure the signalling, i.e. use TLS between RTSP client and factor is to secure the signaling, i.e., use TLS between the RTSP
server. In fact ICE does help avoid the DDoS attack issue with RTSP client and server. In fact ICE does help avoid the DDoS attack issue
substantially as it reduces the possibility for a DDoS using RTSP with RTSP substantially as it reduces the possibility for a DDoS
servers to attackers that are on-path between the RTSP server and the using RTSP servers on attackers that are on path between the RTSP
target and capable of intercepting the STUN connectivity check server and the target and capable of intercepting the STUN
packets and correctly send a response to the server. The ICE connectivity check packets and correctly sending a response to the
connectivity checks with their random transaction IDs from the server server. The ICE connectivity checks with their random transaction
to the client serves as return-routability check and prevents off- IDs from the server to the client serves as a return-routability
path attacker to succeed with address spoofing. Similar to Mobile check and prevents off-path attackers to succeed with address
IPV6's return routability procedure (Section 5.2.5 of [RFC6275]). spoofing. This is similar to Mobile IPv6's return routability
procedure (Section 5.2.5 of [RFC6275]).
4.4. Latching 4.4. Latching
4.4.1. Introduction 4.4.1. Introduction
Latching is a NAT traversal solution that is based on requiring RTSP Latching is a NAT traversal solution that is based on requiring RTSP
clients to send UDP packets to the server's media output ports. clients to send UDP packets to the server's media output ports.
Conventionally, RTSP servers send RTP packets in one direction: from Conventionally, RTSP servers send RTP packets in one direction: from
server to client. Latching is similar to connection-oriented server to client. Latching is similar to connection-oriented
traffic, where one side (e.g., the RTSP client) first "connects" by traffic, where one side (e.g., the RTSP client) first "connects" by
sending a RTP packet to the other side's RTP port, the recipient then sending an RTP packet to the other side's RTP port; the recipient
replies to the originating IP and port. This method is also referred then replies to the originating IP and Port. This method is also
to as "Late binding". It requires that all RTP/RTCP transport is referred to as "late binding". It requires that all RTP/RTCP
done symmetrical, i.e. Symmetric RTP [RFC4961]. There exist a transport be done symmetrically. This in effect requires Symmetric
description for latching of SIP negotiated media streams in Session RTP [RFC4961]. Refer to [RFC7362] for a description of the Latching
Border Controllers [RFC7362]. of SIP-negotiated media streams in Session Border Controllers.
Specifically, when the RTSP server receives the latching packet Specifically, when the RTSP server receives the Latching packet
(a.k.a. hole-punching packet, since it is used to punch a hole in the (a.k.a. hole-punching packet, since it is used to punch a hole in the
firewall/NAT and to aid the server for port binding and address firewall/NAT) from its client, it copies the source IP and Port
mapping) from its client, it copies the source IP and Port number and number and uses them as the delivery address for media packets. By
uses them as delivery address for media packets. By having the having the server send media traffic back the same way as the
server send media traffic back the same way as the client's packet client's packets are sent to the server, address and port mappings
are sent to the server, address mappings will be honored. Therefore will be honored. Therefore, this technique works for all types of
this technique works for all types of NATs, given that the server is NATs, given that the server is not behind a NAT. However, it does
not behind a NAT. However, it does require server modifications. require server modifications. The format of the Latching packet will
The format of the latching packet will have to be defined. have to be defined.
Latching is very vulnerable to both hijacking and becoming a tool in Latching is very vulnerable to both hijacking and becoming a tool in
Distributed Denial of Service (DDoS) attacks (See Security DDoS attacks (see Security Considerations in [RFC7362]) because
Considerations of [RFC7362]), because attackers can simply forge the attackers can simply forge the source IP and Port of the Latching
source IP & Port of the latching packet. Using the rule for packet. The rule for restricting IP addresses to one of the
restricting IP address to the one of the signaling connection will signaling connections will need to be applied here also. However,
need to be applied here also. However, that does not protect against that does not protect against hijacking from another client behind
hijacking from another client behind the same NAT. This can become a the same NAT. This can become a serious issue in deployments with
serious issue in deployments with CGNs. CGNs.
4.4.2. Necessary RTSP extensions 4.4.2. Necessary RTSP Extensions
To support Latching, the RTSP signaling must be extended to allow the To support Latching, RTSP signaling must be extended to allow the
RTSP client to indicate that it will use Latching. The client also RTSP client to indicate that it will use Latching. The client also
needs to be able to signal its RTP SSRC to the server in its SETUP needs to be able to signal its RTP SSRC to the server in its SETUP
request. The RTP SSRC is used to establish some basic level of request. The RTP SSRC is used to establish some basic level of
security against hijacking attacks or simply avoid mis-association security against hijacking attacks or simply to avoid mis-association
when multiple clients are behind the same NAT. Care must be taken in when multiple clients are behind the same NAT. Care must be taken in
choosing clients' RTP SSRC. First, it must be unique within all the choosing clients' RTP SSRC. First, it must be unique within all the
RTP sessions belonging to the same RTSP session. Secondly, if the RTP sessions belonging to the same RTSP session. Second, if the RTSP
RTSP server is sending out media packets to multiple clients from the server is sending out media packets to multiple clients from the same
same send port, the RTP SSRC needs to be unique among those clients' send port, the RTP SSRC needs to be unique among those clients' RTP
RTP sessions. Recognizing that there is a potential that RTP SSRC sessions. Recognizing that there is a potential that RTP SSRC
collisions may occur, the RTSP server must be able to signal to a collisions may occur, the RTSP server must be able to signal to a
client that a collision has occurred and that it wants the client to client that a collision has occurred and that it wants the client to
use a different RTP SSRC carried in the SETUP response or use unique use a different RTP SSRC carried in the SETUP response or use unique
ports per RTSP session. Using unique ports limits an RTSP server in ports per RTSP session. Using unique ports limits an RTSP server in
the number of sessions it can simultaneously handle per interface IP the number of sessions it can simultaneously handle per interface IP
addresses. addresses.
The latching packet as discussed above should have field which can The Latching packet as discussed above should have a field that can
contain an client and RTP session identifier to correctly associate contain a client and RTP session identifier to correctly associate
the latching packet with the correct context. If an RTP packet is to the Latching packet with the correct context. If an RTP packet is to
be used, there would have been a benefit to use a well defined RTP be used, there would be a benefit to using a well-defined RTP payload
payload format for this purpose as the No-Op payload format proposed format for this purpose as the No-Op payload format proposed
[I-D.ietf-avt-rtp-no-op]. However, in the absence of such a [RTP-NO-OP]. However, in the absence of such a specification, an RTP
specification an RTP packet without a payload could be used. Using packet without a payload could be used. Using SSRC is beneficial
SSRC has the benefit that RTP and RTCP both would work as is. because RTP and RTCP both would work as is. However, other packet
However, also other packet formats could be used that carry the formats could be used that carry the necessary identification of the
necessary identification of the context, and such a solution is context, and such a solution is discussed in Section 4.5.
discussed in Section 4.5.
4.4.3. ALG Considerations 4.4.3. ALG Considerations
An RTSP ALG not supporting this method could interfer with the An RTSP ALG not supporting this method could interfere with the
methods used to indicate that latching is to be done, as well as the methods used to indicate that Latching is to be done, as well as the
SSRC signalling. Thus preventing the method from working. However, SSRC signaling, thus preventing the method from working. However, if
if the RTSP ALG instead opens the corresponding pinholes and create the RTSP ALG instead opens the corresponding pinholes and creates the
the necessary mapping in the NAT, traversal will still work. necessary mapping in the NAT, traversal will still work. Securing
Securing the RTSP message transport using TLS will avoid this issue. the RTSP message transport using TLS will avoid this issue.
An RTSP ALG that support this traversal method can for basic An RTSP ALG that supports this traversal method can for basic
functionality simply pass the related signalling parameters functionality simply pass the related signaling parameters
transparently. Due to the security considerations for latching it transparently. Due to the security considerations for Latching,
might exist a benefit for an RTSP ALG that will enable NAT traversal there might exist a benefit for an RTSP ALG that will enable NAT
to negotiate with the path and turn off the latching procedures when traversal to negotiate with the path and turn off the Latching
the ALG handles this. However, this opens up to failure modes when procedures when the ALG handles this. However, this opens up to
there are multiple levels of NAT and only one supports an RTSP ALG. failure modes when there are multiple levels of NAT and only one
supports an RTSP ALG.
4.4.4. Deployment Considerations 4.4.4. Deployment Considerations
Advantages: Advantages:
o Works for all types of client-facing NATs. (Requirement 1 in o Works for all types of client-facing NATs (requirement 1 in
Section 3). Section 3).
o Has little interaction problems with any RTSP ALG changing the o Has little interaction problems with any RTSP ALG changing the
client's information in the transport header. client's information in the Transport header.
Disadvantages: Disadvantages:
o Requires modifications to both RTSP server and client. o Requires modifications to both the RTSP server and client.
o Limited to work with servers that are not behind a NAT. o Limited to working with servers that are not behind a NAT.
o The format of the packet for "connection setup" (a.k.a Latching o The format of the packet for "connection setup" (a.k.a Latching
packet) is not defined. packet) is not defined.
o SSRC management if RTP is used for latching due to risk for mis- o SSRC management if RTP is used for Latching due to risk for mis-
association of clients to RTSP sessions at the server if SSRC association of clients to RTSP sessions at the server if SSRC
collision occurs. collision occurs.
o Has significant security considerations (See Section 4.4.5), due o Has significant security considerations (See Section 4.4.5), due
to lack of a strong authentication mechanism and will need to use to the lack of a strong authentication mechanism and will need to
address restrictions. use address restrictions.
4.4.5. Security Consideration 4.4.5. Security Considerations
Latching's major security issue is that RTP streams can be hijacked Latching's major security issue is that RTP streams can be hijacked
and directed towards any target that the attacker desires unless and directed towards any target that the attacker desires unless
address restrictions are used. In the case of NATs with multiple address restrictions are used. In the case of NATs with multiple
clients on the inside of them, hijacking can still occur. This clients on the inside of them, hijacking can still occur. This
becomes a significant threat in the context of carrier grade NATs becomes a significant threat in the context of CGNs.
(CGN).
The most serious security problem is the deliberate attack with the The most serious security problem is the deliberate attack with the
use of a RTSP client and Latching. The attacker uses RTSP to setup a use of an RTSP client and Latching. The attacker uses RTSP to set up
media session. Then it uses Latching with a spoofed source address a media session. Then it uses Latching with a spoofed source address
of the intended target of the attack. There is no defense against of the intended target of the attack. There is no defense against
this attack other than restricting the possible address a latching this attack other than restricting the possible address a Latching
packet can come from to the same as the RTSP TCP connection are from. packet can come from to the same address as the RTSP TCP connection
This prevents Latching to be used in use cases that require different is from. This prevents Latching to be used in use cases that require
addresses for media destination and signalling. Even allowing only a different addresses for media destination and signaling. Even
limited address range containing the signalling address from where allowing only a limited address range containing the signaling
latching is allowed opens up a significant vulnerability as it is address from where Latching is allowed opens up a significant
difficult to determine the address usage for the network the client vulnerability as it is difficult to determine the address usage for
connects from. the network the client connects from.
A hijack attack can also be performed in various ways. The basic A hijack attack can also be performed in various ways. The basic
attack is based on the ability to read the RTSP signaling packets in attack is based on the ability to read the RTSP signaling packets in
order to learn the address and port the server will send from and order to learn the address and port the server will send from and
also the SSRC the client will use. Having this information the also the SSRC the client will use. Having this information, the
attacker can send its own Latching packets containing the correct RTP attacker can send its own Latching packets containing the correct RTP
SSRC to the correct address and port on the server. The RTSP server SSRC to the correct address and port on the server. The RTSP server
will then use the source IP and port from the Latching packet as the will then use the source IP and Port from the Latching packet as the
destination for the media packets it sends. destination for the media packets it sends.
Another variation of this attack is for a man in the middle to modify Another variation of this attack is for a man in the middle to modify
the RTP latching packet being sent by a client to the server by the RTP Latching packet being sent by a client to the server by
simply changing the source IP and port to the target one desires to simply changing the source IP and Port to the target one desires to
attack. attack.
One can fend off the snooping based attack by applying encryption to One can fend off the snooping-based attack by applying encryption to
the RTSP signaling transport. However, if the attacker is a man in the RTSP signaling transport. However, if the attacker is a man in
the middle modifying latching packets, the attack is impossible to the middle modifying Latching packets, the attack is impossible to
defend against other than through address restrictions. As a NAT re- defend against other than through address restrictions. As a NAT
writes the source IP and (possibly) port this cannot be rewrites the source IP and (possibly) port, this cannot be
authenticated, but authentication is required in order to protect authenticated, but authentication is required in order to protect
against this type of DoS attack. against this type of DoS attack.
Yet another issue is that these attacks also can be used to deny the Yet another issue is that these attacks also can be used to deny the
client the service it desires from the RTSP server completely. The client the service it desires from the RTSP server completely. The
attacker modifies or originates its own latching packets with another attacker modifies or originates its own Latching packets with a port
port than what the legit latching packets uses, which results in that other than what the legit Latching packets use, which results in the
the media server sends the RTP/RTCP traffic to ports the client isn't media server sending the RTP/RTCP traffic to ports the client isn't
listening for RTP/RTCP on. listening for RTP/RTCP on.
The amount of random non-guessable material in the latching packet The amount of random non-guessable material in the Latching packet
determines how well Latching can fend off stream-hijacking performed determines how well Latching can fend off stream hijacking performed
by parties that are off the client to server network path, i.e. lacks by parties that are off the client-to-server network path, i.e., it
the capability to see the client's latching packets. The proposal lacks the capability to see the client's Latching packets. The
above uses the 32-bit RTP SSRC field to this effect. Therefore it is proposal above uses the 32-bit RTP SSRC field to this effect.
important that this field is derived with a non-predictable random Therefore, it is important that this field is derived with a non-
number generator. It should not be possible by knowing the algorithm predictable random number generator. It should not be possible by
used and a couple of basic facts, to derive what random number a knowing the algorithm used and a couple of basic facts to derive what
certain client will use. random number a certain client will use.
An attacker not knowing the SSRC but aware of which port numbers that An attacker not knowing the SSRC but aware of which port numbers that
a server sends from can deploy a brute force attack on the server by a server sends from can deploy a brute-force attack on the server by
testing a lot of different SSRCs until it finds a matching one. testing a lot of different SSRCs until it finds a matching one.
Therefore a server could implement functionality that blocks packets Therefore, a server could implement functionality that blocks packets
to ports or from sources that receive or send multiple Latching to ports or from sources that receive or send multiple Latching
packets with different invalid SSRCs, especially when they are coming packets with different invalid SSRCs, especially when they are coming
from the same IP/Port. Note that this mitigation in itself opens up from the same IP and Port. Note that this mitigation in itself opens
a new venue for DoS attacks against legit users trying to latch. up a new venue for DoS attacks against legit users trying to latch.
To improve the security against attackers the amount of random To improve the security against attackers, the amount of random
material could be increased. To achieve a longer random tag while material could be increased. To achieve a longer random tag while
still using RTP and RTCP, it will be necessary to develop RTP and still using RTP and RTCP, it will be necessary to develop RTP and
RTCP payload formats for carrying the random material. RTCP payload formats for carrying the random material.
4.5. A Variation to Latching 4.5. A Variation to Latching
4.5.1. Introduction 4.5.1. Introduction
Latching as described above requires the usage of a valid RTP format Latching as described above requires the usage of a valid RTP format
as the Latching packet, i.e. the first packet that the client sends as the Latching packet, i.e., the first packet that the client sends
to the server to establish a bi-directional transport flow for RTP to the server to establish a bidirectional transport flow for RTP
streams. There is currently no appropriate RTP packet format for streams. There is currently no appropriate RTP packet format for
this purpose, although the RTP No-Op format was a proposal to fix the this purpose, although the RTP No-Op format was a proposal to fix the
problem [I-D.ietf-avt-rtp-no-op], however, that work was abandoned. problem [RTP-NO-OP]; however, that work was abandoned. [RFC6263]
There exists a RFC that discusses the implication of different type discusses the implication of different types of packets as keep-
of packets as keep-alives for RTP [RFC6263] and its findings are very alives for RTP, and its findings are very relevant to the format of
relevant to the format of the Latching packet. the Latching packet.
Meanwhile, there has been NAT/firewall traversal techniques deployed Meanwhile, there have been NAT/firewall traversal techniques deployed
in the wireless streaming market place that use non-RTP messages as in the wireless streaming market place that use non-RTP messages as
Latching packets. This section describes a variant based on a subset Latching packets. This section describes a variant based on a subset
of those solutions that alters the previously described Latching of those solutions that alters the previously described Latching
solution. solution.
4.5.2. Necessary RTSP extensions 4.5.2. Necessary RTSP Extensions
In this variation of Latching, the Latching packet is a small UDP In this variation of Latching, the Latching packet is a small UDP
packet that does not contain an RTP header. In response to the packet that does not contain an RTP header. In response to the
client's Latching packet, the RTSP server sends back a similar client's Latching packet, the RTSP server sends back a similar
Latching packet as a confirmation so the client can stop the so Latching packet as a confirmation so the client can stop the so-
called "connection phase" of this NAT traversal technique. called "connection phase" of this NAT traversal technique.
Afterwards, the client only has to periodically send Latching packets Afterwards, the client only has to periodically send Latching packets
as keep-alive messages for the NAT mappings. as keep-alive messages for the NAT mappings.
The server listens on its RTP-media output port, and tries to decode The server listens on its RTP-media output port and tries to decode
any received UDP packet as Latching packet. This is valid since an any received UDP packet as the Latching packet. This is valid since
RTSP server is not expecting RTP traffic from the RTSP client. Then, an RTSP server is not expecting RTP traffic from the RTSP client.
it can correlate the Latching packet with the RTSP client's session Then, it can correlate the Latching packet with the RTSP client's
ID or the client's SSRC, and record the NAT bindings accordingly. session ID or the client's SSRC and record the NAT bindings
The server then sends a Latching packet as the response to the accordingly. The server then sends a Latching packet as the response
client. to the client.
The Latching packet can contain the SSRC to identify the RTP stream, The Latching packet can contain the SSRC to identify the RTP stream,
and care must be taken if the packet is bigger than 12 bytes, and care must be taken if the packet is bigger than 12 bytes,
ensuring that it is distinctively different from RTP packets, whose ensuring that it is distinctively different from RTP packets, whose
header size is 12 bytes. header size is 12 bytes.
RTSP signaling can be added to do the following: RTSP signaling can be added to do the following:
1. Enable or disable such Latching message exchanges. When the 1. Enable or disable such Latching message exchanges. When the
firewall/NAT has an RTSP-aware ALG, it is possible to disable firewall/NAT has an RTSP-aware ALG, it is possible to disable
Latching message exchange and let the ALG work out the address Latching message exchange and let the ALG work out the address
and port mappings. and port mappings.
2. Configure the number of re-tries and the re-try interval of the 2. Configure the number of retries and the retry interval of the
Latching message exchanges. Latching message exchanges.
4.5.3. ALG Considerations 4.5.3. ALG Considerations
See Latching ALG consideration Section 4.4.3. See Latching ALG considerations in Section 4.4.3.
4.5.4. Deployment Considerations 4.5.4. Deployment Considerations
This approach has the following advantages when compared with the This approach has the following advantages when compared with the
Latching approach (Section 4.4): Latching approach (Section 4.4):
1. There is no need to define RTP payload format for firewall 1. There is no need to define an RTP payload format for firewall
traversal, therefore it is simple to use, implement and traversal; therefore, it is more simple to use, implement, and
administer (Requirement 4 in Section 3), instead a Latching administer (requirement 4 in Section 3) than a Latching protocol,
protocol must be defined. which must be defined.
2. When properly defined, this kind of Latching packet exchange can 2. When properly defined, this kind of Latching packet exchange can
also authenticate RTP receivers, to prevent hijacking attacks. also authenticate RTP receivers, to prevent hijacking attacks.
This approach has the following disadvantages when compared with the This approach has the following disadvantage when compared with the
Latching approach: Latching approach:
1. The server's sender SSRC for the RTP stream or other session 1. The server's sender SSRC for the RTP stream or other session
Identity information must be signaled in RTSP's SETUP response, Identity information must be signaled in the RTSP's SETUP
in the Transport header of the RTSP SETUP response. response, in the Transport header of the RTSP SETUP response.
4.5.5. Security Considerations 4.5.5. Security Considerations
Compared to the security properties of Latching this variant is Compared to the security properties of Latching, this variant is
slightly improved. First of all it allows for a larger random field slightly improved. First of all it allows for a larger random field
in the Latching packets which makes it more unlikely for an off-path in the Latching packets, which makes it more unlikely for an off-path
attacker to succeed in a hi-jack attack. Secondly the confirmation attacker to succeed in a hijack attack. Second, the confirmation
allows the client to know when Latching works and when it didn't and allows the client to know when Latching works and when it doesn't and
thus restart the Latching process by updating the SSRC. thus when to restart the Latching process by updating the SSRC.
Still the main security issue remain that the RTSP server can't know Still, the main security issue remaining is that the RTSP server
that the source address in the latching packet was coming from a RTSP can't know that the source address in the Latching packet was coming
client wanting to receive media and not one that likes to direct the from an RTSP client wanting to receive media and not from one that
media traffic to an DoS target. likes to direct the media traffic to a DoS target.
4.6. Three Way Latching 4.6. Three-Way Latching
4.6.1. Introduction 4.6.1. Introduction
The three way latching is an attempt to try to resolve the most Three-Way Latching is an attempt to try to resolve the most
significant security issues for both previously discussed variants of significant security issues for both previously discussed variants of
Latching. By adding a server request response exchange directly Latching. By adding a server request response exchange directly
after the initial latching the server can verify that the target after the initial Latching, the server can verify that the target
address present in the latching packet is an active listener and address present in the Latching packet is an active listener and
confirm its desire to establish a media flow. confirm its desire to establish a media flow.
4.6.2. Necessary RTSP extensions 4.6.2. Necessary RTSP Extensions
Uses the same RTSP extensions as the alternative latching method Uses the same RTSP extensions as the Alternative Latching method
(Section 4.5) uses. The extensions for this variant are only in the (Section 4.5) uses. The extensions for this variant are only in the
format and transmission of the Latching packets. format and transmission of the Latching packets.
The client to server latching packet is similar to the Alternative The client-to-server Latching packet is similar to the Alternative
Latching (Section 4.5), i.e. an UDP packet with some session Latching (Section 4.5), i.e., a UDP packet with some session
identifier and a random value. When the server responds to the identifiers and a random value. When the server responds to the
Latching packet with a Latching confirmation, it includes a random Latching packet with a Latching confirmation, it includes a random
value (Nonce) of its own in addition to echoing back the one the value (nonce) of its own in addition to echoing back the one the
client sent. Then a third message is added to the exchange. The client sent. Then a third message is added to the exchange. The
client acknowledges the reception of the Latching confirmation client acknowledges the reception of the Latching confirmation
message and echoes back the server's nonce. Thus confirming that the message and echoes back the server's nonce, thus confirming that the
Latched address goes to a RTSP client that initiated the latching and Latched address goes to an RTSP client that initiated the Latching
is actually present at that address. The RTSP server will refuse to and is actually present at that address. The RTSP server will refuse
send any media until the Latching Acknowledgement has been received to send any media until the Latching Acknowledgement has been
with a valid nonce. received with a valid nonce.
4.6.3. ALG Considerations 4.6.3. ALG Considerations
See Latching ALG consideration Section 4.4.3. See Latching ALG considerations in Section 4.4.3.
4.6.4. Deployment Considerations 4.6.4. Deployment Considerations
A solution with a 3-way handshake and its own Latching packets can be A solution with a three-way handshake and its own Latching packets
compared with the ICE-based solution (Section 4.3) and have the can be compared with the ICE-based solution (Section 4.3) and have
following differences: the following differences:
o Only works for servers that are not behind a NAT. o Only works for servers that are not behind a NAT.
o May be simpler to implement due to the avoidance of the ICE o May be simpler to implement due to the avoidance of the ICE
prioritization and check-board mechanisms. prioritization and check-board mechanisms.
However, a 3-way Latching protocol is very similar to using STUN in However, a Three-Way Latching protocol is very similar to using STUN
both directions as Latching and verification protocol. Using STUN in both directions as a Latching and verification protocol. Using
would remove the need for implementing a new protocol. STUN would remove the need for implementing a new protocol.
4.6.5. Security Considerations 4.6.5. Security Considerations
Three way latching is significantly more secure than its simpler Three-Way Latching is significantly more secure than its simpler
versions discussed above. The client to server nonce which is versions discussed above. The client-to-server nonce, which is
included in signalling and also can be bigger than the 32-bits of included in signaling and also can be bigger than the 32 bits of
random data that the SSRC field supports makes it very difficult for random data that the SSRC field supports, makes it very difficult for
an off-path attacker to perform an denial of service attack by an off-path attacker to perform a DoS attack by diverting the media.
diverting the media.
The client to server nonce and its echoing back does not protect The client-to-server nonce and its echoing back does not protect
against on-patch attacker, including malicious clients. However, the against on-path attackers, including malicious clients. However, the
server to client nonce and its echoing back prevents malicious server-to-client nonce and its echoing back prevents malicious
clients to divert the media stream by spoofing the source address and clients to divert the media stream by spoofing the source address and
port, as it can't echo back the nonce in these cases. Similar to the port, as it can't echo back the nonce in these cases. This is
Mobile IPv6 return routability procedure (Section 5.2.5 of [RFC6275]) similar to the Mobile IPv6 return routability procedure
(Section 5.2.5 of [RFC6275]).
Three way latching is really only vulnerable to an on-path attacker Three-Way Latching is really only vulnerable to an on-path attacker
that is quite capable. First the attacker can either learn the that is quite capable. First, the attacker can learn the client-
client to server nonce, by intercepting the signalling, or modifying to-server nonce either by intercepting the signaling or by modifying
the source information (target destination) of a client's latching the source information (target destination) of a client's Latching
packet. Secondly, it is also on-path between the server and target packet. Second, it is also on-path between the server and target
destination and can generate a response using the server's nonce. An destination and can generate a response using the server's nonce. An
adversary that has these capabilities are commonly capable of causing adversary that has these capabilities is commonly capable of causing
significantly worse damage than this using other methods. significantly worse damage than this using other methods.
Three-way latching do results in that the server to client packet is Three-Way Latching results in the server-to-client packet being
bigger than the client to server packet, due to the inclusion of the bigger than the client-to-server packet, due to the inclusion of the
server to client nonce in addition to the client to server nonce. server-to-client nonce in addition to the client-to-server nonce.
Thus an amplification effect do exist, however, to achieve this Thus, an amplification effect does exist; however, to achieve this
amplification effect the attacker has to create a session state on amplification effect, the attacker has to create a session state on
the RTSP server. The RTSP server can also limit the number of the RTSP server. The RTSP server can also limit the number of
response it will generate before considering the latching to be responses it will generate before considering the Latching to be
failed. failed.
4.7. Application Level Gateways 4.7. Application Level Gateways
4.7.1. Introduction 4.7.1. Introduction
An Application Level Gateway (ALG) reads the application level An ALG reads the application level messages and performs necessary
messages and performs necessary changes to allow the protocol to work changes to allow the protocol to work through the middlebox.
through the middle box. However this behavior has some problems in However, this behavior has some problems in regards to RTSP:
regards to RTSP:
1. It does not work when the RTSP protocol is used with end-to-end 1. It does not work when RTSP is used with end-to-end security. As
security. As the ALG can't inspect and change the application the ALG can't inspect and change the application level messages,
level messages the protocol will fail due to the middle box. the protocol will fail due to the middlebox.
2. ALGs need to be updated if extensions to the protocol are added. 2. ALGs need to be updated if extensions to the protocol are added.
Due to deployment issues with changing ALGs this may also break Due to deployment issues with changing ALGs, this may also break
the end-to-end functionality of RTSP. the end-to-end functionality of RTSP.
Due to the above reasons it is not recommended to use an RTSP ALG in Due to the above reasons, it is not recommended to use an RTSP ALG in
NATs. This is especially important for NATs targeted to home users NATs. This is especially important for NATs targeted to home users
and small office environments, since it is very hard to upgrade NATs and small office environments, since it is very hard to upgrade NATs
deployed in home or SOHO (small office/home office) environment. deployed in SOHO environments.
4.7.2. Outline On how ALGs for RTSP work 4.7.2. Outline on How ALGs for RTSP Work
In this section, we provide a step-by-step outline on how one could In this section, we provide a step-by-step outline on how one could
go about writing an ALG to enable RTSP to traverse a NAT. go about writing an ALG to enable RTSP to traverse a NAT.
1. Detect any SETUP request. 1. Detect any SETUP request.
2. Try to detect the usage of any of the NAT traversal methods that 2. Try to detect the usage of any of the NAT traversal methods that
replace the address and port of the Transport header parameters replace the address and port of the Transport header parameters
"destination" or "dest_addr". If any of these methods are used, "destination" or "dest_addr". If any of these methods are used,
then the ALG should not change the address. Ways to detect that then the ALG should not change the address. Ways to detect that
these methods are used are: these methods are used are:
* For embedded STUN, it would be to watch for a feature tag, * For embedded STUN, it would be to watch for a feature tag,
like "nat.stun". If any of those exists in the "supported", like "nat.stun", and to see if any of those exist in the
"proxy-require", or "require" headers of the RTSP exchange. "supported", "proxy-require", or "require" headers of the RTSP
exchange.
* For stand alone STUN and TURN based solutions: This can be * For stand-alone STUN and TURN-based solutions: This can be
detected by inspecting the "destination" or "dest_addr" detected by inspecting the "destination" or "dest_addr"
parameter. If it contains either one of the NAT's external IP parameter. If it contains either one of the NAT's external IP
addresses or a public IP address then such a solution is in addresses or a public IP address, then such a solution is in
use. However if multiple NATs are used this detection may use. However, if multiple NATs are used, this detection may
fail. Remapping should only be done for addresses belonging fail. Remapping should only be done for addresses belonging
to the NAT's own private address space. to the NAT's own private address space.
Otherwise continue to the next step. Otherwise, continue to the next step.
3. Create UDP mappings (client given IP/port <-> external IP/port) 3. Create UDP mappings (client given IP and Port <-> external IP and
where needed for all possible transport specifications in the Port) where needed for all possible transport specifications in
transport header of the request found in (1). Enter the external the Transport header of the request found in (step 1). Enter the
address and port(s) of these mappings in transport header. external address and port(s) of these mappings in the Transport
Mappings shall be created with consecutive external port numbers header. Mappings shall be created with consecutive external port
starting on an even number for RTP for each media stream. numbers starting on an even number for RTP for each media stream.
Mappings should also be given a long timeout period, at least 5 Mappings should also be given a long timeout period, at least 5
minutes. minutes.
4. When the SETUP response is received from the server, the ALG may 4. When the SETUP response is received from the server, the ALG may
remove the unused UDP mappings, i.e. the ones not present in the remove the unused UDP mappings, i.e., the ones not present in the
transport header. The session ID should also be bound to the UDP Transport header. The session ID should also be bound to the UDP
mappings part of that session. mappings part of that session.
5. If SETUP response settles on RTP over TCP or RTP over RTSP as 5. If the SETUP response settles on RTP over TCP or RTP over RTSP as
lower transport, do nothing: let TCP tunneling take care of NAT lower transport, do nothing: let TCP tunneling take care of NAT
traversal. Otherwise go to next step. traversal. Otherwise, go to the next step.
6. The ALG should keep the UDP mappings belonging to the RTSP 6. The ALG should keep the UDP mappings belonging to the RTSP
session as long as: an RTSP message with the session's ID has session as long as: an RTSP message with the session's ID has
been sent in the last timeout interval, or a UDP message has been been sent in the last timeout interval, or a UDP message has been
sent on any of the UDP mappings during the last timeout interval. sent on any of the UDP mappings during the last timeout interval.
7. The ALG may remove a mapping as soon a TEARDOWN response has been 7. The ALG may remove a mapping as soon as a TEARDOWN response has
received for that media stream. been received for that media stream.
4.7.3. Deployment Considerations 4.7.3. Deployment Considerations
Advantage: Advantages:
o No impact on either client or server o No impact on either client or server.
o Can work for any type of NATs o Can work for any type of NATs.
Disadvantage: Disadvantages:
o When deployed they are hard to update to reflect protocol o When deployed, they are hard to update to reflect protocol
modifications and extensions. If not updated they will break the modifications and extensions. If not updated, they will break the
functionality. functionality.
o When end-to-end security is used, the ALG functionality will fail. o When end-to-end security is used, the ALG functionality will fail.
o Can interfere with other types of traversal mechanisms, such as o Can interfere with other types of traversal mechanisms, such as
STUN. STUN.
Transition: Transition:
An RTSP ALG will not be phased out in any automatic way. It must be An RTSP ALG will not be phased out in any automatic way. It must be
removed, probably through the removal or update of the NAT it is removed, probably through the removal or update of the NAT it is
associated with. associated with.
4.7.4. Security Considerations 4.7.4. Security Considerations
An ALG will not work with deployment of end-to-end RTSP signaling An ALG will not work with deployment of end-to-end RTSP signaling
security, however it will work with the hop-by-hop security method security; however, it will work with the hop-by-hop security method
defined in Section 19.3 of RTSP 2.0 [I-D.ietf-mmusic-rfc2326bis]. defined in Section 19.3 of RTSP 2.0 [RTSP]. Therefore, deployment of
Therefore deployment of ALG may result in clients located behind NATs ALG may result in clients located behind NATs not using end-to-end
not using end-to-end security, or more likely the selection a NAT security, or more likely the selection of a NAT traversal solution
traversal solution that allow for security. that allows for security.
The creation of an UDP mapping based on the signalling message has The creation of a UDP mapping based on the signaling message has some
some potential security implications. First of all if the RTSP potential security implications. First of all, if the RTSP client
client releases its ports and another application are assigned these releases its ports and another application is assigned these instead,
instead it could receive RTP media as long as the mappings exist and it could receive RTP media as long as the mappings exist and the RTSP
the RTSP server has failed to be signalled or notice the lack of server has failed to be signaled or notice the lack of client
client response. response.
A NAT with RTSP ALG that assigns mappings based on SETUP requests A NAT with RTSP ALG that assigns mappings based on SETUP requests
could potentially become victim of a resource exhaustion attack. If could potentially become the victim of a resource exhaustion attack.
an attacker creates a lot of RTSP sessions, even without starting If an attacker creates a lot of RTSP sessions, even without starting
media transmission could exhaust the pool of available UDP ports on media transmission, this could exhaust the pool of available UDP
the NAT. Thus only a limited number of UDP mappings should be ports on the NAT. Thus, only a limited number of UDP mappings should
allowed to be created by the RTSP ALG. be allowed to be created by the RTSP ALG.
4.8. TCP Tunneling 4.8. TCP Tunneling
4.8.1. Introduction 4.8.1. Introduction
Using a TCP connection that is established from the client to the Using a TCP connection that is established from the client to the
server ensures that the server can send data to the client. The server ensures that the server can send data to the client. The
connection opened from the private domain ensures that the server can connection opened from the private domain ensures that the server can
send data back to the client. To send data originally intended to be send data back to the client. To send data originally intended to be
transported over UDP requires the TCP connection to support some type transported over UDP requires the TCP connection to support some type
of framing of the media data packets. Using TCP also results in the of framing of the media data packets. Using TCP also results in the
client having to accept that real-time performance can be impacted. client having to accept that real-time performance can be impacted.
TCP's problem of ensuring timely delivery was one of the reasons why TCP's problem of ensuring timely delivery was one of the reasons why
RTP was developed. Problems that arise with TCP are: head-of-line RTP was developed. Problems that arise with TCP are: head-of-line
blocking, delay introduced by retransmissions, highly varying rate blocking, delay introduced by retransmissions, and a highly varying
due to the congestion control algorithm. If sufficient amount of rate due to the congestion control algorithm. If a sufficient amount
buffering (several seconds) in the receiving client can be tolerated of buffering (several seconds) in the receiving client can be
then TCP clearly work. tolerated, then TCP will clearly work.
4.8.2. Usage of TCP tunneling in RTSP 4.8.2. Usage of TCP Tunneling in RTSP
The RTSP core specification [I-D.ietf-mmusic-rfc2326bis] supports The RTSP core specification [RTSP] supports interleaving of media
interleaving of media data on the TCP connection that carries RTSP data on the TCP connection that carries RTSP signaling. See
signaling. See section 14 in [I-D.ietf-mmusic-rfc2326bis] for how to Section 14 in [RTSP] for how to perform this type of TCP tunneling.
perform this type of TCP tunneling. There also exists another way of There also exists another way of transporting RTP over TCP, which is
transporting RTP over TCP defined in Appendix C.2 in defined in Appendix C.2 in [RTSP]. For signaling and rules on how to
[I-D.ietf-mmusic-rfc2326bis]. For signaling and rules on how to establish the TCP connection in lieu of UDP, see Appendix C.2 in
establish the TCP connection in lieu of UDP, see appendix C.2 in [RTSP]. This is based on the framing of RTP over the TCP connection
[I-D.ietf-mmusic-rfc2326bis]. This is based on the framing of RTP as described in [RFC4571].
over the TCP connection as described in RFC 4571 [RFC4571].
4.8.3. ALG Considerations 4.8.3. ALG Considerations
An RTSP ALG will face a different issue with TCP tunneling, at least An RTSP ALG will face a different issue with TCP tunneling, at least
the Interleaved version. Now the full data stream will flow can end the interleaved version. Now the full data stream can end up flowing
up flowing through the ALG implementation. Thus it is important that through the ALG implementation. Thus, it is important that the ALG
the ALG is efficient in dealing with the interleaved media data is efficient in dealing with the interleaved media data frames to
frames to avoid consuming to much resource and thus creating avoid consuming to many resources and thus creating performance
performance issues. issues.
The RTSP ALG can also effect the transport specifications that The RTSP ALG can also affect the transport specifications that
indicate that TCP tunneling can be done and its priortization, indicate that TCP tunneling can be done and its prioritization,
including removing the transport specification, thus preventing TCP including removing the transport specification, thus preventing TCP
tunneling. tunneling.
4.8.4. Deployment Considerations 4.8.4. Deployment Considerations
Advantage: Advantage:
o Works through all types of NATs where the RTSP server in not NATed o Works through all types of NATs where the RTSP server is not NATed
or at least reachable like it was not. or is at least reachable like it was not.
Disadvantage: Disadvantages:
o Functionality needs to be implemented on both server and client. o Functionality needs to be implemented on both server and client.
o Will not always meet multimedia stream's real-time requirements. o Will not always meet multimedia stream's real-time requirements.
Transition: Transition:
The tunneling over RTSP's TCP connection is not planned to be phased- The tunneling over RTSP's TCP connection is not planned to be phased
out. It is intended to be a fallback mechanism and for usage when out. It is intended to be a fallback mechanism and for usage when
total media reliability is desired, even at the potential price of total media reliability is desired, even at the potential price of
loss of real-time properties. loss of real-time properties.
4.8.5. Security Considerations 4.8.5. Security Considerations
The TCP tunneling of RTP has no known significant security problems The TCP tunneling of RTP has no known significant security problems
besides those already presented in the RTSP specification. It is besides those already presented in the RTSP specification. It is
difficult to get any amplification effect for denial of service difficult to get any amplification effect for DoS attacks due to
attacks due to TCP's flow control. The RTSP server TCP socket, TCP's flow control. The RTSP server's TCP socket, if independently
independently if used for media tunneling or only RTSP messages can used for media tunneling or only RTSP messages, can be used for a
be used for a redirected syn attack. By spoofing the source address redirected syn attack. By spoofing the source address of any TCP
of any TCP init packets, the TCP SYNs from the server can be directed init packets, the TCP SYNs from the server can be directed towards a
towards a target. target.
A possible security consideration, when session media data is A possible security consideration, when session media data is
interleaved with RTSP, would be the performance bottleneck when RTSP interleaved with RTSP, would be the performance bottleneck when RTSP
encryption is applied, since all session media data also needs to be encryption is applied, since all session media data also needs to be
encrypted. encrypted.
4.9. TURN (Traversal Using Relay NAT) 4.9. Traversal Using Relays around NAT (TURN)
4.9.1. Introduction 4.9.1. Introduction
Traversal Using Relay NAT (TURN) [RFC5766] is a protocol for setting TURN [RFC5766] is a protocol for setting up traffic relays that allow
up traffic relays that allow clients behind NATs and firewalls to clients behind NATs and firewalls to receive incoming traffic for
receive incoming traffic for both UDP and TCP. These relays are both UDP and TCP. These relays are controlled and have limited
controlled and have limited resources. They need to be allocated resources. They need to be allocated before usage. TURN allows a
before usage. TURN allows a client to temporarily bind an address/ client to temporarily bind an address/port pair on the relay (TURN
port pair on the relay (TURN server) to its local source address/port server) to its local source address/port pair, which is used to
pair, which is used to contact the TURN server. The TURN server will contact the TURN server. The TURN server will then forward packets
then forward packets between the two sides of the relay. between the two sides of the relay.
To prevent DoS attacks on either recipient, the packets forwarded are To prevent DoS attacks on either recipient, the packets forwarded are
restricted to the specific source address. On the client side it is restricted to the specific source address. On the client side, it is
restricted to the source setting up the allocation. On the external restricted to the source setting up the allocation. On the external
side this is limited to the source address/port pair that have been side, it is limited to the source address/port pair that have been
given permission by the TURN client creating the allocation. Packets given permission by the TURN client creating the allocation. Packets
from any other source on this address will be discarded. from any other source on this address will be discarded.
Using a TURN server makes it possible for a RTSP client to receive Using a TURN server makes it possible for an RTSP client to receive
media streams from even an unmodified RTSP server. However the media streams from even an unmodified RTSP server. However, the
problem is those RTSP servers most likely restrict media destinations problem is those RTSP servers most likely restrict media destinations
to no other IP address than the one the RTSP message arrives from. to no other IP address than the one the RTSP message arrives from.
This means that TURN could only be used if the server knows and This means that TURN could only be used if the server knows and
accepts that the IP belongs to a TURN server and the TURN server accepts that the IP belongs to a TURN server, and the TURN server
can't be targeted at an unknown address. Alternatively, both the can't be targeted at an unknown address. Alternatively, both the
RTSP TCP connection as well as the RTP media is relayed through the RTSP TCP connection as well as the RTP media is relayed through the
same TURN server. same TURN server.
4.9.2. Usage of TURN with RTSP 4.9.2. Usage of TURN with RTSP
To use a TURN server for NAT traversal, the following steps should be To use a TURN server for NAT traversal, the following steps should be
performed. performed.
1. The RTSP client connects with the RTSP server. The client 1. The RTSP client connects with the RTSP server. The client
retrieves the session description to determine the number of retrieves the session description to determine the number of
media streams. To avoid the issue with having RTSP connection media streams. To avoid the issue of having the RTSP connection
and media traffic from different addresses also the TCP and media traffic from different addresses, the TCP connection
connection must be done through the same TURN server as the one must also be done through the same TURN server as the one in the
in the next step. This will require the usage of TURN for TCP next step. This will require the usage of TURN for TCP
[RFC6062]. [RFC6062].
2. The client establishes the necessary bindings on the TURN server. 2. The client establishes the necessary bindings on the TURN server.
It must choose the local RTP and RTCP ports that it desires to It must choose the local RTP and RTCP ports that it desires to
receive media packets. TURN supports requesting bindings of even receive media packets. TURN supports requesting bindings of even
port numbers and contiguous ranges. port numbers and contiguous ranges.
3. The RTSP client uses the acquired address and port allocations in 3. The RTSP client uses the acquired address and port allocations in
the RTSP SETUP request using the destination header. the RTSP SETUP request using the destination header.
4. The RTSP Server sends the SETUP reply, which must include the 4. The RTSP server sends the SETUP reply, which must include the
transport headers src_addr parameter (source and port in RTSP Transport header's "src_addr" parameter (source and port in RTSP
1.0). Note that the server is required to have a mechanism to 1.0). Note that the server is required to have a mechanism to
verify that it is allowed to send media traffic to the given verify that it is allowed to send media traffic to the given
address unless TCP relaying of the RTSP messages also is address unless TCP relaying of the RTSP messages also is
performed. performed.
5. The RTSP Client uses the RTSP Server's response to create TURN 5. The RTSP client uses the RTSP server's response to create TURN
permissions for the server's media traffic. permissions for the server's media traffic.
6. The client requests that the server starts playing. The server 6. The client requests that the server starts playing. The server
starts sending media packets to the given destination address and starts sending media packets to the given destination address and
ports. ports.
7. Media packets arrive at the TURN server on the external port; If 7. Media packets arrive at the TURN server on the external port; if
the packets match an established permission, the TURN server the packets match an established permission, the TURN server
forwards the media packets to the RTSP client. forwards the media packets to the RTSP client.
8. If the client pauses and media is not sent for about 75% of the 8. If the client pauses and media is not sent for about 75% of the
mapping timeout the client should use TURN to refresh the mapping timeout, the client should use TURN to refresh the
bindings. bindings.
4.9.3. ALG Considerations 4.9.3. ALG Considerations
As the RTSP client inserts the address information of the TURN As the RTSP client inserts the address information of the TURN
relay's external allocations in the SETUP messages, and ALG that relay's external allocations in the SETUP messages, the ALG that
replaces the address, without considering that the address do not replaces the address, without considering that the address does not
belong to the internal address realm of the NAT, will prevent this belong to the internal address realm of the NAT, will prevent this
mechanism from working. This can be prevented by securing the RTSP mechanism from working. This can be prevented by securing the RTSP
signalling. signaling.
4.9.4. Deployment Considerations 4.9.4. Deployment Considerations
Advantages: Advantages:
o Does not require any server modifications given that the server o Does not require any server modifications given that the server
includes the src_addr header in the SETUP response. includes the "src_addr" header in the SETUP response.
o Works for any type of NAT as long as the RTSP server has reachable o Works for any type of NAT as long as the RTSP server has a
IP address that is not behind a NAT. reachable IP address that is not behind a NAT.
Disadvantage: Disadvantages:
o Requires another network element, namely the TURN server. o Requires another network element, namely the TURN server.
o A TURN server for RTSP may not scale since the number of sessions o A TURN server for RTSP may not scale since the number of sessions
it must forward is proportional to the number of client media it must forward is proportional to the number of client media
sessions. sessions.
o The TURN server becomes a single point of failure. o The TURN server becomes a single point of failure.
o Since TURN forwards media packets, it necessarily introduces o Since TURN forwards media packets, as a necessity it introduces
delay. delay.
o An RTSP ALG may change the necessary destinations parameter. This o An RTSP ALG may change the necessary destinations parameter. This
will cause the media traffic to be sent to the wrong address. will cause the media traffic to be sent to the wrong address.
Transition: Transition:
TURN is not intended to be phased-out completely, see Section 19 of TURN is not intended to be phased out completely; see Section 19 of
[RFC5766]. However the usage of TURN could be reduced when the [RFC5766]. However, the usage of TURN could be reduced when the
demand for having NAT traversal is reduced. demand for having NAT traversal is reduced.
4.9.5. Security Considerations 4.9.5. Security Considerations
The TURN server can become part of a denial of service attack towards The TURN server can become part of a DoS attack towards any victim.
any victim. To perform this attack the attacker must be able to To perform this attack, the attacker must be able to eavesdrop on the
eavesdrop on the packets from the TURN server towards a target for packets from the TURN server towards a target for the DoS attack.
the DoS attack. The attacker uses the TURN server to setup a RTSP The attacker uses the TURN server to set up an RTSP session with
session with media flows going through the TURN server. The attacker media flows going through the TURN server. The attacker is in fact
is in fact creating TURN mappings towards a target by spoofing the creating TURN mappings towards a target by spoofing the source
source address of TURN requests. As the attacker will need the address of TURN requests. As the attacker will need the address of
address of these mappings he must be able to eavesdrop or intercept these mappings, he must be able to eavesdrop or intercept the TURN
the TURN responses going from the TURN server to the target. Having responses going from the TURN server to the target. Having these
these addresses, he can set up a RTSP session and start delivery of addresses, he can set up an RTSP session and start delivery of the
the media. The attacker must be able to create these mappings. The media. The attacker must be able to create these mappings. The
attacker in this case may be traced by the TURN username in the attacker in this case may be traced by the TURN username in the
mapping requests. mapping requests.
This attack requires that the attacker has access to a user account This attack requires that the attacker has access to a user account
on the TURN server to be able set up the TURN mappings. To prevent on the TURN server to be able to set up the TURN mappings. To
this attack the RTSP server needs to verify that the ultimate target prevent this attack, the RTSP server needs to verify that the
destination accept this media stream. Which would require something ultimate target destination accepts this media stream, which would
like ICE's connectivity checks being run between the RTSP server and require something like ICE's connectivity checks being run between
the RTSP client. the RTSP server and the RTSP client.
5. Firewalls 5. Firewalls
Firewalls exist for the purpose of protecting a network from traffic Firewalls exist for the purpose of protecting a network from traffic
not desired by the firewall owner. Therefore it is a policy decision not desired by the firewall owner. Therefore, it is a policy
if a firewall will let RTSP and its media streams through or not. decision if a firewall will let RTSP and its media streams through or
RTSP is designed to be firewall friendly in that it should be easy to not. RTSP is designed to be firewall friendly in that it should be
design firewall policies to permit passage of RTSP traffic and its easy to design firewall policies to permit passage of RTSP traffic
media streams. and its media streams.
The firewall will need to allow the media streams associated with a The firewall will need to allow the media streams associated with an
RTSP session to pass through it. Therefore the firewall will need an RTSP session to pass through it. Therefore, the firewall will need
ALG that reads RTSP SETUP and TEARDOWN messages. By reading the an ALG that reads RTSP SETUP and TEARDOWN messages. By reading the
SETUP message the firewall can determine what type of transport and SETUP message, the firewall can determine what type of transport and
from where, the media stream packets will be sent. Commonly there from where the media stream packets will be sent. Commonly, there
will be the need to open UDP ports for RTP/RTCP. By looking at the will be the need to open UDP ports for RTP/RTCP. By looking at the
source and destination addresses and ports the opening in the source and destination addresses and ports, the opening in the
firewall can be minimized to the least necessary. The opening in the firewall can be minimized to the least necessary. The opening in the
firewall can be closed after a TEARDOWN message for that session or firewall can be closed after a TEARDOWN message for that session or
the session itself times out. the session itself times out.
The above possibilities for firewalls to inspect and respond to the The above possibilities for firewalls to inspect and respond to the
signalling are prevented if end-to-end confidentiality protection is signaling are prevented if end-to-end confidentiality protection is
used for the RTSP signalling, e.g. using the specified RTSP over TLS. used for the RTSP signaling, e.g., using the specified RTSP over TLS.
This results in that firewalls can't be actively opening pinholes for As a result, firewalls can't be actively opening pinholes for the
the media streams based on the signalling. To enable an RTSP ALG in media streams based on the signaling. To enable an RTSP ALG in the
firewall to correctly function the hop-by-hop signalling security firewall to correctly function, the hop-by-hop signaling security in
(See Section 19.3) in RTSP 2.0 [I-D.ietf-mmusic-rfc2326bis] can be RTSP 2.0 can be used (see Section 19.3 of [RTSP]). If not, other
used. If not, other methods have to be used to enable the transport methods have to be used to enable the transport flows for the media.
flows for the media.
Simpler firewalls do allow a client to receive media as long as it Simpler firewalls do allow a client to receive media as long as it
has sent packets to the target. Depending on the security level this has sent packets to the target. Depending on the security level,
can have the same behavior as a NAT. The only difference is that no this can have the same behavior as a NAT. The only difference is
address translation is done. To use such a firewall a client would that no address translation is done. To use such a firewall, a
need to implement one of the above described NAT traversal methods client would need to implement one of the above described NAT
that include sending packets to the server to open up the mappings. traversal methods that include sending packets to the server to
create the necessary filtering state.
6. Comparison of NAT traversal techniques 6. Comparison of NAT Traversal Techniques
This section evaluates the techniques described above against the This section evaluates the techniques described above against the
requirements listed in Section 3. requirements listed in Section 3.
In the following table, the columns correspond to the numbered In the following table, the columns correspond to the numbered
requirements. For instance, the column under R1 corresponds to the requirements. For instance, the column under R1 corresponds to the
first requirement in Section 3: must work for all flavors of NATs. first requirement in Section 3: must work for all flavors of NATs.
The rows represent the different NAT/firewall traversal techniques. The rows represent the different NAT/firewall traversal techniques.
Latch is short for Latching, "V. Latch" is short for "variation of Latch is short for Latching, "V. Latch" is short for "variation of
Latching" as described in Section 4.5. "3-W Latch" is short for the Latching" as described in Section 4.5, and "3-W Latch" is short for
Three Way Latching described in Section 4.6. the Three-Way Latching described in Section 4.6.
A Summary of the requirements are:
R1: Work for all flavors of NATs A summary of the requirements are:
R2: Must work with firewalls, including those with ALGs R1: Work for all flavors of NATs
R3: Should have minimal impact on clients not behind NATs, counted R2: Must work with firewalls, including those with ALGs
in minimal number of additional RTTs
R4: Should be simple to use, Implement and administer. R3: Should have minimal impact on clients not behind NATs, counted in
minimal number of additional RTTs
R5: Should provide mitigation against DDoS attacks R4: Should be simple to use, implement, and administer
The following considerations are also added to requirements: R5: Should provide mitigation against DDoS attacks
C1: Will solution support both Clients and Servers behind NAT The following considerations are also added to the requirements:
C2: Is the solution robust to changing NAT behaviors C1: Will the solution support both clients and servers behind NAT?
C2: Is the solution robust as NAT behaviors change?
------------+------+------+------+------+------+------+------+ ------------+------+------+------+------+------+------+------+
| R1 | R2 | R3 | R4 | R5 | C1 | C2 | | R1 | R2 | R3 | R4 | R5 | C1 | C2 |
------------+------+------+------+------+------+------+------+ ------------+------+------+------+------+------+------+------+
STUN | No | Yes | 1 | Maybe| No | No | No | STUN | No | Yes | 1 | Maybe| No | No | No |
------------+------+------+------+------+------+------+------+ ------------+------+------+------+------+------+------+------+
Emb. STUN | Yes | Yes | 2 | Maybe| No | No | Yes | Emb. STUN | Yes | Yes | 2 | Maybe| No | No | Yes |
------------+------+------+------+------+------+------+------+ ------------+------+------+------+------+------+------+------+
ICE | Yes | Yes | 2.5 | No | Yes | Yes | Yes | ICE | Yes | Yes | 2.5 | No | Yes | Yes | Yes |
------------+------+------+------+------+------+------+------+ ------------+------+------+------+------+------+------+------+
Latch | Yes | Yes | 1 | Maybe| No | No | Yes | Latch | Yes | Yes | 1 | Maybe| No | No | Yes |
skipping to change at page 39, line 31 skipping to change at page 40, line 26
------------+------+------+------+------+------+------+------+ ------------+------+------+------+------+------+------+------+
3-W Latch | Yes | Yes | 1.5 | Maybe| Yes | No | Yes | 3-W Latch | Yes | Yes | 1.5 | Maybe| Yes | No | Yes |
------------+------+------+------+------+------+------+------+ ------------+------+------+------+------+------+------+------+
ALG |(Yes) | Yes | 0 | No | Yes | No | Yes | ALG |(Yes) | Yes | 0 | No | Yes | No | Yes |
------------+------+------+------+------+------+------+------+ ------------+------+------+------+------+------+------+------+
TCP Tunnel | Yes | Yes | 1.5 | Yes | Yes | No | Yes | TCP Tunnel | Yes | Yes | 1.5 | Yes | Yes | No | Yes |
------------+------+------+------+------+------+------+------+ ------------+------+------+------+------+------+------+------+
TURN | Yes | Yes | 1 | No | Yes |(Yes) | Yes | TURN | Yes | Yes | 1 | No | Yes |(Yes) | Yes |
------------+------+------+------+------+------+------+------+ ------------+------+------+------+------+------+------+------+
Figure 1: Comparison of fulfillment of requirements Figure 1: Comparison of Fulfillment of Requirements
Looking at Figure 1 one would draw the conclusion that using TCP Looking at Figure 1, one would draw the conclusion that using TCP
Tunneling or Three-Way Latching is the solutions that best fulfill Tunneling or Three-Way Latching are the solutions that best fulfill
the requirements. The different techniques were discussed in the the requirements. The different techniques were discussed in the
MMUSIC WG. It was established that the WG would pursue an ICE based MMUSIC WG. It was established that the WG would pursue an ICE-based
solution due to its generality and capability of handling also solution due to its generality and capability of also handling
servers delivering media from behind NATs. TCP Tunneling is likely servers delivering media from behind NATs. TCP Tunneling is likely
to be available as an alternative, due to its specification in the to be available as an alternative, due to its specification in the
main RTSP specification. Thus it can be used if desired and the main RTSP specification. Thus, it can be used if desired, and the
potential downsides of using TCP is acceptable in particular potential downsides of using TCP is acceptable in particular
deployments. When it comes to Three-Way Latching it is a very deployments. When it comes to Three-Way Latching, it is a very
competitive technique given that you don't need support for RTSP competitive technique given that you don't need support for RTSP
servers behind NATs. There were some discussion in the WG if the servers behind NATs. There was some discussion in the WG about if
increased implementation burden of ICE is sufficiently motivated the increased implementation burden of ICE is sufficiently motivated
compared to a the Three-Way Latching solution for this generality. compared to a the Three-Way Latching solution for this generality.
In the end the authors believe that reuse of ICE, the greater In the end, the authors believed that the reuse of ICE, greater
flexibility and anyway need to deploy a new solution was the decisive flexibility, and any way needed to deploy a new solution were the
factors. decisive factors.
The ICE based RTSP NAT traversal solution is specified in "A Network The ICE-based RTSP NAT traversal solution is specified in "A Network
Address Translator (NAT) Traversal mechanism for media controlled by Address Translator (NAT) Traversal mechanism for media controlled by
Real-Time Streaming Protocol (RTSP)" [I-D.ietf-mmusic-rtsp-nat]. Real-Time Streaming Protocol (RTSP)" [RTSP-NAT].
7. IANA Considerations
This document makes no request of IANA.
Note to RFC Editor: this section may be removed on publication as an
RFC.
8. Security Considerations 7. Security Considerations
In the preceding sections we have discussed security merits of the In the preceding sections, we have discussed security merits of the
different NAT/firewall traversal methods for RTSP discussed here. In different NAT/firewall traversal methods for RTSP. In summary, the
summary, the presence of NAT(s) is a security risk, as a client presence of NAT(s) is a security risk, as a client cannot perform
cannot perform source authentication of its IP address. This source authentication of its IP address. This prevents the
prevents the deployment of any future RTSP extensions providing deployment of any future RTSP extensions providing security against
security against hijacking of sessions by a man-in-the-middle. the hijacking of sessions by a man in the middle.
Each of the proposed solutions has security implications. Using STUN Each of the proposed solutions has security implications. Using STUN
will provide the same level of security as RTSP without transport will provide the same level of security as RTSP without transport-
level security and source authentications, as long as the server does level security and source authentications, as long as the server does
not allow media to be sent to a different IP-address than the RTSP not allow media to be sent to a different IP address than the RTSP
client request was sent from. client request was sent from.
Using Latching will have a higher risk of session hijacking or denial Using Latching will have a higher risk of session hijacking or DoS
of service than normal RTSP. The reason is that there exists a than normal RTSP. The reason is that there exists a probability that
probability that an attacker is able to guess the random bits that an attacker is able to guess the random bits that the client uses to
the client uses to prove its identity when creating the address prove its identity when creating the address bindings. This can be
bindings. This can be solved in the variation of Latching solved in the variation of Latching (Section 4.5) with authentication
(Section 4.5) with authentication features. Still both those features. Still, both those variants of Latching are vulnerable
variants of Latching are vulnerable against deliberate attack from against a deliberate attack from the RTSP client to redirect the
the RTSP client to redirect the media stream requested to any target media stream requested to any target assuming it can spoof the source
assuming it can spoof the source address. This security address. This security vulnerability is solved by performing a
vulnerability is solved by performing a Three-way Latching procedure Three-way Latching procedure as discussed in Section 4.6.
as discussed in Section 4.6.
ICE resolves the binding vulnerability of latching by using signed ICE resolves the binding vulnerability of Latching by using signed
STUN messages, as well as requiring that both sides perform STUN messages, as well as requiring that both sides perform
connectivity checks to verify that the target IP address in the connectivity checks to verify that the target IP address in the
candidate pair is both reachable and willing to respond. ICE can candidate pair is both reachable and willing to respond. ICE can,
however create a significant amount of traffic if the number of however, create a significant amount of traffic if the number of
candidate pairs are large. Thus pacing is required and candidate pairs are large. Thus, pacing is required and
implementations should attempt to limit their number of candidates to implementations should attempt to limit their number of candidates to
reduce the number of packets. reduce the number of packets.
If the signalling between the ICE peers (RTSP client and Server) is If the signaling between the ICE peers (RTSP client and server) is
not confidentiality and integrity protected ICE is vulnerable to not confidentiality and integrity protected, ICE is vulnerable to
attacks where the candidate list is manipulated. Lack of signalling attacks where the candidate list is manipulated. The lack of
security will also simplify spoofing of STUN binding messages by signaling security will also simplify spoofing of STUN binding
revealing the secret used in signing. messages by revealing the secret used in signing.
The usage of an RTSP ALG does not in itself increase the risk for The usage of an RTSP ALG does not in itself increase the risk for
session hijacking. However the deployment of ALGs as the sole session hijacking. However, the deployment of ALGs as the sole
mechanism for RTSP NAT traversal will prevent deployment of end-to- mechanism for RTSP NAT traversal will prevent deployment of end-
end encrypted RTSP signaling. to-end encrypted RTSP signaling.
The usage of TCP tunneling has no known security problems. However, The usage of TCP tunneling has no known security problems. However,
it might provide a bottleneck when it comes to end-to-end RTSP it might provide a bottleneck when it comes to end-to-end RTSP
signaling security if TCP tunneling is used on an interleaved RTSP signaling security if TCP tunneling is used on an interleaved RTSP
signaling connection. signaling connection.
The usage of TURN has severe risk of denial of service attacks The usage of TURN has severe risk of DoS attacks against a client.
against a client. The TURN server can also be used as a redirect The TURN server can also be used as a redirect point in a DDoS attack
point in a DDoS attack unless the server has strict enough rules for unless the server has strict enough rules for who may create
who may create bindings. bindings.
The latching and variant of latching have so big security issues that Since Latching and the variants of Latching have such big security
they should not be used at all. The three way latching as well as issues, they should not be used at all. Three-Way Latching as well
ICE mitigates these security issues and performs the important as ICE mitigates these security issues and performs the important
return-routability checks that prevents spoofed source addresses, and return-routability checks that prevent spoofed source addresses, and
should be recommended for that reason. RTP ALG's is a security risk they should be recommended for that reason. RTP ALGs are a security
as they can create an incitement against using secure RTSP risk as they can create an incitement against using secure RTSP
signalling. That can be avoided as ALGs requires trust in the signaling. That can be avoided as ALGs require trust in the
middlebox, and that trust becomes explicit if one uses the hop-by-hop middlebox, and that trust becomes explicit if one uses the hop-by-hop
security solution as specified in Section 19.3 of RTSP 2.0. security solution as specified in Section 19.3 of RTSP 2.0. [RTSP].
[I-D.ietf-mmusic-rfc2326bis]. The remaining methods can be The remaining methods can be considered safe enough, assuming that
considered safe enough, assuming that the appropriate security the appropriate security mechanisms are used and not ignored.
mechanisms are used and not ignored.
9. Acknowledgements 8. Informative References
The author would also like to thank all persons on the MMUSIC working [NICE] Libnice, "The GLib ICE implementation", June 2015,
group's mailing list that has commented on this document. Persons <http://nice.freedesktop.org/wiki/>.
having contributed in such way in no special order to this protocol
are: Jonathan Rosenberg, Philippe Gentric, Tom Marshall, David Yon,
Amir Wolf, Anders Klemets, Flemming Andreasen, Ari Keranen, Bill
Atwood, Alissa Cooper, Colin Perkins, Sarah Banks, David Black and
Alvaro Retana. Thomas Zeng would also like to give special thanks to
Greg Sherwood of PacketVideo for his input into this memo.
Section 1.1 contains text originally written for RFC 4787 by Francois [PJNATH] "PJNATH - Open Source ICE, STUN, and TURN Library", May
Audet and Cullen Jennings. 2013, <http://www.pjsip.org/pjnath/docs/html/>.
10. Informative References [RFC768] Postel, J., "User Datagram Protocol", STD 6, RFC 768,
DOI 10.17487/RFC0768, August 1980,
<http://www.rfc-editor.org/info/rfc768>.
[I-D.ietf-avt-rtp-no-op] [RFC793] Postel, J., "Transmission Control Protocol", STD 7,
Andreasen, F., "A No-Op Payload Format for RTP", draft- RFC 793, DOI 10.17487/RFC0793, September 1981,
ietf-avt-rtp-no-op-04 (work in progress), May 2007. <http://www.rfc-editor.org/info/rfc793>.
[I-D.ietf-mmusic-rfc2326bis] [RFC2326] Schulzrinne, H., Rao, A., and R. Lanphier, "Real Time
Schulzrinne, H., Rao, A., Lanphier, R., Westerlund, M., Streaming Protocol (RTSP)", RFC 2326,
and M. Stiemerling, "Real Time Streaming Protocol 2.0 DOI 10.17487/RFC2326, April 1998,
(RTSP)", draft-ietf-mmusic-rfc2326bis-40 (work in <http://www.rfc-editor.org/info/rfc2326>.
progress), February 2014.
[I-D.ietf-mmusic-rtsp-nat] [RFC2588] Finlayson, R., "IP Multicast and Firewalls", RFC 2588,
Goldberg, J., Westerlund, M., and T. Zeng, "A Network DOI 10.17487/RFC2588, May 1999,
Address Translator (NAT) Traversal Mechanism for Media <http://www.rfc-editor.org/info/rfc2588>.
Controlled by Real-Time Streaming Protocol (RTSP)", draft-
ietf-mmusic-rtsp-nat-22 (work in progress), July 2014.
[NICE] "Libnice - The GLib ICE implementation, [RFC2663] Srisuresh, P. and M. Holdrege, "IP Network Address
http://nice.freedesktop.org/wiki/", May 2013. Translator (NAT) Terminology and Considerations",
RFC 2663, DOI 10.17487/RFC2663, August 1999,
<http://www.rfc-editor.org/info/rfc2663>.
[PJNATH] "PJNATH - Open Source ICE, STUN, and TURN Library, [RFC3022] Srisuresh, P. and K. Egevang, "Traditional IP Network
http://www.pjsip.org/pjnath/docs/html/", May 2013. Address Translator (Traditional NAT)", RFC 3022,
DOI 10.17487/RFC3022, January 2001,
<http://www.rfc-editor.org/info/rfc3022>.
[RFC0768] Postel, J., "User Datagram Protocol", STD 6, RFC 768, [RFC3261] Rosenberg, J., Schulzrinne, H., Camarillo, G., Johnston,
August 1980. A., Peterson, J., Sparks, R., Handley, M., and
E. Schooler, "SIP: Session Initiation Protocol",
RFC 3261, DOI 10.17487/RFC3261, June 2002,
<http://www.rfc-editor.org/info/rfc3261>.
[RFC0793] Postel, J., "Transmission Control Protocol", STD 7, RFC [RFC3424] Daigle, L., Ed. and IAB, "IAB Considerations for
793, September 1981. UNilateral Self-Address Fixing (UNSAF) Across Network
Address Translation", RFC 3424, DOI 10.17487/RFC3424,
November 2002, <http://www.rfc-editor.org/info/rfc3424>.
[RFC2326] Schulzrinne, H., Rao, A., and R. Lanphier, "Real Time [RFC3489] Rosenberg, J., Weinberger, J., Huitema, C., and R. Mahy,
Streaming Protocol (RTSP)", RFC 2326, April 1998. "STUN - Simple Traversal of User Datagram Protocol (UDP)
Through Network Address Translators (NATs)", RFC 3489,
DOI 10.17487/RFC3489, March 2003,
<http://www.rfc-editor.org/info/rfc3489>.
[RFC2588] Finlayson, R., "IP Multicast and Firewalls", RFC 2588, May [RFC3550] Schulzrinne, H., Casner, S., Frederick, R., and V.
1999. Jacobson, "RTP: A Transport Protocol for Real-Time
Applications", STD 64, RFC 3550, DOI 10.17487/RFC3550,
July 2003, <http://www.rfc-editor.org/info/rfc3550>.
[RFC2663] Srisuresh, P. and M. Holdrege, "IP Network Address [RFC4566] Handley, M., Jacobson, V., and C. Perkins, "SDP: Session
Translator (NAT) Terminology and Considerations", RFC Description Protocol", RFC 4566, DOI 10.17487/RFC4566,
2663, August 1999. July 2006, <http://www.rfc-editor.org/info/rfc4566>.
[RFC3022] Srisuresh, P. and K. Egevang, "Traditional IP Network [RFC4571] Lazzaro, J., "Framing Real-time Transport Protocol (RTP)
Address Translator (Traditional NAT)", RFC 3022, January and RTP Control Protocol (RTCP) Packets over Connection-
2001. Oriented Transport", RFC 4571, DOI 10.17487/RFC4571, July
2006, <http://www.rfc-editor.org/info/rfc4571>.
[RFC3261] Rosenberg, J., Schulzrinne, H., Camarillo, G., Johnston, [RFC4787] Audet, F., Ed. and C. Jennings, "Network Address
A., Peterson, J., Sparks, R., Handley, M., and E. Translation (NAT) Behavioral Requirements for Unicast
Schooler, "SIP: Session Initiation Protocol", RFC 3261, UDP", BCP 127, RFC 4787, DOI 10.17487/RFC4787, January
June 2002. 2007, <http://www.rfc-editor.org/info/rfc4787>.
[RFC3424] Daigle, L. and IAB, "IAB Considerations for UNilateral [RFC4961] Wing, D., "Symmetric RTP / RTP Control Protocol (RTCP)",
Self-Address Fixing (UNSAF) Across Network Address BCP 131, RFC 4961, DOI 10.17487/RFC4961, July 2007,
Translation", RFC 3424, November 2002. <http://www.rfc-editor.org/info/rfc4961>.
[RFC3489] Rosenberg, J., Weinberger, J., Huitema, C., and R. Mahy, [RFC5245] Rosenberg, J., "Interactive Connectivity Establishment
"STUN - Simple Traversal of User Datagram Protocol (UDP) (ICE): A Protocol for Network Address Translator (NAT)
Through Network Address Translators (NATs)", RFC 3489, Traversal for Offer/Answer Protocols", RFC 5245,
March 2003. DOI 10.17487/RFC5245, April 2010,
<http://www.rfc-editor.org/info/rfc5245>.
[RFC3550] Schulzrinne, H., Casner, S., Frederick, R., and V. [RFC5382] Guha, S., Ed., Biswas, K., Ford, B., Sivakumar, S., and
Jacobson, "RTP: A Transport Protocol for Real-Time P. Srisuresh, "NAT Behavioral Requirements for TCP",
Applications", STD 64, RFC 3550, July 2003. BCP 142, RFC 5382, DOI 10.17487/RFC5382, October 2008,
<http://www.rfc-editor.org/info/rfc5382>.
[RFC4566] Handley, M., Jacobson, V., and C. Perkins, "SDP: Session [RFC5389] Rosenberg, J., Mahy, R., Matthews, P., and D. Wing,
Description Protocol", RFC 4566, July 2006. "Session Traversal Utilities for NAT (STUN)", RFC 5389,
DOI 10.17487/RFC5389, October 2008,
<http://www.rfc-editor.org/info/rfc5389>.
[RFC4571] Lazzaro, J., "Framing Real-time Transport Protocol (RTP) [RFC5764] McGrew, D. and E. Rescorla, "Datagram Transport Layer
and RTP Control Protocol (RTCP) Packets over Connection- Security (DTLS) Extension to Establish Keys for the
Oriented Transport", RFC 4571, July 2006. Secure Real-time Transport Protocol (SRTP)", RFC 5764,
DOI 10.17487/RFC5764, May 2010,
<http://www.rfc-editor.org/info/rfc5764>.
[RFC4787] Audet, F. and C. Jennings, "Network Address Translation [RFC5766] Mahy, R., Matthews, P., and J. Rosenberg, "Traversal
(NAT) Behavioral Requirements for Unicast UDP", BCP 127, Using Relays around NAT (TURN): Relay Extensions to
RFC 4787, January 2007. Session Traversal Utilities for NAT (STUN)", RFC 5766,
DOI 10.17487/RFC5766, April 2010,
<http://www.rfc-editor.org/info/rfc5766>.
[RFC4961] Wing, D., "Symmetric RTP / RTP Control Protocol (RTCP)", [RFC6062] Perreault, S., Ed. and J. Rosenberg, "Traversal Using
BCP 131, RFC 4961, July 2007. Relays around NAT (TURN) Extensions for TCP Allocations",
RFC 6062, DOI 10.17487/RFC6062, November 2010,
<http://www.rfc-editor.org/info/rfc6062>.
[RFC5245] Rosenberg, J., "Interactive Connectivity Establishment [RFC6263] Marjou, X. and A. Sollaud, "Application Mechanism for
(ICE): A Protocol for Network Address Translator (NAT) Keeping Alive the NAT Mappings Associated with RTP / RTP
Traversal for Offer/Answer Protocols", RFC 5245, April Control Protocol (RTCP) Flows", RFC 6263,
2010. DOI 10.17487/RFC6263, June 2011,
<http://www.rfc-editor.org/info/rfc6263>.
[RFC5382] Guha, S., Biswas, K., Ford, B., Sivakumar, S., and P. [RFC6275] Perkins, C., Ed., Johnson, D., and J. Arkko, "Mobility
Srisuresh, "NAT Behavioral Requirements for TCP", BCP 142, Support in IPv6", RFC 6275, DOI 10.17487/RFC6275, July
RFC 5382, October 2008. 2011, <http://www.rfc-editor.org/info/rfc6275>.
[RFC5389] Rosenberg, J., Mahy, R., Matthews, P., and D. Wing, [RFC7362] Ivov, E., Kaplan, H., and D. Wing, "Latching: Hosted NAT
"Session Traversal Utilities for NAT (STUN)", RFC 5389, Traversal (HNT) for Media in Real-Time Communication",
October 2008. RFC 7362, DOI 10.17487/RFC7362, September 2014,
<http://www.rfc-editor.org/info/rfc7362>.
[RFC5764] McGrew, D. and E. Rescorla, "Datagram Transport Layer [RTP-NO-OP] Andreasen, F., "A No-Op Payload Format for RTP", Work in
Security (DTLS) Extension to Establish Keys for the Secure Progress, draft-ietf-avt-rtp-no-op-04, May 2007.
Real-time Transport Protocol (SRTP)", RFC 5764, May 2010.
[RFC5766] Mahy, R., Matthews, P., and J. Rosenberg, "Traversal Using [RTSP] Schulzrinne, H., Rao, A., Lanphier, R., Westerlund, M.,
Relays around NAT (TURN): Relay Extensions to Session and M. Stiemerling, "Real Time Streaming Protocol 2.0
Traversal Utilities for NAT (STUN)", RFC 5766, April 2010. (RTSP)", Work in Progress,
draft-ietf-mmusic-rfc2326bis-40, February 2014.
[RFC6062] Perreault, S. and J. Rosenberg, "Traversal Using Relays [RTSP-NAT] Goldberg, J., Westerlund, M., and T. Zeng, "A Network
around NAT (TURN) Extensions for TCP Allocations", RFC Address Translator (NAT) Traversal Mechanism for Media
6062, November 2010. Controlled by Real-Time Streaming Protocol (RTSP)", Work
in Progress, draft-ietf-mmusic-rtsp-nat-22, July 2014.
[RFC6263] Marjou, X. and A. Sollaud, "Application Mechanism for [STUN-IMPL] "Open Source STUN Client and Server", May 2013,
Keeping Alive the NAT Mappings Associated with RTP / RTP <http://sourceforge.net/projects/stun/>.
Control Protocol (RTCP) Flows", RFC 6263, June 2011.
[RFC6275] Perkins, C., Johnson, D., and J. Arkko, "Mobility Support Acknowledgements
in IPv6", RFC 6275, July 2011.
[RFC7362] Ivov, E., Kaplan, H., and D. Wing, "Latching: Hosted NAT The authors would also like to thank all persons on the MMUSIC
Traversal (HNT) for Media in Real-Time Communication", RFC working group's mailing list that have commented on this document.
7362, September 2014. Persons having contributed to this protocol, in no special order,
are: Jonathan Rosenberg, Philippe Gentric, Tom Marshall, David Yon,
Amir Wolf, Anders Klemets, Flemming Andreasen, Ari Keranen, Bill
Atwood, Alissa Cooper, Colin Perkins, Sarah Banks, David Black, and
Alvaro Retana. Thomas Zeng would also like to give special thanks to
Greg Sherwood of PacketVideo for his input into this memo.
[STUN-IMPL] Section 1.1 contains text originally written for RFC 4787 by Francois
"Open Source STUN Server and Client, Audet and Cullen Jennings.
http://sourceforge.net/projects/stun/", May 2013.
Authors' Addresses Authors' Addresses
Magnus Westerlund Magnus Westerlund
Ericsson Ericsson
Farogatan 6 Farogatan 6
Stockholm SE-164 80 Stockholm SE-164 80
Sweden Sweden
Phone: +46 8 719 0000 Phone: +46 8 719 0000
Email: magnus.westerlund@ericsson.com Email: magnus.westerlund@ericsson.com
Thomas Zeng Thomas Zeng
PacketVideo Corp
Email: thomas.zeng@gmail.com Email: thomas.zeng@gmail.com
 End of changes. 357 change blocks. 
1014 lines changed or deleted 1028 lines changed or added

This html diff was produced by rfcdiff 1.42. The latest version is available from http://tools.ietf.org/tools/rfcdiff/