idnits 2.17.1 draft-ietf-mmusic-rtsp-nat-03.txt: -(383): Line appears to be too long, but this could be caused by non-ascii characters in UTF-8 encoding -(510): Line appears to be too long, but this could be caused by non-ascii characters in UTF-8 encoding -(608): Line appears to be too long, but this could be caused by non-ascii characters in UTF-8 encoding -(776): Line appears to be too long, but this could be caused by non-ascii characters in UTF-8 encoding -(803): Line appears to be too long, but this could be caused by non-ascii characters in UTF-8 encoding -(913): Line appears to be too long, but this could be caused by non-ascii characters in UTF-8 encoding -(952): Line appears to be too long, but this could be caused by non-ascii characters in UTF-8 encoding Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- ** It looks like you're using RFC 3978 boilerplate. You should update this to the boilerplate described in the IETF Trust License Policy document (see https://trustee.ietf.org/license-info), which is required now. -- Found old boilerplate from RFC 3978, Section 5.5 on line 1498. -- Found old boilerplate from RFC 3979, Section 5, paragraph 1 on line 1471. -- Found old boilerplate from RFC 3979, Section 5, paragraph 2 on line 1478. -- Found old boilerplate from RFC 3979, Section 5, paragraph 3 on line 1484. ** The document seems to lack an RFC 3978 Section 5.1 IPR Disclosure Acknowledgement -- however, there's a paragraph with a matching beginning. Boilerplate error? ** This document has an original RFC 3978 Section 5.4 Copyright Line, instead of the newer IETF Trust Copyright according to RFC 4748. ** This document has an original RFC 3978 Section 5.5 Disclaimer, instead of the newer disclaimer which includes the IETF Trust according to RFC 4748. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- ** The document seems to lack a 1id_guidelines paragraph about 6 months document validity -- however, there's a paragraph with a matching beginning. Boilerplate error? ** The document seems to lack a 1id_guidelines paragraph about the list of current Internet-Drafts -- however, there's a paragraph with a matching beginning. Boilerplate error? == There are 27 instances of lines with non-ascii characters in the document. == No 'Intended status' indicated for this document; assuming Proposed Standard == The page length should not exceed 58 lines per page, but there was 30 longer pages, the longest (page 24) being 75 lines == It seems as if not all pages are separated by form feeds - found 0 form feeds but 33 pages Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- == There are 2 instances of lines with non-RFC2606-compliant FQDNs in the document. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the RFC 3978 Section 5.4 Copyright Line does not match the current year == The document seems to use 'NOT RECOMMENDED' as an RFC 2119 keyword, but does not include the phrase in its RFC 2119 key words list. -- The document seems to lack a disclaimer for pre-RFC5378 work, but may have content which was first submitted before 10 November 2008. If you have contacted all the original authors and they are all willing to grant the BCP78 rights to the IETF Trust, then this is fine, and you can ignore this comment. If not, you may need to add the pre-RFC5378 disclaimer. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (July 18, 2004) is 7222 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Unused Reference: '3' is defined on line 1394, but no explicit reference was found in the text == Unused Reference: '11' is defined on line 1415, but no explicit reference was found in the text == Unused Reference: '14' is defined on line 1428, but no explicit reference was found in the text == Unused Reference: '15' is defined on line 1432, but no explicit reference was found in the text == Unused Reference: '20' is defined on line 1445, but no explicit reference was found in the text ** Obsolete normative reference: RFC 2326 (ref. '1') (Obsoleted by RFC 7826) ** Obsolete normative reference: RFC 2327 (ref. '2') (Obsoleted by RFC 4566) ** Obsolete normative reference: RFC 2234 (ref. '3') (Obsoleted by RFC 4234) ** Obsolete normative reference: RFC 3489 (ref. '6') (Obsoleted by RFC 5389) == Outdated reference: A later version (-40) exists of draft-ietf-mmusic-rfc2326bis-06 == Outdated reference: A later version (-08) exists of draft-rosenberg-midcom-turn-04 -- Possible downref: Normative reference to a draft: ref. '8' == Outdated reference: A later version (-19) exists of draft-ietf-mmusic-ice-01 ** Obsolete normative reference: RFC 3388 (ref. '10') (Obsoleted by RFC 5888) -- No information found for draft-camarillo-mmusic-anat - is the name correct? -- Possible downref: Normative reference to a draft: ref. '11' -- Obsolete informational reference (is this intentional?): RFC 2766 (ref. '13') (Obsoleted by RFC 4966) -- Obsolete informational reference (is this intentional?): RFC 2460 (ref. '14') (Obsoleted by RFC 8200) == Outdated reference: A later version (-10) exists of draft-ietf-mmusic-sdp-comedia-07 == Outdated reference: A later version (-06) exists of draft-ietf-avt-rtp-framing-contrans-03 == Outdated reference: A later version (-03) exists of draft-wing-avt-rtp-noop-00 Summary: 11 errors (**), 0 flaws (~~), 18 warnings (==), 11 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 1 Network Working Group Magnus Westerlund 2 INTERNET-DRAFT Ericsson 3 Expires: Jan 17 2005 Thomas Zeng 4 PacketVideo Network Solutions 5 July 18, 2004 7 How to Enable Real-Time Streaming Protocol (RTSP) Traverse Network 8 Address Translators (NAT) and Interact with Firewalls. 9 11 Status of this memo 13 By submitting this Internet-Draft, I (we) certify that any 14 applicable patent or other IPR claims of which I am (we are) aware 15 have been disclosed, and any of which I (we) become aware will be 16 disclosed, in accordance with RFC 3668 (BCP 79). 18 By submitting this Internet-Draft, I (we) accept the provisions of 19 Section 3 of RFC 3667 (BCP 78). 21 Internet-Drafts are working documents of the Internet Engineering 22 Task Force (IETF), its areas, and its working groups. Note that 23 other groups may also distribute working documents as Internet- 24 Drafts. 26 Internet-Drafts are draft documents valid for a maximum of six 27 months and may be updated, replaced, or obsolete by other documents 28 at any time. It is inappropriate to use Internet-Drafts as reference 29 material or cite them other than as "work in progress". 31 The list of current Internet-Drafts can be accessed at 32 http://www.ietf.org/ietf/lid-abstracts.txt 34 The list of Internet-Draft Shadow Directories can be accessed at 35 http://www.ietf.org/shadow.html 37 This document is an individual submission to the IETF. Comments 38 should be directed to the authors. 40 Abstract 42 This document describes several types of NAT traversal techniques 43 that can be used by RTSP. For each technique a description on how it 44 shall be used, what security implications it has and other 45 deployment considerations are given. Further a description on how 46 RTSP relates to firewalls is given. 48 TABLE OF CONTENTS 50 1. Definitions.........................................................4 51 1.1. Glossary........................................................4 52 1.2. Terminology.....................................................4 53 2. Changes.............................................................4 54 3. Introduction........................................................5 55 3.1. NATs............................................................5 56 3.2. Firewalls.......................................................6 57 4. Requirements........................................................7 58 5. Detecting the loss of NAT mappings..................................8 59 6. NAT Traversal Techniques............................................9 60 6.1. STUN............................................................9 61 6.1.1. Introduction.................................................9 62 6.1.2. Using STUN to traverse NAT without server modifications.....10 63 6.1.3. Embedding STUN in RTSP......................................11 64 6.1.4. Discussion On Co-located STUN Server........................13 65 6.1.5. ALG considerations..........................................13 66 6.1.6. Deployment Considerations...................................13 67 6.1.7. Security Considerations.....................................15 68 6.2. ICE............................................................15 69 6.2.1. Introduction................................................15 70 6.2.2. Using ICE in RTSP...........................................16 71 6.2.3. Implementation burden of ICE................................17 72 6.2.4. Deployment Considerations...................................17 73 6.3. Symmetric RTP..................................................17 74 6.3.1. Introduction................................................17 75 6.3.2. Necessary RTSP extensions...................................18 76 6.3.3. Deployment Considerations...................................18 77 6.3.4. Security Consideration......................................19 78 6.3.5. A Variation to Symmetric RTP................................20 79 6.4. Application Level Gateways.....................................21 80 6.4.1. Introduction................................................21 81 6.4.2. Guidelines On Writing ALGs for RTSP.........................22 82 6.4.3. Deployment Considerations...................................24 83 6.4.4. Security Considerations.....................................24 84 6.5. TCP Tunneling..................................................24 85 6.5.1. Introduction................................................24 86 6.5.2. Usage of TCP tunneling in RTSP..............................25 87 6.5.3. Deployment Considerations...................................25 88 6.5.4. Security Considerations.....................................25 89 6.6. TURN (Traversal Using Relay NAT)...............................25 90 6.6.1. Introduction................................................25 91 6.6.2. Usage of TURN with RTSP.....................................26 92 6.6.3. Deployment Considerations...................................27 93 6.6.4. Security Considerations.....................................27 94 7. Firewalls..........................................................28 95 8. Comparison of Different NAT Traversal Techniques...................29 96 9. Open Issues........................................................29 97 10. Security Consideration............................................30 98 11. IANA Consideration................................................30 99 12. Acknowledgments...................................................31 100 13. Author's Addresses................................................31 101 14. References........................................................32 102 15. IPR Notice........................................................34 103 16. Copyright Notice..................................................34 104 1. Definitions 106 1.1. Glossary 108 ALG - Application Level Gateway, an entity that can be embedded 109 in a NAT or other middlebox to perform the application layer 110 functions required for a particular protocol to traverse the 111 NAT/middlebox [6] 112 ICE - Interactive Connectivity Establishment, see [9]. 113 DNS - Domain Name Service 114 DDOS - Distributed Denial Of Service attacks 115 MID - Media Identifier from Grouping of media lines in SDP, see 116 [10]. 117 NAT - Network Address Translator, see [12]. 118 NAT-PT - Network Address Translator Protocol Translator, see [13] 119 RTP - Real-time Transport Protocol, see [5]. 120 RTSP - Real-Time Streaming Protocol, see [1] and [7]. 121 SDP - Session Description Protocol, see [2]. 122 SSRC - Synchronization source in RTP, see [5]. 123 TBD - To Be Decided 125 1.2. Terminology 127 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 128 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 129 document are to be interpreted as described in RFC 2119 [4]. 131 2. Changes 133 The following changes have been done since draft-ietf-mmusic-rtsp- 134 nat-02.txt: 136 - Added reference to [RTP_NULL] draft. 137 - Added overview of a variation to symmetric RTP. 138 - Added a chapter on the comparisons of different NAT traversal 139 techniques. 140 - Condensed wording on STUN, ICE and Symmetric RTP, in an effort to 141 make this draft a little shorter. 142 - Removed the requirement that "we must use RFC2326bis". 144 3. Introduction 146 Today there is a proliferate deployment of different flavors of 147 Network Address Translator (NAT) boxes that in practice follow 148 standards rather loosely [12][24][18]. NATs cause discontinuity in 149 address realms [18], therefore a protocol, such as RTSP, needs to 150 try to make sure that it can deal with such discontinuities caused 151 by NATs. The problem with RTSP is that, being a media control 152 protocol that manages one or more media streams; RTSP carries 153 information about network addresses and ports inside itself. Because 154 of this, even if RTSP itself, when carried over TCP for example, is 155 not blocked by NATs, its media streams may be blocked by NATs, 156 unless special provisions are added to support NAT-traversal. 158 Like NATs, firewalls (FWs) are also middle boxes that need to be 159 considered. They are deployed to prevent unwanted traffic to be able 160 to get in or out of the protected network. RTSP is designed such 161 that a firewall can be configured to let RTSP controlled media 162 streams to go through with minimal implementation problems. However 163 there is a need for more detailed information on how FWs should be 164 configured to work with RTSP. 166 This document describes several NAT-traversal mechanisms for RTSP 167 based streaming. These NAT solutions fall into the category of 168 ""UNilateral Self-Address Fixing (UNSAF)" as defined in [18] and 169 quoted below: 170 "UNSAF is a process whereby some originating process attempts 171 to determine or fix the address (and port) by which it is 172 known - e.g. to be able to use address data in the protocol 173 exchange, or to advertise a public address from which it will 174 receive connections." 176 Following the guidelines spelled out in [18], we describe the 177 required RTSP protocol extensions for each method, transition 178 strategies, and security concerns. 180 This document intends to recommend FW/NAT traversal methods for RTSP 181 streaming servers based on RFC 2326 [1] as well as the updated 182 RTSP core spec [7]. This document is intended to be updated to stay 183 consistent with the RTSP core protocol [7]. 185 3.1. NATs 187 Today there exist a number of different NAT types and usage areas. 188 The different NAT types are cited here from STUN [6]: 190 Full Cone: A full cone NAT is one where all requests from the same 191 internal IP address and port are mapped to the same external IP 192 address and port. Furthermore, any external host can send a packet 193 to the internal host, by sending a packet to the mapped external 194 address. 196 Restricted Cone: A restricted cone NAT is one where all requests 197 from the same internal IP address and port are mapped to the same 198 external IP address and port. Unlike a full cone NAT, an external 199 host (with IP address X) can send a packet to the internal host only 200 if the internal host had previously sent a packet to IP address X. 202 Port Restricted Cone: A port restricted cone NAT is like a 203 restricted cone NAT, but the restriction includes port numbers. 204 Specifically, an external host can send a packet, with source IP 205 address X and source port P, to the internal host only if the 206 internal host had previously sent a packet to IP address X and port 207 P. 209 Symmetric: A symmetric NAT is one where all requests from the same 210 internal IP address and port, to a specific destination IP address 211 and port, are mapped to the same external IP address and port. If 212 the same host sends a packet with the same source address and port, 213 but to a different destination, a different mapping is used. 214 Furthermore, only the external host that receives a packet can send 215 a UDP packet back to the internal host. 217 NATs are used on both small and large scales. The normal small-scale 218 user is home user that has a NAT to allow multiple computers share 219 the single IP address given by their Internet Service Provider 220 (ISP). The large-scale users are the ISP's themselves that give 221 their users private addresses. This is done both for control and for 222 lack of IP addresses. 224 Native Address Translation and Protocol Translation (NAT-PT) [13] is 225 a mechanism used for IPv4 to IPv6 transition. This device is used to 226 allow devices only having connectivity using one of the IP versions 227 to communicate with the other address domain. If the other address 228 domain is addressable through the use of domain names, then a DNS 229 ALG assigns temporary IP addresses in the requestor's domain. The 230 NAT-PT device translates this temporary address to the receivers� 231 true IP address and at the same time modifies all necessary IP 232 header fields so they are correct in the receiver's address domain. 234 3.2. Firewalls 236 A firewall (FW) is a security gateway that enforces certain access 237 control policies between two network administrative domains: a 238 private domain (intranet) and a public domain (public internet). 239 Many organizations use firewalls to prevent privacy intrusions and 240 malicious attacks to corporate computing resources in the private 241 intranet [19]. 242 A comparison between NAT and FW are given below: 244 1. FW must be a gateway between two network administrative domains, 245 while NAT does not have to sit between two domains. In fact, in 246 many corporations there are many NAT boxes within the intranet, 247 in which case the NAT boxes sit between subnets. 248 2. NAT does not in itself provide security, although some access 249 control policies can be implemented using address translation 250 schemes. 251 3. NAT and FWs are similar in that they can both be configured to 252 allow multiple network hosts to share a single public IP address. 253 In other words, a host behind a NAT or FW can have a private IP 254 address and a public one, so for NAT and FW there is the issue of 255 address mapping which is important in order for RTSP protocol to 256 work properly when there are NATs and FWs between the RTSP server 257 and its clients. 259 In the rest of this memo we use the phrase "NAT traversal" 260 interchangeably with "FW traversal", "NAT/FW traversal" and 261 "NAT/Firewall traversal". 263 4. Requirements 265 This section considers the set of requirements when designing or 266 evaluating RTSP NAT traversal solutions. 268 RTSP is a client/server protocol, and as such the targeted 269 applications in general deploy RTSP servers in the public address 270 realm. However, there are use cases where the reverse is true: RTSP 271 clients are connecting from public address realm to RTSP servers 272 behind home NATs. This is the case for instance when home 273 surveillance cameras running as RTSP servers intend to stream video 274 to cell phone users in the public address realm through a home NAT. 276 The first priority should be to solve the RTSP NAT traversal problem 277 for RTSP servers deployed in the open. 279 The list of feature requirements for RTSP NAT solutions are given 280 below: 281 1. MUST work for all flavors of NATs, including symmetric NATs. 282 2. MUST work for firewalls (subject to pertinent firewall 283 administrative policies), including those with ALGs. 284 3. SHOULD have minimal impact on clients in the open and not dual- 285 hosted: 286 o For instance, no extra delay from RTSP connection till 287 arrival of media. 288 4. SHOULD be simple to use/implement/administer that people 289 actually turn them on 290 o Otherwise people will resort to TCP tunneling through NATs 291 o Address discovery for NAT traversal should take place 292 behind the scene, if possible 294 5. SHOULD authenticate dual-hosted client transport handler to 295 prevent DDOS attacks. 297 The last requirement addresses the Distributed Denial-Of-Service 298 (DDOS) threat, which relates to NAT traversal as explained below. 300 During NAT traversal, when the RTSP server performs address 301 translation on a client, the result may be that the public IP 302 address of the RTP receiver host is different than the public IP 303 address of the RTSP client host. This posts a DDOS threat that has 304 significant amplification potentials because the RTP media streams 305 in general consist of large number of IP packets. DDOS attacks 306 occur if the attacker fakes the messages in the NAT traversal 307 mechanism to trick the RTSP server into believing that the 308 client�s RTP receiver is located in a separate host. For example, 309 user A may use his RTSP client to direct the RTSP server to send 310 video RTP streams to www.foo.com in order to degrade the services 311 provided by www.foo.com. Note a simple preventative measure is for 312 the RTSP server to disallow the cases where the client�s RTP 313 receiver has a different public IP address than that of the RTSP 314 client. However, in some applications (e.g., XCON), dual-hosted 315 RTSP/RTP clients have valid use cases. The key is how to 316 authenticate the messages exchanged during the NAT traversal 317 process. Message authentication is a big challenge in the current 318 wired and wireless networking environment. It may be necessary in 319 the immediate future to deploy NAT traversal solutions that do not 320 have full message authentication, but provide upgrade path to add 321 authentication features in the future. 323 5. Detecting the loss of NAT mappings 325 Several of the NAT traversal techniques in the next chapter make use 326 of the fact that the NAT UDP mapping's external address and port can 327 be discovered. This information is then utilized to traverse the NAT 328 box. However any such information is only good while the mapping is 329 still valid. As the IAB's UNSAF document [18] points out, the 330 mapping can either timeout or change its properties. It is therefore 331 important for the NAT traversal solutions to handle the loss or 332 change of NAT mappings, according to [18]. 334 First, since NATs may also dynamically reclaim or readjust 335 address/port translations, "keep-alive" and periodic re-polling may 336 be required [18]. Secondly, it is possible to detect and recover 337 from the situation where the mapping has been changed or removed. 338 The possibility to detect a lost mapping is based on the fact that 339 no traffic will arrive. Below we will give some recommendation on 340 how to detect loss of NAT mappings when using RTP/RTCP under RTSP 341 control. 343 For RTP session there is normally a need to have both RTP and RTCP 344 functioning. The loss of a RTP mapping can only be detected when 345 expected traffic does not arrive. If no data arrives after having 346 received the 200 response to a PLAY request, one can normally expect 347 to receive RTP packets within a few seconds. However, for a receiver 348 to be certain to detect the case where no RTP traffic was delivered 349 due to NAT trouble, one should monitor the RTCP Sender reports. The 350 sender report carries a field telling how many packets the server 351 has sent. If that has increased and no RTP packets has arrived for a 352 few seconds it is likely the RTP mapping has been removed. 354 The loss of mapping for RTCP is simpler to detect. As RTCP is 355 normally sent periodically in each direction, even during the RTSP 356 ready state, if RTCP packets are missing for several RTCP intervals, 357 the mapping is likely to be lost. Note that if no RTCP packets are 358 received by the RTSP server and nor RTSP messages for a while, the 359 RTSP server has the option to delete the corresponding SSRC and RTSP 360 session ID, because either the client can not get through a middle 361 box NAT/FW, or that the client is mal-functioning. 363 6. NAT Traversal Techniques 365 There exist a number of potential NAT traversal techniques that can 366 be used to allow RTSP to traverse NATs. They have different features 367 and are applicable to different topologies; their cost is also 368 different. They also vary in security levels. In the following 369 sections, each technique is outlined in details with discussions on 370 the corresponding advantages and disadvantages. 372 Not all of the techniques are yet described in the full details, 373 because the intention is to refer to other documents, or some 374 appendix to this document, for the full specification of a specific 375 NAT traversal solution. Note that some of the solutions make use of 376 protocols (e.g., RTP-NOOP, TURN and ICE) in early stage of 377 standardization. 379 6.1. STUN 381 6.1.1. Introduction 383 STUN � "Simple Traversal of UDP Through Network Address Translators" 384 [6][25] is a standardized protocol developed by the MIDCOM WG that 385 allows a client to use secure means to discover the presence of a 386 NAT between himself and the STUN server and the type of that NAT. 387 The client then uses the STUN server to discover the address 388 bindings assigned by the NAT. 390 STUN is a client-server protocol. STUN client sends a request to a 391 STUN server and the server returns a response. There are two types 392 of STUN requests � Binding Requests, sent over UDP, and Shared 393 Secret Requests, sent over TLS over TCP. 395 6.1.2. Using STUN to traverse NAT without server modifications 397 This section describes how a client can use STUN to traverse NATs to 398 RTSP servers without requiring server modifications. However this 399 method has limited applicability and requires the server to be 400 available in the external/public address realm in regards to the 401 client located behind a NAT(s). 403 Limitations: 405 - The server must be located in either a public address realm or the 406 next hop external address realm in regards to the client. 407 - The client may only be located behind NATs that are of the full 408 cone, address restricted, or port restricted type. Clients behind 409 symmetric NATs cannot use this method. 411 Method: 413 A RTSP client using RTP transport over UDP can use STUN to traverse 414 a full cone NAT(s) in the following way: 416 1. Use STUN to discover the type of NAT, and the timeout period for 417 any UDP mapping on the NAT. This is RECOMMENDED to be performed 418 in the background as soon as IP connectivity is established. If 419 this is performed prior to establishing a streaming session the 420 delays in the session establishment will be reduced. If no NAT is 421 detected, normal SETUP SHOULD be used. 423 2. The RTSP client determines the number of UDP ports needed by 424 counting the number of needed media transport protocols sessions 425 in the multi-media presentation. This information is available in 426 the media description protocol, e.g. SDP. For example, each RTP 427 session will in general require two UDP ports, one for RTP, and 428 one for RTCP. 430 3. For each UDP port required, establish a mapping and discover the 431 public/external IP address and port number with the help of the 432 STUN server. A successful mapping looks like below: 433 client�s local address/port <-> public address/port. 435 4. Perform the RTSP SETUP for each media. In the transport header 436 the following parameter SHOULD be included with the given values: 437 "dest_addr" [7] with the public/external IP address and port pair 438 for both RTP and RTCP. To allow this to work servers MUST allow a 439 client to setup the RTP stream on any port, not only even ports. 440 This requires the new feature provided in the update to RFC2326 441 ([7]). The server SHOULD respond with a transport header 442 containing an "src_addr" parameter with the RTP and RTCP source 443 IP address and port of the media stream. 445 5. To keep the mappings alive, the client SHOULD periodically send 446 UDP traffic over all mappings needed for the session. STUN MAY be 447 used to determine the timeout period of the NAT(s) UDP mappings. 448 For the mapping carrying RTCP traffic the periodic RTCP traffic 449 may be enough. For mappings carrying RTP traffic and for mappings 450 carrying RTCP packets at too low a frequency, keep-alive messages 451 SHOULD be sent. As keep alive messages, one could use the RTP 452 NOOP packet ([23]) to the streaming server�s discard port (port 453 number 9). The drawback of using RTP NOOP is that the payload 454 type number must be dynamically assigned through RTSP first. 456 If a UDP mapping is lost then the above discovery process must be 457 repeated. The media stream also needs to be SETUP again to change 458 the transport parameters to the new ones. This will likely cause a 459 glitch in media playback. 461 To allow UDP packets to arrive from the server to a client behind a 462 restricted NAT, the client must send the very first UDP packet to 463 pinch a hole in the NAT. The client, before sending a RTSP PLAY 464 request, must send a so called FW packet (such as a RTP NOOP packet) 465 on each mapping, to the IP address given as the servers source 466 address. To create minimum problems for the server these UDP packets 467 SHOULD be sent to the server's discard port (port number 9). Since 468 UDP packets are inherently unreliable, to ensure that at least one 469 UDP message passes the NAT, FW packets should be retransmitted in 470 short intervals. 472 For a port restricted NAT the client must send messages to the exact 473 ports used by the server to send UDP packets before sending a RTSP 474 PLAY request. This makes it possible to use the above described 475 process with the following additional restrictions: for each port 476 mapping, FW packets need to be sent first to the server's source 477 address/port. To minimize potential effects on the server from these 478 messages the following type of FW packets MUST be sent. RTP: an 479 empty or less than 12 bytes UDP packet. RTCP: A correctly formatted 480 RTCP RR or SR message. 482 The above described adaptations for restricted NATs will not work 483 unless the server includes the "src_addr" in the "Transport" header 484 (which is the "source" transport parameter in RFC2326). 486 6.1.3. Embedding STUN in RTSP 488 This section outlines the adaptation and embedding of STUN within 489 RTSP. This enables STUN to be used to traverse any type of NAT, 490 including symmetric NATs. Protocol changes are beyond the scope of 491 this memo and are instead defined in TBD internet draft. 493 Limitations: 495 This NAT traversal solution has limitations: 497 1. It does not work if both RTSP client and RTSP server are 498 behind separate NATs. 499 2. The RTSP server may, for security reasons, refuse to send 500 media streams to an IP different from the IP in the client RTSP 501 requests. Therefore, if the client is behind a NAT that has 502 multiple public addresses, and the client�s RTSP port and UDP 503 port are mapped to different IP addresses, RTSP SETUP may fail. 505 Deviations from STUN as defined in RFC 3489 507 Specifically, we differ from RFC3489 in two aspects: 508 1. We allow RTSP applications to have the option to perform STUN 509 "Shared Secret Request" through RTSP, via extension to RTSP; 510 2. We require STUN server to be co-located on RTSP server�s media 511 output ports. 513 In order to allow binding discovery without authentication, the STUN 514 server embedded in RTSP application must ignore authentication tag, 515 and the STUN client embedded in RTSP application must use dummy 516 authentication tag. 518 If STUN server is co-located with RTSP server�s media output port, 519 an RTSP client using RTP transport over UDP can use STUN to traverse 520 ALL types of NATs that have been defined in section 3.1. In the case 521 of symmetric NAT, the party inside the NAT must initiate UDP 522 traffic. The STUN Bind Request, being a UDP packet itself, can serve 523 as the traffic initiating packet. Subsequently, both the STUN 524 Binding Response packets and the RTP/RTCP packets can traverse the 525 NAT, regardless of whether the RTSP server or the RTSP client is 526 behind NAT. 528 Likewise, if a RTSP server is behind a NAT, then an embedded STUN 529 server must co-locate on the RTSP client�s RTCP port. In this case, we 530 assume that the client has some means of establishing TCP connection to 531 the RTSP server behind NAT so as to exchange RTSP messages with the 532 RTSP server. 534 To minimize delay, we require that the RTSP server supporting this 535 option must inform its client the RTP and RTCP ports from where the 536 server intend to send out RTP and RTCP packets, respectively. This 537 can be done by using the "server_port" parameter in RFC2326, and the 538 "src_addr" parameter in [7]. Both are in RTSP Transport header. 540 To minimize the keep-alive traffic for address mapping, we also 541 require that the RTSP end-point (server or client) sends and 542 receives RTCP packets from the same port. 544 6.1.4. Discussion On Co-located STUN Server 546 In order to use STUN to traverse symmetric NATs the STUN server 547 needs to be co-located with the streaming server media output ports. 548 This creates a de-multiplexing problem: we must be able to 549 differentiate a STUN packet from a media packet. This will be done 550 based on heuristics. This works fine between STUN and RTP or RTCP 551 where the first byte happens to be different, but may not work with 552 other media transport protocols. 554 6.1.5. ALG considerations 556 If a NAT supports RTSP ALG (Application Level Gateway) and is not 557 aware of the STUN traversal option, service failure may happen, 558 because a client discovers its public IP address and port numbers, 559 and inserts them in its SETUP requests, when the RTSP ALG processes 560 the SETUP request it may change the destination and port number, 561 resulting in unpredictable behavior. In such cases a convenient way 562 should be provided to turn off STUN-based NAT traversal. 564 6.1.6. Deployment Considerations 566 For the non-embedded usage of STUN the following applies: 568 Advantages: 570 - Using STUN does not require RTSP server modifications; it only 571 affects the client implementation. 573 Disadvantages: 575 - Requires a STUN server deployed in the public address space. 576 - Only works with Cone NATs. Restricted Cone NATs create some 577 issues. 578 - Does not work with symmetric NATs without server modifications. 579 - Will mostly not work if a NAT uses multiple IP addresses, since 580 RTSP server generally requires all media streams to use the same 581 IP as used in the RTSP connection. 582 - Interaction problems exist when a RTSP-aware ALG interferes with 583 the use of STUN for NAT traversal. 584 - Using STUN requires that RTSP servers and clients support the 585 updated RTSP specification, because it is no longer possible to 586 guarantee that RTP and RTCP ports are adjacent to each other, as 587 required by the "client_port" and "server_port" parameters in 588 RFC2326. 589 "" 590 Transition: 592 The usage of STUN can be phased out gradually as the first step of a 593 STUN capable server or client should be to check the presence of 594 NATs. The removal of STUN capability in the client implementations 595 will have to wait until there is absolutely no need to use STUN. 597 For the "Embedded STUN" method the following applies: 599 Advantages: 601 - STUN is a solution first used by SIP applications. As shown above, 602 with little or no changes, RTSP application can re-use STUN as a 603 NAT traversal solution, avoiding the pit-fall of solving a problem 604 twice. 605 - STUN has built-in message authentication features, which makes it 606 more secure. See next section for an in-depth security discussion. 607 - This solution works as long as there is only one RTSP end point in 608 the private address realm, regardless of the NAT�s type. There may 609 even be multiple NATs (see figure 1 in [6]). 610 - Compares to other UDP based NAT traversal methods in this 611 document, STUN requires little new protocol development (since 612 STUN is already a IETF standard), and most likely less 613 implementation effort, since open source STUN server and client 614 have become available [21]. There is the need to embed STUN in 615 RTSP server and client, which require a de-multiplexer between 616 STUN packets and RTP/RTCP packets. There is also a need to 617 register the proper feature tags. 619 Disadvantages: 621 - Some extensions to the RTSP core protocol, signaled by RTSP 622 feature tags, must be introduced. 623 - Requires an embedded STUN server to co-locate on each of RTSP 624 server�s media protocol's ports (e.g. RTP and RTCP ports), which 625 means more processing is required to de-multiplex STUN packets 626 from media packets. For example, the de-multiplexer must be able 627 to differentiate a RTCP RR packet from a STUN packet, and forward 628 the former to the streaming server, the later to STUN server. 629 - Even if the RTSP server is in the open, and the client is behind a 630 multi-addressed NAT, it may still break if the RTSP server does 631 not allow RTP packets to be sent to an IP differs from the IP of 632 the client�s RTSP request. 633 - Interaction problems exist when a RTSP ALG is not aware of STUN. 634 - Using STUN requires that RTSP servers and clients support the 635 updated RTSP specification, and they both agree to support the 636 proper feature tag. 637 - Increases the setup delay with at least the amount of time it 638 takes to perform STUN message exchanges. 640 Transition: 642 The usage of STUN can be phased out gradually as the first step of a 643 STUN capable machine can be to check the presence of NATs for the 644 presently used network connection. The removal of STUN capability in 645 the client implementations will have to wait until there is 646 absolutely no need to use STUN. 648 6.1.7. Security Considerations 650 To prevent RTSP server being used as Denial of Service (DoS) attack 651 tools the RTSP Transport header parameter "destination" and 652 "dest_addr" are generally not allowed to point to any IP address 653 other than the one that RTSP message originates from. The RTSP 654 server is only prepared to make an exception of this rule when the 655 client is trusted (e.g., through the use of a secure authentication 656 process, or through some secure method of challenging the 657 destination to verify its willingness to accept the RTP traffic). 658 Such restriction means that STUN does not work for NATs that would 659 assign different IP addresses to different UDP flows on its public 660 side. Therefore the multi-addressed NATs will at times have trouble 661 with STUN-based RTSP NAT traversals. 663 In terms of security property, STUN combined with destination 664 address restricted RTSP has the same security properties as the core 665 RTSP. It is protected from being used as a DoS attack tool unless 666 the attacker has ability the to spoof the TCP connection carrying 667 RTSP messages. 669 Using STUN's support for message authentication and secure transport 670 of RTSP messages, attackers cannot modify STUN responses or RTSP 671 messages to change media destination. This protects against 672 hijacking, however as a client can be the initiator of an attack, 673 these mechanisms cannot securely prevent RTSP servers being used as 674 DoS attack tools. 676 6.2. ICE 678 6.2.1. Introduction 680 ICE (Interactive Connectivity Establishment) [9] is a methodology 681 for NAT traversal that is under development for SIP. The basic idea 682 is to try, in a parallel fashion, all possible connection addresses 683 that an end point may have. This allows the end-point to use the 684 best available UDP "connection" (meaning two UDP end-points capable 685 of reaching each other). The methodology has very nice properties in 686 that basically all NAT topologies are possible to traverse. 688 Here is how ICE works. End point A collects all possible address 689 that can be used, including local IP addresses, STUN derived 690 addresses, TURN addresses. On each local port that any of these 691 address and port pairs leads to, a STUN server is installed. This 692 STUN server only accepts STUN requests using the correct 693 authentication through the use of username and password. 695 End-point A then sends a request to establish connectivity with end- 696 point B, which includes all possible ways to get the media through 697 to A. Note that each of A�s published address/port pairs has a STUN 698 server co-located. B, before responding to A, uses a STUN client to 699 try to reach all the address and port pairs specified by A. The 700 destinations for which the STUN requests have successfully completed 701 are then indicated. If bi-directional communication is intended the 702 end-point B must then in its turn offer A all its reachable address 703 and port pairs, which then are tested by A. 705 If B fails to get any STUN response from A, all hope is not lost. 706 Certain NAT topologies require multiple tries from both ends before 707 successful connectivity is accomplished. The STUN requests may also 708 result in that more connectivity alternatives are discovered and 709 conveyed in the STUN responses. 711 This chapter is not yet a full technical solution. It is mostly a 712 feasibility study on how ICE could be applied to RTSP and what 713 properties it would have. One nice thing about ICE for RTSP is that 714 it does make it possible to deploy RTSP server behind NAT/FIRWALL, a 715 desirable option to some RTSP applications. 717 6.2.2. Using ICE in RTSP 719 The usage of ICE for RTSP requires that both client and server be 720 updated to include the ICE functionality. If both parties implement 721 the necessary functionality the following step-by-step algorithm 722 could be used to accomplish connectivity for the UDP traffic. 724 This assumes that it is possible to establish a TCP connection for 725 the RTSP messages between the client and the server. This is not 726 trivial in scenarios where the server is located behind a NAT, and 727 may require some TCP ports been opened, or the deployment of 728 proxies, etc. 730 Refer to [22] for the mapping of ICE to RTSP. 732 6.2.3. Implementation burden of ICE 734 The usage of ICE will require that a number of new protocols and new 735 RTSP/SDP features be implemented. This makes ICE the solution that 736 has the largest impact on client and server implementations amongst 737 all the NAT/FW traversal methods in this document. 739 Some RTSP server implementation requirements are: 740 - Full STUN server features 741 - limited STUN client features 742 - Dynamic SDP generation with more parameters. 743 - RTSP error code for ICE extension 745 Some client implantation requirements are: 746 - Limited STUN server features 747 - Limited STUN client features 748 - RTSP error code and ICE extension 750 6.2.4. Deployment Considerations 752 Advantages: 753 - Solves NAT connectivity discovery for basically all cases as long 754 as a TCP connection between them can be established. This includes 755 servers behind NATs. (Note that a proxy between address domains 756 may be required to get TCP through). 757 - Improves defenses against DDOS attacks, as media receiving client 758 requires authentications, via STUN on its media reception ports. 759 See [22] for more details. 761 Disadvantages: 762 - Increases the setup delay with at least the amount of time it 763 takes for the server to perform its STUN requests. 764 - Assumes that it is possible to de-multiplex between media packets 765 and STUN packets. 766 - Has fairly high implementation burden put on both RTSP server and 767 client. The precise implantation complexity needs to be assessed 768 once ICE is fully defined as a standard. Currently ICE is still a 769 protocol under development. 771 6.3. Symmetric RTP 773 6.3.1. Introduction 775 Symmetric RTP is a NAT traversal solution that is based on requiring 776 RTSP clients to send UDP packets to the server�s media output ports. 777 Conventionally, RTSP servers send RTP packets in one direction: from 778 server to client. Symmetric RTP is similar to connection-oriented 779 traffic, where one side (e.g., the RTSP client) first "connects" by 780 sending a RTP packet to the other side�s RTP port, the recipient 781 then replies to the originating IP and port. 783 Specifically, when the RTSP server receives the "connect" RTP packet 784 (a.k.a. FW packet, since it is used to pinch a hole in the FW/NAT 785 and to aid the server for port binding and address mapping) from its 786 client, it copies the source IP and Port number and uses them as 787 delivery address for media packets. By having the server send media 788 traffic back the same way as the client's packet are sent to the 789 server, address mappings will be honored. Therefore this technique 790 works for all types of NATs. However, it does require server 791 modifications. Unless there is built-in protection mechanism, 792 symmetric RTP is rather vulnerable to DDOS attacks, because 793 attackers can simply forge the source IP & Port of the binding 794 packet. 796 6.3.2. Necessary RTSP extensions 798 To support symmetric RTP the RTSP signaling must be extended to 799 allow the RTSP client to indicate that it will use symmetric RTP. 800 The client also needs to be able to signal its RTP SSRC to the 801 server in its SETUP request. The RTP SSRC is used to establish some 802 basic level of security against hijacking attacks. Care must be 803 taken in choosing client�s RTP SSRC. First, it must be unique within 804 all the RTP sessions belonging to the same RTSP session. Secondly, 805 if the RTSP server is sending out media packets to multiple clients 806 from the same send port, the RTP SSRC needs to be unique amongst 807 those clients� RTP sessions. Recognizing that there is a potential 808 that RTP SSRC collision may occur, the RTSP server must be able to 809 signal to client that a collision has occurred and that it wants the 810 client to use a different RTP SSRC carried in the SETUP response. 812 Details of the RTSP extension are beyond the scope of this draft and 813 will be defined in a TBD RTSP extension draft. 815 6.3.3. Deployment Considerations 817 Advantages: 819 - Works for all types of NATs, including those using multiple IP 820 addresses. (Requirement 1 in section 4). 821 - Have no interaction problems with any RTSP ALG changing the 822 client's information in the transport header. 824 Disadvantages: 826 - Requires modifications to both RTSP server and client. 827 - The format of the RTP packet for "connection setup" (a.k.a FW 828 packet) is yet to be defined. One possibility is to use RTP NOOP 829 packet format in [23]. 830 - Has somewhat worse security situation than STUN when using address 831 restrictions. 832 - Still requires STUN to discover the timeout of NAT bindings. 834 6.3.4. Security Consideration 835 Symmetric RTP's major security issue is that RTP streams can be 836 hijacked and directed towards any target that the attacker desires. 838 The most serious security problem is the deliberate attack with the 839 use of a RTSP client and symmetric RTP. The attacker uses RTSP to 840 setup a media session. Then it uses symmetric RTP with a spoofed 841 source address of the intended target of the attack. There is no 842 defense against this attack other than restricting the possible bind 843 address to be the same as the RTSP connection arrived on. This 844 prevents symmetric RTP to be used with multi-address NATs. 846 The hijack attack can be performed in various ways. The basic attack 847 is based on the ability to read the RTSP signaling packets in order 848 to learn the address and port the server will send from and also the 849 SSRC the client will use. Having this information the attacker can 850 send its own NAT-traversal RTP packets containing the correct RTP 851 SSRC to the correct address and port on the server. The destination 852 of the packets is set as the source IP and port in these RTP 853 packets. 855 Another variation of this attack is to modify the RTP binding packet 856 being sent to the server by simply changing the source IP to the 857 target one desires to attack. 859 One can fend off the first attack by applying encryption to the RTSP 860 signaling transport. However, the second variation is impossible to 861 defend against. As a NAT re-writes the source IP and port this 862 cannot be authenticated, but authentication is required in order to 863 protect against this type of DOS attack. 865 The random SSRC tag in the binding packet determines how well 866 symmetric RTP can fend off stream-hijacking performed by parties 867 that are not "man-in-the-middle". 868 This proposal uses the 32-bit RTP SSRC field to this effect. 869 Therefore it is important that this field is derived with a non- 870 predictable randomizer. It should not be possible by knowing the 871 algorithm used and a couple of basic facts, to derive what random 872 number a certain client will use. 874 An attacker not knowing the SSRC but aware of which port numbers 875 that a server sends from can deploy a brute force attack on the 876 server by testing a lot of different SSRCs until it finds a matching 877 one. Therefore a server SHOULD implement functionality that blocks 878 ports that receive multiple FW packets (i.e. the packet that is sent 879 to the server for FW traversal) with different invalid SSRCs, 880 especially when they are coming from the same IP/Port. 882 To improve the security against attackers the random tag�s length 883 could be increased. To achieve a longer random tag while still using 884 RTP and RTCP, it will be necessary to develop RTP and RTCP payload 885 formats for carrying the random tag. 887 6.3.5. A Variation to Symmetric RTP 889 Symmetric RTP requires a valid RTP format in the FW packet, which is 890 the first packet that the client sends to the server to set up 891 virtual RTP connection. There is currently no appropriate RTP packet 892 format for this purpose, although the NOOP format is a proposal to 893 fix the problem [23]. 895 Meanwhile, there has been FW traversal techniques deployed in the 896 wireless streaming market place that use non-RTP messages as FW 897 packets. This section attempts to summarize a subset of those 898 solutions that happens to use a variation to the standard symmetric 899 RTP solution. 901 In this variation of symmetric RTP, the FW packet is a small UDP 902 packet that does not contain RTP header. Hence the solution can no 903 longer be called symmetric RTP, yet it employs the same technique 904 for FW traversal. In response to client�s FW packet, RTSP server 905 sends back a similar FW packet as a confirmation so that the client 906 can stop the so called "connection phase" of this NAT traversal 907 technique. Afterwards, the client only has to periodically send FW 908 packets as keep-alive messages for the NAT mappings. 910 The server listens on its RTP-media output port, and tries to decode 911 any received UDP packet as FW packet. This is valid since an RTSP 912 server is not expecting RTP traffic from the RTSP client. Then, it 913 can correlate the FW packet with the RTSP client�s session ID or the 914 server�s SSRC, and record the NAT bindings accordingly. The server 915 then sends a FW packet as the response to the client. 917 The FW packet normally contains the SSRC used to identify the RTP 918 stream, and can be made no bigger than 12 bytes, making it 919 distinctively different from RTP packets, whose header size is 12 920 bytes. 922 RTSP signaling can be added to do the following: 923 1. Enables or disables such FW message exchanges. When the FW/NAT 924 has an RTSP-aware ALG, it is better to disable FW message 925 exchange and let ALG works out the address and port mappings. 926 2. Configures the number of re-tries and the re-try interval of 927 the FW message exchanges. 929 Such FW packets may also contain digital signatures to support 930 three-way handshake based receiver authentications, so as to prevent 931 DDoS attacks described before. 933 This approach has the following advantages when compared with the 934 symmetric RTP approach: 935 1. There is no need to define RTP payload format for FW traversal, 936 therefore it is simple to use, implement and administer 937 (Requirement 4 in section 4), although a binding protocol must 938 be defined (which is out side of the scope of this memo). 939 2. When properly defined, this kind of FW message exchange can 940 also authenticate RTP receivers, so as to prevent DDoS attacks 941 for dual-hosted RTSP client. By dual-hosted RTSP client we mean 942 the kind that uses one "perceived" IP address for RTSP message 943 exchange, and a different "perceived" IP address for RTP 944 reception. (Requirement 5 in section 4). 946 This approach has the following disadvantages when compared with the 947 symmetric RTP approach: 948 1. RTP traffic is normally accompanied by RTCP traffic. This 949 approach still needs to rely on RTCP RRs and SRs to enable NAT 950 traversal for RTCP endpoints, or use the same type of FW 951 messages for RTCP endpoints. 952 2. The server�s sender SSRC for the RTP stream must be signaled in 953 RTSP�s SETUP response, in the Transport header of the RTSP 954 SETUP response. 956 6.4. Application Level Gateways 958 6.4.1. Introduction 960 An Application Level Gateway (ALG) reads the application level 961 messages and performs necessary changes to allow the protocol to 962 work through the middle box. However this behavior has some problems 963 in regards to RTSP: 965 1. It does not work when the RTSP protocol is used with end-to-end 966 security. As the ALG can't inspect and change the application level 967 messages the protocol will fail due to the middle box. 969 2. ALGs need to be updated if extensions to the protocol are added. 970 Due to deployment issues with changing ALGs this may also break the 971 end-to-end functionality of RTSP. 973 Due to the above reasons it is NOT RECOMMENDED to use an RTSP ALG in 974 NATs. This is especially important for NATs targeted to home users 975 and small office environments, since it is very hard to upgrade NATs 976 deployed in home or SOHO (small office/home office) environment. 978 6.4.2. Guidelines On Writing ALGs for RTSP 979 In this section, we provide a step-by-step guideline on how one 980 should go about writing an ALG to enable RTSP to traverse a NAT. 982 1. Detect any SETUP request. 984 2. Try to detect the usage of any of the NAT traversal methods that 985 replace the address and port of the Transport header parameters 986 "destination" or "dest_addr". If any of these methods are used, 987 the ALG SHOULD NOT change the address. Ways to detect that these 988 methods are used are: 989 - For embedded STUN, watch for the feature tag "nat.stun". If any 990 of those exists in the "supported", "proxy-require", or "require" 991 headers of the RTSP exchange. 992 - For non-embedded STUN and TURN based solutions: This can in 993 some case be detected by inspecting the "destination" or 994 "dest_addr" parameter. If it contains either one of the NAT's 995 external IP addresses or a public IP address. However if multiple 996 NATs are used this detection may fail. 998 Otherwise continue to the next step. 1000 3. Create UDP mappings (client given IP/port <-> external IP/port) 1001 where needed for all possible transport specification in the 1002 transport header of the request found in (1). Enter the public 1003 address and port(s) of these mappings in transport header. 1004 Mappings SHALL be created with consecutive public port number 1005 starting on an even number for RTP for each media stream. 1006 Mappings SHOULD also be given a long timeout period, at least 5 1007 minutes. 1009 4. When the SETUP response is received from the server the ALG MAY 1010 remove the unused UDP mappings, i.e. the ones not present in the 1011 transport header. The session ID SHOULD also be bound to the UDP 1012 mappings part of that session. 1014 5. If SETUP response settles on RTP over TCP or RTP over RTSP as 1015 lower transport, do nothing: let TCP tunneling to take care of 1016 NAT traversal. Otherwise go to next step. 1018 6. The ALG SHOULD keep alive the UDP mappings belonging to the an 1019 RTSP session as long as: RTSP messages with the session's ID has 1020 been sent in the last timeout interval, or UDP messages are sent 1021 on any of the UDP mappings during the last timeout interval. 1023 7. The ALG MAY remove a mapping as soon a TEARDOWN response has been 1024 received for that media stream. 1026 6.4.3. Deployment Considerations 1028 Advantage: 1030 - No impact on either client or server 1031 - Can work for any type of NATs 1033 Disadvantage: 1035 - When deployed they are hard to update to reflect protocol 1036 modifications and extensions. If not updated they will break the 1037 functionality. 1038 - When end-to-end security is used the ALG functionality will fail. 1039 - Can interfere with other type of traversal mechanisms, such as 1040 STUN. 1042 Transition: 1044 An RTSP ALG will not be phased out in any automatically way. It must 1045 be removed, probably through the removal of the NAT it is associated 1046 with. 1048 6.4.4. Security Considerations 1050 An ALG will not work when deployment of end-to-end RTSP signaling 1051 security. Therefore deployment of ALG will result in that clients 1052 located behind NATs will not use end-to-end security. 1054 6.5. TCP Tunneling 1056 6.5.1. Introduction 1058 Using a TCP connection that is established from the client to the 1059 server ensures that the server can send data to the client. The 1060 connection opened from the private domain ensures that the server 1061 can send data back to the client. To send data originally intended 1062 to be transported over UDP requires the TCP connection to support 1063 some type of framing of the RTP packets. 1065 Using TCP also results in that the client has to accept that real- 1066 time performance may no longer be possible. TCP's problem of 1067 ensuring timely deliver was the reasons why RTP was developed. 1068 Problems that arise with TCP are: head-of-line blocking, delay 1069 introduced by retransmissions, highly varying congestion control. 1071 6.5.2. Usage of TCP tunneling in RTSP 1073 The RTSP core specification [7] supports interleaving of media data 1074 on the TCP connection that carries RTSP signaling. See section 10.13 1075 in [7] for how to perform this type of TCP tunneling. 1077 There is currently new work on one more way of transporting RTP over 1078 TCP in AVT and MMUSIC. For signaling and rules on how to establish 1079 the TCP connection in lieu of UDP, see [16]. Another draft describes 1080 how to frame RTP over the TCP connection is described in [17]. 1082 6.5.3. Deployment Considerations 1084 Advantage: 1086 - Works through all types of NATs where server is in the open. 1088 Disadvantage: 1090 - Functionality needs to be implemented on both server and client. 1091 - Will not always meet multimedia stream�s real-time requirements. 1093 Transition: 1095 The tunneling over RTSP's TCP connection is not planned to be phased 1096 -out. It is intended to be a fallback mechanism and for usage when 1097 total media reliability is desired, even at the price of loss of 1098 real-time properties. 1100 6.5.4. Security Considerations 1102 The TCP tunneling of RTP has no known security problem besides those 1103 already present in RTSP. It is not possible to get any amplification 1104 effect that is desired for denial of service attacks due to TCP's 1105 flow control. 1107 A possible security consideration, when session media data is 1108 interleaved with RTSP, would be the performance bottleneck when RTSP 1109 encryption is applied, since all session media data also needs to be 1110 encrypted. 1112 6.6. TURN (Traversal Using Relay NAT) 1114 6.6.1. Introduction 1116 Traversal Using Relay NAT (TURN) [8] is a protocol for setting up 1117 traffic relays that allows clients behind NATs and firewalls to 1118 receive incoming traffic for both UDP and TCP. These relays are 1119 controlled and have limited resources. They need to be allocated 1120 before usage. 1122 TURN allows a client to temporarily bind an address/port pair on the 1123 relay (TURN server) to its local source address/port pair, which is 1124 used to contact the TURN server. The TURN server will then forward 1125 packets between the two sides of the relay. To prevent DOS attacks 1126 on either recipient, the packets forwarded are restricted to the 1127 specific source address. On the client side it is restricted to the 1128 source setting up the mapping. On the external side this is limited 1129 to the source address/port pair of the first packet arriving on the 1130 binding. After the first packet has arrived the mapping is "locked 1131 down" to that address. Packets from any other source on this address 1132 will be discarded. 1134 Using a TURN server makes it possible for a RTSP client to receive 1135 media streams from even an unmodified RTSP server. However the 1136 problem is those RTSP servers most likely restrict media 1137 destinations to no other IP address than the one RTSP message 1138 arrives. This means that TURN could only be used if the server knows 1139 and accepts that the IP belongs to a TURN server and the TURN server 1140 can't be targeted at an unknown address. Unfortunately TURN servers 1141 can be targeted at any host that has a public IP address by spoofing 1142 the source IP of TURN Allocation requests. 1144 6.6.2. Usage of TURN with RTSP 1146 To use a TURN server for NAT traversal, the following steps should 1147 be performed. 1149 1. The RTSP client connects with RTSP server. The client retrieves 1150 the session description to determine the number of media streams. 1152 2. The client establishes the necessary bindings on the TURN server. 1153 It must choose the local RTP and RTCP ports that it desires to 1154 receive media packets. TURN supports requesting bindings of even 1155 port numbers and continuous ranges. 1157 3. The RTSP client uses the acquired address and port mappings in 1158 the RTSP SETUP request using the destination header. Note that 1159 the server is required to have a mechanism to verify that it is 1160 allowed to send media traffic to the given address. The server 1161 SHOULD include its RTP SSRC in the SETUP response. 1163 4. Client requests that the Server starts playing. The server starts 1164 sending media packet to the given destination address and ports. 1166 5. The first media packet to arrive at the TURN server on the 1167 external port causes "lock down"; then TURN server forwards the 1168 media packets to the RTSP client. 1170 6. When media arrives at the client, the client should try to verify 1171 that the media packets are from the correct RTSP server, by 1172 matching the RTP SSRC of the packet. Source IP address of this 1173 packet will be that of the TURN server and can therefore not be 1174 used to verify that the correct source has caused lock down. 1176 7. If the client notices that some other source has caused lock down 1177 on the TURN server, the client should create new bindings and 1178 change the session transport parameters to reflect the new 1179 bindings. 1181 8. If the client pauses and media are not sent for about 75% of the 1182 mapping timeout the client should use TURN to refresh the 1183 bindings. 1185 6.6.3. Deployment Considerations 1187 Advantages: 1189 - Does not require any server modifications. 1190 - Works for any types of NAT as long as the server has public 1191 reachable IP address. 1193 Disadvantage 1195 - TURN is not yet a standard. 1196 - Requires another network element, namely the TURN server. 1197 - Such a TURN server for RTSP is not scalable since the number of 1198 sessions it must forward is proportional to the number of client 1199 media sessions. 1200 - TURN server becomes a single point of failure. 1201 - Since TURN forwards media packets, it necessarily introduces 1202 delay. 1203 - Requires that the server can verify that the given destination 1204 address is valid to be used by the client. 1205 - An RTSP ALG MAY change the necessary destinations parameter. This 1206 will cause the media traffic to be sent to the wrong address. 1208 Transition: 1210 TURN is not intended to be phase-out completely, see chapter 11.2 of 1211 [8]. However the usage of TURN could be reduced when the demand for 1212 having NAT traversal is reduced. 1214 6.6.4. Security Considerations 1215 An eavesdropper of RTSP messages between the RTSP client and RTSP 1216 server will be able to do a simple denial of service attack on the 1217 media streams by sending messages to the destination address and 1218 port present in the RTSP SETUP messages. If the attacker�s message 1219 can reach the TURN server before the RTSP server's message, the lock 1220 down can be accomplished towards some other address. This will 1221 result in that the TURN server will drop all the media server's 1222 packets when they arrive. This can be accomplished with little risk 1223 for the attacker of being caught, as it can be performed with a 1224 spoofed source IP. The client may detect this attack when it 1225 receives the lock down packet sent by the attacker as being mal- 1226 formatted and not corresponding to the expected context. It will 1227 also notice the lack of incoming packets. See bullet 7 in section 1228 6.6.2. 1230 The TURN server can also become part of a denial of service attack 1231 towards any victim. To perform this attack the attacker must be able 1232 to eavesdrop on the packets from the TURN server towards a target 1233 for the DOS attack. The attacker uses the TURN server to setup a 1234 RTSP session with media flows going through the TURN server. The 1235 attacker is in fact creating TURN mappings towards a target by 1236 spoofing the source address of TURN requests. As the attacker will 1237 need the address of these mappings he must be able to eavesdrop or 1238 intercept the TURN responses going from the TURN server to the 1239 target. Having these addresses, he can set up a RTSP session and 1240 starts delivery of the media. The attacker must be able to create 1241 these mappings. The attacker in this case may be traced by the TURN 1242 username in the mapping requests. 1244 The first attack can be made very hard by applying transport 1245 security for the RTSP messages, which will hide the TURN servers 1246 address and port numbers from any eavesdropper. 1248 The second attack requires that the attacker have access to a user 1249 account on the TURN server to be able set up the TURN mappings. To 1250 prevent this attack the server shall verify that the target 1251 destination accept this media stream. 1253 7. Firewalls 1255 Firewalls exist for the purpose of protecting a network from traffic 1256 not desired by the firewall owner. Therefore it is a policy decision 1257 if a firewall will let RTSP and its media streams through or not. 1258 RTSP is designed to be firewall friendly in that it should be easy 1259 to design firewall policies to permit passage of RTSP traffic and 1260 its media streams. 1262 The firewall will need to allow the media streams associated with a 1263 RTSP session pass through it. Therefore the firewall will need an 1264 ALG that reads RTSP SETUP and TEARDOWN messages. By reading the 1265 SETUP message the firewall can determine what type of transport and 1266 from where the media streams will use. Commonly there will be the 1267 need to open UDP ports for RTP/RTCP. By looking at the source and 1268 destination addresses and ports the opening in the firewall can be 1269 minimized to the least necessary. The opening in the firewall can be 1270 closed after a teardown message for that session or the session 1271 itself times out. 1273 Simpler firewalls do allow a client to receive media as long as it 1274 has sent packets to the target. Depending on the security level this 1275 can have the same behavior as a full cone NAT or a Symmetric NAT. 1276 The only difference is that no address translation is done. To be 1277 able to use such a firewall a client would need to implement one of 1278 the above described NAT traversal methods that include sending 1279 packets to the server to open up the mappings. 1281 8. Comparison of Different NAT Traversal Techniques 1283 This section evaluates the techniques described above against the 1284 requirements listed in section 4. 1286 In the following table, the columns correspond to the numbered 1287 requirements. For instance, the column under R1 corresponds to the 1288 first requirement in section 4: MUST work for all flavors of NATs. 1290 The rows represent the different FW traversal techniques. SymRTP is 1291 short for symmetric RTP, "V.SymRTP" is short for "variation of 1292 symmetric RTP" as described in section 6.3.5. 1294 -----------------------------------------------+ 1295 | R1 | R2 | R3 | R4 | R5 | 1296 ------------+------+------+------+------+------+ 1297 STUN | Yes | Yes | No | Maybe| No | 1298 ------------+------+------+------+------+------+ 1299 ICE | Yes | Yes | No | No | Yes | 1300 ------------+------+------+------+------+------+ 1301 SymRTP | Yes | Yes | Yes |Maybe | No | 1302 ------------+------+------+------+------+------+ 1303 V. SymRTP | Yes | Yes | Yes | Yes |future| 1304 ------------+------+------+------+------+------+ 1305 TURN | Yes | Yes | No | No | Yes | 1306 -----------------------------------------------+ 1308 9. Open Issues 1310 Some open issues with this draft: 1312 - At some point we need to recommend one RTSP NAT solution so as to 1313 ensure implementations can inter-operate. This decision will 1314 require that requirements, security and desired goals be evaluated 1315 against implementation cost and the probability to get the final 1316 solution deployed. 1317 - The ALG recommendations need to be improved and clarified. 1318 - The firewall RTSP ALG recommendations need to be written as they 1319 are different from the NAT ALG in some perspectives. 1321 10. Security Consideration 1323 In preceding sessions we have discussed security merits of each and 1324 every NAT/FW traversal methods for RTSP. In summary, the presence of 1325 NAT(s) is a security risk, as a client cannot perform source 1326 authentication of its IP address. This prevents the deployment of 1327 any future RTSP extensions providing security against hijacking of 1328 sessions by a man-in-the-middle. 1330 Each of the proposed solutions has security implications. 1332 Using STUN will provide the same level of security as RTSP with out 1333 transport level security and source authentications; as long as the 1334 server does not grant a client request to send media to different IP 1335 addresses. 1337 Using symmetric RTP will have a slightly higher risk of session 1338 hijacking than normal RTSP. The reason is that there exists a 1339 probability that an attacker is able to guess the random tag that 1340 the client uses to prove its identity when creating the address 1341 bindings. This can be solved in the variation of symmetric RTP 1342 (section 6.3.5) with authentication features. 1344 The usage of an RTSP ALG does not increase in itself the risk for 1345 session hijacking. However the deployment of ALGs as sole mechanism 1346 for RTSP NAT traversal will prevent deployment of encrypted end-to- 1347 end RTSP signaling. 1349 The usage of TCP tunneling has no known security problems. However 1350 it might provide a bottleneck when it comes to end-to-end RTSP 1351 signaling security if TCP tunneling is used on an interleaved RTSP 1352 signaling connection. 1354 The usage of TURN has high risk of denial of service attacks against 1355 a client. The TURN server can also be used as a redirect point in a 1356 DDOS attack unless the server has strict enough rules for who may 1357 create bindings. 1359 11. IANA Consideration 1360 This specification does not define any protocol extensions hence no 1361 IANA action is requested. 1363 12. Acknowledgments 1365 The author would also like to thank all persons on the MMUSIC 1366 working group's mailing list that has commented on this 1367 specification. Persons having contributed in such way in no special 1368 order to this protocol are: Jonathan Rosenberg, Philippe Gentric, 1369 Tom Marshall, David Yon, Amir Wolf, Anders Klemets, and Colin 1370 Perkins. Thomas Zeng would also like to give special thanks to Greg 1371 Sherwood of PacketVideo for his input into this memo. 1373 13. Author's Addresses 1375 Magnus Westerlund Tel: +46 8 4048287 1376 Ericsson Research Email: Magnus.Westerlund@ericsson.com 1377 Ericsson AB 1378 Torshamnsgatan 23 1379 SE-164 80 Stockholm, SWEDEN 1381 Thomas Zeng Tel: 1-858-320-3125 1382 PacketVideo Network Solutions Email: zeng@pvnetsolutions.com 1383 9605 Scranton Rd., Suite 400 1384 San Diego, CA92121 1386 14. References 1388 14.1. Normative references 1390 [1] H. Schulzrinne, et. al., "Real Time Streaming Protocol (RTSP)", 1391 IETF RFC 2326, April 1998. 1392 [2] M. Handley, V. Jacobson, "Session Description Protocol (SDP)", 1393 IETF RFC 2327, April 1998. 1394 [3] D. Crocker and P. Overell, "Augmented BNF for syntax 1395 specifications: ABNF," RFC 2234, Internet Engineering Task 1396 Force, Nov. 1997. 1397 [4] S. Bradner, "Key words for use in RFCs to Indicate Requirement 1398 Levels", RFC 2119, March 1997. 1399 [5] H. Schulzrinne, et. al., "RTP: A Transport Protocol for Real- 1400 Time Applications", STD 64, RFC 3550, IETF, July 2003. 1401 [6] J. Rosenberg, et. Al., " STUN - Simple Traversal of UDP Through 1402 Network Address Translators", IETF RFC 3489, March 2003 1403 [7] H. Schulzrinne, et. al., "Real Time Streaming Protocol (RTSP)", 1404 draft-ietf-mmusic-rfc2326bis-06.txt, IETF draft, Feb 2004, work 1405 in progress. 1406 [8] J. Rosenberg, et. Al., "Traversal Using Relay NAT (TURN)", 1407 draft-rosenberg-midcom-turn-04.txt, IETF draft, Feb 2004, work 1408 in progress. 1409 [9] J. Rosenberg, "Interactive Connectivity Establishment (ICE): A 1410 Methodology for Network Address Translator (NAT) Traversal for 1411 the Session Initiation Protocol (SIP)," draft-ietf-mmusic-ice- 1412 01, IETF draft, February 2004, work in progress. 1413 [10] G. Camarillo, et. al., "Grouping of Media Lines in the Session 1414 Description Protocol (SDP)," IETF RFC 3388, December 2002. 1415 [11] G. Camarillo, J. Rosenberg, "The Alternative Network Address 1416 Types Semantics (ANAT) for the Session Description Protocol 1417 (SDP) Grouping Framework," draft-camarillo-mmusic-anat-01.txt, 1418 IETF draft, June 2004, work in progress. 1420 14.2. Informative References 1422 [12] P. Srisuresh, K. Egevang, "Traditional IP Network Address 1423 Translator (Traditional NAT)," RFC 3022, Internet Engineering 1424 Task Force, January 2001. 1425 [13] Tsirtsis, G. and Srisuresh, P., "Network Address Translation - 1426 Protocol Translation (NAT-PT)", RFC 2766, Internet Engineering 1427 Task Force, February 2000. 1428 [14] S. Deering and R. Hinden, "Internet Protocol, Version 6 (IPv6) 1429 Specification", RFC 2460, Internet Engineering Task Force, 1430 December 1998. 1432 [15] J. Postel, "internet protocol", RFC 791, Internet Engineering 1433 Task Force, September 1981. 1434 [16] D. Yon, G. Camarillo, "Connection-Oriented Media Transport in 1435 the Session Description Protocol (SDP)", IETF draft, draft- 1436 ietf-mmusic-sdp-comedia-07.txt, June 2004. 1437 [17] John Lazzaro, "Framing RTP and RTCP Packets over Connection- 1438 Oriented Transport", IETF Draft, draft-ietf-avt-rtp-framing- 1439 contrans-03.txt, July 2004. 1440 [18] D. Daigle, "IAB Considerations for UNilateral Self-Address 1441 Fixing (UNSAF) Across Network Address Translation", RFC 3424, 1442 Internet Engineering Task Force, Nov. 2002 1443 [19] R. Finlayason, "IP Multicast and Firewalls", RFC 2588, Internet 1444 Engineering Task Force, May 1999 1445 [20] Krawczyk, H., Bellare, M., and Canetti, R.: "HMAC: Keyed- 1446 hashing for message authentication". IETF RFC 2104, February 1447 1997 1448 [21] Open Source STUN Server and Client, 1449 http://www.vovida.org/applications/downloads/stun/index.html 1450 [22] Zeng, T.M.: "Mapping ICE (Interactive Connectivity 1451 Establishment) to RTSP", IETF draft, draft-zeng-mmusic-map-ice- 1452 rtsp-00.txt, Feb 2004 1453 [23] Dan Wing, et.al. "RTP No-Op Payload Format", draft-wing-avt- 1454 rtp-noop-00.txt, March 2004 1455 [24] P. Srisuresh and M.Holdrege, "IP Network Address Translator 1456 (NAT) Terminology and Considerations", RFC2663, Internet 1457 Engineering Task Force, Aug. 1999 1458 [25] J. Rosenberg, C. Huitema and R. Mahy, "STUN - Simple Traversal 1459 of UDP Through Network Address Translators", draft-rosenberg- 1460 rfc3489bis-00.txt, July 2004 1462 15. IPR Notice 1464 The IETF takes no position regarding the validity or scope of any 1465 Intellectual Property Rights or other rights that might be claimed 1466 to pertain to the implementation or use of the technology described 1467 in this document or the extent to which any license under such 1468 rights might or might not be available; nor does it represent that 1469 it has made any independent effort to identify any such rights. 1470 Information on the procedures with respect to rights in RFC 1471 documents can be found in BCP 78 and BCP 79. 1473 Copies of IPR disclosures made to the IETF Secretariat and any 1474 assurances of licenses to be made available, or the result of an 1475 attempt made to obtain a general license or permission for the use 1476 of such proprietary rights by implementers or users of this 1477 specification can be obtained from the IETF on-line IPR repository 1478 at http://www.ietf.org/ipr. 1480 The IETF invites any interested party to bring to its attention any 1481 copyrights, patents or patent applications, or other proprietary 1482 rights that may cover technology that may be required to implement 1483 this standard. Please address the information to the IETF at ietf- 1484 ipr@ietf.org. 1486 16. Copyright Notice 1488 Copyright (C) The Internet Society (2004). This document is subject 1489 to the rights, licenses and restrictions contained in BCP 78, and 1490 except as set forth therein, the authors retain all their rights. 1492 This document and the information contained herein are provided on 1493 an "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE 1494 REPRESENTS OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE 1495 INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR 1496 IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF 1497 THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED 1498 WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. 1500 This Internet-Draft expires in January 2005.