draft-ietf-mmusic-rtsp-nat-04.txt   draft-ietf-mmusic-rtsp-nat-05.txt 
Network Working Group Magnus Westerlund Network Working Group M. Westerlund
INTERNET-DRAFT Ericsson Internet-Draft Ericsson
Expires: April 2006 Thomas Zeng Intended status: Standards Track T. Zeng
PacketVideo Network Solutions Expires: January 8, 2008 July 7, 2007
October 24, 2005
How to Enable Real-Time Streaming Protocol (RTSP) Traverse Network An Network Address Translator (NAT) Traversal mechanism for media
Address Translators (NAT) and Interact with Firewalls. controlled by Real-Time Streaming Protocol (RTSP)
<draft-ietf-mmusic-rtsp-nat-04.txt> draft-ietf-mmusic-rtsp-nat-05
Status of this memo Status of this Memo
By submitting this Internet-Draft, each author represents that any By submitting this Internet-Draft, each author represents that any
applicable patent or other IPR claims of which he or she is aware applicable patent or other IPR claims of which he or she is aware
have been or will be disclosed, and any of which he or she becomes have been or will be disclosed, and any of which he or she becomes
aware will be disclosed, in accordance with Section 6 of BCP 79. aware will be disclosed, in accordance with Section 6 of BCP 79.
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF), its areas, and its working groups. Note that Task Force (IETF), its areas, and its working groups. Note that
other groups may also distribute working documents as Internet- other groups may also distribute working documents as Internet-
Drafts. Drafts.
Internet-Drafts are draft documents valid for a maximum of six Internet-Drafts are draft documents valid for a maximum of six months
months and may be updated, replaced, or obsoleted by other documents and may be updated, replaced, or obsoleted by other documents at any
at any time. It is inappropriate to use Internet-Drafts as time. It is inappropriate to use Internet-Drafts as reference
reference material or to cite them other than as "work in material or to cite them other than as "work in progress."
progress.".
The list of current Internet-Drafts can be accessed at The list of current Internet-Drafts can be accessed at
http://www.ietf.org/1id-abstracts.html http://www.ietf.org/ietf/1id-abstracts.txt.
The list of Internet-Draft Shadow Directories can be accessed at The list of Internet-Draft Shadow Directories can be accessed at
http://www.ietf.org/shadow.html http://www.ietf.org/shadow.html.
This document is an individual submission to the IETF. Comments
should be directed to the authors.
Abstract
This document describes several types of NAT traversal techniques
that can be used by RTSP. For each technique a description on how it
shall be used, what security implications it has and other
deployment considerations are given. Further a description on how
RTSP relates to firewalls is given.
TABLE OF CONTENTS This Internet-Draft will expire on January 8, 2008.
1. Definitions.........................................................4 Copyright Notice
1.1. Glossary........................................................4
1.2. Terminology.....................................................4
2. Changes.............................................................4
3. Introduction........................................................5
3.1. NATs............................................................5
3.2. Firewalls.......................................................5
4. Requirements........................................................6
5. Detecting the loss of NAT mappings..................................7
6. NAT Traversal Techniques............................................8
6.1. STUN............................................................8
6.1.1. Introduction.................................................8
6.1.2. Using STUN to traverse NAT without server modifications......9
6.1.3. Embedding STUN in RTSP......................................11
6.1.4. Discussion On Co-located STUN Server........................12
6.1.5. ALG considerations..........................................12
6.1.6. Deployment Considerations...................................12
6.1.7. Security Considerations.....................................14
6.2. ICE............................................................14
6.2.1. Introduction................................................14
6.2.2. Using ICE in RTSP...........................................15
6.2.3. Implementation burden of ICE................................17
6.2.4. Deployment Considerations...................................17
6.3. Symmetric RTP..................................................18
6.3.1. Introduction................................................18
6.3.2. Necessary RTSP extensions...................................18
6.3.3. Deployment Considerations...................................18
6.3.4. Security Consideration......................................19
6.3.5. A Variation to Symmetric RTP................................20
6.4. Application Level Gateways.....................................21
6.4.1. Introduction................................................21
6.4.2. Guidelines On Writing ALGs for RTSP.........................22
6.4.3. Deployment Considerations...................................23
6.4.4. Security Considerations.....................................23
6.5. TCP Tunneling..................................................23
6.5.1. Introduction................................................23
6.5.2. Usage of TCP tunneling in RTSP..............................24
6.5.3. Deployment Considerations...................................24
6.5.4. Security Considerations.....................................24
6.6. TURN (Traversal Using Relay NAT)...............................25
6.6.1. Introduction................................................25
6.6.2. Usage of TURN with RTSP.....................................25
6.6.3. Deployment Considerations...................................26
6.6.4. Security Considerations.....................................27
7. Firewalls..........................................................28
8. Comparison of Different NAT Traversal Techniques...................28
9. Open Issues........................................................29
10. Security Consideration............................................29
11. IANA Consideration................................................30
12. Acknowledgments...................................................30
13. Author's Addresses................................................30
14. References........................................................31
15. IPR Notice........................................................33
16. Copyright Notice........................Error! Bookmark not defined.
1. Definitions Copyright (C) The IETF Trust (2007).
1.1. Glossary Abstract
ALG - Application Level Gateway, an entity that can be embedded This document defines a solution for Network Address Trans(NAT)
in a NAT or other middlebox to perform the application layer traversal for the media stream associated with an Real-time Streaming
functions required for a particular protocol to traverse the Protocol version 2 (RTSP 2.0). The mechanism is based on Interactive
NAT/middlebox [6] Connectivity Establishment (ICE) adapted for using RTSP as signalling
ICE - Interactive Connectivity Establishment, see [9]. channel. The necessary RTSP protocol extensions and procedure is
DNS - Domain Name Service defined in this document.
DDOS - Distributed Denial Of Service attacks
MID - Media Identifier from Grouping of media lines in SDP, see
[10].
NAT - Network Address Translator, see [12].
NAT-PT - Network Address Translator Protocol Translator, see [13]
RTP - Real-time Transport Protocol, see [5].
RTSP - Real-Time Streaming Protocol, see [1] and [7].
SDP - Session Description Protocol, see [2].
SSRC - Synchronization source in RTP, see [5].
TBD - To Be Decided
1.2. Terminology Requirements Language
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in RFC 2119 [4]. document are to be interpreted as described in RFC 2119 [RFC2119].
2. Changes
The following changes have been done since draft-ietf-mmusic-rtsp-
nat-03.txt:
- A outline of a procedure for ICE is presneted.
- Updated references
- Replaced NAT classification by BEHAVE WG definitions.
3. Introduction
Today there is a proliferate deployment of different flavors of
Network Address Translator (NAT) boxes that in practice follow
standards rather loosely [12][24][18]. NATs cause discontinuity in
address realms [18], therefore a protocol, such as RTSP, needs to
try to make sure that it can deal with such discontinuities caused
by NATs. The problem with RTSP is that, being a media control
protocol that manages one or more media streams; RTSP carries
information about network addresses and ports inside itself. Because
of this, even if RTSP itself, when carried over TCP for example, is
not blocked by NATs, its media streams may be blocked by NATs,
unless special provisions are added to support NAT-traversal.
Like NATs, firewalls (FWs) are also middle boxes that need to be
considered. They are deployed to prevent unwanted traffic to be able
to get in or out of the protected network. RTSP is designed such
that a firewall can be configured to let RTSP controlled media
streams to go through with minimal implementation problems. However
there is a need for more detailed information on how FWs should be
configured to work with RTSP.
This document describes several NAT-traversal mechanisms for RTSP
based streaming. These NAT solutions fall into the category of
""UNilateral Self-Address Fixing (UNSAF)" as defined in [18] and
quoted below:
"UNSAF is a process whereby some originating process attempts
to determine or fix the address (and port) by which it is
known - e.g. to be able to use address data in the protocol
exchange, or to advertise a public address from which it will
receive connections."
Following the guidelines spelled out in [18], we describe the
required RTSP protocol extensions for each method, transition
strategies, and security concerns.
This document intends to recommend FW/NAT traversal methods for RTSP
streaming servers based on RFC 2326 [1] as well as the updated RTSP
core spec [7]. This document is intended to be updated to stay
consistent with the RTSP core protocol [7].
3.1. NATs
Today there exist a number of different NAT types and usage areas.
These are described in the section 3 and 4 of [26].
3.2. Firewalls
A firewall (FW) is a security gateway that enforces certain access
control policies between two network administrative domains: a
private domain (intranet) and a public domain (public internet).
Many organizations use firewalls to prevent privacy intrusions and
malicious attacks to corporate computing resources in the private
intranet [19].
A comparison between NAT and FW are given below:
1. FW must be a gateway between two network administrative domains,
while NAT does not have to sit between two domains. In fact, in
many corporations there are many NAT boxes within the intranet,
in which case the NAT boxes sit between subnets.
2. NAT does not in itself provide security, although some access
control policies can be implemented using address translation
schemes.
3. NAT and FWs are similar in that they can both be configured to
allow multiple network hosts to share a single public IP address.
In other words, a host behind a NAT or FW can have a private IP
address and a public one, so for NAT and FW there is the issue of
address mapping which is important in order for RTSP protocol to
work properly when there are NATs and FWs between the RTSP server
and its clients.
In the rest of this memo we use the phrase "NAT traversal"
interchangeably with "FW traversal", "NAT/FW traversal" and
"NAT/Firewall traversal".
4. Requirements
This section considers the set of requirements when designing or
evaluating RTSP NAT traversal solutions.
RTSP is a client/server protocol, and as such the targeted
applications in general deploy RTSP servers in the public address
realm. However, there are use cases where the reverse is true: RTSP
clients are connecting from public address realm to RTSP servers
behind home NATs. This is the case for instance when home
surveillance cameras running as RTSP servers intend to stream video
to cell phone users in the public address realm through a home NAT.
The first priority should be to solve the RTSP NAT traversal problem
for RTSP servers deployed in the open.
The list of feature requirements for RTSP NAT solutions are given
below:
1. MUST work for all flavors of NATs, including symmetric NATs.
2. MUST work for firewalls (subject to pertinent firewall
administrative policies), including those with ALGs.
3. SHOULD have minimal impact on clients in the open and not dual-
hosted:
o For instance, no extra delay from RTSP connection till
arrival of media.
4. SHOULD be simple to use/implement/administer that people
actually turn them on
o Otherwise people will resort to TCP tunneling through NATs
o Address discovery for NAT traversal should take place
behind the scene, if possible
5. SHOULD authenticate dual-hosted client transport handler to
prevent DDOS attacks.
The last requirement addresses the Distributed Denial-Of-Service
(DDOS) threat, which relates to NAT traversal as explained below.
During NAT traversal, when the RTSP server performs address
translation on a client, the result may be that the public IP
address of the RTP receiver host is different than the public IP
address of the RTSP client host. This posts a DDOS threat that has
significant amplification potentials because the RTP media streams
in general consist of large number of IP packets. DDOS attacks
occur if the attacker fakes the messages in the NAT traversal
mechanism to trick the RTSP server into believing that the
client's RTP receiver is located in a separate host. For example,
user A may use his RTSP client to direct the RTSP server to send
video RTP streams to www.foo.com in order to degrade the services
provided by www.foo.com. Note a simple preventative measure is for
the RTSP server to disallow the cases where the client's RTP
receiver has a different public IP address than that of the RTSP
client. However, in some applications (e.g., XCON), dual-hosted
RTSP/RTP clients have valid use cases. The key is how to
authenticate the messages exchanged during the NAT traversal
process. Message authentication is a big challenge in the current
wired and wireless networking environment. It may be necessary in
the immediate future to deploy NAT traversal solutions that do not
have full message authentication, but provide upgrade path to add
authentication features in the future.
5. Detecting the loss of NAT mappings
Several of the NAT traversal techniques in the next chapter make use
of the fact that the NAT UDP mapping's external address and port can
be discovered. This information is then utilized to traverse the NAT
box. However any such information is only good while the mapping is
still valid. As the IAB's UNSAF document [18] points out, the
mapping can either timeout or change its properties. It is therefore
important for the NAT traversal solutions to handle the loss or
change of NAT mappings, according to [18].
First, since NATs may also dynamically reclaim or readjust
address/port translations, "keep-alive" and periodic re-polling may
be required [18]. Secondly, it is possible to detect and recover
from the situation where the mapping has been changed or removed.
The possibility to detect a lost mapping is based on the fact that
no traffic will arrive. Below we will give some recommendation on
how to detect loss of NAT mappings when using RTP/RTCP under RTSP
control.
For RTP session there is normally a need to have both RTP and RTCP
functioning. The loss of a RTP mapping can only be detected when
expected traffic does not arrive. If no data arrives after having
received the 200 response to a PLAY request, one can normally expect
to receive RTP packets within a few seconds. However, for a receiver
to be certain to detect the case where no RTP traffic was delivered
due to NAT trouble, one should monitor the RTCP Sender reports. The
sender report carries a field 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 RTP mapping has been removed.
The loss of mapping for RTCP is simpler to detect. As RTCP is
normally sent periodically in each direction, even during the RTSP
ready state, if RTCP packets are missing for several RTCP intervals,
the mapping is likely to be lost. Note that if no RTCP packets are
received by the RTSP server and nor RTSP messages for a while, the
RTSP server has the option to delete the corresponding SSRC and RTSP
session ID, because either the client can not get through a middle
box NAT/FW, or that the client is mal-functioning.
6. NAT Traversal Techniques
There exist a number of potential NAT traversal techniques that can
be used to allow RTSP to traverse NATs. They have different features
and are applicable to different topologies; their cost is also
different. They also vary in security levels. In the following
sections, each technique is outlined in details with discussions on
the corresponding advantages and disadvantages.
Not all of the techniques are yet described in the full details,
because the intention is to refer to other documents, or some
appendix to this document, for the full specification of a specific
NAT traversal solution. Note that some of the solutions make use of
protocols (e.g., RTP-NOOP, TURN and ICE) in different stage of
standardization and not yet completed.
6.1. STUN
6.1.1. Introduction
STUN - "Simple Traversal of UDP Through Network Address Translators"
[6][25] is a standardized protocol developed by the MIDCOM WG that
allows a client to use secure means to discover the presence of a
NAT between himself and the STUN server and the type of that NAT.
The client then uses the STUN server to discover the address
bindings assigned by the NAT.
STUN is a client-server protocol. STUN client sends a request to a
STUN server and the server returns a response. There are two types
of STUN requests - Binding Requests, sent over UDP, and Shared
Secret Requests, sent over TLS over TCP.
6.1.2. Using STUN to traverse NAT without server modifications
This section describes how a client can use STUN to traverse NATs to
RTSP servers without requiring server modifications. However this
method has limited applicability and requires the server to be
available in the external/public address realm in regards to the
client located behind a NAT(s).
Limitations:
- The server must be located in either a public address realm or the
next hop external address realm in regards to the client.
- The client may only be located behind NATs that performing
Endpoint Independent or Address Dependent Mappings. Clients behind
NATs that do Address and Port Dependent Mappings cannot use this
method.
Method:
A RTSP client using RTP transport over UDP can use STUN to traverse
a NAT(s) in the following way:
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
performed in the background as soon as IP connectivity is
established. If this is performed prior to establishing a
streaming session the delays in the session establishment will be
reduced. If no NAT is detected, normal SETUP SHOULD be used.
2. The RTSP client determines the number of UDP ports needed by
counting the number of needed media transport protocols sessions
in the multi-media presentation. This information is available in
the media description protocol, e.g. SDP. For example, each RTP
session will in general require two UDP ports, one for RTP, and
one for RTCP.
3. For each UDP port required, establish a mapping and discover the
public/external IP address and port number with the help of the
STUN server. A successful mapping looks like below:
client's local address/port <-> public address/port.
4. Perform the RTSP SETUP for each media. In the transport header
the following parameter SHOULD be included with the given values:
"dest_addr" [7] with the public/external IP address and port pair
for both RTP and RTCP. To allow this to work servers MUST allow a
client to setup the RTP stream on any port, not only even ports.
This requires the new feature provided in the update to RFC2326
([7]). The server SHOULD respond with a transport header
containing an "src_addr" parameter with the RTP and RTCP source
IP address and port of the media stream.
5. To keep the mappings alive, the client SHOULD periodically send
UDP traffic over all mappings needed for the session. STUN MAY be
used to determine the timeout period of the NAT(s) UDP mappings.
For the mapping carrying RTCP traffic the periodic RTCP traffic
may be enough. For mappings carrying RTP traffic and for mappings
carrying RTCP packets at too low a frequency, keep-alive messages
SHOULD be sent. As keep alive messages, one could use the RTP
NOOP packet ([23]) to the streaming server's discard port (port
number 9). The drawback of using RTP NOOP is that the payload
type number must be dynamically assigned through RTSP first.
If a UDP mapping is lost then the above discovery process must be
repeated. The media stream also needs to be SETUP again to change
the transport parameters to the new ones. This will likely cause a
glitch in media playback.
To allow UDP packets to arrive from the server to a client behind a
Address Dependent Filtering NAT, the client must send the very first
UDP packet to pinch a hole in the NAT. The client, before sending a
RTSP PLAY request, must send a so called FW packet (such as a RTP
NOOP packet) on each mapping, to the IP address given as the servers
source address. To create minimum problems for the server these UDP
packets SHOULD be sent to the server's discard port (port number 9).
Since UDP packets are inherently unreliable, to ensure that at least
one UDP message passes the NAT, FW packets should be retransmitted
in short intervals.
For a Address and Port Dependent Filtering NAT the client must send
messages to the exact ports used by the server to send UDP packets
before sending a RTSP PLAY request. This makes it possible to use
the above described process with the following additional
restrictions: for each port mapping, FW packets need to be sent
first to the server's source address/port. To minimize potential
effects on the server from these messages the following type of FW
packets MUST be sent. RTP: an empty or less than 12 bytes UDP
packet. RTCP: A correctly formatted RTCP RR or SR message.
The above described adaptations for restricted NATs will not work
unless the server includes the "src_addr" in the "Transport" header
(which is the "source" transport parameter in RFC2326).
6.1.3. Embedding STUN in RTSP
This section outlines the adaptation and embedding of STUN within
RTSP. This enables STUN to be used to traverse any type of NAT,
including symmetric NATs. Protocol changes are beyond the scope of
this memo and are instead defined in TBD internet draft.
Limitations:
This NAT traversal solution has limitations:
1. It does not work if both RTSP client and RTSP server are
behind separate NATs.
2. The RTSP server may, for security reasons, refuse to send
media streams to an IP different from the IP in the client RTSP
requests. Therefore, if the client is behind a NAT that has
multiple public addresses, and the client's RTSP port and UDP
port are mapped to different IP addresses, RTSP SETUP may fail.
Deviations from STUN as defined in RFC 3489
Specifically, we differ from RFC3489 in two aspects:
1. We allow RTSP applications to have the option to perform STUN
"Shared Secret Request" through RTSP, via extension to RTSP;
2. We require STUN server to be co-located on RTSP server's media
output ports.
In order to allow binding discovery without authentication, the STUN
server embedded in RTSP application must ignore authentication tag,
and the STUN client embedded in RTSP application must use dummy
authentication tag.
If STUN server is co-located with RTSP server's media output port,
an RTSP client using RTP transport over UDP can use STUN to traverse
ALL types of NATs. In the case of port and address dependent mapping
NATs, the party inside the NAT must initiate UDP traffic. The STUN
Bind Request, being a UDP packet itself, can serve as the traffic
initiating packet. Subsequently, both the STUN Binding Response
packets and the RTP/RTCP packets can traverse the NAT, regardless of
whether the RTSP server or the RTSP client is behind NAT.
Likewise, if a RTSP server is behind a NAT, then an embedded STUN
server must co-locate on the RTSP client's RTCP port. In this case,
we assume that the client has some means of establishing TCP
connection to the RTSP server behind NAT so as to exchange RTSP
messages with the RTSP server.
To minimize delay, we require that the RTSP server supporting this
option must inform its client the RTP and RTCP ports from where the
server intend to send out RTP and RTCP packets, respectively. This
can be done by using the "server_port" parameter in RFC2326, and the
"src_addr" parameter in [7]. Both are in RTSP Transport header.
To minimize the keep-alive traffic for address mapping, we also
require that the RTSP end-point (server or client) sends and
receives RTCP packets from the same port.
6.1.4. Discussion On Co-located STUN Server
In order to use STUN to traverse port and address dependent mapping
NATs the STUN server needs to be co-located with the streaming
server media output ports. This creates a de-multiplexing problem:
we must be able to differentiate a STUN packet from a media packet.
This will be done based on heuristics. This works fine between STUN
and RTP or RTCP where the first byte happens to be different, but
may not work with other media transport protocols.
6.1.5. ALG considerations
If a NAT supports RTSP ALG (Application Level Gateway) and is not
aware of the STUN traversal option, service failure may happen,
because a client discovers its public IP address and port numbers,
and inserts them in its SETUP requests, when the RTSP ALG processes
the SETUP request it may change the destination and port number,
resulting in unpredictable behavior. In such cases a convenient way
should be provided to turn off STUN-based NAT traversal.
6.1.6. Deployment Considerations
For the non-embedded usage of STUN the following applies:
Advantages:
- Using STUN does not require RTSP server modifications; it only
affects the client implementation.
Disadvantages:
- Requires a STUN server deployed in the public address space.
- Only works with endpoint independent and address dependent
mapping. Port and address dependent filtering NATs create some
issues.
- Does not work with port and address dependent mapping NATs without
server modifications.
- Will mostly not work if a NAT uses multiple IP addresses, since
RTSP server generally requires all media streams to use the same
IP as used in the RTSP connection.
- Interaction problems exist when a RTSP-aware ALG interferes with
the use of STUN for NAT traversal.
- Using STUN requires that RTSP servers and clients support the
updated RTSP specification, because it is no longer possible to
guarantee that RTP and RTCP ports are adjacent to each other, as
required by the "client_port" and "server_port" parameters in
RFC2326.
Transition:
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
NATs. The removal of STUN capability in the client implementations
will have to wait until there is absolutely no need to use STUN.
For the "Embedded STUN" method the following applies:
Advantages:
- STUN is a solution first used by SIP applications. As shown above,
with little or no changes, RTSP application can re-use STUN as a
NAT traversal solution, avoiding the pit-fall of solving a problem
twice.
- STUN has built-in message authentication features, which makes it
more secure. See next section for an in-depth security discussion.
- This solution works as long as there is only one RTSP end point in
the private address realm, regardless of the NAT's type. There may
even be multiple NATs (see figure 1 in [6]).
- Compares to other UDP based NAT traversal methods in this
document, STUN requires little new protocol development (since
STUN is already a IETF standard), and most likely less
implementation effort, since open source STUN server and client
have become available [21]. There is the need to embed STUN in
RTSP server and client, which require a de-multiplexer between
STUN packets and RTP/RTCP packets. There is also a need to
register the proper feature tags.
Disadvantages:
- Some extensions to the RTSP core protocol, signaled by RTSP
feature tags, must be introduced.
- Requires an embedded STUN server to co-locate on each of RTSP
server's media protocol's ports (e.g. RTP and RTCP ports), which
means more processing is required to de-multiplex STUN packets
from media packets. For example, the de-multiplexer must be able
to differentiate a RTCP RR packet from a STUN packet, and forward
the former to the streaming server, the later to STUN server.
- Even if the RTSP server is in the open, and the client is behind a
multi-addressed NAT, it may still break if the RTSP server does
not allow RTP packets to be sent to an IP differs from the IP of
the client's RTSP request.
- Interaction problems exist when a RTSP ALG is not aware of STUN.
- Using STUN requires that RTSP servers and clients support the
updated RTSP specification, and they both agree to support the
proper feature tag.
- Increases the setup delay with at least the amount of time it
takes to perform STUN message exchanges.
Transition:
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
presently used network connection. The removal of STUN capability in
the client implementations will have to wait until there is
absolutely no need to use STUN.
6.1.7. Security Considerations
To prevent RTSP server being used as Denial of Service (DoS) attack
tools the RTSP Transport header parameter "destination" and
"dest_addr" are generally not allowed to point to any IP address
other than the one that RTSP message originates from. The RTSP
server is only prepared to make an exception of this rule when the
client is trusted (e.g., through the use of a secure authentication
process, or through some secure method of challenging the
destination to verify its willingness to accept the RTP traffic).
Such restriction means that STUN does not work for NATs that would
assign different IP addresses to different UDP flows on its public
side. Therefore the multi-addressed NATs will at times have trouble
with STUN-based RTSP NAT traversals.
In terms of security property, STUN combined with destination
address restricted RTSP has the same security properties as the core
RTSP. It is protected from being used as a DoS attack tool unless
the attacker has ability the to spoof the TCP connection carrying
RTSP messages.
Using STUN's support for message authentication and secure transport
of RTSP messages, attackers cannot modify STUN responses or RTSP
messages to change media destination. This protects against
hijacking, however as a client can be the initiator of an attack,
these mechanisms cannot securely prevent RTSP servers being used as
DoS attack tools.
6.2. ICE
6.2.1. Introduction
ICE (Interactive Connectivity Establishment) [9] is a methodology
for NAT traversal that is under development for SIP using SDP
offer/answer. The basic idea is to try, in a parallel fashion, all
possible connection addresses that an end point may have. This
allows the end-point to use the best available UDP "connection"
(meaning two UDP end-points capable of reaching each other). The
methodology has very nice properties in that basically all NAT
topologies are possible to traverse.
Here is how ICE works. End point A collects all possible address
that can be used, including local IP addresses, STUN derived
addresses, TURN addresses, etc. On each local port that any of these
address and port pairs leads to, a STUN server is installed. This
STUN server only accepts STUN requests using the correct
authentication through the use of username and password.
End-point A then sends a request to establish connectivity with end-
point B, which includes all possible ways to get the media through
to A. Note that each of A's published address/port pairs has a STUN
server co-located. B, before responding to A, uses a STUN client to
try to reach all the address and port pairs specified by A. The
destinations for which the STUN requests have successfully completed
are then indicated. If bi-directional communication is intended the
end-point B must then in its turn offer A all its reachable address
and port pairs, which then are tested by A.
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
successful connectivity is accomplished. The STUN requests may also
result in that more connectivity alternatives are discovered and
conveyed in the STUN responses.
This chapter is not yet a full technical solution. It is mostly a
feasibility study on how ICE could be applied to RTSP and what
properties it would have. One nice thing about ICE for RTSP is that
it does make it possible to deploy RTSP server behind NAT/FIRWALL, a
desirable option to some RTSP applications.
6.2.2. Using ICE in RTSP
The usage of ICE for RTSP requires that both client and server be
updated to include the ICE functionality. If both parties implement
the necessary functionality the following step-by-step algorithm
could be used to accomplish connectivity for the UDP traffic.
This assumes that it is possible to establish a TCP connection for
the RTSP messages between the client and the server. This is not
trivial in scenarios where the server is located behind a NAT, and
may require some TCP ports been opened, or the deployment of
proxies, etc.
The negotiation of ICE in RTSP of necessity will work different than
in SIP with SDP offer/answer. The protocol interactions are
different and thus the possibilities for transfer of states are also
somewhat different. The goal is also to avoid introducing extra
delay in the setup process at least for when the server is using a
public address and the client is either having a public address or
is behind NAT(s). This process is only intended to support PLAY
mode, i.e. media traffic flows from server to client.
Step 1: The ICE usage begins in the SDP. The SDP for the service
indicates that ICE is supported at the server. No candidates can be
given here as that would not work with the on demand, DNS load
balancing, etc., that make a SDP indicate a resource on a server
park rather than a specific machine.
Step 2: The client gathers addresses and puts together its candidate
for each media stream indicated in the session description.
Step 3: In each SETUP request the client includes its candidates,
promoting one for primary usage. This indicates for the server the
ICE support by the client. One candidate is the primary candidate
and here the prioritization for this address should be somewhat
different compared to SIP. High performance rather than always
successful is to recommended as it is most likely to be a server in
the public.
Step 4: The server responds (200 OK) for each media stream with its
candidates. A server with a public address usually only provides a
single ICE candidate. Also here one candidate is the server primary
address.
Step 5: The connectivity checks are performed. For the server the
connectivity checks from the server to the clients have an
additional usage. They verify that there is someone willingly to
receive the media, thus protecting itself from performing
unknowingly an DoS attack.
Step 6a: Connectivity checks from the client's primary to the
server's primary was successful. Thus no further SETUP requests are
necessary. Go to 7.
Step 6b: Connectivity checks for primary fails. If further
candidates have been derived then those can be promoted in new
candidate lines in SETUP request updating the list (Goto 5). If
another address than the primary has been verified by the client to
work, that address may then be promoted for usage in a SETUP request
(Goto 7).
Step 7: Client issues PLAY request. If the server also has completed
its connectivity checks for this primary addresses (based on
username as it may be derived addresses if the client was behind
NAT) then it can directly answer 200 ok (Goto 8). If the
connectivity check has not yet completed it responds with a 1xx code
to indicate that it is verifying the connectivity. If that fails
within the set timeout an error is reported back. Client needs to go
to 6b.
Step 8: Process completed media can be delivered. ICE testing ports
may be released.
To keep media paths alive client must likely periodically send data
to the server. This could be realized with either STUN or RTP No-op
[23] packets. RTCP sent by client should be able to keep RTCP open.
6.2.3. Implementation burden of ICE
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
has the largest impact on client and server implementations amongst
all the NAT/FW traversal methods in this document.
Some RTSP server implementation requirements are:
- STUN server features
- limited STUN client features
- SDP generation with more parameters.
- RTSP error code for ICE extension
Some client implantation requirements are:
- Limited STUN server features
- Limited STUN client features
- RTSP error code and ICE extension
6.2.4. Deployment Considerations
Advantages:
- Solves NAT connectivity discovery for basically all cases as long
as a TCP connection between them can be established. This includes
servers behind NATs. (Note that a proxy between address domains
may be required to get TCP through).
- Improves defenses against DDOS attacks, as media receiving client
requires authentications, via STUN on its media reception ports.
Disadvantages:
- Increases the setup delay with at least the amount of time it
takes for the server to perform its STUN requests.
- Assumes that it is possible to de-multiplex between media packets
and STUN packets.
- Has fairly high implementation burden put on both RTSP server and
client. The precise implantation complexity needs to be assessed
once ICE is fully defined as a standard. Currently ICE is still a
protocol under development.
6.3. Symmetric RTP
6.3.1. Introduction
Symmetric RTP is a NAT traversal solution that is based on requiring
RTSP clients to send UDP packets to the server's media output ports.
Conventionally, RTSP servers send RTP packets in one direction: from
server to client. Symmetric RTP is similar to connection-oriented
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 replies to the originating IP and port.
Specifically, when the RTSP server receives the "connect" RTP packet
(a.k.a. FW packet, since it is used to pinch a hole in the FW/NAT
and to aid the server for port binding and address mapping) from its
client, it copies the source IP and Port number and uses them as
delivery address for media packets. By having the server send media
traffic back the same way as the client's packet are sent to the
server, address mappings will be honored. Therefore this technique
works for all types of NATs. However, it does require server
modifications. Unless there is built-in protection mechanism,
symmetric RTP is very vulnerable to DDOS attacks, because attackers
can simply forge the source IP & Port of the binding packet.
6.3.2. Necessary RTSP extensions
To support symmetric RTP the RTSP signaling must be extended to
allow the RTSP client to indicate that it will use symmetric RTP.
The client also 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 security against hijacking attacks. Care must be
taken in choosing client's RTP SSRC. First, it must be unique within
all the RTP sessions belonging to the same RTSP session. Secondly,
if the RTSP server is sending out media packets to multiple clients
from the same send port, the RTP SSRC needs to be unique amongst
those clients' RTP sessions. Recognizing that there is a potential
that RTP SSRC collision may occur, the RTSP server must be able to
signal to client that a collision has occurred and that it wants the
client to use a different RTP SSRC carried in the SETUP response.
Details of the RTSP extension are beyond the scope of this draft.
6.3.3. Deployment Considerations
Advantages:
- Works for all types of NATs, including those using multiple IP
addresses. (Requirement 1 in section 4).
- Have no interaction problems with any RTSP ALG changing the
client's information in the transport header.
Disadvantages:
- Requires modifications to both RTSP server and client.
- The format of the RTP packet for "connection setup" (a.k.a FW
packet) is yet to be defined. One possibility is to use RTP NOOP
packet format in [23].
- Has worse security situation than STUN when using address
restrictions.
- Would still require STUN to discover the timeout of NAT bindings.
6.3.4. Security Consideration
Symmetric RTP's major security issue is that RTP streams can be
hijacked and directed towards any target that the attacker desires.
The most serious security problem is the deliberate attack with the
use of a RTSP client and symmetric RTP. The attacker uses RTSP to
setup a media session. Then it uses symmetric RTP with a spoofed
source address of the intended target of the attack. There is no
defense against this attack other than restricting the possible bind
address to be the same as the RTSP connection arrived on. This
prevents symmetric RTP to be used with multi-address NATs.
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
order to learn the address and port the server will send from and
also the SSRC the client will use. Having this information the
attacker can send its own NAT-traversal RTP packets containing the
correct RTP SSRC to the correct address and port on the server. The
destination of the packets is set as the source IP and port in these
RTP packets.
Another variation of this attack is to modify the RTP binding packet
being sent to the server by simply changing the source IP to the
target one desires to attack.
One can fend off the first attack by applying encryption to the RTSP
signaling transport. However, the second variation is impossible to
defend against. As a NAT re-writes the source IP and port this
cannot be authenticated, but authentication is required in order to
protect against this type of DOS attack.
The random SSRC tag in the binding packet determines how well
symmetric RTP can fend off stream-hijacking performed by parties
that are not "man-in-the-middle".
This proposal uses the 32-bit RTP SSRC field to this effect.
Therefore it is important that this field is derived with a non-
predictable randomizer. It should not be possible by knowing the
algorithm used and a couple of basic facts, to derive what random
number a certain client will use.
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 testing a lot of different SSRCs until it finds a matching
one. Therefore a server SHOULD implement functionality that blocks
ports that receive multiple FW packets (i.e. the packet that is sent
to the server for FW traversal) with different invalid SSRCs,
especially when they are coming from the same IP/Port.
To improve the security against attackers the random tag's length
could be increased. To achieve a longer random tag while still using
RTP and RTCP, it will be necessary to develop RTP and RTCP payload
formats for carrying the random tag.
6.3.5. A Variation to Symmetric RTP
Symmetric RTP requires a valid RTP format in the FW packet, which is
the first packet that the client sends to the server to set up
virtual RTP connection. There is currently no appropriate RTP packet
format for this purpose, although the NOOP format is a proposal to
fix the problem [23].
Meanwhile, there has been FW traversal techniques deployed in the
wireless streaming market place that use non-RTP messages as FW
packets. This section attempts to summarize a subset of those
solutions that happens to use a variation to the standard symmetric
RTP solution.
In this variation of symmetric RTP, the FW packet is a small UDP
packet that does not contain RTP header. Hence the solution can no
longer be called symmetric RTP, yet it employs the same technique
for FW traversal. In response to client's FW packet, RTSP server
sends back a similar FW packet as a confirmation so that the client
can stop the so called "connection phase" of this NAT traversal
technique. Afterwards, the client only has to periodically send FW
packets as keep-alive messages for the NAT mappings.
The server listens on its RTP-media output port, and tries to decode
any received UDP packet as FW packet. This is valid since an RTSP
server is not expecting RTP traffic from the RTSP client. Then, it
can correlate the FW packet with the RTSP client's session ID or the
server's SSRC, and record the NAT bindings accordingly. The server
then sends a FW packet as the response to the client.
The FW packet normally contains the SSRC used to identify the RTP
stream, and can be made no bigger than 12 bytes, making it
distinctively different from RTP packets, whose header size is 12
bytes.
RTSP signaling can be added to do the following:
1. Enables or disables such FW message exchanges. When the FW/NAT
has an RTSP-aware ALG, it is better to disable FW message
exchange and let ALG works out the address and port mappings.
2. Configures the number of re-tries and the re-try interval of
the FW message exchanges.
Such FW packets may also contain digital signatures to support
three-way handshake based receiver authentications, so as to prevent
DDoS attacks described before.
This approach has the following advantages when compared with the
symmetric RTP approach:
1. There is no need to define RTP payload format for FW traversal,
therefore it is simple to use, implement and administer
(Requirement 4 in section 4), although a binding protocol must
be defined (which is out side of the scope of this memo).
2. When properly defined, this kind of FW message exchange can
also authenticate RTP receivers, so as to prevent DDoS attacks
for dual-hosted RTSP client. By dual-hosted RTSP client we mean
the kind that uses one "perceived" IP address for RTSP message
exchange, and a different "perceived" IP address for RTP
reception. (Requirement 5 in section 4).
This approach has the following disadvantages when compared with the
symmetric RTP approach:
1. RTP traffic is normally accompanied by RTCP traffic. This
approach still needs to rely on RTCP RRs and SRs to enable NAT
traversal for RTCP endpoints, or use the same type of FW
messages for RTCP endpoints.
2. The server's sender SSRC for the RTP stream must be signaled in
RTSP's SETUP response, in the Transport header of the RTSP
SETUP response.
6.4. Application Level Gateways
6.4.1. Introduction
An Application Level Gateway (ALG) reads the application level
messages and performs necessary changes to allow the protocol to
work through the middle box. However this behavior has some problems
in regards to RTSP:
1. It does not work when the RTSP protocol is used with end-to-end
security. As the ALG can't inspect and change the application level
messages the protocol will fail due to the middle box.
2. ALGs need to be updated if extensions to the protocol are added.
Due to deployment issues with changing ALGs this may also break the
end-to-end functionality of RTSP.
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
and small office environments, since it is very hard to upgrade NATs
deployed in home or SOHO (small office/home office) environment.
6.4.2. Guidelines On Writing ALGs for RTSP
In this section, we provide a step-by-step guideline on how one
should go about writing an ALG to enable RTSP to traverse a NAT.
1. Detect any SETUP request.
2. Try to detect the usage of any of the NAT traversal methods that
replace the address and port of the Transport header parameters
"destination" or "dest_addr". If any of these methods are used,
the ALG SHOULD NOT change the address. Ways to detect that these
methods are used are:
- For embedded STUN, it would be watch for a feature tag, like
"nat.stun". If any of those exists in the "supported", "proxy-
require", or "require" headers of the RTSP exchange.
- For non-embedded STUN and TURN based solutions: This can in
some case be detected by inspecting the "destination" or
"dest_addr" parameter. If it contains either one of the NAT's
external IP addresses or a public IP address. However if multiple
NATs are used this detection may fail. Remapping should only be
done for addresses belonging to the NATs own private address
space.
Otherwise continue to the next step.
3. Create UDP mappings (client given IP/port <-> external IP/port)
where needed for all possible transport specification in the
transport header of the request found in (1). Enter the public
address and port(s) of these mappings in transport header.
Mappings SHALL be created with consecutive public port number
starting on an even number for RTP for each media stream.
Mappings SHOULD also be given a long timeout period, at least 5
minutes.
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
transport header. The session ID SHOULD also be bound to the UDP
mappings part of that session.
5. If SETUP response settles on RTP over TCP or RTP over RTSP as
lower transport, do nothing: let TCP tunneling to take care of
NAT traversal. Otherwise go to next step.
6. The ALG SHOULD keep alive the UDP mappings belonging to the an
RTSP session as long as: RTSP messages with the session's ID has
been sent in the last timeout interval, or UDP messages are 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
received for that media stream.
6.4.3. Deployment Considerations
Advantage:
- No impact on either client or server
- Can work for any type of NATs
Disadvantage:
- When deployed they are hard to update to reflect protocol
modifications and extensions. If not updated they will break the
functionality.
- When end-to-end security is used the ALG functionality will fail.
- Can interfere with other type of traversal mechanisms, such as
STUN.
Transition:
An RTSP ALG will not be phased out in any automatically way. It must
be removed, probably through the removal of the NAT it is associated
with.
6.4.4. Security Considerations
An ALG will not work when deployment of end-to-end RTSP signaling
security. Therefore deployment of ALG will result in that clients
located behind NATs will not use end-to-end security.
6.5. TCP Tunneling
6.5.1. Introduction
Using a TCP connection that is established from the client to the
server ensures that the server can send data to the client. The
connection opened from the private domain ensures that the server
can send data back to the client. To send data originally intended
to be transported over UDP requires the TCP connection to support
some type of framing of the RTP packets.
Using TCP also results in that the client has to accept that real-
time performance may no longer be possible. TCP's problem of
ensuring timely deliver was the reasons why RTP was developed.
Problems that arise with TCP are: head-of-line blocking, delay
introduced by retransmissions, highly varying congestion control.
6.5.2. Usage of TCP tunneling in RTSP
The RTSP core specification [7] supports interleaving of media data
on the TCP connection that carries RTSP signaling. See section 10.13
in [7] for how to perform this type of TCP tunneling.
There is currently new finished work on one more way of transporting
RTP over TCP in AVT and MMUSIC. For signaling and rules on how to
establish the TCP connection in lieu of UDP, see [16]. Another draft
describes how to frame RTP over the TCP connection is described in
[17].
6.5.3. Deployment Considerations
Advantage:
- Works through all types of NATs where server is in the open.
Disadvantage:
- Functionality needs to be implemented on both server and client.
- Will not always meet multimedia stream's real-time requirements.
Transition:
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
total media reliability is desired, even at the price of loss of
real-time properties.
6.5.4. Security Considerations
The TCP tunneling of RTP has no known security problem besides those
already present in RTSP. It is not possible to get any amplification
effect that is desired for denial of service attacks due to TCP's
flow control.
A possible security consideration, when session media data is
interleaved with RTSP, would be the performance bottleneck when RTSP
encryption is applied, since all session media data also needs to be
encrypted.
6.6. TURN (Traversal Using Relay NAT)
6.6.1. Introduction
Traversal Using Relay NAT (TURN) [8] is a protocol for setting up
traffic relays that allows clients behind NATs and firewalls to
receive incoming traffic for both UDP and TCP. These relays are
controlled and have limited resources. They need to be allocated
before usage.
TURN allows a client to temporarily bind an address/port pair on the
relay (TURN server) to its local source address/port pair, which is
used to contact the TURN server. The TURN server will then forward
packets between the two sides of the relay. 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
source setting up the mapping. On the external side this is limited
to the source address/port pair of the first packet arriving on the
binding. After the first packet has arrived the mapping is "locked
down" to that address. Packets from any other source on this address
will be discarded.
Using a TURN server makes it possible for a RTSP client to receive
media streams from even an unmodified RTSP server. However the
problem is those RTSP servers most likely restrict media
destinations to no other IP address than the one RTSP message
arrives. 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
can't be targeted at an unknown address. Unfortunately TURN servers
can be targeted at any host that has a public IP address by spoofing
the source IP of TURN Allocation requests.
6.6.2. Usage of TURN with RTSP
To use a TURN server for NAT traversal, the following steps should
be performed.
1. The RTSP client connects with RTSP server. The client retrieves
the session description to determine the number of media streams.
To avoid the issue with having RTSP connection and media traffic
from different addresses also the TCP connection must be done
thru the same TURN server as the one in the next step.
2. The client establishes the necessary bindings on the TURN server.
It must choose the local RTP and RTCP ports that it desires to
receive media packets. TURN supports requesting bindings of even
port numbers and continuous ranges.
3. The RTSP client uses the acquired address and port mappings in
the RTSP SETUP request using the destination header. Note that
the server is required to have a mechanism to verify that it is
allowed to send media traffic to the given address. The server
SHOULD include its RTP SSRC in the SETUP response.
4. Client requests that the Server starts playing. The server starts
sending media packet to the given destination address and ports.
5. The first media packet to arrive at the TURN server on the
external port causes "lock down"; then TURN server forwards the
media packets to the RTSP client.
6. When media arrives at the client, the client should try to verify
that the media packets are from the correct RTSP server, by
matching the RTP SSRC of the packet. Source IP address of this
packet will be that of the TURN server and can therefore not be
used to verify that the correct source has caused lock down.
7. If the client notices that some other source has caused lock down Table of Contents
on the TURN server, the client should create new bindings and
change the session transport parameters to reflect the new
bindings.
8. If the client pauses and media are not sent for about 75% of the 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3
mapping timeout the client should use TURN to refresh the 2. Solution Overview . . . . . . . . . . . . . . . . . . . . . . . 3
bindings. 3. RTSP Extensions . . . . . . . . . . . . . . . . . . . . . . . . 5
4. Open Issues . . . . . . . . . . . . . . . . . . . . . . . . . . 5
5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . . 5
6. Security Considerations . . . . . . . . . . . . . . . . . . . . 6
7. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 6
8. References . . . . . . . . . . . . . . . . . . . . . . . . . . 6
8.1. Normative References . . . . . . . . . . . . . . . . . . . 6
8.2. Informative References . . . . . . . . . . . . . . . . . . 6
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 6
Intellectual Property and Copyright Statements . . . . . . . . . . 8
6.6.3. Deployment Considerations 1. Introduction
Advantages: Real-time Streaming Protocol (RTSP)
[RFC2326][I-D.ietf-mmusic-rfc2326bis] is protocol used to setup and
control one or more media streams delivering media to receivers. It
is RTSP's functionality of seting up media streams that get into
serious issues with Network Address Translators (NAT) [RFC3022].
Commonly the media will be totally blocked by the NAT unless extra
provisions are taken by the protocol. There is a clear and present
need for NAT traversal mechanism for the media setup using RTSP.
- Does not require any server modifications. RTSP 1.0 [RFC2326] has quite a long time suffered from the lack of a
- Works for any types of NAT as long as the server has public standardized NAT [RFC3022] traversal mechanism for the media.
reachable IP address. However due to quality of the RTSP 1.0 specification, the work on
updating RTSP was forced to abandom RTSP 1.0 and instead defined RTSP
2.0 [I-D.ietf-mmusic-rfc2326bis]. RTSP 2.0 is similar to RTSP 1.0 in
many aspects but contain a number of significant differencies. It
also contain a well defined extension mechanism allowing for
extensions like NAT traversal to be defined in way that will be
backwards compatible with RTSP 2.0 peers not supporting the
extension. This extension isn't defined for RTSP 1.0 due to that it
can't be specified in any way such that it do not break RTSP 1.0
syntax, and thus create compatibility issues.
Disadvantage There has been a number of suggested ways of resolving the NAT-
traversal of media for RTSP. A large number are also used in
implementations. However as the evaluation of RTSP NAT traversal
solutions [I-D.ietf-mmusic-rtsp-nat-evaluation] for the media has
shown there are issues to consider. In the end a mechanism based on
Interactive Connectivity Establishment (ICE) was selected as it
allows also servers to be located behind NATs and also provide a good
mitigation against the security threat RTSP represent as Distributed
Denial of Service (DDoS) attack tool.
- TURN is not yet a standard. This document does not define a NAT traversal mechanism for the RTSP
- Requires another network element, namely the TURN server. signalling itself. That is for future work in the cases it is
needed. Which compared to the media is in fewer deployement cases.
In all cases the server i reachable on a public IP address the
traversal of NAT for the signalling will work. Issues only arise
when both server and client are behind NATs. Solution beyond static
configurations or proxy based solutions are for future studies.
- Such a TURN server for RTSP is not scalable since the number of 2. Solution Overview
sessions it must forward is proportional to the number of client
media sessions.
- TURN server becomes a single point of failure.
- Since TURN forwards media packets, it necessarily introduces
delay.
- Requires that the server can verify that the given destination
address is valid to be used by the client.
- An RTSP ALG MAY change the necessary destinations parameter. This
will cause the media traffic to be sent to the wrong address.
Transition: This overview assumes that the reader has some familarity with how
ICE [I-D.ietf-mmusic-ice] works. As it primarily points out how the
different ICE steps are accomplished in RTSP.
TURN is not intended to be phase-out completely, see chapter 11.2 of 1. The server includes in the session description an SDP attribute
[8]. However the usage of TURN could be reduced when the demand for to indicate that the server has ICE capabilites for this session.
having NAT traversal is reduced. This is an optimization that allows clients to not spend
resources in cases when the SDP indication is missing.
6.6.4. Security Considerations 2. The client reviews the session description to determine what
media resources that are going to be setup. For each of these
media resources where the transport protocol supports
connectivity checks the client gathers candidate addresses. See
section 4.1.1 in [I-D.ietf-mmusic-ice]. The client also installs
the STUN servers on each of the local candidates.
An eavesdropper of RTSP messages between the RTSP client and RTSP 3. A new RTSP Transport header parameter (name tbd) is used to
server will be able to do a simple denial of service attack on the include all the candidates for each media resource in the SETUP
media streams by sending messages to the destination address and request the client sends. One of these candidates are promoted
port present in the RTSP SETUP messages. If the attacker's message to default candidate per transport stream required for the media
can reach the TURN server before the RTSP server's message, the lock resource by including it as if ICE would not be used in the
down can be accomplished towards some other address. This will dest_addr parameter.
result in that the TURN server will drop all the media server's
packets when they arrive. This can be accomplished with little risk
for the attacker of being caught, as it can be performed with a
spoofed source IP. The client may detect this attack when it
receives the lock down packet sent by the attacker as being mal-
formatted and not corresponding to the expected context. It will
also notice the lack of incoming packets. See bullet 7 in section
6.6.2.
The TURN server can also become part of a denial of service attack 4. The RTSP server receives the list of candidates for the media
towards any victim. To perform this attack the attacker must be able resource to setup. It then gathers its candidates. For servers
to eavesdrop on the packets from the TURN server towards a target having a public IP address a single candidate can be included and
for the DOS attack. The attacker uses the TURN server to setup a promoted to default directly.
RTSP session with media flows going through the TURN server. The
attacker is in fact creating TURN mappings towards a target by
spoofing the source address of TURN requests. As the attacker will
need the address of these mappings he must be able to eavesdrop or
intercept the TURN responses going from the TURN server to the
target. Having these addresses, he can set up a RTSP session and
starts delivery of 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 mapping requests.
The first attack can be made very hard by applying transport 5. The server sets up the media and responds to the SETUP request if
security for the RTSP messages, which will hide the TURN servers otherwise succesfully with 200 OK respons. In that respons the
address and port numbers from any eavesdropper. server includes its candidates in the server candidate parameter
and the default in the src_addr parameter. Servers not being
behind a NAT or other type of middlebox and with a single
candidate should not intitiate its connectivyt checks yet. If
behind a NAT or other middlebox should now initiate its
connectivity checks following the procedures described in Section
5.7 and 5.8 of [I-D.ietf-mmusic-ice].
The second attack requires that the attacker have access to a user 6. The client receives the SETUP response and learns the candidate
account on the TURN server to be able set up the TURN mappings. To address to use for the connectivity checks. Then it initiates
prevent this attack the server shall verify that the target its connectivy checks. In other words it follows the procedures
destination accept this media stream. in Section 6 of [I-D.ietf-mmusic-ice].
7. Firewalls 7. When a connectivity check from the client reahces the server it
should result in a triggered check from the server. This is why
severs not behind a middlebox can wait until this triggered check
to send out any checks for itself. This saves resources and
somewhat mittigates the DDoS potential.
Firewalls exist for the purpose of protecting a network from traffic 8. When the client has concluded its connectivity checks and also
not desired by the firewall owner. Therefore it is a policy decision received connectiviy checks on the promoted candidates for all
if a firewall will let RTSP and its media streams through or not. the media components it can issue a PLAY request. If the
RTSP is designed to be firewall friendly in that it should be easy connectivity checks have not concluded succesfully then the
to design firewall policies to permit passage of RTSP traffic and client may send a new SETUP request assuming it has any new
its media streams. information or thinks the server may be able to do more that can
result in succesful checks.
The firewall will need to allow the media streams associated with a 9. When the RTSP servers receives a PLAY request it checks if its
RTSP session pass through it. Therefore the firewall will need an connectivity checks has concluded succesfully. If not it issues
ALG that reads RTSP SETUP and TEARDOWN messages. By reading the a 1xx response to indicate that it is still working on the
SETUP message the firewall can determine what type of transport and connectivity checks. If the checks has failed it issues a 4xx to
from where the media streams will use. Commonly there will be the indicate that unsuccessful completion of the checks to the
need to open UDP ports for RTP/RTCP. By looking at the source and client. Upon sucess the server sends a 200 OK and starts
destination addresses and ports the opening in the firewall can be delivering media.
minimized to the least necessary. The opening in the firewall can be
closed after a teardown message for that session or the session
itself times out.
Simpler firewalls do allow a client to receive media as long as it The client may release unused candidates by sending a new SETUP
has sent packets to the target. Depending on the security level this request that only contains the used candidates. This SETUP request
can have the same behavior as a NAT. The only difference is that no shall only change the candidate list, and the default candidate to
address translation is done. To be able to use such a firewall a the used ones. No other parameters should be changed. After
client would need to implement one of the above described NAT succesful completion of this request may the client release the
traversal methods that include sending packets to the server to open resources.
up the mappings.
8. Comparison of Different NAT Traversal Techniques The client will continue to use STUN to send keep-alive for the used
bindings. This is important as normally RTSP play mode sessions will
only contain traffic from the server to the client. As many NATs
requires traffic from the client towards the server to keep the
bindings alive these keep-alives are vital.
This section evaluates the techniques described above against the 3. RTSP Extensions
requirements listed in section 4.
In the following table, the columns correspond to the numbered To be written
requirements. For instance, the column under R1 corresponds to the
first requirement in section 4: MUST work for all flavors of NATs.
The rows represent the different FW traversal techniques. SymRTP is 4. Open Issues
short for symmetric RTP, "V.SymRTP" is short for "variation of
symmetric RTP" as described in section 6.3.5.
-----------------------------------------------+ This whole draft is currently an open issues. The actual
| R1 | R2 | R3 | R4 | R5 | implementation of ICE for RTSP is yet to be written down in all
------------+------+------+------+------+------+ necessary details.
STUN | Yes | Yes | No | Maybe| No |
------------+------+------+------+------+------+
ICE | Yes | Yes | No | No | Yes |
------------+------+------+------+------+------+
SymRTP | Yes | Yes | Yes |Maybe | No |
------------+------+------+------+------+------+
V. SymRTP | Yes | Yes | Yes | Yes |future|
------------+------+------+------+------+------+
TURN | Yes | Yes | No | No | Yes |
-----------------------------------------------+
9. Open Issues 5. IANA Considerations
Some open issues with this draft: This document makes no request of IANA.
- At some point we need to recommend one RTSP NAT solution so as to Note to RFC Editor: this section may be removed on publication as an
ensure implementations can inter-operate. This decision will RFC.
require that requirements, security and desired goals be evaluated
against implementation cost and the probability to get the final
solution deployed.
- The ALG recommendations need to be improved and clarified.
- The firewall RTSP ALG recommendations need to be written as they
are different from the NAT ALG in some perspectives.
- The ICE solution needs to be hammered out into all the details.
10. Security Consideration 6. Security Considerations
In preceding sessions we have discussed security merits of each and To be written
every NAT/FW traversal methods for RTSP. In summary, the presence of
NAT(s) is a security risk, as a client cannot perform source
authentication of its IP address. This prevents the deployment of
any future RTSP extensions providing security against hijacking of
sessions by a man-in-the-middle.
Each of the proposed solutions has security implications. 7. Acknowledgements
Using STUN will provide the same level of security as RTSP with out 8. References
transport level security and source authentications; as long as the
server does not grant a client request to send media to different IP
addresses.
Using symmetric RTP will have a higher risk of session hijacking 8.1. Normative References
than normal RTSP. The reason is that there exists a probability that
an attacker is able to guess the random tag that the client uses to
prove its identity when creating the address bindings. This can be
solved in the variation of symmetric RTP (section 6.3.5) with
authentication features.
The usage of an RTSP ALG does not increase in itself the risk for [I-D.ietf-mmusic-ice]
session hijacking. However the deployment of ALGs as sole mechanism Rosenberg, J., "Interactive Connectivity Establishment
for RTSP NAT traversal will prevent deployment of encrypted end-to- (ICE): A Protocol for Network Address Translator (NAT)
end RTSP signaling. Traversal for Offer/Answer Protocols",
draft-ietf-mmusic-ice-16 (work in progress), June 2007.
The usage of TCP tunneling has no known security problems. However [I-D.ietf-mmusic-rfc2326bis]
it might provide a bottleneck when it comes to end-to-end RTSP Schulzrinne, H., "Real Time Streaming Protocol 2.0
signaling security if TCP tunneling is used on an interleaved RTSP (RTSP)", draft-ietf-mmusic-rfc2326bis-15 (work in
signaling connection. progress), June 2007.
The usage of TURN has severe risk of denial of service attacks [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
against a client. The TURN server can also be used as a redirect Requirement Levels", BCP 14, RFC 2119, March 1997.
point in a DDOS attack unless the server has strict enough rules for
who may create bindings.
11. IANA Consideration [RFC2326] Schulzrinne, H., Rao, A., and R. Lanphier, "Real Time
Streaming Protocol (RTSP)", RFC 2326, April 1998.
This specification does not define any protocol extensions hence no 8.2. Informative References
IANA action is requested.
12. Acknowledgments [I-D.ietf-mmusic-rtsp-nat-evaluation]
Westerlund, M., "The evaluation of different NAT traversal
Techniques for media controlled by Real-time Streaming
Protocol (RTSP)", draft-ietf-mmusic-rtsp-nat-evaluation-00
(work in progress), July 2007.
The author would also like to thank all persons on the MMUSIC [RFC3022] Srisuresh, P. and K. Egevang, "Traditional IP Network
working group's mailing list that has commented on this Address Translator (Traditional NAT)", RFC 3022,
specification. Persons having contributed in such way in no special January 2001.
order to this protocol are: Jonathan Rosenberg, Philippe Gentric,
Tom Marshall, David Yon, Amir Wolf, Anders Klemets, and Colin
Perkins. Thomas Zeng would also like to give special thanks to Greg
Sherwood of PacketVideo for his input into this memo.
13. Author's Addresses Authors' Addresses
Magnus Westerlund Tel: +46 8 4048287 Magnus Westerlund
Ericsson Research Email: Magnus.Westerlund@ericsson.com Ericsson
Ericsson AB Torshamsgatan 23
Torshamnsgatan 23 Stockholm, SE-164 80
SE-164 80 Stockholm, SWEDEN Sweden
Thomas Zeng Tel: 1-858-320-3125 Phone: +46 8 719 0000
PacketVideo Network Solutions Email: zeng@pvnetsolutions.com Fax:
9605 Scranton Rd., Suite 400 Email: magnus.westerlund@ericsson.com
San Diego, CA92121 URI:
14. References Thomas Zeng
14.1. Normative references Phone:
Fax:
Email: thomas.zeng@gmail.com
URI:
[1] H. Schulzrinne, et. al., "Real Time Streaming Protocol (RTSP)", Full Copyright Statement
IETF RFC 2326, April 1998.
[2] M. Handley, V. Jacobson, "Session Description Protocol (SDP)",
IETF RFC 2327, April 1998.
[3] Crocker, D. and P. Overell, "Augmented BNF for Syntax
Specifications: ABNF", RFC 4234, October 2005.
[4] S. Bradner, "Key words for use in RFCs to Indicate Requirement
Levels", RFC 2119, March 1997.
[5] H. Schulzrinne, et. al., "RTP: A Transport Protocol for Real-
Time Applications", STD 64, RFC 3550, IETF, July 2003.
[6] J. Rosenberg, et. Al., " STUN - Simple Traversal of UDP Through
[7] H. Schulzrinne, et. al., "Real Time Streaming Protocol (RTSP)",
draft-ietf-mmusic-rfc2326bis-11.txt, IETF draft, October 2005,
work in progress.
[8] J. Rosenberg, et. Al., "Traversal Using Relay NAT (TURN)",
draft-rosenberg-midcom-turn-08.txt, IETF draft, Sep 2005, work
in progress.
[9] J. Rosenberg, "Interactive Connectivity Establishment (ICE): A
Methodology for Network Address Translator (NAT) Traversal for
the Session Initiation Protocol (SIP)," draft-ietf-mmusic-ice-
06, IETF draft, October 2005, work in progress.
[10] G. Camarillo, et. al., "Grouping of Media Lines in the Session
Description Protocol (SDP)," IETF RFC 3388, December 2002.
[11] Camarillo, G. and J. Rosenberg, "The Alternative Network
Address Types (ANAT) Semantics for the Session Description
Protocol (SDP) Grouping Framework", RFC 4091, June 2005.
14.2. Informative References Copyright (C) The IETF Trust (2007).
[12] P. Srisuresh, K. Egevang, "Traditional IP Network Address This document is subject to the rights, licenses and restrictions
Translator (Traditional NAT)," RFC 3022, Internet Engineering contained in BCP 78, and except as set forth therein, the authors
Task Force, January 2001. retain all their rights.
[13] Tsirtsis, G. and Srisuresh, P., "Network Address Translation -
Protocol Translation (NAT-PT)", RFC 2766, Internet Engineering
Task Force, February 2000.
[14] S. Deering and R. Hinden, "Internet Protocol, Version 6 (IPv6)
Specification", RFC 2460, Internet Engineering Task Force,
December 1998.
[15] J. Postel, "internet protocol", RFC 791, Internet Engineering
Task Force, September 1981.
[16] Camarillo, G. and J. Rosenberg, "The Alternative Network This document and the information contained herein are provided on an
Address Types (ANAT) Semantics for the Session Description "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS
Protocol (SDP) Grouping Framework", RFC 4091, June 2005. OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY, THE IETF TRUST AND
[17] John Lazzaro, "Framing RTP and RTCP Packets over Connection- THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS
Oriented Transport", IETF Draft, draft-ietf-avt-rtp-framing- OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF
contrans-06.txt, September 2005. THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
[18] D. Daigle, "IAB Considerations for UNilateral Self-Address WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
Fixing (UNSAF) Across Network Address Translation", RFC 3424,
Internet Engineering Task Force, Nov. 2002
[19] R. Finlayason, "IP Multicast and Firewalls", RFC 2588, Internet
[20] Krawczyk, H., Bellare, M., and Canetti, R.: "HMAC: Keyed-
hashing for message authentication". IETF RFC 2104, February
1997
[21] Open Source STUN Server and Client,
http://www.vovida.org/applications/downloads/stun/index.html
[22]
[23] Dan Wing, et.al. "RTP No-Op Payload Format", draft-wing-avt-
[24] P. Srisuresh and M.Holdrege, "IP Network Address Translator
(NAT) Terminology and Considerations", RFC2663, Internet
Engineering Task Force, Aug. 1999
[25] J. Rosenberg, C. Huitema and R. Mahy, "STUN - Simple Traversal
of UDP Through Network Address Translators", draft-ietf-behave-
[26] F. Audet, "NAT Behavioral Requirements for Unicast UDP," draft-
ietf-behave-nat-udp-04, September 6, 2005.
15. IPR Notice Intellectual Property
The IETF takes no position regarding the validity or scope of any The IETF takes no position regarding the validity or scope of any
Intellectual Property Rights or other rights that might be claimed Intellectual Property Rights or other rights that might be claimed to
to pertain to the implementation or use of the technology described pertain to the implementation or use of the technology described in
in this document or the extent to which any license under such this document or the extent to which any license under such rights
rights might or might not be available; nor does it represent that might or might not be available; nor does it represent that it has
it has made any independent effort to identify any such rights. made any independent effort to identify any such rights. Information
Information on the procedures with respect to rights in RFC on the procedures with respect to rights in RFC documents can be
documents can be found in BCP 78 and BCP 79. found in BCP 78 and BCP 79.
Copies of IPR disclosures made to the IETF Secretariat and any Copies of IPR disclosures made to the IETF Secretariat and any
assurances of licenses to be made available, or the result of an assurances of licenses to be made available, or the result of an
attempt made to obtain a general license or permission for the use attempt made to obtain a general license or permission for the use of
of such proprietary rights by implementers or users of this such proprietary rights by implementers or users of this
specification can be obtained from the IETF on-line IPR repository specification can be obtained from the IETF on-line IPR repository at
at http://www.ietf.org/ipr. http://www.ietf.org/ipr.
The IETF invites any interested party to bring to its attention any The IETF invites any interested party to bring to its attention any
copyrights, patents or patent applications, or other proprietary copyrights, patents or patent applications, or other proprietary
rights that may cover technology that may be required to implement rights that may cover technology that may be required to implement
this standard. Please address the information to the IETF at this standard. Please address the information to the IETF at
ietf-ipr@ietf.org. ietf-ipr@ietf.org.
16. Copyright Notice Acknowledgment
Copyright (C) The Internet Society (2005).
This document is subject to the rights, licenses and restrictions
contained in BCP 78, and except as set forth therein, the authors
retain all their rights.
This document and the information contained herein are provided on
an "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE
REPRESENTS OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE
INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF
THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
This Internet-Draft expires in April 2006. Funding for the RFC Editor function is provided by the IETF
Administrative Support Activity (IASA).
 End of changes. 66 change blocks. 
1434 lines changed or deleted 220 lines changed or added

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