Internet Engineering Task Force (IETF) M. Westerlund Request for Comments: 7604 Ericsson Category: Informational T. Zeng ISSN: 2070-1721 PacketVideo Corp September 2015
Internet Engineering Task Force (IETF) M. Westerlund Request for Comments: 7604 Ericsson Category: Informational T. Zeng ISSN: 2070-1721 PacketVideo Corp September 2015
Comparison of Different NAT Traversal Techniques for Media Controlled by the Real-Time Streaming Protocol (RTSP)
实时流协议(RTSP)控制媒体的不同NAT穿越技术比较
Abstract
摘要
This document describes several Network Address Translator (NAT) traversal techniques that were considered to be used for establishing the RTP media flows controlled by the Real-Time Streaming Protocol (RTSP). Each technique includes a description of how it would be used, the security implications of using it, and any other deployment considerations it has. There are also discussions on how NAT traversal techniques relate to firewalls and how each technique can be applied in different use cases. These findings were used when selecting the NAT traversal for RTSP 2.0, which is specified in a separate document.
本文档描述了几种网络地址转换器(NAT)遍历技术,这些技术被认为用于建立由实时流协议(RTSP)控制的RTP媒体流。每种技术都包括如何使用它的描述、使用它的安全含义以及它所具有的任何其他部署注意事项。还讨论了NAT穿越技术如何与防火墙相关,以及每种技术如何应用于不同的用例。在为RTSP 2.0选择NAT遍历时使用了这些发现,这在单独的文档中有详细说明。
Status of This Memo
关于下段备忘
This document is not an Internet Standards Track specification; it is published for informational purposes.
本文件不是互联网标准跟踪规范;它是为了提供信息而发布的。
This document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Not all documents approved by the IESG are a candidate for any level of Internet Standard; see Section 2 of RFC 5741.
本文件是互联网工程任务组(IETF)的产品。它代表了IETF社区的共识。它已经接受了公众审查,并已被互联网工程指导小组(IESG)批准出版。并非IESG批准的所有文件都适用于任何级别的互联网标准;见RFC 5741第2节。
Information about the current status of this document, any errata, and how to provide feedback on it may be obtained at http://www.rfc-editor.org/info/rfc7604.
有关本文件当前状态、任何勘误表以及如何提供反馈的信息,请访问http://www.rfc-editor.org/info/rfc7604.
Copyright Notice
版权公告
Copyright (c) 2015 IETF Trust and the persons identified as the document authors. All rights reserved.
版权所有(c)2015 IETF信托基金和确定为文件作者的人员。版权所有。
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.
本文件受BCP 78和IETF信托有关IETF文件的法律规定的约束(http://trustee.ietf.org/license-info)自本文件出版之日起生效。请仔细阅读这些文件,因为它们描述了您对本文件的权利和限制。从本文件中提取的代码组件必须包括信托法律条款第4.e节中所述的简化BSD许可证文本,并提供简化BSD许可证中所述的无担保。
Table of Contents
目录
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 4 1.1. Network Address Translators . . . . . . . . . . . . . . . 5 1.2. Firewalls . . . . . . . . . . . . . . . . . . . . . . . . 6 1.3. Glossary . . . . . . . . . . . . . . . . . . . . . . . . 7 2. Detecting the Loss of NAT Mappings . . . . . . . . . . . . . 8 3. Requirements on Solutions . . . . . . . . . . . . . . . . . . 9 4. NAT-Traversal Techniques . . . . . . . . . . . . . . . . . . 10 4.1. Stand-Alone STUN . . . . . . . . . . . . . . . . . . . . 11 4.1.1. Introduction . . . . . . . . . . . . . . . . . . . . 11 4.1.2. Using STUN to Traverse NAT without Server Modifications . . . . . . . . . . . . . . . . . . . . 11 4.1.3. ALG Considerations . . . . . . . . . . . . . . . . . 14 4.1.4. Deployment Considerations . . . . . . . . . . . . . . 14 4.1.5. Security Considerations . . . . . . . . . . . . . . . 15 4.2. Server Embedded STUN . . . . . . . . . . . . . . . . . . 16 4.2.1. Introduction . . . . . . . . . . . . . . . . . . . . 16 4.2.2. Embedding STUN in RTSP . . . . . . . . . . . . . . . 16 4.2.3. Discussion on Co-located STUN Server . . . . . . . . 17 4.2.4. ALG Considerations . . . . . . . . . . . . . . . . . 17 4.2.5. Deployment Considerations . . . . . . . . . . . . . . 18 4.2.6. Security Considerations . . . . . . . . . . . . . . . 19 4.3. ICE . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 4.3.1. Introduction . . . . . . . . . . . . . . . . . . . . 19 4.3.2. Using ICE in RTSP . . . . . . . . . . . . . . . . . . 20 4.3.3. Implementation Burden of ICE . . . . . . . . . . . . 21 4.3.4. ALG Considerations . . . . . . . . . . . . . . . . . 22 4.3.5. Deployment Considerations . . . . . . . . . . . . . . 22 4.3.6. Security Considerations . . . . . . . . . . . . . . . 23
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 4 1.1. Network Address Translators . . . . . . . . . . . . . . . 5 1.2. Firewalls . . . . . . . . . . . . . . . . . . . . . . . . 6 1.3. Glossary . . . . . . . . . . . . . . . . . . . . . . . . 7 2. Detecting the Loss of NAT Mappings . . . . . . . . . . . . . 8 3. Requirements on Solutions . . . . . . . . . . . . . . . . . . 9 4. NAT-Traversal Techniques . . . . . . . . . . . . . . . . . . 10 4.1. Stand-Alone STUN . . . . . . . . . . . . . . . . . . . . 11 4.1.1. Introduction . . . . . . . . . . . . . . . . . . . . 11 4.1.2. Using STUN to Traverse NAT without Server Modifications . . . . . . . . . . . . . . . . . . . . 11 4.1.3. ALG Considerations . . . . . . . . . . . . . . . . . 14 4.1.4. Deployment Considerations . . . . . . . . . . . . . . 14 4.1.5. Security Considerations . . . . . . . . . . . . . . . 15 4.2. Server Embedded STUN . . . . . . . . . . . . . . . . . . 16 4.2.1. Introduction . . . . . . . . . . . . . . . . . . . . 16 4.2.2. Embedding STUN in RTSP . . . . . . . . . . . . . . . 16 4.2.3. Discussion on Co-located STUN Server . . . . . . . . 17 4.2.4. ALG Considerations . . . . . . . . . . . . . . . . . 17 4.2.5. Deployment Considerations . . . . . . . . . . . . . . 18 4.2.6. Security Considerations . . . . . . . . . . . . . . . 19 4.3. ICE . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 4.3.1. Introduction . . . . . . . . . . . . . . . . . . . . 19 4.3.2. Using ICE in RTSP . . . . . . . . . . . . . . . . . . 20 4.3.3. Implementation Burden of ICE . . . . . . . . . . . . 21 4.3.4. ALG Considerations . . . . . . . . . . . . . . . . . 22 4.3.5. Deployment Considerations . . . . . . . . . . . . . . 22 4.3.6. Security Considerations . . . . . . . . . . . . . . . 23
4.4. Latching . . . . . . . . . . . . . . . . . . . . . . . . 23 4.4.1. Introduction . . . . . . . . . . . . . . . . . . . . 23 4.4.2. Necessary RTSP Extensions . . . . . . . . . . . . . . 24 4.4.3. ALG Considerations . . . . . . . . . . . . . . . . . 25 4.4.4. Deployment Considerations . . . . . . . . . . . . . . 25 4.4.5. Security Considerations . . . . . . . . . . . . . . . 26 4.5. A Variation to Latching . . . . . . . . . . . . . . . . . 27 4.5.1. Introduction . . . . . . . . . . . . . . . . . . . . 27 4.5.2. Necessary RTSP Extensions . . . . . . . . . . . . . . 28 4.5.3. ALG Considerations . . . . . . . . . . . . . . . . . 28 4.5.4. Deployment Considerations . . . . . . . . . . . . . . 28 4.5.5. Security Considerations . . . . . . . . . . . . . . . 29 4.6. Three-Way Latching . . . . . . . . . . . . . . . . . . . 29 4.6.1. Introduction . . . . . . . . . . . . . . . . . . . . 29 4.6.2. Necessary RTSP Extensions . . . . . . . . . . . . . . 29 4.6.3. ALG Considerations . . . . . . . . . . . . . . . . . 30 4.6.4. Deployment Considerations . . . . . . . . . . . . . . 30 4.6.5. Security Considerations . . . . . . . . . . . . . . . 30 4.7. Application Level Gateways . . . . . . . . . . . . . . . 31 4.7.1. Introduction . . . . . . . . . . . . . . . . . . . . 31 4.7.2. Outline on How ALGs for RTSP Work . . . . . . . . . . 31 4.7.3. Deployment Considerations . . . . . . . . . . . . . . 32 4.7.4. Security Considerations . . . . . . . . . . . . . . . 33 4.8. TCP Tunneling . . . . . . . . . . . . . . . . . . . . . . 33 4.8.1. Introduction . . . . . . . . . . . . . . . . . . . . 33 4.8.2. Usage of TCP Tunneling in RTSP . . . . . . . . . . . 34 4.8.3. ALG Considerations . . . . . . . . . . . . . . . . . 34 4.8.4. Deployment Considerations . . . . . . . . . . . . . . 34 4.8.5. Security Considerations . . . . . . . . . . . . . . . 35 4.9. Traversal Using Relays around NAT (TURN) . . . . . . . . 35 4.9.1. Introduction . . . . . . . . . . . . . . . . . . . . 35 4.9.2. Usage of TURN with RTSP . . . . . . . . . . . . . . . 36 4.9.3. ALG Considerations . . . . . . . . . . . . . . . . . 37 4.9.4. Deployment Considerations . . . . . . . . . . . . . . 37 4.9.5. Security Considerations . . . . . . . . . . . . . . . 37 5. Firewalls . . . . . . . . . . . . . . . . . . . . . . . . . . 38 6. Comparison of NAT Traversal Techniques . . . . . . . . . . . 39 7. Security Considerations . . . . . . . . . . . . . . . . . . . 41 8. Informative References . . . . . . . . . . . . . . . . . . . 42 Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . 45 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 46
4.4. Latching . . . . . . . . . . . . . . . . . . . . . . . . 23 4.4.1. Introduction . . . . . . . . . . . . . . . . . . . . 23 4.4.2. Necessary RTSP Extensions . . . . . . . . . . . . . . 24 4.4.3. ALG Considerations . . . . . . . . . . . . . . . . . 25 4.4.4. Deployment Considerations . . . . . . . . . . . . . . 25 4.4.5. Security Considerations . . . . . . . . . . . . . . . 26 4.5. A Variation to Latching . . . . . . . . . . . . . . . . . 27 4.5.1. Introduction . . . . . . . . . . . . . . . . . . . . 27 4.5.2. Necessary RTSP Extensions . . . . . . . . . . . . . . 28 4.5.3. ALG Considerations . . . . . . . . . . . . . . . . . 28 4.5.4. Deployment Considerations . . . . . . . . . . . . . . 28 4.5.5. Security Considerations . . . . . . . . . . . . . . . 29 4.6. Three-Way Latching . . . . . . . . . . . . . . . . . . . 29 4.6.1. Introduction . . . . . . . . . . . . . . . . . . . . 29 4.6.2. Necessary RTSP Extensions . . . . . . . . . . . . . . 29 4.6.3. ALG Considerations . . . . . . . . . . . . . . . . . 30 4.6.4. Deployment Considerations . . . . . . . . . . . . . . 30 4.6.5. Security Considerations . . . . . . . . . . . . . . . 30 4.7. Application Level Gateways . . . . . . . . . . . . . . . 31 4.7.1. Introduction . . . . . . . . . . . . . . . . . . . . 31 4.7.2. Outline on How ALGs for RTSP Work . . . . . . . . . . 31 4.7.3. Deployment Considerations . . . . . . . . . . . . . . 32 4.7.4. Security Considerations . . . . . . . . . . . . . . . 33 4.8. TCP Tunneling . . . . . . . . . . . . . . . . . . . . . . 33 4.8.1. Introduction . . . . . . . . . . . . . . . . . . . . 33 4.8.2. Usage of TCP Tunneling in RTSP . . . . . . . . . . . 34 4.8.3. ALG Considerations . . . . . . . . . . . . . . . . . 34 4.8.4. Deployment Considerations . . . . . . . . . . . . . . 34 4.8.5. Security Considerations . . . . . . . . . . . . . . . 35 4.9. Traversal Using Relays around NAT (TURN) . . . . . . . . 35 4.9.1. Introduction . . . . . . . . . . . . . . . . . . . . 35 4.9.2. Usage of TURN with RTSP . . . . . . . . . . . . . . . 36 4.9.3. ALG Considerations . . . . . . . . . . . . . . . . . 37 4.9.4. Deployment Considerations . . . . . . . . . . . . . . 37 4.9.5. Security Considerations . . . . . . . . . . . . . . . 37 5. Firewalls . . . . . . . . . . . . . . . . . . . . . . . . . . 38 6. Comparison of NAT Traversal Techniques . . . . . . . . . . . 39 7. Security Considerations . . . . . . . . . . . . . . . . . . . 41 8. Informative References . . . . . . . . . . . . . . . . . . . 42 Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . 45 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 46
Today there is a proliferating deployment of different types of Network Address Translator (NAT) boxes that in many cases only loosely follow standards [RFC3022] [RFC2663] [RFC3424] [RFC4787] [RFC5382]. NATs cause discontinuity in address realms [RFC3424]; therefore, an application protocol, such as the Real-Time Streaming Protocol (RTSP) [RFC2326] [RTSP], needs to deal with such discontinuities caused by NATs. The problem is that, being a media control protocol managing one or more media streams, RTSP carries network address and port information within its protocol messages. Because of this, even if RTSP itself, when carried over the Transmission Control Protocol (TCP) [RFC793], for example, is not blocked by NATs, its media streams may be blocked by NATs. This will occur unless special protocol provisions are added to support NAT traversal.
如今,不同类型的网络地址转换器(NAT)盒的部署越来越多,在许多情况下,它们只是松散地遵循标准[RFC3022][RFC2663][RFC3424][RFC4787][RFC5382]。NAT导致地址域不连续[RFC3424];因此,诸如实时流协议(RTSP)[RFC2326][RTSP]之类的应用协议需要处理由nat引起的这种不连续性。问题在于,作为管理一个或多个媒体流的媒体控制协议,RTSP在其协议消息中携带网络地址和端口信息。因此,即使RTSP本身在通过传输控制协议(TCP)[RFC793]传输时未被NAT阻止,其媒体流也可能被NAT阻止。除非添加特殊协议条款以支持NAT遍历,否则将发生这种情况。
Like NATs, firewalls are also middleboxes that need to be considered. Firewalls help prevent unwanted traffic from getting in or out of the protected network. RTSP is designed such that a firewall can be configured to let RTSP-controlled media streams go through with limited implementation effort. The effort needed is to implement an Application Level Gateway (ALG) to interpret RTSP parameters. There is also a large class of firewalls, commonly home firewalls, that use a filtering behavior that appears to be the same as what NATs have. This type of firewall will be successfully traversed using the same solution as employed for NAT traversal, instead of relying on an RTSP ALG. Therefore, firewalls will also be discussed and some important differences highlighted.
与NAT一样,防火墙也是需要考虑的中间包。防火墙有助于防止不必要的流量进出受保护的网络。RTSP的设计使防火墙可以配置为允许RTSP控制的媒体流通过,而实施工作有限。所需的工作是实现应用程序级网关(ALG)来解释RTSP参数。还有一大类防火墙,通常是家庭防火墙,它们使用的过滤行为似乎与NAT相同。这种类型的防火墙将使用与NAT穿越相同的解决方案成功穿越,而不是依赖RTSP ALG。因此,还将讨论防火墙,并强调一些重要的区别。
This document describes several NAT traversal mechanisms for RTSP-controlled media streaming. Many of these NAT solutions fall into the category of "UNilateral Self-Address Fixing (UNSAF)" as defined in [RFC3424] and quoted below:
本文档描述了RTSP控制的媒体流的几种NAT遍历机制。许多NAT解决方案属于[RFC3424]中定义的“单边自定址(UNSAF)”,如下所述:
[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.
[UNSAF]是一个过程,其中一些发起过程试图确定或修复已知的地址(和端口)-例如,能够在协议交换中使用地址数据,或播发将从中接收连接的公共地址。
Following the guidelines spelled out in RFC 3424, we describe the required RTSP extensions for each method, transition strategies, and security concerns. The transition strategies are a discussion of how and if the method encourages a move towards not having any NATs on the path.
按照RFC 3424中阐述的指导原则,我们描述了每种方法所需的RTSP扩展、转换策略和安全问题。过渡策略讨论了该方法如何以及是否鼓励在路径上不使用任何NAT。
This document is capturing the evaluation done in the process to recommend firewall/NAT traversal methods for RTSP streaming servers based on [RFC2326] as well as the RTSP 2.0 core specification [RTSP]. The evaluation is focused on NAT traversal for the media streams carried over the User Datagram Protocol (UDP) [RFC768] with RTP [RFC3550] over UDP being the main case for such usage. The findings should be applicable to other protocols as long as they have similar properties.
本文档记录了为基于[RFC2326]以及RTSP 2.0核心规范[RTSP]的RTSP流式服务器推荐防火墙/NAT穿越方法的过程中所做的评估。评估的重点是通过用户数据报协议(UDP)[RFC768]承载的媒体流的NAT遍历,UDP上的RTP[RFC3550]是此类使用的主要情况。这些发现应该适用于其他协议,只要它们具有相似的属性。
At the time when the bulk of work on this document was done, a single level of NAT was the dominant deployment for NATs, and multiple levels of NATs, including Carrier-Grade NATs (CGNs), were not considered. Thus, any characterizations or findings may not be applicable in such scenarios, unless CGN or multiple levels of NATs are explicitly noted.
在完成本文档的大部分工作时,单一级别的NAT是NAT的主要部署,而多个级别的NAT(包括舰载级NAT(CGN))未被考虑。因此,除非明确指出CGN或多级NAT,否则任何特征或发现可能不适用于此类场景。
An RTSP NAT traversal mechanism based on Interactive Connectivity Establishment (ICE) is specified in "A Network Address Translator (NAT) Traversal Mechanism for Media Controlled by Real-Time Streaming Protocol (RTSP)" [RTSP-NAT].
“实时流协议(RTSP)控制的媒体的网络地址转换器(NAT)遍历机制”[RTSP-NAT]中规定了基于交互式连接建立(ICE)的RTSP NAT遍历机制。
We begin by reviewing two quotes from Section 3 in "Network Address Translation (NAT) Behavioral Requirements for Unicast UDP" [RFC4787] concerning NATs and their terminology:
我们首先回顾“单播UDP的网络地址转换(NAT)行为要求”[RFC4787]第3节中有关NAT及其术语的两段引用:
Readers are urged to refer to [RFC2663] for information on NAT taxonomy and terminology. Traditional NAT is the most common type of NAT device deployed. Readers may refer to [RFC3022] for detailed information on traditional NAT. Traditional NAT has two main varieties -- Basic NAT and Network Address/Port Translator (NAPT).
有关NAT分类和术语的信息,请读者参考[RFC2663]。传统NAT是部署的最常见的NAT设备类型。读者可参考[RFC3022]了解传统NAT的详细信息。传统的NAT主要有两种:基本NAT和网络地址/端口转换器(NAPT)。
NAPT is by far the most commonly deployed NAT device. NAPT allows multiple internal hosts to share a single public IP address simultaneously. When an internal host opens an outgoing TCP or UDP session through a NAPT, the NAPT assigns the session a public IP address and port number, so that subsequent response packets from the external endpoint can be received by the NAPT, translated, and forwarded to the internal host. The effect is that the NAPT establishes a NAT session to translate the (private IP address, private port number) tuple to a (public IP address, public port number) tuple, and vice versa, for the duration of the session. An issue of relevance to peer-to-peer applications is how the NAT behaves when an internal host initiates multiple simultaneous sessions from a single (private IP, private port) endpoint to multiple distinct endpoints on the external network.
NAPT是目前最常用的NAT设备。NAPT允许多个内部主机同时共享一个公共IP地址。当内部主机通过NAPT打开传出TCP或UDP会话时,NAPT会为会话分配公共IP地址和端口号,以便NAPT可以接收、转换并转发到内部主机的来自外部端点的后续响应数据包。其效果是NAPT建立NAT会话,在会话期间将(私有IP地址、私有端口号)元组转换为(公共IP地址、公共端口号)元组,反之亦然。与对等应用程序相关的一个问题是,当内部主机从单个(专用IP、专用端口)端点向外部网络上的多个不同端点同时发起多个会话时,NAT的行为如何。
In this specification, the term "NAT" refers to both "Basic NAT" and "Network Address/Port Translator (NAPT)".
在本规范中,术语“NAT”指的是“基本NAT”和“网络地址/端口转换器(NAPT)”。
This document uses the term "Address and Port Mapping" as the translation between an external address and port and an internal address and port. Note that this is not the same as an "address binding" as defined in RFC 2663.
本文档使用术语“地址和端口映射”作为外部地址和端口与内部地址和端口之间的转换。请注意,这与RFC 2663中定义的“地址绑定”不同。
Note: In the above text, it would be more correct to use an external IP address instead of a public IP address. The external IP address is commonly a public one, but it might be of another type if the NAT's external side is in a private address domain.
注意:在上面的文本中,使用外部IP地址而不是公共IP地址更为正确。外部IP地址通常是公共地址,但如果NAT的外部端位于私有地址域中,则可能是另一种类型。
In addition to the above quote, there exists a number of address and port mapping behaviors described in more detail in Section 4.1 of [RFC4787] that are highly relevant to the discussion in this document.
除上述引用外,[RFC4787]第4.1节中更详细地描述了许多地址和端口映射行为,这些行为与本文档中的讨论高度相关。
NATs also have a filtering behavior on traffic arriving on the external side. Such behavior affects how well different methods for NAT traversal works through these NATs. See Section 5 of [RFC4787] for more information on the different types of filtering that have been identified.
NAT对到达外部的流量也有过滤行为。这种行为会影响不同的NAT遍历方法在这些NAT中的工作情况。有关已识别的不同过滤类型的更多信息,请参见[RFC4787]第5节。
A firewall is a security gateway that enforces certain access control policies between two network administrative domains: a private domain (intranet) and an external domain, e.g., the Internet. Many organizations use firewalls to prevent intrusions and malicious attacks on computing resources in the private intranet [RFC2588].
防火墙是一种安全网关,它在两个网络管理域(私有域(intranet)和外部域(例如Internet)之间实施某些访问控制策略。许多组织使用防火墙来防止对私有intranet中计算资源的入侵和恶意攻击[RFC2588]。
A comparison between NAT and a firewall is given below:
NAT与防火墙的比较如下:
1. A firewall sits at security enforcement/protection points, while NAT sits at borders between two address domains.
1. 防火墙位于安全强制/保护点,而NAT位于两个地址域之间的边界。
2. NAT does not in itself provide security, although some access control policies can be implemented using address translation schemes. The inherent filtering behaviors are commonly mistaken for real security policies.
2. NAT本身并不提供安全性,尽管一些访问控制策略可以使用地址转换方案实现。固有的过滤行为通常被误认为是真正的安全策略。
It should be noted that many NAT devices intended for Residential or Small Office, Home Office (SOHO) use include both NATs and firewall functionality.
应该注意的是,许多用于住宅或小型办公室、家庭办公室(SOHO)的NAT设备包括NAT和防火墙功能。
Address-Dependent Mapping: The NAT reuses the port mapping for subsequent packets sent from the same internal IP address and port to the same external IP address, regardless of the external port; see [RFC4787].
地址相关映射:NAT将端口映射用于从相同的内部IP地址和端口发送到相同的外部IP地址的后续数据包,而不考虑外部端口;见[RFC4787]。
Address and Port-Dependent Mapping: The NAT reuses the port mapping for subsequent packets sent from the same internal IP address and port to the same external IP address and port while the mapping is still active; see [RFC4787].
与地址和端口相关的映射:NAT在映射仍处于活动状态时,对从相同的内部IP地址和端口发送到相同的外部IP地址和端口的后续数据包重用端口映射;见[RFC4787]。
ALG: Application Level Gateway is an entity that can be embedded in a NAT or other middlebox to perform the application layer functions required for a particular protocol to traverse the NAT/middlebox.
ALG:应用层网关是一个实体,可以嵌入NAT或其他中间盒中,以执行特定协议穿越NAT/中间盒所需的应用层功能。
Endpoint-Independent Mapping: The NAT reuses the port mapping for subsequent packets sent from the same internal IP address and port to any external IP address and port; see [RFC4787].
端点无关映射:NAT重用端口映射,用于从相同的内部IP地址和端口发送到任何外部IP地址和端口的后续数据包;见[RFC4787]。
ICE: Interactive Connectivity Establishment; see [RFC5245].
ICE:交互式连接建立;见[RFC5245]。
DNS: Domain Name Service
域名服务
DoS: Denial of Service
拒绝服务
DDoS: Distributed Denial of Service
分布式拒绝服务
NAT: Network Address Translator; see [RFC3022].
NAT:网络地址转换器;参见[RFC3022]。
NAPT: Network Address/Port Translator; see [RFC3022].
NAPT:网络地址/端口转换器;参见[RFC3022]。
RTP: Real-Time Transport Protocol; see [RFC3550].
实时传输协议;见[RFC3550]。
RTSP: Real-Time Streaming Protocol; see [RFC2326] and [RTSP].
RTSP:实时流协议;参见[RFC2326]和[RTSP]。
RTT: Round Trip Times
RTT:往返时间
SDP: Session Description Protocol; see [RFC4566].
会话描述协议;见[RFC4566]。
SSRC: Synchronization source in RTP; see [RFC3550].
SSRC:RTP中的同步源;见[RFC3550]。
Several NAT traversal techniques in the next chapter make use of the fact that the NAT UDP mapping's external address and port can be 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 [RFC3424] 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 RFC 3424.
下一章中的几种NAT遍历技术利用了可以发现NAT UDP映射的外部地址和端口这一事实。然后利用该信息遍历NAT框。然而,只有当映射仍然有效时,任何此类信息才是好的。正如IAB的UNSAF文档[RFC3424]所指出的,映射可以超时,也可以更改其属性。因此,根据RFC 3424,NAT穿越解决方案处理NAT映射的丢失或更改非常重要。
First, since NATs may also dynamically reclaim or readjust address/ port translations, "keep-alive" and periodic repolling may be required according to RFC 3424. Second, it is possible to detect and recover from the situation where the mapping has been changed or removed. The loss of a mapping can be detected when no traffic arrives for a while. Below we will give some recommendations on how to detect the loss of NAT mappings when using RTP/RTCP under RTSP control.
首先,由于NAT还可以动态地回收或重新调整地址/端口转换,根据RFC 3424,可能需要“保持活动”和定期重新填充。其次,可以检测映射已更改或删除的情况并从中恢复。当一段时间内没有流量到达时,可以检测到映射丢失。下面我们将给出一些关于如何在RTSP控制下使用RTP/RTCP时检测NAT映射丢失的建议。
An RTP session normally has both RTP and RTCP streams. The loss of an RTP mapping can only be detected when expected traffic does not arrive. If a client does not receive media data within a few seconds after having received the "200 OK" response to an RTSP PLAY request that starts the media delivery, it may be the result of a middlebox blocking the traffic. However, for a receiver to be more certain to detect the case where no RTP traffic was delivered due to NAT trouble, one should monitor the RTCP Sender reports if they are received and not also blocked. The sender report carries a field telling how many packets the server has sent. If that has increased and no RTP packets have arrived for a few seconds, it is likely the mapping for the RTP stream has been removed.
RTP会话通常同时具有RTP和RTCP流。RTP映射的丢失只能在预期流量未到达时检测到。如果客户端在收到RTSP播放请求的“200 OK”响应(启动媒体传送)后几秒钟内未接收到媒体数据,则可能是由于中间盒阻塞了通信量。然而,为了让接收方更确定地检测到由于NAT故障而没有传递RTP通信量的情况,应该监控RTCP发送方报告,如果它们被接收并且没有被阻止。sender报告包含一个字段,告诉服务器已发送多少数据包。如果这增加了,并且几秒钟内没有RTP数据包到达,则RTP流的映射可能已被删除。
The loss of mapping for RTCP is simpler to detect. 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 lost. Note that if neither RTCP packets nor RTSP messages are received by the RTSP server for a while (default 60 seconds), the RTSP server has the option to delete the corresponding RTP session, SSRC and RTSP session ID, because either the client can not get through a middlebox NAT/firewall, or the client is malfunctioning.
RTCP的映射丢失更容易检测。RTCP通常在每个方向上定期发送,即使在RTSP就绪状态下也是如此。如果RTCP数据包在几个RTCP间隔内丢失,则映射可能丢失。请注意,如果RTSP服务器在一段时间内(默认为60秒)未收到RTCP数据包或RTSP消息,RTSP服务器可以选择删除相应的RTP会话、SSRC和RTSP会话ID,因为客户端无法通过中间箱NAT/防火墙,或者客户端出现故障。
This section considers the set of requirements for the evaluation of RTSP NAT traversal solutions.
本节考虑评估RTSP NAT穿越解决方案的一系列要求。
RTSP is a client-server protocol. Typically, service providers deploy RTSP servers on the Internet or otherwise reachable address realm. However, there are use cases where the reverse is true: RTSP clients are connecting from any address realm to RTSP servers behind NATs, e.g., in a home. 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. In terms of requirements, the primary issue to solve is the RTSP NAT traversal problem for RTSP servers deployed in a network where the server is on the external side of any NAT, i.e., the server is not behind a NAT. The server behind a NAT is desirable but of much lower priority.
RTSP是一种客户机-服务器协议。通常,服务提供商在Internet或其他可访问的地址域上部署RTSP服务器。然而,也有相反的情况:RTSP客户端从任何地址域连接到NAT后面的RTSP服务器,例如在家中。例如,当作为RTSP服务器运行的家庭监控摄像机打算通过家庭NAT向公共广播领域的手机用户传输视频时,就是这种情况。就需求而言,要解决的主要问题是RTSP服务器的RTSP NAT遍历问题,该服务器部署在任何NAT的外部,即服务器不在NAT后面的网络中。NAT背后的服务器是理想的,但优先级要低得多。
Important considerations for any NAT traversal technique are whether any protocol modifications are needed and where the implementation burden resides (e.g., server, client, or middlebox). If the incentive to get RTSP to work over a NAT is sufficient, it will motivate the owner of the server, client, or middlebox to update, configure, or otherwise perform changes to the device and its software in order to support NAT traversal. Thus, the questions of who this burden falls on and how big it is are highly relevant.
任何NAT穿越技术的重要考虑因素是是否需要修改任何协议以及实现负担所在的位置(例如,服务器、客户端或中间件)。如果让RTSP在NAT上工作的动机足够,它将激励服务器、客户端或中间盒的所有者更新、配置或以其他方式对设备及其软件进行更改,以支持NAT遍历。因此,这个负担落在谁身上以及有多大的问题是高度相关的。
The list of feature requirements for RTSP NAT solutions are given below:
RTSP NAT解决方案的功能要求列表如下:
1. Must work for all flavors of NATs, including NATs with Address and Port-Dependent Filtering.
1. 必须适用于所有类型的NAT,包括带有地址和端口相关过滤的NAT。
2. Must work for firewalls (subject to pertinent firewall administrative policies), including those with ALGs.
2. 必须适用于防火墙(根据相关防火墙管理政策),包括使用ALG的防火墙。
3. Should have minimal impact on clients not behind NATs and that are not dual hosted. RTSP dual hosting means that the RTSP signaling protocol and the media protocol (e.g., RTP) are implemented on different computers with different IP addresses.
3. 应该对不在NAT后面并且不是双主机的客户端产生最小的影响。RTSP双重托管意味着RTSP信令协议和媒体协议(如RTP)在具有不同IP地址的不同计算机上实现。
* For instance, no extra protocol RTT before arrival of media.
* 例如,在介质到达之前没有额外的协议RTT。
4. Should be simple to use/implement/administer so people actually turn them on.
4. 应该易于使用/实施/管理,以便人们真正打开它们。
* Discovery of the address(es) assigned by NAT should happen automatically, if possible.
* 如果可能,NAT分配的地址的发现应该自动进行。
5. Should authenticate dual-hosted client's media transport receiver to prevent usage of RTSP servers for DDoS attacks.
5. 应验证双主机客户端的媒体传输接收器,以防止使用RTSP服务器进行DDoS攻击。
The last requirement addresses the Distributed Denial-of-Service (DDoS) threat, which relates to NAT traversal as explained below.
最后一项要求涉及分布式拒绝服务(DDoS)威胁,该威胁与NAT穿越有关,如下所述。
During NAT traversal, when the RTSP server determines the media destination (address and port) for the client, the result may be that the IP address of the RTP receiver host is different than the IP address of the RTSP client host. This poses a DDoS threat that has significant amplification potentials because the RTP media streams in general consist of a large number of IP packets. DDoS attacks can occur if the attacker can fake the messages in the NAT traversal mechanism to trick the RTSP server into believing that the client's RTP receiver is located on a host to be attacked. For example, user A may use his RTSP client to direct the RTSP server to send video RTP streams to target.example.com in order to degrade the services provided by target.example.com.
在NAT遍历期间,当RTSP服务器确定客户端的媒体目的地(地址和端口)时,结果可能是RTP接收器主机的IP地址不同于RTSP客户端主机的IP地址。由于RTP媒体流通常由大量IP数据包组成,因此这构成了具有显著放大潜力的DDoS威胁。如果攻击者可以在NAT遍历机制中伪造消息,诱使RTSP服务器相信客户端的RTP接收器位于要攻击的主机上,则可能发生DDoS攻击。例如,用户A可以使用其RTSP客户端来指示RTSP服务器向target.example.com发送视频RTP流,以便降低target.example.com提供的服务。
Note that a simple mitigation is for the RTSP server to disallow the cases where the client's RTP receiver has a different IP address than that of the RTSP client. This is recommended behavior in RTSP 2.0 unless other solutions to prevent this attack are present; see Section 21.2.1 in [RTSP]. With the increased deployment of NAT middleboxes by operators, i.e., CGN, the reuse of an IP address on the NAT's external side by many customers reduces the protection provided. Also in some applications (e.g., centralized conferencing), dual-hosted RTSP/RTP clients have valid use cases. The key is how to authenticate the messages exchanged during the NAT traversal process.
请注意,一个简单的缓解措施是RTSP服务器不允许客户端的RTP接收器的IP地址与RTSP客户端的IP地址不同的情况。这是RTSP 2.0中的推荐行为,除非存在防止此攻击的其他解决方案;参见[RTSP]中的第21.2.1节。随着运营商(即CGN)增加NAT中间盒的部署,许多客户在NAT的外部重新使用IP地址,减少了提供的保护。此外,在某些应用程序中(例如,集中式会议),双主机RTSP/RTP客户端具有有效的用例。关键是如何验证NAT遍历过程中交换的消息。
There exists 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 costs are also different. They also vary in security levels. In the following sections, each technique is outlined with discussions on the corresponding advantages and disadvantages.
有许多潜在的NAT遍历技术可用于允许RTSP遍历NAT。它们具有不同的特点,适用于不同的拓扑结构;它们的成本也不同。它们的安全级别也各不相同。在以下各节中,将概述每种技术,并讨论相应的优缺点。
The survey of traversal techniques was done prior to 2007 and is based on what was available then. This section includes NAT traversal techniques that have not been formally specified anywhere else. This document may be the only publicly available specification of some of the NAT traversal techniques. However, that is not a real barrier against doing an evaluation of the NAT traversal techniques. Some techniques used as part of some of the traversal solutions have been recommended against or are no longer possible due to the outcome
遍历技术的调查是在2007年之前完成的,并以当时可用的技术为基础。本节包括其他地方未正式指定的NAT遍历技术。本文档可能是某些NAT穿越技术的唯一公开规范。然而,这并不是对NAT穿越技术进行评估的真正障碍。作为某些遍历解决方案的一部分使用的一些技术已被推荐为不适用,或者由于结果而不再可能使用
of standardization work or their failure to progress within IETF after the initial evaluation in this document. For example, RTP No-Op [RTP-NO-OP] was a proposed RTP payload format that failed to be specified; thus, it is not available for use today. In each such case, the missing parts will be noted and some basic reasons will be given.
在本文件中进行初步评估后,标准化工作或其未能在IETF内取得进展。例如,RTP No Op[RTP-No-Op]是一种未指定的拟议RTP有效负载格式;因此,它今天无法使用。在每种情况下,都会注意到缺失的部分,并给出一些基本原因。
Session Traversal Utilities for NAT (STUN) [RFC5389] is a standardized protocol that allows a client to use secure means to discover the presence of a NAT between itself and the STUN server. The client uses the STUN server to discover the address and port mappings assigned by the NAT. Then using the knowledge of these NAT mappings, it uses the external addresses to directly connect to the independent RTSP server. However, this is only possible if the NAT address and port mapping behavior is such that the STUN server and RTSP server will see the same external address and port for the same internal address and port.
NAT会话遍历实用程序(STUN)[RFC5389]是一种标准化协议,允许客户端使用安全手段来发现自身和STUN服务器之间存在的NAT。客户端使用STUN服务器来发现NAT分配的地址和端口映射。然后利用这些NAT映射的知识,它使用外部地址直接连接到独立的RTSP服务器。但是,只有当NAT地址和端口映射行为使STUN服务器和RTSP服务器能够看到相同内部地址和端口的相同外部地址和端口时,才有可能实现这一点。
STUN is a client-server protocol. The STUN client sends a request to a STUN server and the server returns a response. There are two types of STUN messages -- Binding Requests and Indications. Binding Requests are used when determining a client's external address and soliciting a response from the STUN server with the seen address. Indications are used by the client for keep-alive messages towards the server and requires no response from the server.
STUN是一种客户机-服务器协议。STUN客户端向STUN服务器发送请求,服务器返回响应。有两种类型的STUN消息——绑定请求和指示。在确定客户端的外部地址并请求STUN服务器使用所看到的地址进行响应时,将使用绑定请求。客户机使用指示向服务器发送保持活动状态的消息,不需要服务器响应。
The first version of STUN [RFC3489] included categorization and parameterization of NATs. This was abandoned in the updated version [RFC5389] due to it being unreliable and brittle. This particular traversal method uses the removed functionality described in RFC 3489 to detect the NAT type to give an early failure indication when the NAT is showing the behavior that this method can't support. This method also suggests using the RTP No-Op payload format [RTP-NO-OP] for keep-alives of the RTP traffic in the client-to-server direction. This can be replaced with another form of UDP packet as will be further discussed below.
STUN的第一个版本[RFC3489]包括NAT的分类和参数化。由于不可靠且易碎,更新版本[RFC5389]中放弃了该功能。此特定的遍历方法使用RFC 3489中描述的已删除功能来检测NAT类型,以便在NAT显示此方法无法支持的行为时给出早期故障指示。此方法还建议使用RTP No-Op有效负载格式[RTP-No-Op],以保持客户端到服务器方向上的RTP流量有效。这可以用另一种形式的UDP数据包代替,下面将进一步讨论。
This section describes how a client can use STUN to traverse NATs to RTSP servers without requiring server modifications. Note that 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).
本节介绍客户机如何使用STUN将NAT遍历到RTSP服务器,而无需修改服务器。请注意,此方法的适用性有限,并且要求服务器在外部/公共地址领域中对位于NAT后面的客户端可用。
Limitations:
限制:
o The server must be located in either a public address realm or the next-hop external address realm in regards to the client.
o 对于客户端,服务器必须位于公共地址域或下一跳外部地址域中。
o The client may only be located behind NATs that perform Endpoint-Independent or Address-Dependent Mappings (the STUN server and RTSP server on the same IP address). Clients behind NATs that do Address and Port-Dependent Mappings cannot use this method. See [RFC4787] for the full definition of these terms.
o 客户机只能位于执行端点无关或地址相关映射的NAT后面(同一IP地址上的STUN服务器和RTSP服务器)。NAT后面进行地址和端口相关映射的客户端不能使用此方法。有关这些术语的完整定义,请参见[RFC4787]。
o Based on the discontinued middlebox classification of the replaced STUN specification [RFC3489]; thus, it is brittle and unreliable.
o 基于替换的STUN规范[RFC3489]的中断的中间盒分类;因此,它是脆弱和不可靠的。
Method:
方法:
An RTSP client using RTP transport over UDP can use STUN to traverse a NAT(s) in the following way:
使用UDP上的RTP传输的RTSP客户端可以使用STUN以以下方式遍历NAT:
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.
1. 使用STUN尝试发现NAT的类型以及NAT上任何UDP映射的超时时间。建议在IP连接建立后立即在后台执行此操作。如果这是在建立流式会话之前执行的,则会话建立中的延迟将减少。如果未检测到NAT,则应使用正常设置。
2. The RTSP client determines the number of UDP ports needed by counting the number of needed media transport protocols sessions in the multimedia presentation. This information is available in the media description protocol, e.g., SDP [RFC4566]. For example, each RTP session will in general require two UDP ports: one for RTP, and one for RTCP.
2. RTSP客户端通过计算多媒体演示文稿中所需的媒体传输协议会话数来确定所需的UDP端口数。该信息在媒体描述协议中可用,例如SDP[RFC4566]。例如,每个RTP会话通常需要两个UDP端口:一个用于RTP,一个用于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: client's local address/port <-> public address/port.
3. 对于所需的每个UDP端口,在STUN服务器的帮助下建立映射并发现公共/外部IP地址和端口号。成功的映射如下所示:客户端的本地地址/端口<->公共地址/端口。
4. Perform the RTSP SETUP for each media. In the Transport header, the following parameter should be included with the given values: "dest_addr" [RTSP] or "destination" + "client_port" [RFC2326] with the public/external IP address and port pair for both RTP and RTCP. To be certain that this works, servers must allow a client to set up the RTP stream on any port, not only even ports and with non-contiguous port numbers for RTP and RTCP. This requires the new feature provided in RTSP 2.0 [RTSP]. The server should respond with a Transport header containing an "src_addr"
4. 为每个介质执行RTSP设置。在传输标头中,以下参数应包含在给定值中:“dest_addr”[RTSP]或“destination”+“client_port”[RFC2326],其中包含RTP和RTCP的公共/外部IP地址和端口对。为了确保这一点,服务器必须允许客户机在任何端口上设置RTP流,而不仅仅是偶数端口以及RTP和RTCP的非连续端口号。这需要RTSP 2.0[RTSP]中提供的新功能。服务器应使用包含“src_addr”的传输头进行响应
or "source" + "server_port" parameters with the RTP and RTCP source IP address and port of the media stream.
或“source”+“server_port”参数,带有媒体流的RTP和RTCP源IP地址和端口。
5. To keep the mappings alive, the client should periodically send UDP traffic over all mappings needed for the session. For the mapping carrying RTCP traffic, the periodic RTCP traffic is likely enough. For mappings carrying RTP traffic and for mappings carrying RTCP packets at too low of a frequency, keep-alive messages should be sent.
5. 要使映射保持活动状态,客户端应定期通过会话所需的所有映射发送UDP通信。对于承载RTCP流量的映射,周期性RTCP流量可能就足够了。对于承载RTP流量的映射和承载RTCP数据包的映射,频率过低时,应发送保持活动的消息。
If a UDP mapping is lost, 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 cause a glitch in media playback.
如果UDP映射丢失,则必须重复上述发现过程。还需要再次设置媒体流,以将传输参数更改为新参数。这将导致媒体播放出现故障。
To allow UDP packets to arrive from the server to a client behind an Address-Dependent or Address and Port-Dependent Filtering NAT, the client must first send a UDP packet to establish the filtering state in the NAT. The client, before sending an RTSP PLAY request, must send a so-called hole-punching packet on each mapping to the IP address and port given as the server's source address and port. For a NAT that only is Address-Dependent Filtering, the hole-punching packet could be sent to the server's discard port (port number 9). For Address and Port-Dependent Filtering NATs, the hole-punching packet must go to the port used for sending UDP packets to the client. To be able to do that, the server needs to include the "src_addr" in the Transport header (which is the "source" transport parameter in RFC2326). Since UDP packets are inherently unreliable, to ensure that at least one UDP message passes the NAT, hole-punching packets should be retransmitted a reasonable number of times.
要允许UDP数据包从服务器到达地址相关或地址和端口相关过滤NAT后面的客户端,客户端必须首先发送UDP数据包以在NAT中建立过滤状态。在发送RTSP播放请求之前,客户端必须在每个映射上发送一个所谓的打孔数据包,并将其发送到作为服务器源地址和端口给定的IP地址和端口。对于仅为地址相关过滤的NAT,穿孔数据包可以发送到服务器的丢弃端口(端口号9)。对于依赖于地址和端口的过滤NAT,穿孔数据包必须转到用于向客户端发送UDP数据包的端口。要做到这一点,服务器需要在传输头中包含“src_addr”(这是RFC2326中的“source”传输参数)。由于UDP数据包本质上是不可靠的,为了确保至少有一条UDP消息通过NAT,穿孔数据包应该被重新传输合理的次数。
One could have used RTP No-Op packets [RTP-NO-OP] as hole-punching and keep-alive messages had they been defined. That would have ensured that the traffic would look like RTP and thus would likely have the least risk of being dropped by any firewall. The drawback of using RTP No-Op is that the payload type number must be dynamically assigned through RTSP first. Other options are STUN, an RTP packet without any payload, or a UDP packet without any payload. For RTCP it is most suitable to use correctly generated RTCP packets. In general, sending unsolicited traffic to the RTSP server may trigger security functions resulting in the blocking of the keep-alive messages or termination of the RTSP session itself.
如果定义了RTP No-Op数据包[RTP-No-Op],则可以将其用作穿孔和保持活动状态的消息。这将确保流量看起来像RTP,因此可能被任何防火墙丢弃的风险最小。使用RTP No Op的缺点是必须首先通过RTSP动态分配有效负载类型号。其他选项包括STUN、不带任何负载的RTP数据包或不带任何负载的UDP数据包。对于RTCP,最适合使用正确生成的RTCP数据包。通常,向RTSP服务器发送未经请求的通信量可能会触发安全功能,从而导致保持活动消息的阻塞或RTSP会话本身的终止。
This method is further brittle as it doesn't support Address and Port-Dependent Mappings. Thus, it proposes to use the old STUN methods to classify the NAT behavior, thus enabling early error indication. This is strictly not required but will lead to failures during setup when the NAT has the wrong behavior. This failure can
此方法更加脆弱,因为它不支持与地址和端口相关的映射。因此,它建议使用旧的STUN方法对NAT行为进行分类,从而实现早期错误指示。这是严格不需要的,但当NAT有错误的行为时,将导致安装过程中的失败。这种失败可以
also occur if the NAT changes the properties of the existing mapping and filtering state or between the classification message exchange and the actual RTSP session setup, for example, due to load.
如果NAT更改现有映射和筛选状态的属性,或者由于负载等原因在分类消息交换和实际RTSP会话设置之间更改属性,也会发生这种情况。
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 NAT external 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. An ALG should not update address fields that contain addresses other than the NAT's internal address domain. In cases where the ALG modifies fields unnecessarily, two alternatives exist:
如果NAT支持RTSP ALG(应用程序级网关),并且不知道STUN遍历选项,则可能会发生服务故障,因为客户端会发现其NAT外部IP地址和端口号,并将其插入其设置请求中。当RTSP ALG处理设置请求时,它可能会更改目标和端口号,从而导致不可预测的行为。ALG不应更新包含NAT内部地址域以外地址的地址字段。如果ALG不必要地修改字段,则存在两种备选方案:
1. Use Transport Layer Security (TLS) to encrypt the data over the RTSP TCP connection to prevent the ALG from reading and modifying the RTSP messages.
1. 使用传输层安全性(TLS)通过RTSP TCP连接加密数据,以防止ALG读取和修改RTSP消息。
2. Turn off the STUN-based NAT traversal mechanism.
2. 关闭基于STUN的NAT遍历机制。
As it may be difficult to determine why the failure occurs, the usage of TLS-protected RTSP message exchange at all times would avoid this issue.
由于可能难以确定故障发生的原因,因此始终使用受TLS保护的RTSP消息交换可以避免此问题。
For the stand-alone usage of STUN, the following applies:
对于STUN的独立使用,以下内容适用:
Advantages:
优势:
o STUN is a solution first used by applications based on SIP [RFC3261] (see Sections 1 and 2 of [RFC5389]). As shown above, with little or no changes, the RTSP application can reuse STUN as a NAT traversal solution, avoiding the pitfall of solving a problem twice.
o STUN是基于SIP[RFC3261]的应用程序首次使用的解决方案(见[RFC5389]第1节和第2节)。如上所示,RTSP应用程序只需很少或不做任何更改,就可以将STUN重用为NAT遍历解决方案,避免了两次解决问题的陷阱。
o Using STUN does not require RTSP server modifications, assuming it is a server that is compliant with RTSP 2.0; it only affects the client implementation.
o 使用STUN不需要修改RTSP服务器,假设它是符合RTSP 2.0的服务器;它只影响客户端实现。
Disadvantages:
缺点:
o Requires a STUN server deployed in the same address domain as the server.
o 需要在与服务器相同的地址域中部署STUN服务器。
o Only works with NATs that perform Endpoint-Independent and Address-Dependent Mappings. Address and Port-Dependent Filtering NATs create some issues.
o 仅适用于执行端点独立和地址依赖映射的NAT。地址和端口相关的过滤NAT会产生一些问题。
o Brittle to NATs changing the properties of the NAT mapping and filtering.
o 更改NAT映射和过滤的属性会导致NAT的脆弱性。
o Does not work with Address and Port-Dependent Mapping NATs without server modifications.
o 在不修改服务器的情况下,无法使用与地址和端口相关的映射NAT。
o Will not work if a NAT uses multiple IP addresses, since RTSP servers generally require all media streams to use the same IP as used in the RTSP connection to prevent becoming a DDoS tool.
o 如果NAT使用多个IP地址,则将不起作用,因为RTSP服务器通常要求所有媒体流使用RTSP连接中使用的相同IP,以防止成为DDoS工具。
o Interaction problems exist when an RTSP-aware ALG interferes with the use of STUN for NAT traversal unless TLS-secured RTSP message exchange is used.
o 当RTSP感知ALG干扰STUN用于NAT遍历时,存在交互问题,除非使用TLS安全的RTSP消息交换。
o Using STUN requires that RTSP servers and clients support the updated RTSP specification [RTSP], 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 RFC 2326.
o 使用STUN要求RTSP服务器和客户端支持更新的RTSP规范[RTSP],因为无法再按照RFC 2326中“客户端端口”和“服务器端口”参数的要求保证RTP和RTCP端口彼此相邻。
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.
STUN的使用可以逐步停止,因为具备STUN功能的服务器或客户端的第一步应该是检查NAT的存在。在客户端实现中删除STUN功能必须等到完全不需要使用STUN时。
To prevent the RTSP server from being used as Denial-of-Service (DoS) attack tools, the RTSP Transport header parameters "destination" and "dest_addr" are generally not allowed to point to any IP address other than the one the RTSP message originates from. The RTSP server is only prepared to make an exception to this rule when the client is 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 a restriction means that STUN in general does not work for use cases where RTSP and media transport go to different addresses.
为了防止RTSP服务器被用作拒绝服务(DoS)攻击工具,RTSP传输头参数“destination”和“dest_addr”通常不允许指向RTSP消息来源以外的任何IP地址。RTSP服务器仅准备在客户端受信任时对此规则进行例外(例如,通过使用安全身份验证过程或通过质疑目的地以验证其接受RTP通信的意愿的某种安全方法)。这种限制意味着STUN通常不适用于RTSP和媒体传输到不同地址的用例。
STUN combined with RTSP that is restricted by destination address has the same security properties as the core RTSP. It is protected from being used as a DoS attack tool unless the attacker has the ability to spoof the TCP connection carrying RTSP messages.
STUN与受目标地址限制的RTSP相结合,具有与核心RTSP相同的安全属性。除非攻击者能够欺骗携带RTSP消息的TCP连接,否则它不会被用作DoS攻击工具。
Using STUN's support for message authentication and the secure transport of RTSP messages, attackers cannot modify STUN responses or RTSP messages (TLS) to change the media destination. This protects against hijacking; however, as a client can be the initiator of an attack, these mechanisms cannot securely prevent RTSP servers from being used as DoS attack tools.
利用STUN对消息身份验证和RTSP消息安全传输的支持,攻击者无法修改STUN响应或RTSP消息(TLS)来更改媒体目标。这可以防止劫持;但是,由于客户端可能是攻击的发起方,这些机制无法安全地防止RTSP服务器被用作DoS攻击工具。
This section describes an alternative to the stand-alone STUN usage in the previous section that has quite significantly different behavior.
本节介绍了一种替代上一节中单独使用的眩晕方法,该方法的行为有很大不同。
This section outlines the adaptation and embedding of STUN within RTSP. This enables STUN to be used to traverse any type of NAT, including Address and Port-Dependent Mapping NATs. This would require RTSP-level protocol changes.
本节概述了STUN在RTSP中的适应和嵌入。这使STUN能够用于遍历任何类型的NAT,包括地址和端口相关映射NAT。这需要更改RTSP级别的协议。
This NAT traversal solution has limitations:
此NAT穿越解决方案有以下限制:
1. It does not work if both the RTSP client and RTSP server are behind separate NATs.
1. 如果RTSP客户端和RTSP服务器都位于单独的NAT后面,则此功能不起作用。
2. The RTSP server may, for security reasons, refuse to send media streams to an IP that is different from the IP in the client RTSP requests.
2. 出于安全原因,RTSP服务器可能会拒绝向与客户端RTSP请求中的IP不同的IP发送媒体流。
Deviations from STUN as defined in RFC 5389:
与RFC 5389中定义的STUN的偏差:
1. The RTSP application must provision the client with an identity and shared secret to use in the STUN authentication;
1. RTSP应用程序必须为客户端提供身份和共享机密,以便在STUN身份验证中使用;
2. We require the STUN server to be co-located on the RTSP server's media source ports.
2. 我们要求STUN服务器位于RTSP服务器的媒体源端口上。
If the STUN server is co-located with the RTSP server's media source port, an RTSP client using RTP transport over UDP can use STUN to traverse ALL types of NATs. In the case of Address and Port-Dependent Mapping NATs, the party on the inside of the NAT must initiate UDP traffic. The STUN Binding 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 (however, only one of them can be behind a NAT).
如果STUN服务器与RTSP服务器的媒体源端口位于同一位置,则使用UDP上的RTP传输的RTSP客户端可以使用STUN遍历所有类型的NAT。在地址和端口相关映射NAT的情况下,NAT内部的一方必须发起UDP通信。STUN绑定请求本身就是一个UDP数据包,可以用作流量发起数据包。随后,STUN绑定响应数据包和RTP/RTCP数据包都可以穿越NAT,而不管RTSP服务器或RTSP客户端是否在NAT后面(但是,它们中只有一个可以在NAT后面)。
Likewise, if an RTSP server is behind a NAT, then an embedded STUN server must be co-located on the RTSP client's RTCP port. Also, it will become the client that needs to disclose his destination address rather than the server, so the server can correctly determine its NAT external source address for the media streams. In this case, we assume that the client has some means of establishing a TCP connection to the RTSP server behind NAT so as to exchange RTSP messages with the RTSP server, potentially using a proxy or static rules.
同样,如果RTSP服务器位于NAT后面,则嵌入式STUN服务器必须位于RTSP客户端的RTCP端口上。此外,它将成为需要公开其目标地址的客户端,而不是服务器,因此服务器可以正确确定其媒体流的NAT外部源地址。在这种情况下,我们假设客户机有某种方法可以在NAT后面建立到RTSP服务器的TCP连接,以便使用代理或静态规则与RTSP服务器交换RTSP消息。
To minimize delay, we require that the RTSP server supporting this option must inform the client about the RTP and RTCP ports from where the server will send out RTP and RTCP packets, respectively. This can be done by using the "server_port" parameter in RFC 2326 and the "src_addr" parameter in [RTSP]. Both are in the RTSP Transport header. But in general, this strategy will require that one first does one SETUP request per media to learn the server ports, then perform the STUN checks, followed by a subsequent SETUP to change the client port and destination address to what was learned during the STUN checks.
为了最大限度地减少延迟,我们要求支持此选项的RTSP服务器必须通知客户端服务器将分别从中发送RTP和RTCP数据包的RTP和RTCP端口。这可以通过使用RFC 2326中的“server_port”参数和[RTSP]中的“src_addr”参数来实现。两者都位于RTSP传输标头中。但通常情况下,此策略需要先对每个介质执行一次设置请求以了解服务器端口,然后执行STUN检查,然后执行后续设置以将客户端端口和目标地址更改为STUN检查期间了解到的内容。
To be certain that RTCP works correctly, the RTSP endpoint (server or client) will be required to send and receive RTCP packets from the same port.
为确保RTCP正常工作,需要RTSP端点(服务器或客户端)从同一端口发送和接收RTCP数据包。
In order to use STUN to traverse Address and Port-Dependent Filtering or Mapping NATs, the STUN server needs to be co-located with the streaming server media output ports. This creates a demultiplexing problem: we must be able to differentiate a STUN packet from a media packet. This will be done based on heuristics. The existing STUN heuristics is the first byte in the packet and the Magic Cookie field (added in RFC 5389), which works fine between STUN and RTP or RTCP where the first byte happens to be different. Thanks to the Magic Cookie field, it is unlikely that other protocols would be mistaken for a STUN packet, but this is not assured. For more discussion of this, please see Section 5.1.2 of [RFC5764].
为了使用STUN遍历地址和端口相关的过滤或映射NAT,STUN服务器需要与流媒体服务器的媒体输出端口位于同一位置。这就产生了一个解复用问题:我们必须能够区分STUN数据包和媒体数据包。这将基于启发式进行。现有的STUN启发式算法是数据包中的第一个字节和Magic Cookie字段(添加在RFC 5389中),该字段在STUN和RTP或RTCP之间工作良好,其中第一个字节恰好不同。多亏了Magic Cookie字段,其他协议不太可能被误认为是STUN数据包,但这一点并不确定。有关这方面的更多讨论,请参见[RFC5764]第5.1.2节。
The same ALG traversal considerations as for stand-alone STUN applies (Section 4.1.3).
适用与单机STUN相同的ALG遍历注意事项(第4.1.3节)。
For the "Embedded STUN" method the following applies:
对于“嵌入式STUN”方法,以下内容适用:
Advantages:
优势:
o STUN is a solution first used by SIP applications. As shown above, with little or no changes, the RTSP application can reuse STUN as a NAT traversal solution, avoiding the pitfall of solving a problem twice.
o STUN是SIP应用程序首次使用的解决方案。如上所示,RTSP应用程序只需很少或不做任何更改,就可以将STUN重用为NAT遍历解决方案,避免了两次解决问题的陷阱。
o STUN has built-in message authentication features, which makes it more secure against hijacking attacks. See the next section for an in-depth security discussion.
o STUN具有内置的消息身份验证功能,这使它更安全地抵御劫持攻击。有关深入的安全性讨论,请参见下一节。
o This solution works as long as there is only one RTSP endpoint in the private address realm, regardless of the NAT's type. There may even be multiple NATs (see Figure 1 in [RFC5389]).
o 只要私有地址域中只有一个RTSP端点,无论NAT的类型如何,此解决方案都可以工作。甚至可能有多个NAT(参见[RFC5389]中的图1)。
o Compared to other UDP-based NAT traversal methods in this document, STUN requires little new protocol development (since STUN is already an IETF standard), and most likely less implementation effort, since open source STUN server and client implementations are available [STUN-IMPL] [PJNATH].
o 与本文档中其他基于UDP的NAT遍历方法相比,STUN几乎不需要新的协议开发(因为STUN已经是IETF标准),而且很可能需要更少的实现工作,因为可以使用开源STUN服务器和客户端实现[STUN-IMPL][PJNAH]。
Disadvantages:
缺点:
o Some extensions to the RTSP core protocol, likely signaled by RTSP feature tags, must be introduced.
o 必须引入RTSP核心协议的一些扩展,这些扩展可能由RTSP功能标签发出信号。
o Requires an embedded STUN server to be co-located on each of the RTSP server's media protocol's ports (e.g., RTP and RTCP ports), which means more processing is required to demultiplex STUN packets from media packets. For example, the demultiplexer must be able to differentiate an RTCP RR packet from a STUN packet and forward the former to the streaming server and the latter to the STUN server.
o 要求嵌入式STUN服务器位于RTSP服务器的每个媒体协议端口(例如RTP和RTCP端口)上,这意味着需要进行更多处理才能将STUN数据包与媒体数据包解复用。例如,解复用器必须能够区分RTCP RR数据包和STUN数据包,并将前者转发给流媒体服务器,后者转发给STUN服务器。
o Does not support use cases that require the RTSP connection and the media reception to happen at different addresses, unless the server's security policy is relaxed.
o 不支持要求RTSP连接和媒体接收在不同地址发生的用例,除非服务器的安全策略放宽。
o Interaction problems exist when an RTSP ALG is not aware of STUN unless TLS is used to protect the RTSP messages.
o 当RTSP ALG不知道STUN时,存在交互问题,除非使用TLS保护RTSP消息。
o Using STUN requires that RTSP servers and clients support the updated RTSP specification [RTSP], and they both agree to support the NAT traversal feature.
o 使用STUN需要RTSP服务器和客户端支持更新的RTSP规范[RTSP],并且它们都同意支持NAT遍历功能。
o Increases the setup delay with at least the amount of time it takes to perform STUN message exchanges. Most likely an extra SETUP sequence will be required.
o 增加设置延迟,至少增加执行STUN消息交换所需的时间。很可能需要额外的设置顺序。
Transition:
过渡:
The usage of STUN can be phased out gradually as the first step of a STUN-capable machine can be used 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, i.e., no NATs or firewalls.
STUN的使用可以逐步停止,因为可以使用具有STUN功能的机器的第一步来检查当前使用的网络连接是否存在NAT。在客户端实现中删除STUN功能必须等到完全不需要使用STUN,即不需要NAT或防火墙。
See Stand-Alone STUN (Section 4.1.5).
参见独立电击(第4.1.5节)。
Interactive Connectivity Establishment (ICE) [RFC5245] is a methodology for NAT traversal that has been developed for SIP using SDP offer/answer. The basic idea is to try, in a staggered parallel fashion, all possible connection addresses in which an endpoint may be reached. This allows the endpoint to use the best available UDP "connection" (meaning two UDP endpoints capable of reaching each other). The methodology has very nice properties in that basically all NAT topologies are possible to traverse.
交互式连接建立(ICE)[RFC5245]是一种NAT穿越方法,该方法已使用SDP提供/应答为SIP开发。基本思想是以交错并行的方式尝试所有可能到达端点的连接地址。这允许端点使用最佳可用的UDP“连接”(意味着两个能够相互连接的UDP端点)。该方法具有非常好的特性,基本上所有NAT拓扑都可以遍历。
Here is how ICE works at a high level. Endpoint A collects all possible addresses that can be used, including local IP addresses, STUN-derived addresses, Traversal Using Relay NAT (TURN) addresses, etc. On each local port that any of these address and port pairs lead to, a STUN server is installed. This STUN server only accepts STUN requests using the correct authentication through the use of a username and password.
下面是冰在高水平下的工作原理。端点A收集所有可能使用的地址,包括本地IP地址、STUN派生地址、使用中继NAT(TURN)地址进行遍历等。在这些地址和端口对所指向的每个本地端口上,安装了STUN服务器。此STUN服务器仅接受通过使用用户名和密码进行正确身份验证的STUN请求。
Endpoint A then sends a request to establish connectivity with endpoint B, which includes all possible "destinations" [RFC5245] to get the media through to A. Note that each of A's local address/port pairs (host candidates and server reflexive base) has a co-located STUN server. B in turn provides A with all its possible destinations for the different media streams. A and B then uses a STUN client to try to reach all the address and port pairs specified by A from its corresponding destination ports. The destinations for which the STUN requests successfully complete are then indicated and one is selected.
然后,端点A发送与端点B建立连接的请求,端点B包括所有可能的“目的地”[RFC5245],以将媒体传送到A。请注意,A的每个本地地址/端口对(主机候选和服务器自反基)都有一个位于同一位置的STUN服务器。反过来,B向A提供不同媒体流的所有可能目的地。然后,A和B使用STUN客户端尝试从其相应的目标端口访问A指定的所有地址和端口对。然后指示成功完成STUN请求的目的地,并选择一个目的地。
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; therefore, requests are retransmitted multiple times. The STUN requests may also result in more connectivity alternatives (destinations) being discovered and conveyed in the STUN responses.
如果B没有从A那里得到任何晕眩的反应,所有的希望都没有失去。某些NAT拓扑需要从两端多次尝试才能成功连接;因此,请求被重传多次。STUN请求还可能导致在STUN响应中发现并传达更多的连接备选方案(目的地)。
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 steps could provide ICE support for RTSP.
使用ICE for RTSP需要更新客户端和服务器以包含ICE功能。如果双方都实现了必要的功能,以下步骤可以为RTSP提供ICE支持。
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 be opened, or proxies are deployed, etc.
这假设可以在客户端和服务器之间为RTSP消息建立TCP连接。在服务器位于NAT后面,可能需要打开一些TCP端口或部署代理等情况下,这一点并不重要。
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 not behind a NAT in regards to the client, and the client is either having an address in the same address domain or is behind the NAT(s), which can address the address domain of the server. This process is only intended to support PLAY mode, i.e., media traffic flows from server to client.
必要时,RTSP中的ICE协商将不同于SIP中的SDP报价/应答。协议的相互作用是不同的,因此状态转移的可能性也有所不同。目标还在于避免在设置过程中引入额外的延迟,至少当服务器不在与客户端相关的NAT之后,并且客户端在同一地址域中有地址或在NAT之后,NAT可以寻址服务器的地址域。此过程仅用于支持播放模式,即从服务器到客户端的媒体流量。
1. 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 on demand, DNS load balancing, etc., which have the SDP indicate a resource on a server park rather than a specific machine.
1. 冰的使用从SDP开始。服务的SDP表示服务器支持ICE。此处不能给出任何候选项,因为这将不适用于按需、DNS负载平衡等,因为SDP指示服务器园区上的资源,而不是特定机器上的资源。
2. The client gathers addresses and puts together its candidates for each media stream indicated in the session description.
2. 客户端收集地址,并将会话描述中指示的每个媒体流的候选地址放在一起。
3. In each SETUP request, the client includes its candidates in an ICE-specific transport specification. For the server, this indicates the ICE support by the client. One candidate is the most prioritized candidate and here the prioritization for this address should be somewhat different compared to SIP. High-performance candidates are recommended rather than candidates with the highest likelihood of success, as it is more likely that a server is not behind a NAT compared to a SIP user agent.
3. 在每个设置请求中,客户机在ICE特定的传输规范中包含其候选者。对于服务器,这表示客户端对ICE的支持。一个候选者是优先级最高的候选者,与SIP相比,此地址的优先级应该有所不同。推荐高性能的候选者,而不是成功可能性最高的候选者,因为与SIP用户代理相比,服务器不在NAT后面的可能性更大。
4. The server responds to the SETUP (200 OK) for each media stream with its candidates. A server not behind a NAT usually only provides a single ICE candidate. Also, here one candidate is the server primary address.
4. 服务器对每个媒体流及其候选流的设置(200 OK)作出响应。不在NAT后面的服务器通常只提供一个ICE候选服务器。此外,这里还有一个候选服务器主地址。
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 willing to receive the media, thus preventing the server from unknowingly performing a DoS attack.
5. 将执行连接检查。对于服务器,从服务器到客户端的连接检查还有其他用途。它们验证是否有人愿意接收媒体,从而防止服务器在不知情的情况下执行DoS攻击。
6. Connectivity checks from the client promoting a candidate pair were successful. Thus, no further SETUP requests are necessary and processing can proceed with step 7. If an address other than the primary has been verified by the client to work, that address may then be promoted for usage in a SETUP request (go to step 7). If the checks for the available candidates failed and if further candidates have been derived during the connectivity checks, then those can be signaled in new candidate lines in a SETUP request updating the list (go to step 5).
6. 来自提升候选对的客户端的连接检查成功。因此,不需要进一步的设置请求,处理可以继续执行步骤7。如果客户机已验证主地址以外的地址有效,则该地址可在安装请求中升级使用(转至步骤7)。如果对可用候选项的检查失败,并且如果在连接检查期间派生了更多候选项,则可以在更新列表的设置请求中在新候选行中通知这些候选项(转至步骤5)。
7. Client issues the PLAY request. If the server also has completed its connectivity checks for the promoted candidate pair (based on the username as it may be derived addresses if the client was behind NAT), then it can directly answer 200 OK (go to step 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. The client needs to go back to step 6.
7. 客户端发出播放请求。如果服务器还完成了升级候选对的连接检查(基于用户名,因为如果客户端在NAT后面,它可能是派生地址),那么它可以直接回答200 OK(转到步骤8)。如果连接性检查尚未完成,它将以1xx代码响应,以指示正在验证连接性。如果在设置的超时内失败,则会报告错误。客户端需要返回到步骤6。
8. Process completed and media can be delivered. ICE candidates not used may be released.
8. 流程已完成,可以交付介质。未使用的ICE候选者可能会被释放。
To keep media paths alive, the client needs to periodically send data to the server. This will be realized with STUN. RTCP sent by the client should be able to keep RTCP open, but STUN will also be used for SIP based on the same motivations as for ICE.
要使媒体路径保持活动状态,客户端需要定期向服务器发送数据。这将通过晕眩实现。客户端发送的RTCP应该能够保持RTCP打开,但基于与ICE相同的动机,STUN也将用于SIP。
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 among all the NAT/firewall traversal methods in this document.
ICE的使用将需要实施许多新的协议和新的RTSP/SDP功能。这使得ICE成为本文档中所有NAT/防火墙穿越方法中对客户端和服务器实现影响最大的解决方案。
RTSP server implementation requirements are:
RTSP服务器实施要求包括:
o STUN server features
o STUN服务器功能
o Limited STUN client features
o 有限的STUN客户端功能
o SDP generation with more parameters
o 具有更多参数的SDP生成
o RTSP error code for ICE extension
o ICE扩展的RTSP错误代码
RTSP client implementation requirements are:
RTSP客户端实现要求包括:
o Limited STUN server features
o 有限的STUN服务器功能
o Limited STUN client features
o 有限的STUN客户端功能
o RTSP error code and ICE extension
o RTSP错误代码和ICE扩展
If there is an RTSP ALG that doesn't support the NAT traversal method, it may interfere with the NAT traversal. As the usage of ICE for the traversal manifests itself in the RTSP message primarily as a new transport specification, an ALG that passes through unknown will not prevent the traversal. An ALG that discards unknown specifications will, however, prevent the NAT traversal. These issues can be avoided by preventing the ALG to interfere with the signaling by using TLS for the RTSP message transport.
如果存在不支持NAT遍历方法的RTSP ALG,它可能会干扰NAT遍历。由于用于遍历的ICE主要作为新的传输规范在RTSP消息中显示,因此通过未知的ALG不会阻止遍历。然而,丢弃未知规范的ALG将阻止NAT遍历。通过使用TLS进行RTSP消息传输,防止ALG干扰信令,可以避免这些问题。
An ALG that supports this traversal method can, on the most basic level, just pass the transport specifications through. ALGs in NATs and firewalls could use the ICE candidates to establish a filtering state that would allow incoming STUN messages prior to any outgoing hole-punching packets, and in that way it could speed up the connectivity checks and reduce the risk of failures.
支持这种遍历方法的ALG可以在最基本的级别上传递传输规范。NAT和防火墙中的ALG可以使用ICE候选者建立过滤状态,允许传入的STUN消息在任何传出穿孔数据包之前进入,这样可以加快连接检查并降低失败风险。
Advantages:
优势:
o Solves NAT connectivity discovery for basically all cases as long as a TCP connection between the client and server can be established. This includes servers behind NATs. (Note that a proxy between address domains may be required to get TCP through.)
o 只要可以在客户端和服务器之间建立TCP连接,就基本上解决了所有情况下的NAT连接发现问题。这包括NAT后面的服务器。(请注意,可能需要地址域之间的代理才能通过TCP。)
o Improves defenses against DDoS attacks, since a media-receiving client requires authentications via STUN on its media reception ports.
o 提高对DDoS攻击的防御能力,因为媒体接收客户端需要通过其媒体接收端口上的STUN进行身份验证。
Disadvantages:
缺点:
o Increases the setup delay with at least the amount of time it takes for the server to perform its STUN requests.
o 增加设置延迟,至少增加服务器执行其STUN请求所需的时间。
o Assumes that it is possible to demultiplex between the packets of the media protocol and STUN packets. This is possible for RTP as discussed, for example, in Section 5.1.2 of [RFC5764].
o 假设可以在媒体协议的数据包和STUN数据包之间解复用。如[RFC5764]第5.1.2节所述,这对于RTP是可能的。
o Has a fairly high implementation burden put on both the RTSP server and client. However, several open source ICE implementations do exist, such as [NICE] and [PJNATH].
o RTSP服务器和客户端都有相当高的实现负担。然而,确实存在一些开源ICE实现,例如[NICE]和[PJNATH]。
One should review the Security Considerations section of ICE and STUN to understand that ICE contains some potential issues. However, these can be avoided by correctly using ICE in RTSP. An important factor is to secure the signaling, i.e., use TLS between the RTSP client and server. In fact ICE does help avoid the DDoS attack issue with RTSP substantially as it reduces the possibility for a DDoS using RTSP servers on attackers that are on path between the RTSP server and the target and capable of intercepting the STUN connectivity check packets and correctly sending a response to the server. The ICE connectivity checks with their random transaction IDs from the server to the client serves as a return-routability check and prevents off-path attackers to succeed with address spoofing. This is similar to Mobile IPv6's return routability procedure (Section 5.2.5 of [RFC6275]).
您应该查看ICE和STUN的安全注意事项部分,以了解ICE包含一些潜在问题。但是,通过在RTSP中正确使用ICE可以避免这些问题。一个重要因素是确保信令的安全,即在RTSP客户端和服务器之间使用TLS。事实上,ICE确实有助于避免RTSP的DDoS攻击问题,因为它大大降低了在RTSP服务器和目标之间的路径上的攻击者上使用RTSP服务器进行DDoS攻击的可能性,并且能够截获STUN连接检查包并正确地向服务器发送响应。ICE使用其从服务器到客户端的随机事务ID进行连接检查,作为返回可路由性检查,防止路径外攻击者通过地址欺骗成功。这类似于移动IPv6的返回路由程序(RFC6275的第5.2.5节)。
Latching 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. Latching is similar to connection-oriented traffic, where one side (e.g., the RTSP client) first "connects" by sending an RTP packet to the other side's RTP port; the recipient then replies to the originating IP and Port. This method is also referred to as "late binding". It requires that all RTP/RTCP transport be done symmetrically. This in effect requires Symmetric RTP [RFC4961]. Refer to [RFC7362] for a description of the Latching of SIP-negotiated media streams in Session Border Controllers.
锁存是一种NAT穿越解决方案,它基于要求RTSP客户端向服务器的媒体输出端口发送UDP数据包。通常,RTSP服务器向一个方向发送RTP数据包:从服务器到客户端。锁存类似于面向连接的流量,其中一方(例如,RTSP客户端)首先通过向另一方的RTP端口发送RTP数据包来“连接”;然后,收件人回复原始IP和端口。此方法也称为“后期绑定”。它要求所有RTP/RTCP传输对称进行。这实际上需要对称RTP[RFC4961]。有关会话边界控制器中SIP协商媒体流的锁定说明,请参阅[RFC7362]。
Specifically, when the RTSP server receives the Latching packet (a.k.a. hole-punching packet, since it is used to punch a hole in the
具体地说,当RTSP服务器接收到锁存数据包(也称为穿孔数据包)时,因为它用于在数据包中穿孔
firewall/NAT) from its client, it copies the source IP and Port number and uses them as the delivery address for media packets. By having the server send media traffic back the same way as the client's packets are sent to the server, address and port mappings will be honored. Therefore, this technique works for all types of NATs, given that the server is not behind a NAT. However, it does require server modifications. The format of the Latching packet will have to be defined.
防火墙/NAT)从其客户端复制源IP和端口号,并将其用作媒体数据包的传递地址。通过让服务器以与客户端数据包发送到服务器相同的方式发送媒体流量,地址和端口映射将得到遵守。因此,考虑到服务器不在NAT后面,这种技术适用于所有类型的NAT。但是,它确实需要修改服务器。必须定义锁存数据包的格式。
Latching is very vulnerable to both hijacking and becoming a tool in DDoS attacks (see Security Considerations in [RFC7362]) because attackers can simply forge the source IP and Port of the Latching packet. The rule for restricting IP addresses to one of the signaling connections will need to be applied here also. However, that does not protect against hijacking from another client behind the same NAT. This can become a serious issue in deployments with CGNs.
锁存非常容易被劫持,并成为DDoS攻击的工具(请参阅[RFC7362]中的安全注意事项),因为攻击者只需伪造锁存数据包的源IP和端口即可。此处还需要应用将IP地址限制为其中一个信令连接的规则。然而,这并不能防止来自同一NAT背后的另一个客户端的劫持。在使用CGN的部署中,这可能会成为一个严重的问题。
To support Latching, RTSP signaling must be extended to allow the RTSP client to indicate that it will use Latching. The client also needs to be able to signal its RTP SSRC to the server in its SETUP request. The RTP SSRC is used to establish some basic level of security against hijacking attacks or simply to avoid mis-association when multiple clients are behind the same NAT. Care must be taken in choosing clients' RTP SSRC. First, it must be unique within all the RTP sessions belonging to the same RTSP session. Second, if the RTSP server is sending out media packets to multiple clients from the same send port, the RTP SSRC needs to be unique among those clients' RTP sessions. Recognizing that there is a potential that RTP SSRC collisions may occur, the RTSP server must be able to signal to a client that a collision has occurred and that it wants the client to use a different RTP SSRC carried in the SETUP response or use unique ports per RTSP session. Using unique ports limits an RTSP server in the number of sessions it can simultaneously handle per interface IP addresses.
为了支持锁存,必须扩展RTSP信令,以允许RTSP客户端指示它将使用锁存。客户机还需要能够在其设置请求中向服务器发送其RTP SSRC信号。RTP SSRC用于建立一些基本的安全级别,以防劫持攻击,或者只是在多个客户端位于同一NAT后面时避免错误关联。在选择客户的RTP SSRC时必须小心。首先,它在属于同一RTSP会话的所有RTP会话中必须是唯一的。其次,如果RTSP服务器从同一发送端口向多个客户端发送媒体包,则RTP SSRC需要在这些客户端的RTP会话中是唯一的。认识到存在可能发生RTP SSRC冲突的可能性,RTSP服务器必须能够向客户端发出发生冲突的信号,并希望客户端使用安装响应中携带的不同RTP SSRC,或每个RTSP会话使用唯一端口。使用唯一端口限制RTSP服务器可以同时处理每个接口IP地址的会话数。
The Latching packet as discussed above should have a field that can contain a client and RTP session identifier to correctly associate the Latching packet with the correct context. If an RTP packet is to be used, there would be a benefit to using a well-defined RTP payload format for this purpose as the No-Op payload format proposed [RTP-NO-OP]. However, in the absence of such a specification, an RTP packet without a payload could be used. Using SSRC is beneficial because RTP and RTCP both would work as is. However, other packet formats could be used that carry the necessary identification of the context, and such a solution is discussed in Section 4.5.
如上所述的闭锁包应该有一个字段,该字段可以包含客户端和RTP会话标识符,以便将闭锁包与正确的上下文正确关联。如果要使用RTP数据包,则为此目的使用定义良好的RTP有效载荷格式作为建议的无操作有效载荷格式[RTP-No-Op]将是有益的。然而,在没有这样的规范的情况下,可以使用没有有效载荷的RTP分组。使用SSRC是有益的,因为RTP和RTCP都可以按原样工作。但是,可以使用其他数据包格式来进行必要的上下文标识,第4.5节讨论了这种解决方案。
An RTSP ALG not supporting this method could interfere with the methods used to indicate that Latching is to be done, as well as the SSRC signaling, thus preventing the method from working. However, if the RTSP ALG instead opens the corresponding pinholes and creates the necessary mapping in the NAT, traversal will still work. Securing the RTSP message transport using TLS will avoid this issue.
不支持此方法的RTSP ALG可能会干扰用于指示要进行锁存的方法以及SSRC信令,从而阻止该方法工作。但是,如果RTSP ALG打开相应的针孔,并在NAT中创建必要的映射,则遍历仍然有效。使用TLS保护RTSP消息传输将避免此问题。
An RTSP ALG that supports this traversal method can for basic functionality simply pass the related signaling parameters transparently. Due to the security considerations for Latching, there might exist a benefit for an RTSP ALG that will enable NAT traversal to negotiate with the path and turn off the Latching procedures when the ALG handles this. However, this opens up to failure modes when there are multiple levels of NAT and only one supports an RTSP ALG.
支持这种遍历方法的RTSP ALG可以为基本功能简单地透明地传递相关的信令参数。由于锁存的安全性考虑,RTSP ALG可能有一个好处,即当ALG处理此问题时,允许NAT遍历与路径协商并关闭锁存过程。但是,当存在多个NAT级别且只有一个支持RTSP ALG时,这会导致出现故障模式。
Advantages:
优势:
o Works for all types of client-facing NATs (requirement 1 in Section 3).
o 适用于所有类型的面向客户的NAT(第3节中的要求1)。
o Has little interaction problems with any RTSP ALG changing the client's information in the Transport header.
o 与任何RTSP ALG在传输头中更改客户端信息时几乎没有交互问题。
Disadvantages:
缺点:
o Requires modifications to both the RTSP server and client.
o 需要对RTSP服务器和客户端进行修改。
o Limited to working with servers that are not behind a NAT.
o 仅限于使用不在NAT后面的服务器。
o The format of the packet for "connection setup" (a.k.a Latching packet) is not defined.
o 未定义“连接设置”的数据包格式(也称为闭锁数据包)。
o SSRC management if RTP is used for Latching due to risk for mis-association of clients to RTSP sessions at the server if SSRC collision occurs.
o SSRC管理如果RTP用于锁存,因为如果发生SSRC冲突,客户端与服务器上的RTSP会话存在错误关联的风险。
o Has significant security considerations (See Section 4.4.5), due to the lack of a strong authentication mechanism and will need to use address restrictions.
o 由于缺乏强大的身份验证机制,具有重要的安全考虑(见第4.4.5节),需要使用地址限制。
Latching's major security issue is that RTP streams can be hijacked and directed towards any target that the attacker desires unless address restrictions are used. In the case of NATs with multiple clients on the inside of them, hijacking can still occur. This becomes a significant threat in the context of CGNs.
闭锁的主要安全问题是RTP流可能被劫持并指向攻击者想要的任何目标,除非使用地址限制。在NAT内部有多个客户端的情况下,劫持仍然可能发生。这成为CGN环境中的一个重大威胁。
The most serious security problem is the deliberate attack with the use of an RTSP client and Latching. The attacker uses RTSP to set up a media session. Then it uses Latching with a spoofed source address of the intended target of the attack. There is no defense against this attack other than restricting the possible address a Latching packet can come from to the same address as the RTSP TCP connection is from. This prevents Latching to be used in use cases that require different addresses for media destination and signaling. Even allowing only a limited address range containing the signaling address from where Latching is allowed opens up a significant vulnerability as it is difficult to determine the address usage for the network the client connects from.
最严重的安全问题是使用RTSP客户端和锁存进行蓄意攻击。攻击者使用RTSP设置媒体会话。然后,它使用锁存来伪造攻击目标的源地址。除了将锁存数据包可能来自的地址限制为与RTSP TCP连接来自的地址相同之外,没有其他防御措施。这可以防止在需要不同地址的介质目的地和信令的用例中使用锁存。即使只允许包含允许锁定的信令地址的有限地址范围,也会打开一个严重的漏洞,因为很难确定客户端连接的网络的地址使用情况。
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 Latching packets containing the correct RTP SSRC to the correct address and port on the server. The RTSP server will then use the source IP and Port from the Latching packet as the destination for the media packets it sends.
劫持攻击也可以以各种方式进行。基本攻击基于读取RTSP信令包的能力,以便了解服务器将从中发送的地址和端口以及客户端将使用的SSRC。有了这些信息,攻击者可以将自己包含正确RTP SSRC的锁存数据包发送到服务器上的正确地址和端口。然后,RTSP服务器将使用锁存数据包的源IP和端口作为其发送的媒体数据包的目的地。
Another variation of this attack is for a man in the middle to modify the RTP Latching packet being sent by a client to the server by simply changing the source IP and Port to the target one desires to attack.
这种攻击的另一种变化是中间的人通过简单地将源IP和端口更改为希望攻击的目标对象来修改客户端向服务器发送的RTP锁存分组。
One can fend off the snooping-based attack by applying encryption to the RTSP signaling transport. However, if the attacker is a man in the middle modifying Latching packets, the attack is impossible to defend against other than through address restrictions. As a NAT rewrites the source IP and (possibly) port, this cannot be authenticated, but authentication is required in order to protect against this type of DoS attack.
通过对RTSP信令传输应用加密,可以抵御基于窥探的攻击。然而,如果攻击者是中间人修改闩锁分组,则攻击是不可能抵御的,而不是通过地址限制。由于NAT重写源IP和(可能)端口,因此无法对其进行身份验证,但需要进行身份验证以防止此类DoS攻击。
Yet another issue is that these attacks also can be used to deny the client the service it desires from the RTSP server completely. The attacker modifies or originates its own Latching packets with a port
还有一个问题是,这些攻击还可用于完全拒绝客户端从RTSP服务器获得所需的服务。攻击者使用端口修改或发起自己的锁定数据包
other than what the legit Latching packets use, which results in the media server sending the RTP/RTCP traffic to ports the client isn't listening for RTP/RTCP on.
除了合法锁存数据包使用的内容之外,这会导致媒体服务器将RTP/RTCP通信发送到客户端未侦听RTP/RTCP的端口。
The amount of random non-guessable material in the Latching packet determines how well Latching can fend off stream hijacking performed by parties that are off the client-to-server network path, i.e., it lacks the capability to see the client's Latching packets. The proposal above uses the 32-bit RTP SSRC field to this effect. Therefore, it is important that this field is derived with a non-predictable random number generator. 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.
锁存数据包中随机不可猜测的材料的数量决定了锁存如何能够很好地抵御客户端到服务器网络路径之外的各方执行的流外劫持,即,它缺乏查看客户端锁存数据包的能力。上述方案为此使用32位RTP SSRC字段。因此,使用不可预测的随机数生成器导出此字段非常重要。如果知道使用的算法和两个基本事实,就不可能得出某个客户端将使用的随机数。
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 could implement functionality that blocks packets to ports or from sources that receive or send multiple Latching packets with different invalid SSRCs, especially when they are coming from the same IP and Port. Note that this mitigation in itself opens up a new venue for DoS attacks against legit users trying to latch.
不知道SSRC但知道服务器发送的端口号的攻击者可以通过测试大量不同的SSRC直到找到匹配的SSRC,在服务器上部署暴力攻击。因此,服务器可以实现阻止数据包到端口或来自接收或发送具有不同无效SSRC的多个锁存数据包的源的功能,特别是当它们来自同一IP和端口时。请注意,这种缓解措施本身为针对试图锁定的合法用户的DoS攻击打开了一个新的场所。
To improve the security against attackers, the amount of random material 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 material.
为了提高针对攻击者的安全性,可以增加随机材料的数量。为了在仍然使用RTP和RTCP的情况下获得更长的随机标签,有必要开发RTP和RTCP有效载荷格式,以承载随机材料。
Latching as described above requires the usage of a valid RTP format as the Latching packet, i.e., the first packet that the client sends to the server to establish a bidirectional transport flow for RTP streams. There is currently no appropriate RTP packet format for this purpose, although the RTP No-Op format was a proposal to fix the problem [RTP-NO-OP]; however, that work was abandoned. [RFC6263] discusses the implication of different types of packets as keep-alives for RTP, and its findings are very relevant to the format of the Latching packet.
如上所述的锁存要求使用有效的RTP格式作为锁存分组,即客户端发送到服务器以建立RTP流的双向传输流的第一个分组。目前没有适合此目的的RTP数据包格式,尽管RTP no-Op格式是解决问题的建议[RTP-no-Op];然而,这项工作被放弃了。[RFC6263]讨论了不同类型的数据包作为RTP保存的含义,其发现与闭锁数据包的格式非常相关。
Meanwhile, there have been NAT/firewall traversal techniques deployed in the wireless streaming market place that use non-RTP messages as Latching packets. This section describes a variant based on a subset of those solutions that alters the previously described Latching solution.
同时,在无线流媒体市场上部署了NAT/防火墙穿越技术,使用非RTP消息作为锁存数据包。本节描述了一个基于这些解决方案子集的变体,它改变了前面描述的闭锁解决方案。
In this variation of Latching, the Latching packet is a small UDP packet that does not contain an RTP header. In response to the client's Latching packet, the RTSP server sends back a similar Latching packet as a confirmation so the client can stop the so-called "connection phase" of this NAT traversal technique. Afterwards, the client only has to periodically send Latching packets as keep-alive messages for the NAT mappings.
在锁存的这种变体中,锁存数据包是不包含RTP报头的小UDP数据包。作为对客户端锁存数据包的响应,RTSP服务器发回一个类似的锁存数据包作为确认,以便客户端可以停止这种NAT穿越技术的所谓“连接阶段”。之后,客户端只需定期发送锁存数据包作为NAT映射的保持活动消息。
The server listens on its RTP-media output port and tries to decode any received UDP packet as the Latching packet. This is valid since an RTSP server is not expecting RTP traffic from the RTSP client. Then, it can correlate the Latching packet with the RTSP client's session ID or the client's SSRC and record the NAT bindings accordingly. The server then sends a Latching packet as the response to the client.
服务器侦听其RTP媒体输出端口,并尝试将任何接收到的UDP数据包解码为锁定数据包。这是有效的,因为RTSP服务器不需要来自RTSP客户端的RTP通信。然后,它可以将锁存数据包与RTSP客户端的会话ID或客户端的SSRC关联起来,并相应地记录NAT绑定。然后,服务器向客户端发送一个锁存数据包作为响应。
The Latching packet can contain the SSRC to identify the RTP stream, and care must be taken if the packet is bigger than 12 bytes, ensuring that it is distinctively different from RTP packets, whose header size is 12 bytes.
锁存数据包可以包含SSRC以识别RTP流,如果数据包大于12字节,则必须小心,以确保它与头大小为12字节的RTP数据包有明显的不同。
RTSP signaling can be added to do the following:
可以添加RTSP信令以执行以下操作:
1. Enable or disable such Latching message exchanges. When the firewall/NAT has an RTSP-aware ALG, it is possible to disable Latching message exchange and let the ALG work out the address and port mappings.
1. 启用或禁用此类锁定消息交换。当防火墙/NAT具有RTSP感知ALG时,可以禁用锁存消息交换,并让ALG计算地址和端口映射。
2. Configure the number of retries and the retry interval of the Latching message exchanges.
2. 配置锁定消息交换的重试次数和重试间隔。
See Latching ALG considerations in Section 4.4.3.
参见第4.4.3节中的闭锁ALG注意事项。
This approach has the following advantages when compared with the Latching approach (Section 4.4):
与闭锁方法相比,该方法具有以下优点(第4.4节):
1. There is no need to define an RTP payload format for firewall traversal; therefore, it is more simple to use, implement, and administer (requirement 4 in Section 3) than a Latching protocol, which must be defined.
1. 不需要为防火墙遍历定义RTP有效负载格式;因此,它的使用、实现和管理(第3节中的要求4)比必须定义的锁存协议更简单。
2. When properly defined, this kind of Latching packet exchange can also authenticate RTP receivers, to prevent hijacking attacks.
2. 如果定义正确,这种锁存数据包交换还可以对RTP接收器进行身份验证,以防止劫持攻击。
This approach has the following disadvantage when compared with the Latching approach:
与闭锁方法相比,这种方法有以下缺点:
1. The server's sender SSRC for the RTP stream or other session Identity information must be signaled in the RTSP's SETUP response, in the Transport header of the RTSP SETUP response.
1. RTP流或其他会话标识信息的服务器发送方SSRC必须在RTSP设置响应的RTSP设置响应的传输头中发出信号。
Compared to the security properties of Latching, this variant is slightly improved. First of all it allows for a larger random field in the Latching packets, which makes it more unlikely for an off-path attacker to succeed in a hijack attack. Second, the confirmation allows the client to know when Latching works and when it doesn't and thus when to restart the Latching process by updating the SSRC.
与锁存的安全属性相比,此变体略有改进。首先,它允许锁存数据包中有更大的随机场,这使得非路径攻击者更不可能成功进行劫持攻击。其次,确认允许客户机知道锁存何时工作,何时不工作,从而知道何时通过更新SSRC重新启动锁存过程。
Still, the main security issue remaining is that the RTSP server can't know that the source address in the Latching packet was coming from an RTSP client wanting to receive media and not from one that likes to direct the media traffic to a DoS target.
不过,仍然存在的主要安全问题是RTSP服务器无法知道锁存数据包中的源地址来自希望接收媒体的RTSP客户端,而不是来自希望将媒体流量定向到DoS目标的RTSP客户端。
Three-Way Latching is an attempt to try to resolve the most significant security issues for both previously discussed variants of Latching. By adding a server request response exchange directly after the initial Latching, the server can verify that the target address present in the Latching packet is an active listener and confirm its desire to establish a media flow.
三向锁存是一种尝试,旨在解决前面讨论的两种锁存变体的最重要的安全问题。通过在初始锁定后直接添加服务器请求-响应交换,服务器可以验证锁定数据包中存在的目标地址是否为活动侦听器,并确认其建立媒体流的愿望。
Uses the same RTSP extensions as the Alternative Latching method (Section 4.5) uses. The extensions for this variant are only in the format and transmission of the Latching packets.
使用与备用锁存方法(第4.5节)相同的RTSP扩展。此变体的扩展仅限于锁存数据包的格式和传输。
The client-to-server Latching packet is similar to the Alternative Latching (Section 4.5), i.e., a UDP packet with some session identifiers and a random value. When the server responds to the Latching packet with a Latching confirmation, it includes a random value (nonce) of its own in addition to echoing back the one the client sent. Then a third message is added to the exchange. The client acknowledges the reception of the Latching confirmation
客户端到服务器的锁存数据包类似于备用锁存(第4.5节),即具有一些会话标识符和随机值的UDP数据包。当服务器用锁存确认响应锁存数据包时,除了回显客户端发送的数据包外,它还包括自己的随机值(nonce)。然后,第三条消息被添加到交换中。客户确认收到锁定确认
message and echoes back the server's nonce, thus confirming that the Latched address goes to an RTSP client that initiated the Latching and is actually present at that address. The RTSP server will refuse to send any media until the Latching Acknowledgement has been received with a valid nonce.
消息并回显服务器的nonce,从而确认锁存地址发送到启动锁存的RTSP客户端,并且实际存在于该地址。RTSP服务器将拒绝发送任何媒体,直到收到带有有效nonce的锁定确认。
See Latching ALG considerations in Section 4.4.3.
参见第4.4.3节中的闭锁ALG注意事项。
A solution with a three-way handshake and its own Latching packets can be compared with the ICE-based solution (Section 4.3) and have the following differences:
具有三向握手和自身锁存数据包的解决方案可与基于ICE的解决方案(第4.3节)进行比较,并具有以下差异:
o Only works for servers that are not behind a NAT.
o 仅适用于不支持NAT的服务器。
o May be simpler to implement due to the avoidance of the ICE prioritization and check-board mechanisms.
o 由于避免了ICE优先级划分和检查委员会机制,实施起来可能更简单。
However, a Three-Way Latching protocol is very similar to using STUN in both directions as a Latching and verification protocol. Using STUN would remove the need for implementing a new protocol.
然而,三向锁存协议非常类似于在两个方向上使用STUN作为锁存和验证协议。使用STUN将消除实施新协议的需要。
Three-Way Latching is significantly more secure than its simpler versions discussed above. The client-to-server nonce, which is included in signaling and also can be bigger than the 32 bits of random data that the SSRC field supports, makes it very difficult for an off-path attacker to perform a DoS attack by diverting the media.
三向锁存比上面讨论的简单版本安全得多。客户端到服务器的nonce(包括在信令中)也可能大于SSRC字段支持的32位随机数据,这使得非路径攻击者很难通过转移介质来执行DoS攻击。
The client-to-server nonce and its echoing back does not protect against on-path attackers, including malicious clients. However, the server-to-client nonce and its echoing back prevents malicious clients to divert the media stream by spoofing the source address and port, as it can't echo back the nonce in these cases. This is similar to the Mobile IPv6 return routability procedure (Section 5.2.5 of [RFC6275]).
客户端到服务器的nonce及其回显不能防止路径上的攻击者,包括恶意客户端。但是,服务器到客户端的nonce及其回显可防止恶意客户端通过欺骗源地址和端口来转移媒体流,因为在这些情况下,它无法回显nonce。这类似于移动IPv6返回可路由性程序(RFC6275第5.2.5节)。
Three-Way Latching is really only vulnerable to an on-path attacker that is quite capable. First, the attacker can learn the client-to-server nonce either by intercepting the signaling or by modifying the source information (target destination) of a client's Latching packet. Second, it is also on-path between the server and target destination and can generate a response using the server's nonce. An
三向锁存实际上只对非常有能力的路径上攻击者易受攻击。首先,攻击者可以通过截获信令或修改客户机锁存数据包的源信息(目标目的地)来了解客户机到服务器的nonce。其次,它也位于服务器和目标目标之间的路径上,可以使用服务器的nonce生成响应。一
adversary that has these capabilities is commonly capable of causing significantly worse damage than this using other methods.
具有这些能力的敌方通常能够造成比使用其他方法更严重的伤害。
Three-Way Latching results in the server-to-client packet being bigger than the client-to-server packet, due to the inclusion of the server-to-client nonce in addition to the client-to-server nonce. Thus, an amplification effect does exist; however, to achieve this amplification effect, the attacker has to create a session state on the RTSP server. The RTSP server can also limit the number of responses it will generate before considering the Latching to be failed.
三向锁存导致服务器到客户端数据包比客户端到服务器数据包大,这是因为除了客户端到服务器的nonce之外还包含了服务器到客户端的nonce。因此,确实存在放大效应;但是,为了实现这种放大效果,攻击者必须在RTSP服务器上创建会话状态。RTSP服务器还可以在认为锁定失败之前限制它将生成的响应数量。
An ALG reads the application level messages and performs necessary changes to allow the protocol to work through the middlebox. However, this behavior has some problems in regards to RTSP:
ALG读取应用程序级消息并执行必要的更改,以允许协议通过中间盒工作。但是,这种行为在RTSP方面存在一些问题:
1. It does not work when RTSP 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 middlebox.
1. 当RTSP与端到端安全性一起使用时,它不起作用。由于ALG无法检查和更改应用程序级消息,协议将由于中间盒而失败。
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.
2. 如果添加了协议扩展,则需要更新ALG。由于ALG发生变化时存在部署问题,这也可能会破坏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 SOHO environments.
由于上述原因,不建议在NAT中使用RTSP ALG。这对于针对家庭用户和小型办公室环境的NAT尤其重要,因为升级SOHO环境中部署的NAT非常困难。
In this section, we provide a step-by-step outline on how one could go about writing an ALG to enable RTSP to traverse a NAT.
在本节中,我们将逐步概述如何编写ALG以使RTSP能够遍历NAT。
1. Detect any SETUP request.
1. 检测任何设置请求。
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, then the ALG should not change the address. Ways to detect that these methods are used are:
2. 尝试检测替换传输头参数“destination”或“dest_addr”的地址和端口的任何NAT遍历方法的使用情况。如果使用这些方法中的任何一种,则ALG不应更改地址。检测是否使用这些方法的方法有:
* For embedded STUN, it would be to watch for a feature tag, like "nat.stun", and to see if any of those exist in the "supported", "proxy-require", or "require" headers of the RTSP exchange.
* 对于嵌入式STUN,需要注意一个功能标签,如“nat.STUN”,并查看RTSP交换的“受支持”、“代理请求”或“请求”头中是否存在这些标签。
* For stand-alone STUN and TURN-based solutions: This can 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, then such a solution is in use. However, if multiple NATs are used, this detection may fail. Remapping should only be done for addresses belonging to the NAT's own private address space.
* 对于独立的眩晕和转身解决方案:这可以通过检查“目的地”或“目的地地址”参数来检测。若它包含NAT的一个外部IP地址或一个公共IP地址,那个么这样的解决方案正在使用中。但是,如果使用多个NAT,此检测可能会失败。只应对属于NAT自己的专用地址空间的地址进行重新映射。
Otherwise, continue to the next step.
否则,继续下一步。
3. Create UDP mappings (client given IP and Port <-> external IP and Port) where needed for all possible transport specifications in the Transport header of the request found in (step 1). Enter the external address and port(s) of these mappings in the Transport header. Mappings shall be created with consecutive external port numbers starting on an even number for RTP for each media stream. Mappings should also be given a long timeout period, at least 5 minutes.
3. 创建UDP映射(客户端给定的IP和端口<->外部IP和端口),以便在(步骤1)中找到的请求的传输头中的所有可能的传输规范都需要该映射。在传输标头中输入这些映射的外部地址和端口。应使用连续的外部端口号创建映射,从每个媒体流的RTP偶数开始。映射也应该有一个长的超时时间,至少5分钟。
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.
4. 当从服务器接收到设置响应时,ALG可能会删除未使用的UDP映射,即传输头中不存在的映射。会话ID还应绑定到该会话的UDP映射部分。
5. If the SETUP response settles on RTP over TCP or RTP over RTSP as lower transport, do nothing: let TCP tunneling take care of NAT traversal. Otherwise, go to the next step.
5. 如果设置响应以RTP over TCP或RTP over RTSP作为较低的传输,则什么也不做:让TCP隧道处理NAT遍历。否则,请转至下一步。
6. The ALG should keep the UDP mappings belonging to the RTSP session as long as: an RTSP message with the session's ID has been sent in the last timeout interval, or a UDP message has been sent on any of the UDP mappings during the last timeout interval.
6. ALG应保留属于RTSP会话的UDP映射,只要:具有会话ID的RTSP消息已在上一个超时间隔内发送,或UDP消息已在上一个超时间隔内发送到任何UDP映射。
7. The ALG may remove a mapping as soon as a TEARDOWN response has been received for that media stream.
7. 一旦接收到针对该媒体流的拆卸响应,ALG就可以移除映射。
Advantages:
优势:
o No impact on either client or server.
o 对客户端或服务器都没有影响。
o Can work for any type of NATs.
o 可用于任何类型的NAT。
Disadvantages:
缺点:
o When deployed, they are hard to update to reflect protocol modifications and extensions. If not updated, they will break the functionality.
o 部署时,它们很难更新以反映协议修改和扩展。如果不更新,它们将破坏功能。
o When end-to-end security is used, the ALG functionality will fail.
o 使用端到端安全性时,ALG功能将失败。
o Can interfere with other types of traversal mechanisms, such as STUN.
o 可能会干扰其他类型的遍历机制,例如STUN。
Transition:
过渡:
An RTSP ALG will not be phased out in any automatic way. It must be removed, probably through the removal or update of the NAT it is associated with.
RTSP ALG不会以任何自动方式逐步淘汰。必须删除它,可能是通过删除或更新与其关联的NAT。
An ALG will not work with deployment of end-to-end RTSP signaling security; however, it will work with the hop-by-hop security method defined in Section 19.3 of RTSP 2.0 [RTSP]. Therefore, deployment of ALG may result in clients located behind NATs not using end-to-end security, or more likely the selection of a NAT traversal solution that allows for security.
ALG不支持端到端RTSP信令安全的部署;但是,它将使用RTSP 2.0[RTSP]第19.3节中定义的逐跳安全方法。因此,ALG的部署可能导致位于NAT后面的客户端不使用端到端安全性,或者更可能是选择考虑安全性的NAT穿越解决方案。
The creation of a UDP mapping based on the signaling message has some potential security implications. First of all, if the RTSP client releases its ports and another application is assigned these instead, it could receive RTP media as long as the mappings exist and the RTSP server has failed to be signaled or notice the lack of client response.
基于信令消息创建UDP映射有一些潜在的安全隐患。首先,如果RTSP客户端释放其端口并为另一个应用程序分配这些端口,则只要映射存在且RTSP服务器未能收到信号或注意到缺少客户端响应,它就可以接收RTP介质。
A NAT with RTSP ALG that assigns mappings based on SETUP requests could potentially become the victim of a resource exhaustion attack. If an attacker creates a lot of RTSP sessions, even without starting media transmission, this could exhaust the pool of available UDP ports on the NAT. Thus, only a limited number of UDP mappings should be allowed to be created by the RTSP ALG.
基于设置请求分配映射的带有RTSP ALG的NAT可能成为资源耗尽攻击的受害者。如果攻击者创建大量RTSP会话,即使没有启动媒体传输,也可能耗尽NAT上可用UDP端口池。因此,RTSP ALG只允许创建有限数量的UDP映射。
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
使用从客户端到服务器建立的TCP连接可以确保服务器可以向客户端发送数据。从私有域打开的连接确保服务器可以将数据发送回客户端。发送最初打算发送的数据
transported over UDP requires the TCP connection to support some type of framing of the media data packets. Using TCP also results in the client having to accept that real-time performance can be impacted. TCP's problem of ensuring timely delivery was one of the reasons why RTP was developed. Problems that arise with TCP are: head-of-line blocking, delay introduced by retransmissions, and a highly varying rate due to the congestion control algorithm. If a sufficient amount of buffering (several seconds) in the receiving client can be tolerated, then TCP will clearly work.
通过UDP传输需要TCP连接来支持某种类型的媒体数据包帧。使用TCP还导致客户端不得不接受实时性能可能受到影响的事实。TCP确保及时交付的问题是开发RTP的原因之一。TCP出现的问题有:线路阻塞、重传引起的延迟以及拥塞控制算法导致的高度变化率。如果可以容忍接收客户端中有足够的缓冲(几秒钟),那么TCP显然可以工作。
The RTSP core specification [RTSP] supports interleaving of media data on the TCP connection that carries RTSP signaling. See Section 14 in [RTSP] for how to perform this type of TCP tunneling. There also exists another way of transporting RTP over TCP, which is defined in Appendix C.2 in [RTSP]. For signaling and rules on how to establish the TCP connection in lieu of UDP, see Appendix C.2 in [RTSP]. This is based on the framing of RTP over the TCP connection as described in [RFC4571].
RTSP核心规范[RTSP]支持在承载RTSP信令的TCP连接上交错媒体数据。有关如何执行这种类型的TCP隧道,请参见[RTSP]中的第14节。还有另一种通过TCP传输RTP的方法,其定义见[RTSP]中的附录C.2。有关如何建立TCP连接代替UDP的信令和规则,请参见[RTSP]中的附录C.2。这是基于[RFC4571]中描述的TCP连接上的RTP帧。
An RTSP ALG will face a different issue with TCP tunneling, at least the interleaved version. Now the full data stream can end up flowing through the ALG implementation. Thus, it is important that the ALG is efficient in dealing with the interleaved media data frames to avoid consuming to many resources and thus creating performance issues.
RTSP ALG将在TCP隧道中面临不同的问题,至少是交叉版本。现在,完整的数据流可以通过ALG实现结束。因此,重要的是ALG在处理交织媒体数据帧时是有效的,以避免消耗许多资源,从而产生性能问题。
The RTSP ALG can also affect the transport specifications that indicate that TCP tunneling can be done and its prioritization, including removing the transport specification, thus preventing TCP tunneling.
RTSP ALG还可以影响传输规范,该规范指示可以进行TCP隧道及其优先级,包括删除传输规范,从而防止TCP隧道。
Advantage:
优点:
o Works through all types of NATs where the RTSP server is not NATed or is at least reachable like it was not.
o 适用于RTSP服务器未启用或至少可以访问的所有类型的NAT。
Disadvantages:
缺点:
o Functionality needs to be implemented on both server and client.
o 功能需要在服务器和客户端上实现。
o Will not always meet multimedia stream's real-time requirements.
o 不能始终满足多媒体流的实时性要求。
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 potential price of loss of real-time properties.
RTSP的TCP连接上的隧道不计划被逐步淘汰。它旨在作为一种回退机制,并在需要总体介质可靠性时使用,即使以实时属性损失的潜在代价。
The TCP tunneling of RTP has no known significant security problems besides those already presented in the RTSP specification. It is difficult to get any amplification effect for DoS attacks due to TCP's flow control. The RTSP server's TCP socket, if independently used for media tunneling or only RTSP messages, can be used for a redirected syn attack. By spoofing the source address of any TCP init packets, the TCP SYNs from the server can be directed towards a target.
RTP的TCP隧道除了RTSP规范中已经提出的安全问题外,没有已知的重大安全问题。由于TCP的流量控制,DoS攻击很难得到任何放大效果。RTSP服务器的TCP套接字如果单独用于媒体隧道或仅用于RTSP消息,则可用于重定向syn攻击。通过欺骗任何TCP init数据包的源地址,可以将服务器上的TCP SYN定向到目标。
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.
当会话媒体数据与RTSP交织时,一个可能的安全考虑因素将是应用RTSP加密时的性能瓶颈,因为所有会话媒体数据也需要加密。
TURN [RFC5766] is a protocol for setting up traffic relays that allow 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.
TURN[RFC5766]是一种用于设置流量中继的协议,允许NAT和防火墙后面的客户端接收UDP和TCP的传入流量。这些继电器受控制,资源有限。它们需要在使用前进行分配。TURN允许客户端将中继(TURN服务器)上的地址/端口对临时绑定到其用于联系TURN服务器的本地源地址/端口对。然后,TURN服务器将在中继的两侧转发数据包。
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 allocation. On the external side, it is limited to the source address/port pair that have been given permission by the TURN client creating the allocation. Packets from any other source on this address will be discarded.
为了防止对任一收件人的DoS攻击,转发的数据包被限制在特定的源地址。在客户端,它仅限于设置分配的源。在外部,它仅限于创建分配的TURN客户端授予的源地址/端口对。来自此地址上任何其他源的数据包将被丢弃。
Using a TURN server makes it possible for an 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 the RTSP message arrives from. This means that TURN could only be used if the server knows and
使用TURN服务器,RTSP客户端甚至可以从未修改的RTSP服务器接收媒体流。但是,问题在于,这些RTSP服务器很可能将媒体目的地限制为RTSP消息到达的IP地址之外的其他IP地址。这意味着只有在服务器知道并且
accepts that the IP belongs to a TURN server, and the TURN server can't be targeted at an unknown address. Alternatively, both the RTSP TCP connection as well as the RTP media is relayed through the same TURN server.
接受IP属于TURN服务器,并且TURN服务器不能以未知地址为目标。或者,RTSP TCP连接和RTP介质都通过同一TURN服务器中继。
To use a TURN server for NAT traversal, the following steps should be performed.
要使用TURN服务器进行NAT遍历,应执行以下步骤。
1. The RTSP client connects with the RTSP server. The client retrieves the session description to determine the number of media streams. To avoid the issue of having the RTSP connection and media traffic from different addresses, the TCP connection must also be done through the same TURN server as the one in the next step. This will require the usage of TURN for TCP [RFC6062].
1. RTSP客户端与RTSP服务器连接。客户端检索会话描述以确定媒体流的数量。为了避免RTSP连接和来自不同地址的媒体流量问题,TCP连接也必须通过与下一步相同的TURN服务器完成。这将需要对TCP使用TURN[RFC6062]。
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 contiguous ranges.
2. 客户端在TURN服务器上建立必要的绑定。它必须选择希望接收媒体数据包的本地RTP和RTCP端口。TURN支持请求偶数端口号和连续范围的绑定。
3. The RTSP client uses the acquired address and port allocations in the RTSP SETUP request using the destination header.
3. RTSP客户端使用目标标头在RTSP设置请求中使用获取的地址和端口分配。
4. The RTSP server sends the SETUP reply, which must include the Transport header's "src_addr" parameter (source and port in RTSP 1.0). Note that the server is required to have a mechanism to verify that it is allowed to send media traffic to the given address unless TCP relaying of the RTSP messages also is performed.
4. RTSP服务器发送安装应答,该应答必须包括传输头的“src_addr”参数(RTSP 1.0中的源和端口)。请注意,服务器需要有一种机制来验证是否允许向给定地址发送媒体流量,除非同时执行RTSP消息的TCP中继。
5. The RTSP client uses the RTSP server's response to create TURN permissions for the server's media traffic.
5. RTSP客户端使用RTSP服务器的响应为服务器的媒体流量创建TURN权限。
6. The client requests that the server starts playing. The server starts sending media packets to the given destination address and ports.
6. 客户端请求服务器开始播放。服务器开始向给定的目标地址和端口发送媒体数据包。
7. Media packets arrive at the TURN server on the external port; if the packets match an established permission, the TURN server forwards the media packets to the RTSP client.
7. 媒体包到达外部端口上的TURN服务器;如果数据包与已建立的权限匹配,TURN服务器将媒体数据包转发给RTSP客户端。
8. If the client pauses and media is not sent for about 75% of the mapping timeout, the client should use TURN to refresh the bindings.
8. 如果在大约75%的映射超时时间内,客户端暂停并且未发送媒体,则客户端应使用TURN刷新绑定。
As the RTSP client inserts the address information of the TURN relay's external allocations in the SETUP messages, the ALG that replaces the address, without considering that the address does not belong to the internal address realm of the NAT, will prevent this mechanism from working. This can be prevented by securing the RTSP signaling.
当RTSP客户端在设置消息中插入转向继电器外部分配的地址信息时,替换该地址的ALG(不考虑该地址不属于NAT的内部地址域)将阻止该机制工作。这可以通过保护RTSP信令来防止。
Advantages:
优势:
o Does not require any server modifications given that the server includes the "src_addr" header in the SETUP response.
o 不需要任何服务器修改,因为服务器在安装响应中包含“src_addr”头。
o Works for any type of NAT as long as the RTSP server has a reachable IP address that is not behind a NAT.
o 只要RTSP服务器有一个不在NAT后面的可访问IP地址,就可以用于任何类型的NAT。
Disadvantages:
缺点:
o Requires another network element, namely the TURN server.
o 需要另一个网元,即TURN服务器。
o A TURN server for RTSP may not scale since the number of sessions it must forward is proportional to the number of client media sessions.
o RTSP的TURN服务器可能无法扩展,因为它必须转发的会话数与客户端媒体会话数成比例。
o The TURN server becomes a single point of failure.
o TURN服务器成为单点故障。
o Since TURN forwards media packets, as a necessity it introduces delay.
o 由于TURN转发媒体数据包,因此必然会引入延迟。
o An RTSP ALG may change the necessary destinations parameter. This will cause the media traffic to be sent to the wrong address.
o RTSP ALG可更改必要的目的地参数。这将导致媒体流量发送到错误的地址。
Transition:
过渡:
TURN is not intended to be phased out completely; see Section 19 of [RFC5766]. However, the usage of TURN could be reduced when the demand for having NAT traversal is reduced.
TURN不打算完全淘汰;参见[RFC5766]第19节。然而,当NAT穿越的需求减少时,TURN的使用可以减少。
The TURN server can become part of a DoS attack towards any victim. To perform this attack, the attacker must be able to eavesdrop on the packets from the TURN server towards a target for the DoS attack. The attacker uses the TURN server to set up an RTSP session with media flows going through the TURN server. The attacker is in fact
TURN服务器可能成为针对任何受害者的DoS攻击的一部分。要执行此攻击,攻击者必须能够从TURN服务器向DoS攻击目标窃听数据包。攻击者使用TURN服务器设置RTSP会话,媒体流通过TURN服务器。袭击者实际上是
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 an RTSP session and start 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.
通过欺骗回合请求的源地址,创建指向目标的回合映射。由于攻击者需要这些映射的地址,他必须能够窃听或截获从TURN服务器到目标的TURN响应。有了这些地址,他就可以建立RTSP会话并开始传送介质。攻击者必须能够创建这些映射。在这种情况下,攻击者可以通过映射请求中的TURN用户名进行跟踪。
This attack requires that the attacker has access to a user account on the TURN server to be able to set up the TURN mappings. To prevent this attack, the RTSP server needs to verify that the ultimate target destination accepts this media stream, which would require something like ICE's connectivity checks being run between the RTSP server and the RTSP client.
此攻击要求攻击者有权访问TURN服务器上的用户帐户才能设置TURN映射。为防止此攻击,RTSP服务器需要验证最终目标目标是否接受此媒体流,这需要在RTSP服务器和RTSP客户端之间运行ICE连接检查之类的操作。
Firewalls exist for the purpose of protecting a network from traffic not desired by the firewall owner. Therefore, it is a policy decision if a firewall will let RTSP and its media streams through or not. RTSP is designed to be firewall friendly in that it should be easy to design firewall policies to permit passage of RTSP traffic and its media streams.
防火墙的存在是为了保护网络不受防火墙所有者不希望的流量的影响。因此,防火墙是否允许RTSP及其媒体流通过是一项政策决定。RTSP设计为防火墙友好型,因为它应该易于设计防火墙策略,以允许RTSP流量及其媒体流通过。
The firewall will need to allow the media streams associated with an RTSP session to pass through it. Therefore, the firewall will need an ALG that reads RTSP SETUP and TEARDOWN messages. By reading the SETUP message, the firewall can determine what type of transport and from where the media stream packets will be sent. Commonly, there will be the need to open UDP ports for RTP/RTCP. By looking at the source and destination addresses and ports, the opening in the firewall can be minimized to the least necessary. The opening in the firewall can be closed after a TEARDOWN message for that session or the session itself times out.
防火墙需要允许与RTSP会话关联的媒体流通过它。因此,防火墙需要一个ALG来读取RTSP设置和拆卸消息。通过读取设置消息,防火墙可以确定传输类型以及媒体流数据包将从何处发送。通常,需要为RTP/RTCP打开UDP端口。通过查看源地址和目标地址以及端口,可以将防火墙中的漏洞最小化到最不必要的程度。在该会话的拆卸消息或会话本身超时后,可以关闭防火墙中的开口。
The above possibilities for firewalls to inspect and respond to the signaling are prevented if end-to-end confidentiality protection is used for the RTSP signaling, e.g., using the specified RTSP over TLS. As a result, firewalls can't be actively opening pinholes for the media streams based on the signaling. To enable an RTSP ALG in the firewall to correctly function, the hop-by-hop signaling security in RTSP 2.0 can be used (see Section 19.3 of [RTSP]). If not, other methods have to be used to enable the transport flows for the media.
如果对RTSP信令使用端到端保密保护(例如,通过TLS使用指定的RTSP),则阻止防火墙检查和响应信令的上述可能性。因此,防火墙无法根据信令主动为媒体流打开针孔。为了使防火墙中的RTSP ALG正常工作,可以使用RTSP 2.0中的逐跳信令安全性(参见[RTSP]第19.3节)。如果没有,则必须使用其他方法来启用介质的传输流。
Simpler firewalls do allow a client to receive media as long as it has sent packets to the target. Depending on the security level, this can have the same behavior as a NAT. The only difference is
更简单的防火墙允许客户端接收媒体,只要它已向目标发送数据包。根据安全级别的不同,这可能与NAT具有相同的行为。唯一的区别是
that no address translation is done. To use such a firewall, a client would need to implement one of the above described NAT traversal methods that include sending packets to the server to create the necessary filtering state.
没有地址转换。要使用这样的防火墙,客户端需要实现上述NAT遍历方法之一,包括向服务器发送数据包以创建必要的过滤状态。
This section evaluates the techniques described above against the requirements listed in Section 3.
本节根据第3节列出的要求评估上述技术。
In the following table, the columns correspond to the numbered requirements. For instance, the column under R1 corresponds to the first requirement in Section 3: must work for all flavors of NATs. The rows represent the different NAT/firewall traversal techniques. Latch is short for Latching, "V. Latch" is short for "variation of Latching" as described in Section 4.5, and "3-W Latch" is short for the Three-Way Latching described in Section 4.6.
在下表中,各列对应于编号要求。例如,R1下的列对应于第3节中的第一个要求:必须适用于所有NAT。这些行表示不同的NAT/防火墙遍历技术。闩锁是闭锁的简称,“V.闩锁”是第4.5节所述“闭锁变化”的简称,“3-W闩锁”是第4.6节所述三向闭锁的简称。
A summary of the requirements are:
要求摘要如下:
R1: Work for all flavors of NATs
R1:适用于所有口味的NATs
R2: Must work with firewalls, including those with ALGs
R2:必须使用防火墙,包括使用ALG的防火墙
R3: Should have minimal impact on clients not behind NATs, counted in minimal number of additional RTTs
R3:对不支持NAT的客户端的影响应该最小,计入附加RTT的最小数量
R4: Should be simple to use, implement, and administer
R4:应该易于使用、实现和管理
R5: Should provide mitigation against DDoS attacks
R5:应对DDoS攻击提供缓解措施
The following considerations are also added to the requirements:
要求中还增加了以下注意事项:
C1: Will the solution support both clients and servers behind NAT?
C1:该解决方案是否同时支持NAT背后的客户端和服务器?
C2: Is the solution robust as NAT behaviors change?
C2:随着NAT行为的变化,解决方案是否稳健?
------------+------+------+------+------+------+------+------+ | R1 | R2 | R3 | R4 | R5 | C1 | C2 | ------------+------+------+------+------+------+------+------+ STUN | No | Yes | 1 | Maybe| No | No | No | ------------+------+------+------+------+------+------+------+ Emb. STUN | Yes | Yes | 2 | Maybe| No | No | Yes | ------------+------+------+------+------+------+------+------+ ICE | Yes | Yes | 2.5 | No | Yes | Yes | Yes | ------------+------+------+------+------+------+------+------+ Latch | Yes | Yes | 1 | Maybe| No | No | Yes | ------------+------+------+------+------+------+------+------+ V. Latch | Yes | Yes | 1 | Yes | No | No | Yes | ------------+------+------+------+------+------+------+------+ 3-W Latch | Yes | Yes | 1.5 | Maybe| Yes | No | Yes | ------------+------+------+------+------+------+------+------+ ALG |(Yes) | Yes | 0 | No | Yes | No | Yes | ------------+------+------+------+------+------+------+------+ TCP Tunnel | Yes | Yes | 1.5 | Yes | Yes | No | Yes | ------------+------+------+------+------+------+------+------+ TURN | Yes | Yes | 1 | No | Yes |(Yes) | Yes | ------------+------+------+------+------+------+------+------+
------------+------+------+------+------+------+------+------+ | R1 | R2 | R3 | R4 | R5 | C1 | C2 | ------------+------+------+------+------+------+------+------+ STUN | No | Yes | 1 | Maybe| No | No | No | ------------+------+------+------+------+------+------+------+ Emb. STUN | Yes | Yes | 2 | Maybe| No | No | Yes | ------------+------+------+------+------+------+------+------+ ICE | Yes | Yes | 2.5 | No | Yes | Yes | Yes | ------------+------+------+------+------+------+------+------+ Latch | Yes | Yes | 1 | Maybe| No | No | Yes | ------------+------+------+------+------+------+------+------+ V. Latch | Yes | Yes | 1 | Yes | No | No | Yes | ------------+------+------+------+------+------+------+------+ 3-W Latch | Yes | Yes | 1.5 | Maybe| Yes | No | Yes | ------------+------+------+------+------+------+------+------+ ALG |(Yes) | Yes | 0 | No | Yes | No | Yes | ------------+------+------+------+------+------+------+------+ TCP Tunnel | Yes | Yes | 1.5 | Yes | Yes | No | Yes | ------------+------+------+------+------+------+------+------+ TURN | Yes | Yes | 1 | No | Yes |(Yes) | Yes | ------------+------+------+------+------+------+------+------+
Figure 1: Comparison of Fulfillment of Requirements
图1:需求实现的比较
Looking at Figure 1, one would draw the conclusion that using TCP Tunneling or Three-Way Latching are the solutions that best fulfill the requirements. The different techniques were discussed in the MMUSIC WG. It was established that the WG would pursue an ICE-based solution due to its generality and capability of also handling servers delivering media from behind NATs. TCP Tunneling is likely to be available as an alternative, due to its specification in the main RTSP specification. Thus, it can be used if desired, and the potential downsides of using TCP is acceptable in particular deployments. When it comes to Three-Way Latching, it is a very competitive technique given that you don't need support for RTSP servers behind NATs. There was some discussion in the WG about if the increased implementation burden of ICE is sufficiently motivated compared to a the Three-Way Latching solution for this generality. In the end, the authors believed that the reuse of ICE, greater flexibility, and any way needed to deploy a new solution were the decisive factors.
查看图1,可以得出结论,使用TCP隧道或三向锁存是最能满足需求的解决方案。MMUSIC工作组讨论了不同的技术。工作组将寻求基于ICE的解决方案,因为它具有通用性,并且能够处理从NAT后面传送媒体的服务器。由于主RTSP规范中的规范,TCP隧道可能作为替代方案提供。因此,如果需要,可以使用它,并且在特定部署中使用TCP的潜在缺点是可以接受的。当涉及到三向锁存时,这是一种非常有竞争力的技术,因为您不需要NAT背后的RTSP服务器支持。在工作组中有一些讨论,关于与三向锁存解决方案相比,ICE增加的实现负担是否有足够的动机来实现这一普遍性。最后,作者认为ICE的再利用、更大的灵活性以及部署新解决方案所需的任何方式是决定性因素。
The ICE-based RTSP NAT traversal solution is specified in "A Network Address Translator (NAT) Traversal mechanism for media controlled by Real-Time Streaming Protocol (RTSP)" [RTSP-NAT].
基于ICE的RTSP NAT遍历解决方案在“实时流协议(RTSP)控制的媒体的网络地址转换器(NAT)遍历机制[RTSP-NAT]中指定。
In the preceding sections, we have discussed security merits of the different NAT/firewall 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 the hijacking of sessions by a man in the middle.
在前面的部分中,我们讨论了RTSP的不同NAT/防火墙穿越方法的安全优点。总之,NAT的存在是一种安全风险,因为客户端无法对其IP地址执行源身份验证。这阻止了部署任何将来的RTSP扩展,以防止中间人对会话的劫持。
Each of the proposed solutions has security implications. Using STUN will provide the same level of security as RTSP without transport-level security and source authentications, as long as the server does not allow media to be sent to a different IP address than the RTSP client request was sent from.
每一个提议的解决方案都有安全影响。只要服务器不允许将介质发送到不同于RTSP客户端请求的IP地址,使用STUN将提供与RTSP相同的安全级别,而无需传输级别的安全性和源身份验证。
Using Latching will have a higher risk of session hijacking or DoS than normal RTSP. The reason is that there exists a probability that an attacker is able to guess the random bits that the client uses to prove its identity when creating the address bindings. This can be solved in the variation of Latching (Section 4.5) with authentication features. Still, both those variants of Latching are vulnerable against a deliberate attack from the RTSP client to redirect the media stream requested to any target assuming it can spoof the source address. This security vulnerability is solved by performing a Three-way Latching procedure as discussed in Section 4.6.
与普通RTSP相比,使用锁存将有更高的会话劫持或DoS风险。原因是攻击者有可能在创建地址绑定时猜测客户端用来证明其身份的随机位。这可以通过具有身份验证功能的锁存变体(第4.5节)来解决。尽管如此,这两种锁存变体都容易受到RTSP客户端的蓄意攻击,从而将请求的媒体流重定向到任何目标,前提是它可以欺骗源地址。如第4.6节所述,通过执行三向锁存程序解决此安全漏洞。
ICE resolves the binding vulnerability of Latching by using signed STUN messages, as well as requiring that both sides perform connectivity checks to verify that the target IP address in the candidate pair is both reachable and willing to respond. ICE can, however, create a significant amount of traffic if the number of candidate pairs are large. Thus, pacing is required and implementations should attempt to limit their number of candidates to reduce the number of packets.
ICE通过使用签名的STUN消息以及要求双方执行连接性检查来验证候选对中的目标IP地址是否可访问并愿意响应,从而解决了锁定的绑定漏洞。然而,如果候选对的数量很大,ICE会产生大量的流量。因此,需要调整速度,实现应该尝试限制候选数量以减少数据包数量。
If the signaling between the ICE peers (RTSP client and server) is not confidentiality and integrity protected, ICE is vulnerable to attacks where the candidate list is manipulated. The lack of signaling security will also simplify spoofing of STUN binding messages by revealing the secret used in signing.
如果ICE对等方(RTSP客户端和服务器)之间的信令不受机密性和完整性保护,ICE容易受到操纵候选列表的攻击。缺乏信令安全性还将通过泄露签名中使用的秘密简化对STUN绑定消息的欺骗。
The usage of an RTSP ALG does not in itself increase the risk for session hijacking. However, the deployment of ALGs as the sole mechanism for RTSP NAT traversal will prevent deployment of end-to-end encrypted RTSP signaling.
使用RTSP ALG本身不会增加会话劫持的风险。然而,将ALG部署为RTSP NAT遍历的唯一机制将阻止端到端加密RTSP信令的部署。
The usage of TCP tunneling has no known security problems. However, it might provide a bottleneck when it comes to end-to-end RTSP signaling security if TCP tunneling is used on an interleaved RTSP signaling connection.
TCP隧道的使用没有已知的安全问题。但是,如果在交叉RTSP信令连接上使用TCP隧道,则在端到端RTSP信令安全方面可能会出现瓶颈。
The usage of TURN has severe risk of DoS attacks against a client. The TURN server can also be used as a redirect point in a DDoS attack unless the server has strict enough rules for who may create bindings.
使用TURN具有针对客户端的DoS攻击的严重风险。TURN服务器也可以用作DDoS攻击中的重定向点,除非该服务器对可能创建绑定的用户有足够严格的规则。
Since Latching and the variants of Latching have such big security issues, they should not be used at all. Three-Way Latching as well as ICE mitigates these security issues and performs the important return-routability checks that prevent spoofed source addresses, and they should be recommended for that reason. RTP ALGs are a security risk as they can create an incitement against using secure RTSP signaling. That can be avoided as ALGs require trust in the middlebox, and that trust becomes explicit if one uses the hop-by-hop security solution as specified in Section 19.3 of RTSP 2.0. [RTSP]. The remaining methods can be considered safe enough, assuming that the appropriate security mechanisms are used and not ignored.
因为锁存和锁存的变体有如此大的安全问题,所以根本不应该使用它们。三路锁存和ICE缓解了这些安全问题,并执行重要的返回路由性检查,以防止伪造源地址,因此应建议使用这些检查。RTP ALG是一种安全风险,因为它们会煽动使用安全RTSP信号。这是可以避免的,因为ALG需要中间盒中的信任,并且如果使用RTSP 2.0第19.3节中指定的逐跳安全解决方案,则该信任将变得明确。[RTSP]。假设使用了适当的安全机制,而不是忽略,则可以认为其余的方法足够安全。
[NICE] Libnice, "The GLib ICE implementation", June 2015, <http://nice.freedesktop.org/wiki/>.
[NICE]Libnice,“GLib ICE实施”,2015年6月<http://nice.freedesktop.org/wiki/>.
[PJNATH] "PJNATH - Open Source ICE, STUN, and TURN Library", May 2013, <http://www.pjsip.org/pjnath/docs/html/>.
[PJNATH]“PJNATH-开源ICE、STUN和TURN库”,2013年5月<http://www.pjsip.org/pjnath/docs/html/>.
[RFC768] Postel, J., "User Datagram Protocol", STD 6, RFC 768, DOI 10.17487/RFC0768, August 1980, <http://www.rfc-editor.org/info/rfc768>.
[RFC768]Postel,J.,“用户数据报协议”,STD 6,RFC 768,DOI 10.17487/RFC0768,1980年8月<http://www.rfc-editor.org/info/rfc768>.
[RFC793] Postel, J., "Transmission Control Protocol", STD 7, RFC 793, DOI 10.17487/RFC0793, September 1981, <http://www.rfc-editor.org/info/rfc793>.
[RFC793]Postel,J.,“传输控制协议”,标准7,RFC 793,DOI 10.17487/RFC0793,1981年9月<http://www.rfc-editor.org/info/rfc793>.
[RFC2326] Schulzrinne, H., Rao, A., and R. Lanphier, "Real Time Streaming Protocol (RTSP)", RFC 2326, DOI 10.17487/RFC2326, April 1998, <http://www.rfc-editor.org/info/rfc2326>.
[RFC2326]Schulzrinne,H.,Rao,A.,和R.Lanphier,“实时流协议(RTSP)”,RFC 2326,DOI 10.17487/RFC2326,1998年4月<http://www.rfc-editor.org/info/rfc2326>.
[RFC2588] Finlayson, R., "IP Multicast and Firewalls", RFC 2588, DOI 10.17487/RFC2588, May 1999, <http://www.rfc-editor.org/info/rfc2588>.
[RFC2588]Finlayson,R.,“IP多播和防火墙”,RFC 2588,DOI 10.17487/RFC2588,1999年5月<http://www.rfc-editor.org/info/rfc2588>.
[RFC2663] Srisuresh, P. and M. Holdrege, "IP Network Address Translator (NAT) Terminology and Considerations", RFC 2663, DOI 10.17487/RFC2663, August 1999, <http://www.rfc-editor.org/info/rfc2663>.
[RFC2663]Srisuresh,P.和M.Holdrege,“IP网络地址转换器(NAT)术语和注意事项”,RFC 2663,DOI 10.17487/RFC2663,1999年8月<http://www.rfc-editor.org/info/rfc2663>.
[RFC3022] Srisuresh, P. and K. Egevang, "Traditional IP Network Address Translator (Traditional NAT)", RFC 3022, DOI 10.17487/RFC3022, January 2001, <http://www.rfc-editor.org/info/rfc3022>.
[RFC3022]Srisuresh,P.和K.Egevang,“传统IP网络地址转换器(传统NAT)”,RFC 3022,DOI 10.17487/RFC3022,2001年1月<http://www.rfc-editor.org/info/rfc3022>.
[RFC3261] Rosenberg, J., Schulzrinne, H., Camarillo, G., Johnston, A., Peterson, J., Sparks, R., Handley, M., and E. Schooler, "SIP: Session Initiation Protocol", RFC 3261, DOI 10.17487/RFC3261, June 2002, <http://www.rfc-editor.org/info/rfc3261>.
[RFC3261]Rosenberg,J.,Schulzrinne,H.,Camarillo,G.,Johnston,A.,Peterson,J.,Sparks,R.,Handley,M.,和E.Schooler,“SIP:会话启动协议”,RFC 3261,DOI 10.17487/RFC3261,2002年6月<http://www.rfc-editor.org/info/rfc3261>.
[RFC3424] Daigle, L., Ed. and IAB, "IAB Considerations for UNilateral Self-Address Fixing (UNSAF) Across Network Address Translation", RFC 3424, DOI 10.17487/RFC3424, November 2002, <http://www.rfc-editor.org/info/rfc3424>.
[RFC3424]Daigle,L.,Ed.和IAB,“网络地址转换中单边自地址固定(UNSAF)的IAB考虑”,RFC 3424DOI 10.17487/RFC3424,2002年11月<http://www.rfc-editor.org/info/rfc3424>.
[RFC3489] Rosenberg, J., Weinberger, J., Huitema, C., and R. Mahy, "STUN - Simple Traversal of User Datagram Protocol (UDP) Through Network Address Translators (NATs)", RFC 3489, DOI 10.17487/RFC3489, March 2003, <http://www.rfc-editor.org/info/rfc3489>.
[RFC3489]Rosenberg,J.,Weinberger,J.,Huitema,C.,和R.Mahy,“STUN-通过网络地址转换器(NAT)简单遍历用户数据报协议(UDP)”,RFC 3489,DOI 10.17487/RFC3489,2003年3月<http://www.rfc-editor.org/info/rfc3489>.
[RFC3550] Schulzrinne, H., Casner, S., Frederick, R., and V. Jacobson, "RTP: A Transport Protocol for Real-Time Applications", STD 64, RFC 3550, DOI 10.17487/RFC3550, July 2003, <http://www.rfc-editor.org/info/rfc3550>.
[RFC3550]Schulzrinne,H.,Casner,S.,Frederick,R.,和V.Jacobson,“RTP:实时应用的传输协议”,STD 64,RFC 3550,DOI 10.17487/RFC3550,2003年7月<http://www.rfc-editor.org/info/rfc3550>.
[RFC4566] Handley, M., Jacobson, V., and C. Perkins, "SDP: Session Description Protocol", RFC 4566, DOI 10.17487/RFC4566, July 2006, <http://www.rfc-editor.org/info/rfc4566>.
[RFC4566]Handley,M.,Jacobson,V.,和C.Perkins,“SDP:会话描述协议”,RFC 4566,DOI 10.17487/RFC4566,2006年7月<http://www.rfc-editor.org/info/rfc4566>.
[RFC4571] Lazzaro, J., "Framing Real-time Transport Protocol (RTP) and RTP Control Protocol (RTCP) Packets over Connection-Oriented Transport", RFC 4571, DOI 10.17487/RFC4571, July 2006, <http://www.rfc-editor.org/info/rfc4571>.
[RFC4571]Lazzaro,J.,“面向连接传输上的帧实时传输协议(RTP)和RTP控制协议(RTCP)数据包”,RFC 4571,DOI 10.17487/RFC4571,2006年7月<http://www.rfc-editor.org/info/rfc4571>.
[RFC4787] Audet, F., Ed. and C. Jennings, "Network Address Translation (NAT) Behavioral Requirements for Unicast UDP", BCP 127, RFC 4787, DOI 10.17487/RFC4787, January 2007, <http://www.rfc-editor.org/info/rfc4787>.
[RFC4787]Audet,F.,Ed.和C.Jennings,“单播UDP的网络地址转换(NAT)行为要求”,BCP 127,RFC 4787,DOI 10.17487/RFC4787,2007年1月<http://www.rfc-editor.org/info/rfc4787>.
[RFC4961] Wing, D., "Symmetric RTP / RTP Control Protocol (RTCP)", BCP 131, RFC 4961, DOI 10.17487/RFC4961, July 2007, <http://www.rfc-editor.org/info/rfc4961>.
[RFC4961]Wing,D,“对称RTP/RTP控制协议(RTCP)”,BCP 131,RFC 4961,DOI 10.17487/RFC49611907年7月<http://www.rfc-editor.org/info/rfc4961>.
[RFC5245] Rosenberg, J., "Interactive Connectivity Establishment (ICE): A Protocol for Network Address Translator (NAT) Traversal for Offer/Answer Protocols", RFC 5245, DOI 10.17487/RFC5245, April 2010, <http://www.rfc-editor.org/info/rfc5245>.
[RFC5245]Rosenberg,J.,“交互式连接建立(ICE):提供/应答协议的网络地址转换器(NAT)遍历协议”,RFC 5245,DOI 10.17487/RFC5245,2010年4月<http://www.rfc-editor.org/info/rfc5245>.
[RFC5382] Guha, S., Ed., Biswas, K., Ford, B., Sivakumar, S., and P. Srisuresh, "NAT Behavioral Requirements for TCP", BCP 142, RFC 5382, DOI 10.17487/RFC5382, October 2008, <http://www.rfc-editor.org/info/rfc5382>.
[RFC5382]Guha,S.,Ed.,Biswas,K.,Ford,B.,Sivakumar,S.,和P.Srisuresh,“TCP的NAT行为要求”,BCP 142,RFC 5382,DOI 10.17487/RFC5382,2008年10月<http://www.rfc-editor.org/info/rfc5382>.
[RFC5389] Rosenberg, J., Mahy, R., Matthews, P., and D. Wing, "Session Traversal Utilities for NAT (STUN)", RFC 5389, DOI 10.17487/RFC5389, October 2008, <http://www.rfc-editor.org/info/rfc5389>.
[RFC5389]Rosenberg,J.,Mahy,R.,Matthews,P.,和D.Wing,“NAT(STUN)的会话遍历实用程序”,RFC 5389,DOI 10.17487/RFC5389,2008年10月<http://www.rfc-editor.org/info/rfc5389>.
[RFC5764] McGrew, D. and E. Rescorla, "Datagram Transport Layer Security (DTLS) Extension to Establish Keys for the Secure Real-time Transport Protocol (SRTP)", RFC 5764, DOI 10.17487/RFC5764, May 2010, <http://www.rfc-editor.org/info/rfc5764>.
[RFC5764]McGrew,D.和E.Rescorla,“为安全实时传输协议(SRTP)建立密钥的数据报传输层安全(DTLS)扩展”,RFC 5764,DOI 10.17487/RFC5764,2010年5月<http://www.rfc-editor.org/info/rfc5764>.
[RFC5766] Mahy, R., Matthews, P., and J. Rosenberg, "Traversal Using Relays around NAT (TURN): Relay Extensions to Session Traversal Utilities for NAT (STUN)", RFC 5766, DOI 10.17487/RFC5766, April 2010, <http://www.rfc-editor.org/info/rfc5766>.
[RFC5766]Mahy,R.,Matthews,P.,和J.Rosenberg,“使用NAT周围的中继进行遍历(TURN):NAT(STUN)会话遍历实用程序的中继扩展”,RFC 5766,DOI 10.17487/RFC5766,2010年4月<http://www.rfc-editor.org/info/rfc5766>.
[RFC6062] Perreault, S., Ed. and J. Rosenberg, "Traversal Using Relays around NAT (TURN) Extensions for TCP Allocations", RFC 6062, DOI 10.17487/RFC6062, November 2010, <http://www.rfc-editor.org/info/rfc6062>.
[RFC6062]Perreault,S.,Ed.和J.Rosenberg,“围绕TCP分配的NAT(TURN)扩展使用中继进行遍历”,RFC 6062,DOI 10.17487/RFC6062,2010年11月<http://www.rfc-editor.org/info/rfc6062>.
[RFC6263] Marjou, X. and A. Sollaud, "Application Mechanism for Keeping Alive the NAT Mappings Associated with RTP / RTP Control Protocol (RTCP) Flows", RFC 6263, DOI 10.17487/RFC6263, June 2011, <http://www.rfc-editor.org/info/rfc6263>.
[RFC6263]Marjou,X.和A.Sollaud,“保持与RTP/RTP控制协议(RTCP)流相关的NAT映射活动的应用机制”,RFC 6263,DOI 10.17487/RFC6263,2011年6月<http://www.rfc-editor.org/info/rfc6263>.
[RFC6275] Perkins, C., Ed., Johnson, D., and J. Arkko, "Mobility Support in IPv6", RFC 6275, DOI 10.17487/RFC6275, July 2011, <http://www.rfc-editor.org/info/rfc6275>.
[RFC6275]Perkins,C.,Ed.,Johnson,D.,和J.Arkko,“IPv6中的移动支持”,RFC 6275,DOI 10.17487/RFC6275,2011年7月<http://www.rfc-editor.org/info/rfc6275>.
[RFC7362] Ivov, E., Kaplan, H., and D. Wing, "Latching: Hosted NAT Traversal (HNT) for Media in Real-Time Communication", RFC 7362, DOI 10.17487/RFC7362, September 2014, <http://www.rfc-editor.org/info/rfc7362>.
[RFC7362]Ivov,E.,Kaplan,H.,和D.Wing,“闭锁:实时通信中媒体的托管NAT穿越(HNT)”,RFC 7362,DOI 10.17487/RFC7362,2014年9月<http://www.rfc-editor.org/info/rfc7362>.
[RTP-NO-OP] Andreasen, F., "A No-Op Payload Format for RTP", Work in Progress, draft-ietf-avt-rtp-no-op-04, May 2007.
[RTP-NO-OP]Andreasen,F.,“RTP的无操作有效载荷格式”,正在进行的工作,草稿-ietf-avt-RTP-NO-OP-04,2007年5月。
[RTSP] Schulzrinne, H., Rao, A., Lanphier, R., Westerlund, M., and M. Stiemerling, "Real Time Streaming Protocol 2.0 (RTSP)", Work in Progress, draft-ietf-mmusic-rfc2326bis-40, February 2014.
[RTSP]Schulzrinne,H.,Rao,A.,Lanphier,R.,Westerlund,M.,和M.Stiemerling,“实时流协议2.0(RTSP)”,正在进行的工作,草案-ietf-mmusic-rfc2326bis-40,2014年2月。
[RTSP-NAT] Goldberg, J., Westerlund, M., and T. Zeng, "A Network Address Translator (NAT) Traversal Mechanism for Media Controlled by Real-Time Streaming Protocol (RTSP)", Work in Progress, draft-ietf-mmusic-rtsp-nat-22, July 2014.
[RTSP-NAT]Goldberg,J.,Westerlund,M.,和T.Zeng,“由实时流协议(RTSP)控制的媒体的网络地址转换器(NAT)遍历机制”,正在进行的工作,草稿-ietf-mmusic-RTSP-NAT-22,2014年7月。
[STUN-IMPL] "Open Source STUN Client and Server", May 2013, <http://sourceforge.net/projects/stun/>.
[STUN-IMPL]“开源STUN客户端和服务器”,2013年5月<http://sourceforge.net/projects/stun/>.
Acknowledgements
致谢
The authors would also like to thank all persons on the MMUSIC working group's mailing list that have commented on this document. Persons having contributed to this protocol, in no special order, are: Jonathan Rosenberg, Philippe Gentric, Tom Marshall, David Yon, Amir Wolf, Anders Klemets, Flemming Andreasen, Ari Keranen, Bill Atwood, Alissa Cooper, Colin Perkins, Sarah Banks, David Black, and Alvaro Retana. Thomas Zeng would also like to give special thanks to Greg Sherwood of PacketVideo for his input into this memo.
作者还要感谢MMUSIC工作组邮件列表中对本文件发表评论的所有人员。参与本协议的人员(无特殊顺序)为:乔纳森·罗森博格、菲利普·金特里克、汤姆·马歇尔、大卫·杨、阿米尔·沃尔夫、安德斯·克莱梅茨、弗莱明·安德烈森、阿里·凯拉宁、比尔·阿特伍德、艾莉莎·库珀、科林·珀金斯、莎拉·班克斯、大卫·布莱克和阿尔瓦罗·雷塔纳。Thomas Zeng还想特别感谢PacketVideo的Greg Sherwood为这份备忘录所做的贡献。
Section 1.1 contains text originally written for RFC 4787 by Francois Audet and Cullen Jennings.
第1.1节包含Francois Audet和Cullen Jennings最初为RFC 4787编写的文本。
Authors' Addresses
作者地址
Magnus Westerlund Ericsson Farogatan 6 Stockholm SE-164 80 Sweden
Magnus Westerlund Ericsson Farogatan 6斯德哥尔摩SE-164 80瑞典
Phone: +46 8 719 0000 Email: magnus.westerlund@ericsson.com
Phone: +46 8 719 0000 Email: magnus.westerlund@ericsson.com
Thomas Zeng PacketVideo Corp
托马斯曾包装视频公司
Email: thomas.zeng@gmail.com
Email: thomas.zeng@gmail.com