idnits 2.17.1 draft-ietf-behave-rfc3489bis-02.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- ** It looks like you're using RFC 3978 boilerplate. You should update this to the boilerplate described in the IETF Trust License Policy document (see https://trustee.ietf.org/license-info), which is required now. -- Found old boilerplate from RFC 3978, Section 5.1 on line 18. -- Found old boilerplate from RFC 3978, Section 5.5 on line 2099. -- Found old boilerplate from RFC 3979, Section 5, paragraph 1 on line 2076. -- Found old boilerplate from RFC 3979, Section 5, paragraph 2 on line 2083. -- Found old boilerplate from RFC 3979, Section 5, paragraph 3 on line 2089. ** This document has an original RFC 3978 Section 5.4 Copyright Line, instead of the newer IETF Trust Copyright according to RFC 4748. ** This document has an original RFC 3978 Section 5.5 Disclaimer, instead of the newer disclaimer which includes the IETF Trust according to RFC 4748. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- == No 'Intended status' indicated for this document; assuming Proposed Standard Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the RFC 3978 Section 5.4 Copyright Line does not match the current year == The document seems to lack the recommended RFC 2119 boilerplate, even if it appears to use RFC 2119 keywords. (The document does seem to have the reference to RFC 2119 which the ID-Checklist requires). -- The document seems to lack a disclaimer for pre-RFC5378 work, but may have content which was first submitted before 10 November 2008. If you have contacted all the original authors and they are all willing to grant the BCP78 rights to the IETF Trust, then this is fine, and you can ignore this comment. If not, you may need to add the pre-RFC5378 disclaimer. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (July 17, 2005) is 6857 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) ** Obsolete normative reference: RFC 2246 (ref. '2') (Obsoleted by RFC 4346) ** Obsolete normative reference: RFC 3268 (ref. '4') (Obsoleted by RFC 5246) ** Obsolete normative reference: RFC 2818 (ref. '5') (Obsoleted by RFC 9110) -- Obsolete informational reference (is this intentional?): RFC 1510 (ref. '14') (Obsoleted by RFC 4120, RFC 6649) -- Obsolete informational reference (is this intentional?): RFC 2616 (ref. '15') (Obsoleted by RFC 7230, RFC 7231, RFC 7232, RFC 7233, RFC 7234, RFC 7235) -- Obsolete informational reference (is this intentional?): RFC 3489 (ref. '19') (Obsoleted by RFC 5389) -- Obsolete informational reference (is this intentional?): RFC 2327 (ref. '20') (Obsoleted by RFC 4566) == Outdated reference: A later version (-19) exists of draft-ietf-mmusic-ice-04 Summary: 6 errors (**), 0 flaws (~~), 4 warnings (==), 11 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 BEHAVE J. Rosenberg 3 Internet-Draft Cisco Systems 4 Expires: January 18, 2006 C. Huitema 5 Microsoft 6 R. Mahy 7 Airspace 8 July 17, 2005 10 Simple Traversal of UDP Through Network Address Translators (NAT) (STUN) 11 draft-ietf-behave-rfc3489bis-02 13 Status of this Memo 15 By submitting this Internet-Draft, each author represents that any 16 applicable patent or other IPR claims of which he or she is aware 17 have been or will be disclosed, and any of which he or she becomes 18 aware will be disclosed, in accordance with Section 6 of BCP 79. 20 Internet-Drafts are working documents of the Internet Engineering 21 Task Force (IETF), its areas, and its working groups. Note that 22 other groups may also distribute working documents as Internet- 23 Drafts. 25 Internet-Drafts are draft documents valid for a maximum of six months 26 and may be updated, replaced, or obsoleted by other documents at any 27 time. It is inappropriate to use Internet-Drafts as reference 28 material or to cite them other than as "work in progress." 30 The list of current Internet-Drafts can be accessed at 31 http://www.ietf.org/ietf/1id-abstracts.txt. 33 The list of Internet-Draft Shadow Directories can be accessed at 34 http://www.ietf.org/shadow.html. 36 This Internet-Draft will expire on January 18, 2006. 38 Copyright Notice 40 Copyright (C) The Internet Society (2005). 42 Abstract 44 Simple Traversal of UDP Through NATs (STUN) is a lightweight protocol 45 that provides the ability for applications to determine the public IP 46 addresses allocated to them by the NAT. These addresses can be 47 placed into protocol payloads where a client needs to provide a 48 publically routable IP address. STUN works with many existing NATs, 49 and does not require any special behavior from them. As a result, it 50 allows a wide variety of applications to work through existing NAT 51 infrastructure. 53 Table of Contents 55 1. Applicability Statement . . . . . . . . . . . . . . . . . . . 4 56 2. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 4 57 3. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 5 58 4. Definitions . . . . . . . . . . . . . . . . . . . . . . . . . 5 59 5. NAT Variations . . . . . . . . . . . . . . . . . . . . . . . . 6 60 6. Overview of Operation . . . . . . . . . . . . . . . . . . . . 6 61 7. Message Overview . . . . . . . . . . . . . . . . . . . . . . . 9 62 8. Server Behavior . . . . . . . . . . . . . . . . . . . . . . . 10 63 8.1 Binding Requests . . . . . . . . . . . . . . . . . . . . . 10 64 8.2 Shared Secret Requests . . . . . . . . . . . . . . . . . . 14 65 9. Client Behavior . . . . . . . . . . . . . . . . . . . . . . . 16 66 9.1 Discovery . . . . . . . . . . . . . . . . . . . . . . . . 16 67 9.2 Obtaining a Shared Secret . . . . . . . . . . . . . . . . 17 68 9.3 Formulating the Binding Request . . . . . . . . . . . . . 18 69 9.4 Processing Binding Responses . . . . . . . . . . . . . . . 19 70 9.5 Using the Mapped Address . . . . . . . . . . . . . . . . . 21 71 10. Protocol Details . . . . . . . . . . . . . . . . . . . . . . 22 72 10.1 Message Header . . . . . . . . . . . . . . . . . . . . . . 22 73 10.2 Message Attributes . . . . . . . . . . . . . . . . . . . . 23 74 10.2.1 MAPPED-ADDRESS . . . . . . . . . . . . . . . . . . . . 25 75 10.2.2 RESPONSE-ADDRESS . . . . . . . . . . . . . . . . . . . 26 76 10.2.3 CHANGED-ADDRESS . . . . . . . . . . . . . . . . . . . 26 77 10.2.4 CHANGE-REQUEST . . . . . . . . . . . . . . . . . . . . 26 78 10.2.5 SOURCE-ADDRESS . . . . . . . . . . . . . . . . . . . . 27 79 10.2.6 USERNAME . . . . . . . . . . . . . . . . . . . . . . . 27 80 10.2.7 PASSWORD . . . . . . . . . . . . . . . . . . . . . . . 27 81 10.2.8 MESSAGE-INTEGRITY . . . . . . . . . . . . . . . . . . 27 82 10.2.9 ERROR-CODE . . . . . . . . . . . . . . . . . . . . . . 27 83 10.2.10 UNKNOWN-ATTRIBUTES . . . . . . . . . . . . . . . . . 29 84 10.2.11 REFLECTED-FROM . . . . . . . . . . . . . . . . . . . 29 85 10.2.12 XOR-MAPPED-ADDRESS . . . . . . . . . . . . . . . . . 29 86 10.2.13 XOR-ONLY . . . . . . . . . . . . . . . . . . . . . . 30 87 10.2.14 SERVER . . . . . . . . . . . . . . . . . . . . . . . 30 88 11. Security Considerations . . . . . . . . . . . . . . . . . . 31 89 11.1 Attacks on STUN . . . . . . . . . . . . . . . . . . . . . 31 90 11.1.1 Attack I: DDOS Against a Target . . . . . . . . . . . 31 91 11.1.2 Attack II: Silencing a Client . . . . . . . . . . . . 31 92 11.1.3 Attack III: Assuming the Identity of a Client . . . . 32 93 11.1.4 Attack IV: Eavesdropping . . . . . . . . . . . . . . . 32 94 11.2 Launching the Attacks . . . . . . . . . . . . . . . . . . 32 95 11.2.1 Approach I: Compromise a Legitimate STUN Server . . . 33 96 11.2.2 Approach II: DNS Attacks . . . . . . . . . . . . . . . 33 97 11.2.3 Approach III: Rogue Router or NAT . . . . . . . . . . 33 98 11.2.4 Approach IV: MITM . . . . . . . . . . . . . . . . . . 34 99 11.2.5 Approach V: Response Injection Plus DoS . . . . . . . 34 100 11.2.6 Approach VI: Duplication . . . . . . . . . . . . . . . 35 101 11.3 Countermeasures . . . . . . . . . . . . . . . . . . . . . 35 102 11.4 Residual Threats . . . . . . . . . . . . . . . . . . . . . 37 103 12. IANA Considerations . . . . . . . . . . . . . . . . . . . . 37 104 13. IAB Considerations . . . . . . . . . . . . . . . . . . . . . 37 105 13.1 Problem Definition . . . . . . . . . . . . . . . . . . . . 37 106 13.2 Exit Strategy . . . . . . . . . . . . . . . . . . . . . . 38 107 13.3 Brittleness Introduced by STUN . . . . . . . . . . . . . . 38 108 13.4 Requirements for a Long Term Solution . . . . . . . . . . 40 109 13.5 Issues with Existing NAPT Boxes . . . . . . . . . . . . . 41 110 13.6 In Closing . . . . . . . . . . . . . . . . . . . . . . . . 42 111 14. Changes Since RFC 3489 . . . . . . . . . . . . . . . . . . . 42 112 15. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . 43 113 16. References . . . . . . . . . . . . . . . . . . . . . . . . . 43 114 16.1 Normative References . . . . . . . . . . . . . . . . . . . 43 115 16.2 Informative References . . . . . . . . . . . . . . . . . . 43 116 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . 45 117 Intellectual Property and Copyright Statements . . . . . . . . 46 119 1. Applicability Statement 121 This protocol is not a cure-all for the problems associated with NAT. 122 It does not enable incoming TCP connections through NAT. It allows 123 incoming UDP packets through NAT, but only through a subset of 124 existing NAT types. In particular, STUN does not enable incoming UDP 125 packets through symmetric NATs (defined below), which are common in 126 large enterprises. STUN does not work when it is used to obtain an 127 address to communicate with a peer which happens to be behind the 128 same NAT. STUN does not work when the STUN server is not in a common 129 shared address realm. For a more complete discussion of the 130 limitations of STUN, see Section 13. 132 2. Introduction 134 Network Address Translators (NATs), while providing many benefits, 135 also come with many drawbacks. The most troublesome of those 136 drawbacks is the fact that they break many existing IP applications, 137 and make it difficult to deploy new ones. Guidelines have been 138 developed [8] that describe how to build "NAT friendly" protocols, 139 but many protocols simply cannot be constructed according to those 140 guidelines. Examples of such protocols include almost all peer-to- 141 peer protocols, such as multimedia communications, file sharing and 142 games. 144 To combat this problem, Application Layer Gateways (ALGs) have been 145 embedded in NATs. ALGs perform the application layer functions 146 required for a particular protocol to traverse a NAT. Typically, 147 this involves rewriting application layer messages to contain 148 translated addresses, rather than the ones inserted by the sender of 149 the message. ALGs have serious limitations, including scalability, 150 reliability, and speed of deploying new applications. To resolve 151 these problems, the Middlebox Communications (MIDCOM) protocol is 152 being developed [9]. MIDCOM allows an application entity, such as an 153 end client or network server of some sort (like a Session Initiation 154 Protocol (SIP) proxy [10]) to control a NAT (or firewall), in order 155 to obtain NAT bindings and open or close pinholes. In this way, NATs 156 and applications can be separated once more, eliminating the need for 157 embedding ALGs in NATs, and resolving the limitations imposed by 158 current architectures. 160 Unfortunately, MIDCOM requires upgrades to existing NAT and 161 firewalls, in addition to application components. Complete upgrades 162 of these NAT and firewall products will take a long time, potentially 163 years. This is due, in part, to the fact that the deployers of NAT 164 and firewalls are not the same people who are deploying and using 165 applications. As a result, the incentive to upgrade these devices 166 will be low in many cases. Consider, for example, an airport 167 Internet lounge that provides access with a NAT. A user connecting 168 to the NATed network may wish to use a peer-to-peer service, but 169 cannot, because the NAT doesn't support it. Since the administrators 170 of the lounge are not the ones providing the service, they are not 171 motivated to upgrade their NAT equipment to support it, using either 172 an ALG, or MIDCOM. 174 Another problem is that the MIDCOM protocol requires that the agent 175 controlling the middleboxes know the identity of those middleboxes, 176 and have a relationship with them which permits control. In many 177 configurations, this will not be possible. For example, many cable 178 access providers use NAT in front of their entire access network. 179 This NAT could be in addition to a residential NAT purchased and 180 operated by the end user. The end user will probably not have a 181 control relationship with the NAT in the cable access network, and 182 may not even know of its existence. 184 Many existing proprietary protocols, such as those for online games 185 (such as the games described in RFC 3027 [11]) and Voice over IP, 186 have developed tricks that allow them to operate through NATs without 187 changing those NATs. This document is an attempt to take some of 188 those ideas, and codify them into an interoperable protocol that can 189 meet the needs of many applications. 191 The protocol described here, Simple Traversal of UDP Through NAT 192 (STUN), allows entities behind a NAT to learn the address bindings 193 allocated by the NAT. STUN requires no changes to NATs, and works 194 with an arbitrary number of NATs in tandem between the application 195 entity and the public Internet. 197 3. Terminology 199 In this document, the key words "MUST", "MUST NOT", "REQUIRED", 200 "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", 201 and "OPTIONAL" are to be interpreted as described in BCP 14, RFC 2119 202 [1] and indicate requirement levels for compliant STUN 203 implementations. 205 4. Definitions 207 STUN Client: A STUN client (also just referred to as a client) is an 208 entity that generates STUN requests. A STUN client can execute on 209 an end system, such as a user's PC, or can run in a network 210 element, such as a conferencing server. 212 STUN Server: A STUN Server (also just referred to as a server) is an 213 entity that receives STUN requests, and sends STUN responses. 214 STUN servers are generally attached to the public Internet. 216 5. NAT Variations 218 It is assumed that the reader is familiar with NATs. It has been 219 observed that NAT treatment of UDP varies among implementations. The 220 four treatments observed in implementations are: 222 Full Cone: A full cone NAT is one where all requests from the same 223 internal IP address and port are mapped to the same external IP 224 address and port. Furthermore, any external host can send a 225 packet to the internal host, by sending a packet to the mapped 226 external address. 228 Restricted Cone: A restricted cone NAT is one where all requests from 229 the same internal IP address and port are mapped to the same 230 external IP address and port. Unlike a full cone NAT, an external 231 host (with IP address X) can send a packet to the internal host 232 only if the internal host had previously sent a packet to IP 233 address X. 235 Port Restricted Cone: A port restricted cone NAT is like a restricted 236 cone NAT, but the restriction includes port numbers. 237 Specifically, an external host can send a packet, with source IP 238 address X and source port P, to the internal host only if the 239 internal host had previously sent a packet to IP address X and 240 port P. 242 Symmetric: A symmetric NAT is one where all requests from the same 243 internal IP address and port, to a specific destination IP address 244 and port, are mapped to the same external IP address and port. If 245 the same host sends a packet with the same source address and 246 port, but to a different destination, a different mapping is used. 247 Furthermore, only the external host that receives a packet can 248 send a UDP packet back to the internal host. 250 6. Overview of Operation 252 This section is descriptive only. Normative behavior is described in 253 Section 8 and Section 9. 255 /-----\ 256 // STUN \\ 257 | Server | 258 \\ // 259 \-----/ 261 +--------------+ Public Internet 262 ................| NAT 2 |....................... 263 +--------------+ 265 +--------------+ Private NET 2 266 ................| NAT 1 |....................... 267 +--------------+ 269 /-----\ 270 // STUN \\ 271 | Client | 272 \\ // Private NET 1 273 \-----/ 275 Figure 1 277 The typical STUN configuration is shown in Figure 1. A STUN client 278 is connected to private network 1. This network connects to private 279 network 2 through NAT 1. Private network 2 connects to the public 280 Internet through NAT 2. The STUN server resides on the public 281 Internet. 283 STUN is a simple client-server protocol. A client sends a request to 284 a server, and the server returns a response. There are two types of 285 requests - Binding Requests, sent over UDP, and Shared Secret 286 Requests, sent over TLS [2] over TCP. Shared Secret Requests ask the 287 server to return a temporary username and password. This username 288 and password are used in a subsequent Binding Request and Binding 289 Response, for the purposes of authentication and message integrity. 291 Binding requests are used to determine the bindings allocated by 292 NATs. The client sends a Binding Request to the server, over UDP. 293 The server examines the source IP address and port of the request, 294 and copies them into a response that is sent back to the client. 295 There are some parameters in the request that allow the client to ask 296 that the response be sent elsewhere, or that the server send the 297 response from a different address and port. The flags allow for STUN 298 to be used in diagnostic applications. There are attributes for 299 providing message integrity and authentication. 301 The STUN client is typically embedded in an application which needs 302 to obtain a public IP address and port that can be used to receive 303 data. For example, it might need to obtain an IP address and port to 304 receive Real Time Transport Protocol (RTP) [12] traffic. When the 305 application starts, the STUN client within the application sends a 306 STUN Shared Secret Request to its server, obtains a username and 307 password, and then sends it a Binding Request. STUN servers can be 308 discovered through DNS SRV records [3], and it is generally assumed 309 that the client is configured with the domain to use to find the STUN 310 server. Generally, this will be the domain of the provider of the 311 service the application is using (such a provider is incented to 312 deploy STUN servers in order to allow its customers to use its 313 application through NAT). Of course, a client can determine the 314 address or domain name of a STUN server through other means. A STUN 315 server can even be embedded within an end system. 317 The STUN Binding Request is used to discover the public IP address 318 and port mappings generated by the NAT. Binding Requests are sent to 319 the STUN server using UDP. When a Binding Request arrives at the 320 STUN server, it may have passed through one or more NATs between the 321 STUN client and the STUN server. As a result, the source address of 322 the request received by the server will be the mapped address created 323 by the NAT closest to the server. The STUN server copies that source 324 IP address and port into a STUN Binding Response, and sends it back 325 to the source IP address and port of the STUN request. For all of 326 the NAT types above, this response will arrive at the STUN client. 328 When the STUN client receives the STUN Binding Response, it compares 329 the IP address and port in the packet with the local IP address and 330 port it bound to when the request was sent. If these do not match, 331 the STUN client is behind one or more NATs. The IP address and port 332 in the body of the STUN response are public, and can be used by any 333 host on the public Internet to send packets to the application that 334 sent the STUN request. An application need only listen on the IP 335 address and port from which the STUN request was sent. Packets sent 336 by a host on the public Internet to the public address and port 337 learned by STUN will be received by the application, so long as 338 conditions permit. The conditions in which these packets will not be 339 received by the client are described in Section 1. 341 It should be noted that the configuration in Figure 1 is not the only 342 permissible configuration. The STUN server can be located anywhere, 343 including within another client. The only requirement is that the 344 STUN server is reachable by the client, and if the client is trying 345 to obtain a publicly routable address, that the server reside on the 346 public Internet. 348 7. Message Overview 350 STUN messages are TLV (type-length-value) encoded using big endian 351 (network ordered) binary. All STUN messages start with a STUN 352 header, followed by a STUN payload. The payload is a series of STUN 353 attributes, the set of which depends on the message type. The STUN 354 header contains a STUN message type, transaction ID, and length. The 355 message type can be Binding Request, Binding Response, Binding Error 356 Response, Shared Secret Request, Shared Secret Response, or Shared 357 Secret Error Response. The transaction ID is used to correlate 358 requests and responses. The length indicates the total length of the 359 STUN payload, not including the header. This allows STUN to run over 360 TCP. Shared Secret Requests are always sent over TCP (indeed, using 361 TLS over TCP). 363 Several STUN attributes are defined. The first is a MAPPED-ADDRESS 364 attribute, which is an IP address and port. It is always placed in 365 the Binding Response, and it indicates the source IP address and port 366 the server saw in the Binding Request. There is also a RESPONSE- 367 ADDRESS attribute, which contains an IP address and port. The 368 RESPONSE-ADDRESS attribute can be present in the Binding Request, and 369 indicates where the Binding Response is to be sent. It's optional, 370 and when not present, the Binding Response is sent to the source IP 371 address and port of the Binding Request. 373 The third attribute is the CHANGE-REQUEST attribute, and it contains 374 two flags to control the IP address and port used to send the 375 response. These flags are called "change IP" and "change port" 376 flags. The CHANGE-REQUEST attribute is allowed only in the Binding 377 Request. They instruct the server to send the Binding Responses from 378 a different source IP address and port. The CHANGE-REQUEST attribute 379 is optional in the Binding Request. 381 The fourth attribute is the CHANGED-ADDRESS attribute. It is present 382 in Binding Responses. It informs the client of the source IP address 383 and port that would be used if the client requested the "change IP" 384 and "change port" behavior. 386 The fifth attribute is the SOURCE-ADDRESS attribute. It is only 387 present in Binding Responses. It indicates the source IP address and 388 port where the response was sent from. 390 The RESPONSE-ADDRESS, CHANGE-REQUEST, CHANGED-ADDRESS and SOURCE- 391 ADDRESS attributes are primarily useful for diagnostic applications 392 that use STUN in order to determine information about the type of 393 NAT. The usage of these attributes for such purposes is outside the 394 scope of this specification. 396 The sixth attribute is the USERNAME attribute. It is present in a 397 Shared Secret Response, which provides the client with a temporary 398 username and password (encoded in the PASSWORD attribute). The 399 USERNAME is also present in Binding Requests, serving as an index to 400 the shared secret used for the integrity protection of the Binding 401 Request. The seventh attribute, PASSWORD, is only found in Shared 402 Secret Response messages. The eight attribute is the MESSAGE- 403 INTEGRITY attribute, which contains a message integrity check over 404 the Binding Request or Binding Response. 406 The ninth attribute is the ERROR-CODE attribute. This is present in 407 the Binding Error Response and Shared Secret Error Response. It 408 indicates the error that has occurred. The tenth attribute is the 409 UNKNOWN-ATTRIBUTES attribute, which is present in either the Binding 410 Error Response or Shared Secret Error Response. It indicates the 411 mandatory attributes from the request which were unknown. The 412 eleventh attribute is the REFLECTED-FROM attribute, which is present 413 in Binding Responses. It indicates the IP address and port of the 414 sender of a Binding Request, used for traceability purposes to 415 prevent certain denial-of-service attacks. 417 The twelfth attribute is XOR-MAPPED-ADDRESS. Like MAPPED-ADDRESS, it 418 is present in the Binding Response, and tells the client the source 419 IP address and port where the Binding Request came from. However, it 420 is encoded using an Exclusive Or (XOR) operation with the transaction 421 ID. Some NAT devices have been found to rewrite binary encoded IP 422 addresses present in protocol PDUs. Such behavior interferes with 423 the operation of STUN. Clients use XOR-MAPPED-ADDRESS instead of 424 MAPPED-ADDRESS whenever both are present in a Binding Response. 425 Using XOR-MAPPED-ADDRESS protects the client from such interfering 426 NAT devices. 428 The last attribute is XOR-ONLY. It can be present in the Binding 429 Request. It tells the server to only send a XOR-MAPPED-ADDRESS in 430 the Binding Response. 432 8. Server Behavior 434 The server behavior depends on whether the request is a Binding 435 Request or a Shared Secret Request. 437 8.1 Binding Requests 439 A STUN server MUST be prepared to receive Binding Requests on four 440 address/port combinations - (A1, P1), (A2, P1), (A1, P2), and (A2, 441 P2). (A1, P1) represent the primary address and port, and these are 442 the ones obtained through the client discovery procedures below. 443 Typically, P1 will be port 3478, the default STUN port. A2 and P2 444 are arbitrary. A2 and P2 are advertised by the server through the 445 CHANGED-ADDRESS attribute, as described below. 447 OPEN ISSUE: Experience has shown that the usage of a dynamic port 448 for P2 has been problematic. This is because firewall 449 administrators have opened up port 3478 to permit STUN, but 450 disallowed the dynamic port used by the server. This causes the 451 diagnostic techniques to fail. This can be fixed through 452 allocation of a second port number from IANA. Does that belong in 453 this specification or in the diagnostic specification? I think it 454 has to go here. 456 It is RECOMMENDED that the server check the Binding Request for a 457 MESSAGE-INTEGRITY attribute. If not present, and the server requires 458 integrity checks on the request, it generates a Binding Error 459 Response with an ERROR-CODE attribute with response code 401. If the 460 MESSAGE-INTEGRITY attribute was present, the server computes the HMAC 461 over the request as described in Section 10.2.8. The key to use 462 depends on the shared secret mechanism. If the STUN Shared Secret 463 Request was used, the key MUST be the one associated with the 464 USERNAME attribute present in the request. If the USERNAME attribute 465 was not present, the server MUST generate a Binding Error Response. 466 The Binding Error Response MUST include an ERROR-CODE attribute with 467 response code 432. If the USERNAME is present, but the server 468 doesn't remember the shared secret for that USERNAME (because it 469 timed out, for example), the server MUST generate a Binding Error 470 Response. The Binding Error Response MUST include an ERROR-CODE 471 attribute with response code 430. If the server does know the shared 472 secret, but the computed HMAC differs from the one in the request, 473 the server MUST generate a Binding Error Response with an ERROR-CODE 474 attribute with response code 431. The Binding Error Response is sent 475 to the IP address and port the Binding Request came from, and sent 476 from the IP address and port the Binding Request was sent to. 478 Assuming the message integrity check passed, processing continues. 479 The server MUST check for any attributes in the request with values 480 less than or equal to 0x7fff which it does not understand. If it 481 encounters any, the server MUST generate a Binding Error Response, 482 and it MUST include an ERROR-CODE attribute with a 420 response code. 484 That response MUST contain an UNKNOWN-ATTRIBUTES attribute listing 485 the attributes with values less than or equal to 0x7fff which were 486 not understood. The Binding Error Response is sent to the IP address 487 and port the Binding Request came from, and sent from the IP address 488 and port the Binding Request was sent to. 490 Assuming the request was correctly formed, the server MUST generate a 491 single Binding Response. The Binding Response MUST contain the same 492 transaction ID contained in the Binding Request. The length in the 493 message header MUST contain the total length of the message in bytes, 494 excluding the header. The Binding Response MUST have a message type 495 of "Binding Response". 497 If the XOR-ONLY attribute was not present in the request, the server 498 MUST add a MAPPED-ADDRESS attribute to the Binding Response. The IP 499 address component of this attribute MUST be set to the source IP 500 address observed in the Binding Request. The port component of this 501 attribute MUST be set to the source port observed in the Binding 502 Request. If the XOR-ONLY attribute was present in the request, the 503 server MUST NOT include the MAPPED-ADDRESS attribute in the Binding 504 Response. 506 The server MUST add a XOR-MAPPED-ADDRESS attribute to the Binding 507 Response. This attribute has the same information content as MAPPED- 508 ADDRESS (in particular, it conveys the IP address and port observed 509 in the source IP and source port fields of the STUN request), but is 510 encoded by performing an XOR operation between the transaction ID and 511 the IP address and port. The details on the encoding can be found in 512 Section 10.2.12. 514 The server SHOULD add a SERVER attribute to any Binding Response or 515 Binding Error Response it generates, and its value SHOULD indicate 516 the manufacturer of the software and a software version or build 517 number. 519 If the RESPONSE-ADDRESS attribute was absent from the Binding 520 Request, the destination address and port of the Binding Response 521 MUST be the same as the source address and port of the Binding 522 Request. Otherwise, the destination address and port of the Binding 523 Response MUST be the value of the IP address and port in the 524 RESPONSE-ADDRESS attribute. 526 The source address and port of the Binding Response depend on the 527 value of the CHANGE-REQUEST attribute and on the address and port the 528 Binding Request was received on, and are summarized in Table 1. 530 Let Da represent the destination IP address of the Binding Request 531 (which will be either A1 or A2), and Dp represent the destination 532 port of the Binding Request (which will be either P1 or P2). Let Ca 533 represent the other address, so that if Da is A1, Ca is A2. If Da is 534 A2, Ca is A1. Similarly, let Cp represent the other port, so that if 535 Dp is P1, Cp is P2. If Dp is P2, Cp is P1. If the "change port" 536 flag was set in CHANGE-REQUEST attribute of the Binding Request, and 537 the "change IP" flag was not set, the source IP address of the 538 Binding Response MUST be Da and the source port of the Binding 539 Response MUST be Cp. If the "change IP" flag was set in the Binding 540 Request, and the "change port" flag was not set, the source IP 541 address of the Binding Response MUST be Ca and the source port of the 542 Binding Response MUST be Dp. When both flags are set, the source IP 543 address of the Binding Response MUST be Ca and the source port of the 544 Binding Response MUST be Cp. If neither flag is set, or if the 545 CHANGE-REQUEST attribute is absent entirely, the source IP address of 546 the Binding Response MUST be Da and the source port of the Binding 547 Response MUST be Dp. 549 Flags Source Address Source Port CHANGED-ADDRESS 550 none Da Dp Ca:Cp 551 Change IP Ca Dp Ca:Cp 552 Change port Da Cp Ca:Cp 553 Change IP and 554 Change port Ca Cp Ca:Cp 556 Figure 2 558 The server MUST add a SOURCE-ADDRESS attribute to the Binding 559 Response, containing the source address and port used to send the 560 Binding Response. 562 The server MUST add a CHANGED-ADDRESS attribute to the Binding 563 Response. This contains the source IP address and port that would be 564 used if the client had set the "change IP" and "change port" flags in 565 the Binding Request. As summarized in Table 1, these are Ca and Cp, 566 respectively, regardless of the value of the CHANGE-REQUEST flags. 568 If the Binding Request contained both the USERNAME and MESSAGE- 569 INTEGRITY attributes, the server MUST add a MESSAGE-INTEGRITY 570 attribute to the Binding Response. The attribute contains an HMAC 571 [13] over the response, as described in Section 10.2.8. The key to 572 use depends on the shared secret mechanism. If the STUN Shared 573 Secret Request was used, the key MUST be the one associated with the 574 USERNAME attribute present in the Binding Request. 576 If the Binding Request contained a RESPONSE-ADDRESS attribute, the 577 server MUST add a REFLECTED-FROM attribute to the response. If the 578 Binding Request was authenticated using a username obtained from a 579 Shared Secret Request, the REFLECTED-FROM attribute MUST contain the 580 source IP address and port where that Shared Secret Request came 581 from. If the username present in the request was not allocated using 582 a Shared Secret Request, the REFLECTED-FROM attribute MUST contain 583 the source address and port of the entity which obtained the 584 username, as best can be verified with the mechanism used to allocate 585 the username. If the username was not present in the request, and 586 the server was willing to process the request, the REFLECTED-FROM 587 attribute SHOULD contain the source IP address and port where the 588 request came from. 590 The server SHOULD NOT retransmit the response. Reliability is 591 achieved by having the client periodically resend the request, each 592 of which triggers a response from the server. 594 8.2 Shared Secret Requests 596 Shared Secret Requests are always received on TLS connections. When 597 the server receives a request from the client to establish a TLS 598 connection, it MUST proceed with TLS, and SHOULD present a site 599 certificate. The TLS ciphersuite TLS_RSA_WITH_AES_128_CBC_SHA [4] 600 SHOULD be used. Client TLS authentication MUST NOT be done, since 601 the server is not allocating any resources to clients, and the 602 computational burden can be a source of attacks. 604 If the server receives a Shared Secret Request, it MUST verify that 605 the request arrived on a TLS connection. If it did not receive the 606 request over TLS, it MUST generate a Shared Secret Error Response, 607 and it MUST include an ERROR-CODE attribute with a 433 response code. 608 The destination for the error response depends on the transport on 609 which the request was received. If the Shared Secret Request was 610 received over TCP, the Shared Secret Error Response is sent over the 611 same connection the request was received on. If the Shared Secret 612 Request was receive over UDP, the Shared Secret Error Response is 613 sent to the source IP address and port that the request came from. 615 The server MUST check for any attributes in the request with values 616 less than or equal to 0x7fff which it does not understand. If it 617 encounters any, the server MUST generate a Shared Secret Error 618 Response, and it MUST include an ERROR-CODE attribute with a 420 619 response code. That response MUST contain an UNKNOWN-ATTRIBUTES 620 attribute listing the attributes with values less than or equal to 621 0x7fff which were not understood. The Shared Secret Error Response 622 is sent over the TLS connection. 624 All Shared Secret Error Responses MUST contain the same transaction 625 ID contained in the Shared Secret Request. The length in the message 626 header MUST contain the total length of the message in bytes, 627 excluding the header. The Shared Secret Error Response MUST have a 628 message type of "Shared Secret Error Response" (0x0112). 630 Assuming the request was properly constructed, the server creates a 631 Shared Secret Response. The Shared Secret Response MUST contain the 632 same transaction ID contained in the Shared Secret Request. The 633 length in the message header MUST contain the total length of the 634 message in bytes, excluding the header. The Shared Secret Response 635 MUST have a message type of "Shared Secret Response". The Shared 636 Secret Response MUST contain a USERNAME attribute and a PASSWORD 637 attribute. The USERNAME attribute serves as an index to the 638 password, which is contained in the PASSWORD attribute. The server 639 can use any mechanism it chooses to generate the username. However, 640 the username MUST be valid for a period of at least 10 minutes. 641 Validity means that the server can compute the password for that 642 username. There MUST be a single password for each username. In 643 other words, the server cannot, 10 minutes later, assign a different 644 password to the same username. The server MUST hand out a different 645 username for each distinct Shared Secret Request. Distinct, in this 646 case, implies a different transaction ID. It is RECOMMENDED that the 647 server explicitly invalidate the username after ten minutes. It MUST 648 invalidate the username after 30 minutes. The PASSWORD contains the 649 password bound to that username. The password MUST have at least 128 650 bits. The likelihood that the server assigns the same password for 651 two different usernames MUST be vanishingly small, and the passwords 652 MUST be unguessable. In other words, they MUST be a 653 cryptographically random function of the username. 655 These requirements can still be met using a stateless server, by 656 intelligently computing the USERNAME and PASSWORD. One approach is 657 to construct the USERNAME as: 659 USERNAME = 661 Where prefix is some random text string (different for each shared 662 secret request), rounded-time is the current time modulo 20 minutes, 663 clientIP is the source IP address where the Shared Secret Request 664 came from, and hmac is an HMAC [13] over the prefix, rounded-time, 665 and client IP, using a server private key. 667 The password is then computed as: 669 password = 671 With this structure, the username itself, which will be present in 672 the Binding Request, contains the source IP address where the Shared 673 Secret Request came from. That allows the server to meet the 674 requirements specified in Section 8.1 for constructing the REFLECTED- 675 FROM attribute. The server can verify that the username was not 676 tampered with, using the hmac present in the username. 678 The server SHOULD include a SERVER attribute in any Shared Secret 679 Response or Shared Secret Error response it generates, and its value 680 SHOULD indicate the manufacturer of the software and a software 681 version or build number. 683 The Shared Secret Response is sent over the same TLS connection the 684 request was received on. The server SHOULD keep the connection open, 685 and let the client close it. 687 9. Client Behavior 689 The behavior of the client is very straightforward. Its task is to 690 discover the STUN server, obtain a shared secret, formulate the 691 Binding Request, handle request reliability, process the Binding 692 Responses, and use the resulting addresses. 694 9.1 Discovery 696 Generally, the client will be configured with a domain name of the 697 provider of the STUN servers. This domain name is resolved to an IP 698 address and port using the SRV procedures specified in RFC 2782 [3]. 700 Specifically, the service name is "stun". The protocol is "udp" for 701 sending Binding Requests, or "tcp" for sending Shared Secret 702 Requests. The procedures of RFC 2782 are followed to determine the 703 server to contact. RFC 2782 spells out the details of how a set of 704 SRV records are sorted and then tried. However, it only states that 705 the client should "try to connect to the (protocol, address, 706 service)" without giving any details on what happens in the event of 707 failure. Those details are described here for STUN. 709 For STUN requests, failure occurs if there is a transport failure of 710 some sort (generally, due to fatal ICMP errors in UDP or connection 711 failures in TCP). Failure also occurs if the transaction fails due 712 to timeout. This occurs 9.5 seconds after the first request is sent, 713 for both Shared Secret Requests and Binding Requests. See 714 Section 9.3 for details on transaction timeouts for Binding Requests. 715 If a failure occurs, the client SHOULD create a new request, which is 716 identical to the previous, but has a different transaction ID and 717 MESSAGE INTEGRITY attribute (the HMAC will change because the 718 transaction ID has changed). That request is sent to the next 719 element in the list as specified by RFC 2782. 721 The default port for STUN requests is 3478, for both TCP and UDP. 722 Administrators SHOULD use this port in their SRV records, but MAY use 723 others. 725 If no SRV records were found, the client performs an A record lookup 726 of the domain name. The result will be a list of IP addresses, each 727 of which can be contacted at the default port. 729 This would allow a firewall admin to open the STUN port, so hosts 730 within the enterprise could access new applications. Whether they 731 will or won't do this is a good question. 733 9.2 Obtaining a Shared Secret 735 As discussed in Section 11, there are several attacks possible on 736 STUN systems. Many of these are prevented through integrity of 737 requests and responses. To provide that integrity, STUN makes use of 738 a shared secret between client and server, used as the keying 739 material for an HMAC used in both the Binding Request and Binding 740 Response. STUN allows for the shared secret to be obtained in any 741 way (for example, Kerberos [14]). However, it MUST have at least 128 742 bits of randomness. In order to ensure interoperability, this 743 specification describes a TLS-based mechanism. This mechanism, 744 described in this section, MUST be implemented by clients and 745 servers. 747 First, the client determines the IP address and port that it will 748 open a TCP connection to. This is done using the discovery 749 procedures in Section 9.1. The client opens up the connection to 750 that address and port, and immediately begins TLS negotiation [2]. 751 The client MUST verify the identity of the server. To do that, it 752 follows the identification procedures defined in Section 3.1 of RFC 753 2818 [5]. Those procedures assume the client is dereferencing a URI. 754 For purposes of usage with this specification, the client treats the 755 domain name or IP address used in Section 9.1 as the host portion of 756 the URI that has been dereferenced. 758 Once the connection is opened, the client sends a Shared Secret 759 request. This request has no attributes, just the header. The 760 transaction ID in the header MUST meet the requirements outlined for 761 the transaction ID in a binding request, described in Section 9.3 762 below. The server generates a response, which can either be a Shared 763 Secret Response or a Shared Secret Error Response. 765 If the response was a Shared Secret Error Response, the client checks 766 the response code in the ERROR-CODE attribute. Interpretation of 767 those response codes is identical to the processing of Section 9.4 768 for the Binding Error Response. 770 If a client receives a Shared Secret Response with an attribute that 771 is not understood whose type is greater than 0x7fff, the attribute 772 MUST be ignored. If the client receives a Shared Secret Response 773 with an unknown attribute whose type is less than or equal to 0x7fff, 774 the response is ignored. 776 If the response was a Shared Secret Response, it will contain a short 777 lived username and password, encoded in the USERNAME and PASSWORD 778 attributes, respectively. 780 The client MAY generate multiple Shared Secret Requests on the 781 connection, and it MAY do so before receiving Shared Secret Responses 782 to previous Shared Secret Requests. The client SHOULD close the 783 connection as soon as it has finished obtaining usernames and 784 passwords. 786 Section 9.3 describes how these passwords are used to provide 787 integrity protection over Binding Requests, and Section 8.1 describes 788 how it is used in Binding Responses. 790 9.3 Formulating the Binding Request 792 A Binding Request formulated by the client follows the syntax rules 793 defined in Section 10. Any two requests that are not bit-wise 794 identical, and not sent to the same server from the same IP address 795 and port, MUST carry different transaction IDs. The transaction ID 796 MUST be uniformly and randomly distributed between 0 and 2**128 - 1. 797 The large range is needed because the transaction ID serves as a form 798 of randomization, helping to prevent replays of previously signed 799 responses from the server. The message type of the request MUST be 800 "Binding Request". 802 The RESPONSE-ADDRESS attribute is optional in the Binding Request. 803 It is used if the client wishes the response to be sent to a 804 different IP address and port than the one the request was sent from. 805 The CHANGE-REQUEST attribute is also optional. It tells the server 806 to send the response from a different address or port. Both 807 RESPONSE-ADDRESS and CHANGE-REQUEST are primarily useful in 808 diagnostic operations for analyzing the behavior of a NAT. Under 809 normal usage, neither of these attributes will be present. 811 The client SHOULD add a MESSAGE-INTEGRITY and USERNAME attribute to 812 the Binding Request. This MESSAGE-INTEGRITY attribute contains an 813 HMAC [13]. The value of the username, and the key to use in the 814 MESSAGE-INTEGRITY attribute depend on the shared secret mechanism. 815 If the STUN Shared Secret Request was used, the USERNAME must be a 816 valid username obtained from a Shared Secret Response within the last 817 nine minutes. The shared secret for the HMAC is the value of the 818 PASSWORD attribute obtained from the same Shared Secret Response. 820 Once formulated, the client sends the Binding Request. Reliability 821 is accomplished through client retransmissions. Clients SHOULD 822 retransmit the request starting with an interval of 100ms, doubling 823 every retransmit until the interval reaches 1.6s. Retransmissions 824 continue with intervals of 1.6s until a response is received, or a 825 total of 9 requests have been sent. If no response is received by 826 1.6 seconds after the last request has been sent, the client SHOULD 827 consider the transaction to have failed. In other words, requests 828 would be sent at times 0ms, 100ms, 300ms, 700ms, 1500ms, 3100ms, 829 4700ms, 6300ms, and 7900ms. At 9500ms, the client considers the 830 transaction to have failed if no response has been received. 832 9.4 Processing Binding Responses 834 The response can either be a Binding Response or Binding Error 835 Response. Binding Error Responses are always received on the source 836 address and port the request was sent from. A Binding Response will 837 be received on the address and port placed in the RESPONSE-ADDRESS 838 attribute of the request. If none was present, the Binding Responses 839 will be received on the source address and port the request was sent 840 from. 842 If the response is a Binding Error Response, the client checks the 843 response code from the ERROR-CODE attribute of the response. For a 844 400 response code, the client SHOULD display the reason phrase to the 845 user. For a 420 response code, the client SHOULD retry the request, 846 this time omitting any attributes listed in the UNKNOWN-ATTRIBUTES 847 attribute of the response. For a 430 response code, the client 848 SHOULD obtain a new shared secret, and retry the Binding Request with 849 a new transaction. For 401 and 432 response codes, if the client had 850 omitted the USERNAME or MESSAGE-INTEGRITY attribute as indicated by 851 the error, it SHOULD try again with those attributes. For a 431 852 response code, the client SHOULD alert the user, and MAY try the 853 request again after obtaining a new username and password. For a 500 854 response code, the client MAY wait several seconds and then retry the 855 request. For a 600 response code, the client MUST NOT retry the 856 request, and SHOULD display the reason phrase to the user. Unknown 857 attributes between 400 and 499 are treated like a 400, unknown 858 attributes between 500 and 599 are treated like a 500, and unknown 859 attributes between 600 and 699 are treated like a 600. Any response 860 between 100 and 399 MUST result in the cessation of request 861 retransmissions, but otherwise is discarded. 863 If a client receives a response with an unknown attribute whose type 864 is greater than 0x7fff, the attribute MUST be ignored. If the client 865 receives a response with an unknown attribute whose type is less than 866 or equal to 0x7fff, request retransmissions MUST cease, but the 867 entire response is otherwise ignored. 869 If the response is a Binding Response, the client SHOULD check the 870 response for a MESSAGE-INTEGRITY attribute. If not present, and the 871 client placed a MESSAGE-INTEGRITY attribute into the request, it MUST 872 discard the response. If present, the client computes the HMAC over 873 the response as described in Section 10.2.8. The key to use depends 874 on the shared secret mechanism. If the STUN Shared Secret Request 875 was used, the key MUST be same as used to compute the MESSAGE- 876 INTEGRITY attribute in the request. If the computed HMAC differs 877 from the one in the response, the client SHOULD determine if the 878 integrity check failed due to a NAT rewriting the MAPPED-ADDRESS. To 879 perform this check, the client compares the IP address and port in 880 the MAPPED-ADDRESS with the IP address and port extracted from XOR- 881 MAPPED-ADDRESS (extraction involves xor'ing the contents of X-port 882 and X-value with the transaction ID, as described in Section 10). If 883 the two IP addresses and ports differ, the client MUST discard the 884 response, but then it SHOULD retry the Binding Request with the XOR- 885 ONLY attribute included. This tells the server not to include a 886 MAPPED-ADDRESS in the Binding Response. 888 If there is no XOR-MAPPED-ADDRESS, or if there is, but there are no 889 differences between the two IP addresses and ports, the client MUST 890 discard the response and SHOULD alert the user about a possible 891 attack. 893 If the computed HMAC matches the one from the response, processing 894 continues. 896 Reception of a response (either Binding Error Response or Binding 897 Response) to a Binding Request will terminate retransmissions of that 898 request. However, clients MUST continue to listen for responses to a 899 Binding Request for 10 seconds after the first response. If it 900 receives any responses in this interval with different message types 901 (Binding Responses and Binding Error Responses, for example), 902 different MAPPED-ADDRESSes, or different XOR-MAPPED-ADDRESSes, it is 903 an indication of a possible attack. The client MUST NOT use the 904 MAPPED-ADDRESS or XOR-MAPPED-ADDRESS from any of the responses it 905 received (either the first or the additional ones), and SHOULD alert 906 the user. 908 Furthermore, if a client receives more than twice as many Binding 909 Responses as the number of Binding Requests it sent, it MUST NOT use 910 the MAPPED-ADDRESS or XOR-MAPPED-ADDRESS from any of those responses, 911 and SHOULD alert the user about a potential attack. 913 If the Binding Response is authenticated, and the MAPPED-ADDRESS or 914 XOR-MAPPED-ADDRESS was not discarded because of a potential attack, 915 the CLIENT MAY use the information in the Binding Response. In 916 particular, the client SHOULD used the IP address and port from the 917 XOR-MAPPED-ADDRESS instead of the information from the MAPPED- 918 ADDRESS, assuming XOR-MAPPED-ADDRESS was present in the Binding 919 Response. Servers compliant to RFC 3489 [19] will not generate XOR- 920 MAPPED-ADDRESS, so a client MUST be prepared to handle the case where 921 only MAPPED-ADDRESS is present. In such a case, the information from 922 MAPPED-ADDRESS is used. 924 It is also possible for an IPv4 host to receive a XOR-MAPPED-ADDRESS 925 or MAPPED-ADDRESS containing an IPv6 address, or for an IPv6 host to 926 receive a XOR-MAPPED-ADDRESS or MAPPED-ADDRESS containing an IPv4 927 address. Clients MUST be prepared for this case. 929 The next section provides additional details on how the mapped 930 address information is used. 932 9.5 Using the Mapped Address 934 The mapped address present in the XOR-MAPPED-ADDRESS attribute (or 935 MAPPED-ADDRESS if not present) of the binding response can be used by 936 clients to facilitate UDP traversal of NATs for many applications. 938 NAT traversal is problematic for applications which require a client 939 to insert an IP address and port into a message, to which subsequent 940 messages will be delivered by other entities in a network. Normally, 941 the client would insert the IP address and port from a local 942 interface into the message. However, if the client is behind a NAT, 943 this local interface will be a private address. Clients within other 944 address realms will not be able to send messages to that address. 946 An example of a such an application is SIP, which requires a client 947 to include IP address and port information in several places, 948 including the Session Description Protocol (SDP) body [20] carried by 949 SIP. The IP address and port present in the SDP is used for receipt 950 of media. 952 To use STUN as a technique for traversal of SIP and other protocols, 953 when the client wishes to send a protocol message, it figures out the 954 places in the protocol data unit where it is supposed to insert its 955 own IP address along with a port. Instead of directly using a port 956 allocated from a local interface, the client allocates a port from 957 the local interface, and from that port, initiates the STUN 958 procedures described above. The XOR-MAPPED-ADDRESS (or MAPPED- 959 ADDRESS if not present) in the STUN Binding Response provides the 960 client with an alternative IP address and port which it can then 961 include in the protocol PDU. This IP address and port may be within 962 a different address family than the local interfaces used by the 963 client. This is not an error condition. In such a case, the client 964 would use the learned IP address and port as if the client was a host 965 with an interface within that address family. 967 In the case of SIP, to populate the SDP appropriately, a client would 968 generate two STUN Binding Request messages at the time a call is 969 initiated or answered. One is used to obtain the IP address and port 970 for RTP, and the other, for the Real Time Control Protocol (RTCP) 971 [12]. The client might also need to use STUN to obtain IP addresses 972 and ports for usage in other parts of the SIP message. The detailed 973 usage of STUN to facilitate SIP NAT traversal is outside the scope of 974 this specification. 976 As discussed above, the addresses learned by STUN may not be usable 977 with all entities with whom a client might wish to communicate. The 978 way in which this problem is handled depends on the application 979 protocol. The ideal solution is for a protocol to allow a client to 980 include a multiplicity of addresses and ports in the PDU. One of 981 those can be the address and port determined from STUN, and the 982 others can include addresses and ports learned from other techniques. 983 The application protocol would then provide a means for dynamically 984 detecting which one works. An example of such an an approach is 985 Interactive Connectivity Establishment (ICE) [21]. 987 10. Protocol Details 989 This section presents the detailed encoding of a STUN message. 991 STUN is a request-response protocol. Clients send a request, and the 992 server sends a response. There are two requests, Binding Request, 993 and Shared Secret Request. The response to a Binding Request can 994 either be the Binding Response or Binding Error Response. The 995 response to a Shared Secret Request can either be a Shared Secret 996 Response or a Shared Secret Error Response. 998 STUN messages are encoded using binary fields. All integer fields 999 are carried in network byte order, that is, most significant byte 1000 (octet) first. This byte order is commonly known as big-endian. The 1001 transmission order is described in detail in Appendix B of RFC 791 1002 [6]. Unless otherwise noted, numeric constants are in decimal (base 1003 10). 1005 10.1 Message Header 1007 All STUN messages consist of a 20 byte header: 1009 0 1 2 3 1010 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 1011 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1012 | STUN Message Type | Message Length | 1013 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1014 | 1015 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1017 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1018 Transaction ID 1019 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1020 | 1021 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1023 The Message Types can take on the following values: 1025 0x0001 : Binding Request 1026 0x0101 : Binding Response 1027 0x0111 : Binding Error Response 1028 0x0002 : Shared Secret Request 1029 0x0102 : Shared Secret Response 1030 0x0112 : Shared Secret Error Response 1032 It is important to note that the most significant two bits of every 1033 STUN message are equal to 0b00. This aids in differentiating STUN 1034 packets from RTP packets, in the case that both are sent to the same 1035 IP address and port, as is done with ICE. 1037 The message length is the count, in bytes, of the size of the 1038 message, not including the 20 byte header. 1040 The transaction ID is a 128 bit identifier. It also serves as salt 1041 to randomize the request and the response. All responses carry the 1042 same identifier as the request they correspond to. 1044 10.2 Message Attributes 1046 After the header are 0 or more attributes. Each attribute is TLV 1047 encoded, with a 16 bit type, 16 bit length, and variable value: 1049 0 1 2 3 1050 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 1051 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1052 | Type | Length | 1053 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1054 | Value .... 1056 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1058 The following types are defined: 1060 0x0001: MAPPED-ADDRESS 1061 0x0002: RESPONSE-ADDRESS 1062 0x0003: CHANGE-REQUEST 1063 0x0004: SOURCE-ADDRESS 1064 0x0005: CHANGED-ADDRESS 1065 0x0006: USERNAME 1066 0x0007: PASSWORD 1067 0x0008: MESSAGE-INTEGRITY 1068 0x0009: ERROR-CODE 1069 0x000a: UNKNOWN-ATTRIBUTES 1070 0x000b: REFLECTED-FROM 1071 0x8020: XOR-MAPPED-ADDRESS 1072 0x0021: XOR-ONLY 1073 0x8022: SERVER 1075 To allow future revisions of this specification to add new attributes 1076 if needed, the attribute space is divided into optional and mandatory 1077 ones. Attributes with values greater than 0x7fff are optional, which 1078 means that the message can be processed by the client or server even 1079 though the attribute is not understood. Attributes with values less 1080 than or equal to 0x7fff are mandatory to understand, which means that 1081 the client or server cannot process the message unless it understands 1082 the attribute. 1084 The MESSAGE-INTEGRITY attribute MUST be the last attribute within a 1085 message. Any attributes that are known, but are not supposed to be 1086 present in a message (MAPPED-ADDRESS in a request, for example) MUST 1087 be ignored. 1089 Figure 9 indicates which attributes are present in which messages. 1090 An M indicates that inclusion of the attribute in the message is 1091 mandatory, O means its optional, C means it's conditional based on 1092 some other aspect of the message, and N/A means that the attribute is 1093 not applicable to that message type. 1095 Binding Shared Shared Shared 1096 Binding Binding Error Secret Secret Secret 1097 Att. Req. Resp. Resp. Req. Resp. Error 1098 Resp. 1099 _____________________________________________________________________ 1100 MAPPED-ADDRESS N/A M N/A N/A N/A N/A 1101 RESPONSE-ADDRESS O N/A N/A N/A N/A N/A 1102 CHANGE-REQUEST O N/A N/A N/A N/A N/A 1103 SOURCE-ADDRESS N/A M N/A N/A N/A N/A 1104 CHANGED-ADDRESS N/A M N/A N/A N/A N/A 1105 USERNAME O N/A N/A N/A M N/A 1106 PASSWORD N/A N/A N/A N/A M N/A 1107 MESSAGE-INTEGRITY O O N/A N/A N/A N/A 1108 ERROR-CODE N/A N/A M N/A N/A M 1109 UNKNOWN-ATTRIBUTES N/A N/A C N/A N/A C 1110 REFLECTED-FROM N/A C N/A N/A N/A N/A 1111 XOR-MAPPED-ADDRESS N/A M N/A N/A N/A N/A 1112 XOR-ONLY O N/A N/A N/A N/A N/A 1113 SERVER N/A O O N/A O O 1115 Figure 9 1117 The length refers to the length of the value element, expressed as an 1118 unsigned integral number of bytes. 1120 10.2.1 MAPPED-ADDRESS 1122 The MAPPED-ADDRESS attribute indicates the mapped IP address and 1123 port. It consists of an eight bit address family, and a sixteen bit 1124 port, followed by a fixed length value representing the IP address. 1125 If the address family is IPv4, the address is 32 bits. If the 1126 address family is IPv6, the address is 128 bits. 1128 0 1 2 3 1129 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 1130 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1131 |x x x x x x x x| Family | Port | 1132 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1133 | Address (variable) 1134 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1136 The port is a network byte ordered representation of the mapped port. 1137 The address family can take on the following values: 1139 0x01: IPv4 1141 0x02: IPv6 1143 The first 8 bits of the MAPPED-ADDRESS are ignored, for the purposes 1144 of aligning parameters on natural boundaries. 1146 10.2.2 RESPONSE-ADDRESS 1148 The RESPONSE-ADDRESS attribute indicates where the response to a 1149 Binding Request should be sent. Its syntax is identical to MAPPED- 1150 ADDRESS. 1152 10.2.3 CHANGED-ADDRESS 1154 The CHANGED-ADDRESS attribute indicates the IP address and port where 1155 responses would have been sent from if the "change IP" and "change 1156 port" flags had been set in the CHANGE-REQUEST attribute of the 1157 Binding Request. The attribute is always present in a Binding 1158 Response, independent of the value of the flags. Its syntax is 1159 identical to MAPPED-ADDRESS. 1161 10.2.4 CHANGE-REQUEST 1163 The CHANGE-REQUEST attribute is used by the client to request that 1164 the server use a different address and/or port when sending the 1165 response. The attribute is 32 bits long, although only two bits (A 1166 and B) are used: 1168 0 1 2 3 1169 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 1170 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1171 |0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 A B 0| 1172 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1174 The meaning of the flags is: 1176 A: This is the "change IP" flag. If true, it requests the server to 1177 send the Binding Response with a different IP address than the one 1178 the Binding Request was received on. 1180 B: This is the "change port" flag. If true, it requests the server 1181 to send the Binding Response with a different port than the one 1182 the Binding Request was received on. 1184 10.2.5 SOURCE-ADDRESS 1186 The SOURCE-ADDRESS attribute is present in Binding Responses. It 1187 indicates the source IP address and port that the server is sending 1188 the response from. Its syntax is identical to that of MAPPED- 1189 ADDRESS. 1191 10.2.6 USERNAME 1193 The USERNAME attribute is used for message integrity. It serves as a 1194 means to identify the shared secret used in the message integrity 1195 check. The USERNAME is always present in a Shared Secret Response, 1196 along with the PASSWORD. It is optionally present in a Binding 1197 Request when message integrity is used. 1199 The value of USERNAME is a variable length opaque value. Its length 1200 MUST be a multiple of 4 (measured in bytes) in order to guarantee 1201 alignment of attributes on word boundaries. 1203 10.2.7 PASSWORD 1205 The PASSWORD attribute is used in Shared Secret Responses. It is 1206 always present in a Shared Secret Response, along with the USERNAME. 1208 The value of PASSWORD is a variable length value that is to be used 1209 as a shared secret. Its length MUST be a multiple of 4 (measured in 1210 bytes) in order to guarantee alignment of attributes on word 1211 boundaries. 1213 10.2.8 MESSAGE-INTEGRITY 1215 The MESSAGE-INTEGRITY attribute contains an HMAC-SHA1 [13] of the 1216 STUN message. It can be present in Binding Requests or Binding 1217 Responses. Since it uses the SHA1 hash, the HMAC will be 20 bytes. 1218 The text used as input to HMAC is the STUN message, including the 1219 header, up to and including the attribute preceding the MESSAGE- 1220 INTEGRITY attribute. That text is then padded with zeroes so as to 1221 be a multiple of 64 bytes. As a result, the MESSAGE-INTEGRITY 1222 attribute MUST be the last attribute in any STUN message. The key 1223 used as input to HMAC depends on the context. 1225 10.2.9 ERROR-CODE 1227 The ERROR-CODE attribute is present in the Binding Error Response and 1228 Shared Secret Error Response. It is a numeric value in the range of 1229 100 to 699 plus a textual reason phrase encoded in UTF-8, and is 1230 consistent in its code assignments and semantics with SIP [10] and 1231 HTTP [15]. The reason phrase is meant for user consumption, and can 1232 be anything appropriate for the response code. The lengths of the 1233 reason phrases MUST be a multiple of 4 (measured in bytes). This can 1234 be accomplished by added spaces to the end of the text, if necessary. 1235 Recommended reason phrases for the defined response codes are 1236 presented below. 1238 To facilitate processing, the class of the error code (the hundreds 1239 digit) is encoded separately from the rest of the code. 1241 0 1 2 3 1242 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 1243 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1244 | 0 |Class| Number | 1245 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1246 | Reason Phrase (variable) .. 1247 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1249 The class represents the hundreds digit of the response code. The 1250 value MUST be between 1 and 6. The number represents the response 1251 code modulo 100, and its value MUST be between 0 and 99. 1253 The following response codes, along with their recommended reason 1254 phrases (in brackets) are defined at this time: 1256 400 (Bad Request): The request was malformed. The client should not 1257 retry the request without modification from the previous attempt. 1259 401 (Unauthorized): The Binding Request did not contain a MESSAGE- 1260 INTEGRITY attribute. 1262 420 (Unknown Attribute): The server did not understand a mandatory 1263 attribute in the request. 1265 430 (Stale Credentials): The Binding Request did contain a MESSAGE- 1266 INTEGRITY attribute, but it used a shared secret that has expired. 1267 The client should obtain a new shared secret and try again. 1269 431 (Integrity Check Failure): The Binding Request contained a 1270 MESSAGE-INTEGRITY attribute, but the HMAC failed verification. 1271 This could be a sign of a potential attack, or client 1272 implementation error. 1274 432 (Missing Username): The Binding Request contained a MESSAGE- 1275 INTEGRITY attribute, but not a USERNAME attribute. Both must be 1276 present for integrity checks. 1278 433 (Use TLS): The Shared Secret request has to be sent over TLS, but 1279 was not received over TLS. 1281 500 (Server Error): The server has suffered a temporary error. The 1282 client should try again. 1284 600 (Global Failure): The server is refusing to fulfill the request. 1285 The client should not retry. 1287 10.2.10 UNKNOWN-ATTRIBUTES 1289 The UNKNOWN-ATTRIBUTES attribute is present only in a Binding Error 1290 Response or Shared Secret Error Response when the response code in 1291 the ERROR-CODE attribute is 420. 1293 The attribute contains a list of 16 bit values, each of which 1294 represents an attribute type that was not understood by the server. 1295 If the number of unknown attributes is an odd number, one of the 1296 attributes MUST be repeated in the list, so that the total length of 1297 the list is a multiple of 4 bytes. 1299 0 1 2 3 1300 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 1301 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1302 | Attribute 1 Type | Attribute 2 Type | 1303 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1304 | Attribute 3 Type | Attribute 4 Type ... 1305 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1307 10.2.11 REFLECTED-FROM 1309 The REFLECTED-FROM attribute is present only in Binding Responses, 1310 when the Binding Request contained a RESPONSE-ADDRESS attribute. The 1311 attribute contains the identity (in terms of IP address) of the 1312 source where the request came from. Its purpose is to provide 1313 traceability, so that a STUN server cannot be used as a reflector for 1314 denial-of-service attacks. 1316 Its syntax is identical to the MAPPED-ADDRESS attribute. 1318 10.2.12 XOR-MAPPED-ADDRESS 1320 The XOR-MAPPED-ADDRESS attribute is only present in Binding 1321 Responses. It provides the same information that is present in the 1322 MAPPED-ADDRESS attribute. However, the information is encoded by 1323 performing an exclusive or (XOR) operation between the mapped address 1324 and the transaction ID. Unfortunately, some NAT devices have been 1325 found to rewrite binary encoded IP addresses and ports that are 1326 present in protocol payloads. This behavior interferes with the 1327 operation of STUN. By providing the mapped address in an obfuscated 1328 form, STUN can continue to operate through these devices. 1330 The format of the XOR-MAPPED-ADDRESS is: 1332 0 1 2 3 1333 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 1334 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1335 |x x x x x x x x| Family | X-Port | 1336 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1337 | X-Address (Variable) 1338 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1340 The Family represents the IP address family, and is encoded 1341 identically to the Family in MAPPED-ADDRESS. 1343 X-Port is equal to the port in MAPPED-ADDRESS, exclusive or'ed with 1344 most significant 16 bits of the transaction ID. If the IP address 1345 family is IPv4, X-Address is equal to the IP address in MAPPED- 1346 ADDRESS, exclusive or'ed with the most significant 32 bits of the 1347 transaction ID. If the IP address family is IPv6, the X-Address is 1348 equal to the IP address in MAPPED-ADDRESS, exclusive or'ed with the 1349 entire 128 bit transaction ID. 1351 10.2.13 XOR-ONLY 1353 This attribute is present in a Binding Request. It is used by a 1354 client to request that a server compliant to this specification omit 1355 the MAPPED-ADDRESS from a Binding Response, and include only the XOR- 1356 MAPPED-ADDRESS. This is necessary in cases where a Binding Response 1357 is failing integrity checks because a NAT is rewriting the contents 1358 of a MAPPED-ADDRESS in the Binding Response. 1360 This attribute has a length of zero, and therefore contains no other 1361 information past the common attribute header. 1363 10.2.14 SERVER 1365 The server attribute contains a textual description of the software 1366 being used by the server, including manufacturer and version number. 1367 The attribute has no impact on operation of the protocol, and serves 1368 only as a tool for diagnostic and debugging purposes. 1370 The value of SERVER is variable length. Its length MUST be a 1371 multiple of 4 (measured in bytes) in order to guarantee alignment of 1372 attributes on word boundaries. 1374 11. Security Considerations 1376 11.1 Attacks on STUN 1378 Generally speaking, attacks on STUN can be classified into denial of 1379 service attacks and eavesdropping attacks. Denial of service attacks 1380 can be launched against a STUN server itself, or against other 1381 elements using the STUN protocol. 1383 STUN servers create state through the Shared Secret Request 1384 mechanism. To prevent being swamped with traffic, a STUN server 1385 SHOULD limit the number of simultaneous TLS connections it will hold 1386 open by dropping an existing connection when a new connection request 1387 arrives (based on an Least Recently Used (LRU) policy, for example). 1388 Similarly, it SHOULD limit the number of shared secrets it will 1389 store, in the event that the server is storing the shared secrets. 1391 The attacks of greater interest are those in which the STUN server 1392 and client are used to launch DOS attacks against other entities, 1393 including the client itself. 1395 Many of the attacks require the attacker to generate a response to a 1396 legitimate STUN request, in order to provide the client with a faked 1397 XOR-MAPPED-ADDRESS or MAPPED-ADDRESS. In the sections below, we 1398 refer to either the XOR-MAPPED-ADDRESS or MAPPED-ADDRESS as just the 1399 mapped address (note the lower case). The attacks that can be 1400 launched using such a technique include: 1402 11.1.1 Attack I: DDOS Against a Target 1404 In this case, the attacker provides a large number of clients with 1405 the same faked mapped address that points to the intended target. 1406 This will trick all the STUN clients into thinking that their 1407 addresses are equal to that of the target. The clients then hand out 1408 that address in order to receive traffic on it (for example, in SIP 1409 or H.323 messages). However, all of that traffic becomes focused at 1410 the intended target. The attack can provide substantial 1411 amplification, especially when used with clients that are using STUN 1412 to enable multimedia applications. 1414 11.1.2 Attack II: Silencing a Client 1416 In this attack, the attacker seeks to deny a client access to 1417 services enabled by STUN (for example, a client using STUN to enable 1418 SIP-based multimedia traffic). To do that, the attacker provides 1419 that client with a faked mapped address. The mapped address it 1420 provides is an IP address that routes to nowhere. As a result, the 1421 client won't receive any of the packets it expects to receive when it 1422 hands out the mapped address. 1424 This exploitation is not very interesting for the attacker. It 1425 impacts a single client, which is frequently not the desired target. 1426 Moreover, any attacker that can mount the attack could also deny 1427 service to the client by other means, such as preventing the client 1428 from receiving any response from the STUN server, or even a DHCP 1429 server. 1431 11.1.3 Attack III: Assuming the Identity of a Client 1433 This attack is similar to attack II. However, the faked mapped 1434 address points to the attacker themself. This allows the attacker to 1435 receive traffic which was destined for the client. 1437 11.1.4 Attack IV: Eavesdropping 1439 In this attack, the attacker forces the client to use a mapped 1440 address that routes to itself. It then forwards any packets it 1441 receives to the client. This attack would allow the attacker to 1442 observe all packets sent to the client. However, in order to launch 1443 the attack, the attacker must have already been able to observe 1444 packets from the client to the STUN server. In most cases (such as 1445 when the attack is launched from an access network), this means that 1446 the attacker could already observe packets sent to the client. This 1447 attack is, as a result, only useful for observing traffic by 1448 attackers on the path from the client to the STUN server, but not 1449 generally on the path of packets being routed towards the client. 1451 11.2 Launching the Attacks 1453 It is important to note that attacks of this nature (injecting 1454 responses with fake mapped addresses) require that the attacker be 1455 capable of eavesdropping requests sent from the client to the server 1456 (or to act as a MITM for such attacks). This is because STUN 1457 requests contain a transaction identifier, selected by the client, 1458 which is random with 128 bits of entropy. The server echoes this 1459 value in the response, and the client ignores any responses that 1460 don't have a matching transaction ID. Therefore, in order for an 1461 attacker to provide a faked response that is accepted by the client, 1462 the attacker needs to know what the transaction ID in the request 1463 was. The large amount of randomness, combined with the need to know 1464 when the client sends a request, precludes attacks that involve 1465 guessing the transaction ID. 1467 Since all of the above attacks rely on this one primitive - injecting 1468 a response with a faked mapped address - preventing the attacks is 1469 accomplished by preventing this one operation. To prevent it, we 1470 need to consider the various ways in which it can be accomplished. 1471 There are several: 1473 11.2.1 Approach I: Compromise a Legitimate STUN Server 1475 In this attack, the attacker compromises a legitimate STUN server 1476 through a virus or Trojan horse. Presumably, this would allow the 1477 attacker to take over the STUN server, and control the types of 1478 responses it generates. 1480 Compromise of a STUN server can also lead to discovery of open ports. 1481 Knowledge of an open port creates an opportunity for DoS attacks on 1482 those ports (or DDoS attacks if the traversed NAT is a full cone 1483 NAT). Discovering open ports is already fairly trivial using port 1484 probing, so this does not represent a major threat. 1486 11.2.2 Approach II: DNS Attacks 1488 STUN servers are discovered using DNS SRV records. If an attacker 1489 can compromise the DNS, it can inject fake records which map a domain 1490 name to the IP address of a STUN server run by the attacker. This 1491 will allow it to inject fake responses to launch any of the attacks 1492 above. 1494 11.2.3 Approach III: Rogue Router or NAT 1496 Rather than compromise the STUN server, an attacker can cause a STUN 1497 server to generate responses with the wrong mapped address by 1498 compromising a router or NAT on the path from the client to the STUN 1499 server. When the STUN request passes through the rogue router or 1500 NAT, it rewrites the source address of the packet to be that of the 1501 desired mapped address. This address cannot be arbitrary. If the 1502 attacker is on the public Internet (that is, there are no NATs 1503 between it and the STUN server), and the attacker doesn't modify the 1504 STUN request, the address has to have the property that packets sent 1505 from the STUN server to that address would route through the 1506 compromised router. This is because the STUN server will send the 1507 responses back to the source address of the request. With a modified 1508 source address, the only way they can reach the client is if the 1509 compromised router directs them there. If the attacker is on the 1510 public Internet, but they can modify the STUN request, they can 1511 insert a RESPONSE-ADDRESS attribute into the request, containing the 1512 actual source address of the STUN request. This will cause the 1513 server to send the response to the client, independent of the source 1514 address the STUN server sees. This gives the attacker the ability to 1515 forge an arbitrary source address when it forwards the STUN request. 1517 If the attacker is on a private network (that is, there are NATs 1518 between it and the STUN server), the attacker will not be able to 1519 force the server to generate arbitrary mapped addresses in responses. 1520 They will only be able force the STUN server to generate mapped 1521 addresses which route to the private network. This is because the 1522 NAT between the attacker and the STUN server will rewrite the source 1523 address of the STUN request, mapping it to a public address that 1524 routes to the private network. Because of this, the attacker can 1525 only force the server to generate faked mapped addresses that route 1526 to the private network. Unfortunately, it is possible that a low 1527 quality NAT would be willing to map an allocated public address to 1528 another public address (as opposed to an internal private address), 1529 in which case the attacker could forge the source address in a STUN 1530 request to be an arbitrary public address. This kind of behavior 1531 from NATs does appear to be rare. 1533 11.2.4 Approach IV: MITM 1535 As an alternative to approach III, if the attacker can place an 1536 element on the path from the client to the server, the element can 1537 act as a man-in-the-middle. In that case, it can intercept a STUN 1538 request, and generate a STUN response directly with any desired value 1539 of the mapped address field. Alternatively, it can forward the STUN 1540 request to the server (after potential modification), receive the 1541 response, and forward it to the client. When forwarding the request 1542 and response, this attack is subject to the same limitations on the 1543 mapped address described in Section 11.2.3. 1545 11.2.5 Approach V: Response Injection Plus DoS 1547 In this approach, the attacker does not need to be a MITM (as in 1548 approaches III and IV). Rather, it only needs to be able to 1549 eavesdrop onto a network segment that carries STUN requests. This is 1550 easily done in multiple access networks such as ethernet or 1551 unprotected 802.11. To inject the fake response, the attacker 1552 listens on the network for a STUN request. When it sees one, it 1553 simultaneously launches a DoS attack on the STUN server, and 1554 generates its own STUN response with the desired mapped address 1555 value. The STUN response generated by the attacker will reach the 1556 client, and the DoS attack against the server is aimed at preventing 1557 the legitimate response from the server from reaching the client. 1558 Arguably, the attacker can do without the DoS attack on the server, 1559 so long as the faked response beats the real response back to the 1560 client, and the client uses the first response, and ignores the 1561 second (even though it's different). 1563 11.2.6 Approach VI: Duplication 1565 This approach is similar to approach V. The attacker listens on the 1566 network for a STUN request. When it sees it, it generates its own 1567 STUN request towards the server. This STUN request is identical to 1568 the one it saw, but with a spoofed source IP address. The spoofed 1569 address is equal to the one that the attacker desires to have placed 1570 in the mapped address of the STUN response. In fact, the attacker 1571 generates a flood of such packets. The STUN server will receive the 1572 one original request, plus a flood of duplicate fake ones. It 1573 generates responses to all of them. If the flood is sufficiently 1574 large for the responses to congest routers or some other equipment, 1575 there is a reasonable probability that the one real response is lost 1576 (along with many of the faked ones), but the net result is that only 1577 the faked responses are received by the STUN client. These responses 1578 are all identical and all contain the mapped address that the 1579 attacker wanted the client to use. 1581 The flood of duplicate packets is not needed (that is, only one faked 1582 request is sent), so long as the faked response beats the real 1583 response back to the client, and the client uses the first response, 1584 and ignores the second (even though it's different). 1586 Note that, in this approach, launching a DoS attack against the STUN 1587 server or the IP network, to prevent the valid response from being 1588 sent or received, is problematic. The attacker needs the STUN server 1589 to be available to handle its own request. Due to the periodic 1590 retransmissions of the request from the client, this leaves a very 1591 tiny window of opportunity. The attacker must start the DoS attack 1592 immediately after the actual request from the client, causing the 1593 correct response to be discarded, and then cease the DoS attack in 1594 order to send its own request, all before the next retransmission 1595 from the client. Due to the close spacing of the retransmits (100ms 1596 to a few seconds), this is very difficult to do. 1598 Besides DoS attacks, there may be other ways to prevent the actual 1599 request from the client from reaching the server. Layer 2 1600 manipulations, for example, might be able to accomplish it. 1602 Fortunately, Approach IV is subject to the same limitations 1603 documented in Section 11.2.3, which limit the range of mapped 1604 addresses the attacker can cause the STUN server to generate. 1606 11.3 Countermeasures 1608 STUN provides mechanisms to counter the approaches described above, 1609 and additional, non-STUN techniques can be used as well. 1611 First off, it is RECOMMENDED that networks with STUN clients 1612 implement ingress source filtering (RFC 2827 [7]). This is 1613 particularly important for the NATs themselves. As Section 11.2.3 1614 explains, NATs which do not perform this check can be used as 1615 "reflectors" in DDoS attacks. Most NATs do perform this check as a 1616 default mode of operation. We strongly advise people that purchase 1617 NATs to ensure that this capability is present and enabled. 1619 Secondly, it is RECOMMENDED that STUN servers be run on hosts 1620 dedicated to STUN, with all UDP and TCP ports disabled except for the 1621 STUN ports. This is to prevent viruses and Trojan horses from 1622 infecting STUN servers, in order to prevent their compromise. This 1623 helps mitigate Approach I (Section 11.2.1). 1625 Thirdly, to prevent the DNS attack of Section 11.2.2, Section 9.2 1626 recommends that the client verify the credentials provided by the 1627 server with the name used in the DNS lookup. 1629 Finally, all of the attacks above rely on the client taking the 1630 mapped address it learned from STUN, and using it in application 1631 layer protocols. If encryption and message integrity are provided 1632 within those protocols, the eavesdropping and identity assumption 1633 attacks can be prevented. As such, applications that make use of 1634 STUN addresses in application protocols SHOULD use integrity and 1635 encryption, even if a SHOULD level strength is not specified for that 1636 protocol. For example, multimedia applications using STUN addresses 1637 to receive RTP traffic would use secure RTP [16]. 1639 The above three techniques are non-STUN mechanisms. STUN itself 1640 provides several countermeasures. 1642 Approaches IV (Section 11.2.4), when generating the response locally, 1643 and V (Section 11.2.5) require an attacker to generate a faked 1644 response. This attack is prevented using the message integrity 1645 mechanism provided in STUN, described in Section 8.1. 1647 Approaches III (Section 11.2.3) IV (Section 11.2.4), when using the 1648 relaying technique, and VI (Section 11.2.6), however, are not 1649 preventable through server signatures. Both approaches are most 1650 potent when the attacker can modify the request, inserting a 1651 RESPONSE-ADDRESS that routes to the client. Fortunately, such 1652 modifications are preventable using the message integrity techniques 1653 described in Section 9.3. However, these three approaches are still 1654 functional when the attacker modifies nothing but the source address 1655 of the STUN request. Sadly, this is the one thing that cannot be 1656 protected through cryptographic means, as this is the change that 1657 STUN itself is seeking to detect and report. It is therefore an 1658 inherent weakness in NAT, and not fixable in STUN. To help mitigate 1659 these attacks, Section 9.4 provides several heuristics for the client 1660 to follow. The client looks for inconsistent or extra responses, 1661 both of which are signs of the attacks described above. However, 1662 these heuristics are just that - heuristics, and cannot be guaranteed 1663 to prevent attacks. The heuristics appear to prevent the attacks as 1664 we know how to launch them today. Implementors should stay posted 1665 for information on new heuristics that might be required in the 1666 future. Such information will be distributed on the IETF MIDCOM 1667 mailing list, midcom@ietf.org. 1669 11.4 Residual Threats 1671 None of the countermeasures listed above can prevent the attacks 1672 described in Section 11.2.3 if the attacker is in the appropriate 1673 network paths. Specifically, consider the case in which the attacker 1674 wishes to convince client C that it has address V. The attacker needs 1675 to have a network element on the path between A and the server (in 1676 order to modify the request) and on the path between the server and V 1677 so that it can forward the response to C. Furthermore, if there is a 1678 NAT between the attacker and the server, V must also be behind the 1679 same NAT. In such a situation, the attacker can either gain access 1680 to all the application-layer traffic or mount the DDOS attack 1681 described in Section 11.1.1. Note that any host which exists in the 1682 correct topological relationship can be DDOSed. It need not be using 1683 STUN. 1685 12. IANA Considerations 1687 STUN cannot be extended. Changes to the protocol are made through a 1688 standards track revision of this specification. As a result, no IANA 1689 registries are needed. Any future extensions will establish any 1690 needed registries. 1692 13. IAB Considerations 1694 The IAB has studied the problem of "Unilateral Self Address Fixing", 1695 which is the general process by which a client attempts to determine 1696 its address in another realm on the other side of a NAT through a 1697 collaborative protocol reflection mechanism (RFC 3424 [17]). STUN is 1698 an example of a protocol that performs this type of function. The 1699 IAB has mandated that any protocols developed for this purpose 1700 document a specific set of considerations. This section meets those 1701 requirements. 1703 13.1 Problem Definition 1705 From RFC 3424 [17], any UNSAF proposal must provide: 1707 Precise definition of a specific, limited-scope problem that is to 1708 be solved with the UNSAF proposal. A short term fix should not be 1709 generalized to solve other problems; this is why "short term fixes 1710 usually aren't". 1712 The specific problem being solved by STUN is to provide a means for a 1713 client to obtain an address on the public Internet from a non- 1714 symmetric NAT, for the express purpose of receiving incoming UDP 1715 traffic from another host, targeted to that address. 1717 STUN does not address TCP, either incoming or outgoing, and does not 1718 address outgoing UDP communications. 1720 13.2 Exit Strategy 1722 From [17], any UNSAF proposal must provide: 1724 Description of an exit strategy/transition plan. The better short 1725 term fixes are the ones that will naturally see less and less use 1726 as the appropriate technology is deployed. 1728 STUN by itself does not provide an exit strategy. This is provided 1729 by techniques, such as Interactive Connectivity Establishment (ICE) 1730 [21], which allow a client to determine whether addresses learned 1731 from STUN are needed, or whether other addresses, such as the one on 1732 the local interface, will work when communicating with another host. 1733 With such a detection technique, as a client finds that the addresses 1734 provided by STUN are never used, STUN queries can cease to be made, 1735 thus allowing them to phase out. 1737 STUN can also help facilitate the introduction of midcom. As midcom- 1738 capable NATs are deployed, applications will, instead of using STUN 1739 (which also resides at the application layer), first allocate an 1740 address binding using midcom. However, it is a well-known limitation 1741 of midcom that it only works when the agent knows the middleboxes 1742 through which its traffic will flow. Once bindings have been 1743 allocated from those middleboxes, a STUN detection procedure can 1744 validate that there are no additional middleboxes on the path from 1745 the public Internet to the client. If this is the case, the 1746 application can continue operation using the address bindings 1747 allocated from midcom. If it is not the case, STUN provides a 1748 mechanism for self-address fixing through the remaining midcom- 1749 unaware middleboxes. Thus, STUN provides a way to help transition to 1750 full midcom-aware networks. 1752 13.3 Brittleness Introduced by STUN 1754 From [17], any UNSAF proposal must provide: 1756 Discussion of specific issues that may render systems more 1757 "brittle". For example, approaches that involve using data at 1758 multiple network layers create more dependencies, increase 1759 debugging challenges, and make it harder to transition. 1761 STUN introduces brittleness into the system in several ways: 1763 o The binding acquisition usage of STUN does not work for all NAT 1764 types. It will work for any application for full cone NATs only. 1765 For restricted cone and port restricted cone NAT, it will work for 1766 some applications depending on the application. Application 1767 specific processing will generally be needed. For symmetric NATs, 1768 the binding acquisition will not yield a usable address. The 1769 tight dependency on the specific type of NAT makes the protocol 1770 brittle. 1772 o STUN assumes that the server exists on the public Internet. If 1773 the server is located in another private address realm, the user 1774 may or may not be able to use its discovered address to 1775 communicate with other users. There is no way to detect such a 1776 condition. 1778 o The bindings allocated from the NAT need to be continuously 1779 refreshed. Since the timeouts for these bindings is very 1780 implementation specific, the refresh interval cannot easily be 1781 determined. When the binding is not being actively used to 1782 receive traffic, but to wait for an incoming message, the binding 1783 refresh will needlessly consume network bandwidth. 1785 o The use of the STUN server as an additional network element 1786 introduces another point of potential security attack. These 1787 attacks are largely prevented by the security measures provided by 1788 STUN, but not entirely. 1790 o The use of the STUN server as an additional network element 1791 introduces another point of failure. If the client cannot locate 1792 a STUN server, or if the server should be unavailable due to 1793 failure, the application cannot function. 1795 o The use of STUN to discover address bindings will result in an 1796 increase in latency for applications. For example, a Voice over 1797 IP application will see an increase of call setup delays equal to 1798 at least one RTT to the STUN server. 1800 o STUN imposes some restrictions on the network topologies for 1801 proper operation. If client A obtains an address from STUN server 1802 X, and sends it to client B, B may not be able to send to A using 1803 that IP address. The address will not work if any of the 1804 following is true: 1806 * The STUN server is not in an address realm that is a common 1807 ancestor (topologically) of both clients A and B. For example, 1808 consider client A and B, both of which have residential NAT 1809 devices. Both devices connect them to their cable operators, 1810 but both clients have different providers. Each provider has a 1811 NAT in front of their entire network, connecting it to the 1812 public Internet. If the STUN server used by A is in A's cable 1813 operator's network, an address obtained by it will not be 1814 usable by B. The STUN server must be in the network which is a 1815 common ancestor to both - in this case, the public Internet. 1817 * The STUN server is in an address realm that is a common 1818 ancestor to both clients, but both clients are behind the same 1819 NAT connecting to that address realm. For example, if the two 1820 clients in the previous example had the same cable operator, 1821 that cable operator had a single NAT connecting their network 1822 to the public Internet, and the STUN server was on the public 1823 Internet, the address obtained by A would not be usable by B. 1824 That is because some NATs will not accept an internal packet 1825 sent to a public IP address which is mapped back to an internal 1826 address. To deal with this, additional protocol mechanisms or 1827 configuration parameters need to be introduced which detect 1828 this case. 1830 o Most significantly, STUN introduces potential security threats 1831 which cannot be eliminated. This specification describes 1832 heuristics that can be used to mitigate the problem, but it is 1833 provably unsolvable given what STUN is trying to accomplish. 1834 These security problems are described fully in Section 11. 1836 13.4 Requirements for a Long Term Solution 1838 From [17], any UNSAF proposal must provide: 1840 Identify requirements for longer term, sound technical solutions 1841 -- contribute to the process of finding the right longer term 1842 solution. 1844 Our experience with STUN has led to the following requirements for a 1845 long term solution to the NAT problem: 1847 Requests for bindings and control of other resources in a NAT need to 1848 be explicit. Much of the brittleness in STUN derives from its 1849 guessing at the parameters of the NAT, rather than telling the NAT 1850 what parameters to use. 1852 Control needs to be in-band. There are far too many scenarios in 1853 which the client will not know about the location of middleboxes 1854 ahead of time. Instead, control of such boxes needs to occur in- 1855 band, traveling along the same path as the data will itself 1856 travel. This guarantees that the right set of middleboxes are 1857 controlled. This is only true for first-party controls; third- 1858 party controls are best handled using the midcom framework. 1860 Control needs to be limited. Users will need to communicate through 1861 NATs which are outside of their administrative control. In order 1862 for providers to be willing to deploy NATs which can be controlled 1863 by users in different domains, the scope of such controls needs to 1864 be extremely limited - typically, allocating a binding to reach 1865 the address where the control packets are coming from. 1867 Simplicity is Paramount. The control protocol will need to be 1868 implement in very simple clients. The servers will need to 1869 support extremely high loads. The protocol will need to be 1870 extremely robust, being the precursor to a host of application 1871 protocols. As such, simplicity is key. 1873 13.5 Issues with Existing NAPT Boxes 1875 From [17], any UNSAF proposal must provide: 1877 Discussion of the impact of the noted practical issues with 1878 existing, deployed NA[P]Ts and experience reports. 1880 Several of the practical issues with STUN involve future proofing - 1881 breaking the protocol when new NAT types get deployed. Fortunately, 1882 this is not an issue at the current time, since most of the deployed 1883 NATs are of the types assumed by STUN. The primary usage STUN has 1884 found is in the area of VoIP, to facilitate allocation of addresses 1885 for receiving RTP [12] traffic. In that application, the periodic 1886 keepalives are provided by the RTP traffic itself. However, several 1887 practical problems arise for RTP. First, RTP assumes that RTCP 1888 traffic is on a port one higher than the RTP traffic. This pairing 1889 property cannot be guaranteed through NATs that are not directly 1890 controllable. As a result, RTCP traffic may not be properly 1891 received. Protocol extensions to SDP have been proposed which 1892 mitigate this by allowing the client to signal a different port for 1893 RTCP [18]. However, there will be interoperability problems for some 1894 time. 1896 For VoIP, silence suppression can cause a gap in the transmission of 1897 RTP packets. This could result in the loss of a binding in the 1898 middle of a call, if that silence period exceeds the binding timeout. 1900 This can be mitigated by sending occasional silence packets to keep 1901 the binding alive. However, the result is additional brittleness; 1902 proper operation depends on the silence suppression algorithm in use, 1903 the usage of a comfort noise codec, the duration of the silence 1904 period, and the binding lifetime in the NAT. 1906 13.6 In Closing 1908 The problems with STUN are not design flaws in STUN. The problems in 1909 STUN have to do with the lack of standardized behaviors and controls 1910 in NATs. The result of this lack of standardization has been a 1911 proliferation of devices whose behavior is highly unpredictable, 1912 extremely variable, and uncontrollable. STUN does the best it can in 1913 such a hostile environment. Ultimately, the solution is to make the 1914 environment less hostile, and to introduce controls and standardized 1915 behaviors into NAT. However, until such time as that happens, STUN 1916 provides a good short term solution given the terrible conditions 1917 under which it is forced to operate. 1919 14. Changes Since RFC 3489 1921 This specification updates RFC 3489 [19]. This specification differs 1922 from RFC 3489 in the following ways: 1924 o Removed the usage of STUN for NAT type detection and binding 1925 lifetime discovery. These techniques have proven overly brittle 1926 due to wider variations in the types of NAT devices than described 1927 in this document. The protocol semantics used for NAT type 1928 detection remain, however, to provide backwards compatibility, and 1929 to allow for the NAT type detection to occur in purely diagnostic 1930 applications. 1932 o Removed the STUN example that centered around the separation of 1933 the control and media planes. Instead, provided more information 1934 on using STUN with protocols. 1936 o Added the XOR-MAPPED-ADDRESS attribute, which clients prefer to 1937 the MAPPED-ADDRESS when both are present in a Binding Response. 1938 XOR-MAPPED-ADDRESS is obfuscated so that NATs which try to "help" 1939 by rewriting binary IP addresses they find in protocols will not 1940 interfere with the operation of STUN. 1942 o Added the XOR-ONLY attribute, which clients can use to request 1943 that the server send a response with only the XOR-MAPPED-ADDRESS. 1944 This is necessary in case a Binding Response fails integrity 1945 checks due to a NAT that rewrites the MAPPED-ADDRESS. 1947 o Explicitly point out that the most significant two bits of STUN 1948 are 0b00, allowing easy differentiation with RTP packets when used 1949 with ICE. 1951 o Added support for IPv6. Made it clear that an IPv4 client could 1952 get a v6 mapped address, and vice-a-versa. 1954 o Added the SERVER attribute. 1956 15. Acknowledgments 1958 The authors would like to thank Cedric Aoun, Pete Cordell, Cullen 1959 Jennings, Bob Penfield and Chris Sullivan for their comments, and 1960 Baruch Sterman and Alan Hawrylyshen for initial implementations. 1961 Thanks for Leslie Daigle, Allison Mankin, Eric Rescorla, and Henning 1962 Schulzrinne for IESG and IAB input on this work. 1964 16. References 1966 16.1 Normative References 1968 [1] Bradner, S., "Key words for use in RFCs to Indicate Requirement 1969 Levels", BCP 14, RFC 2119, March 1997. 1971 [2] Dierks, T. and C. Allen, "The TLS Protocol Version 1.0", 1972 RFC 2246, January 1999. 1974 [3] Gulbrandsen, A., Vixie, P., and L. Esibov, "A DNS RR for 1975 specifying the location of services (DNS SRV)", RFC 2782, 1976 February 2000. 1978 [4] Chown, P., "Advanced Encryption Standard (AES) Ciphersuites for 1979 Transport Layer Security (TLS)", RFC 3268, June 2002. 1981 [5] Rescorla, E., "HTTP Over TLS", RFC 2818, May 2000. 1983 [6] Postel, J., "Internet Protocol", STD 5, RFC 791, September 1981. 1985 [7] Ferguson, P. and D. Senie, "Network Ingress Filtering: Defeating 1986 Denial of Service Attacks which employ IP Source Address 1987 Spoofing", BCP 38, RFC 2827, May 2000. 1989 16.2 Informative References 1991 [8] Senie, D., "Network Address Translator (NAT)-Friendly 1992 Application Design Guidelines", RFC 3235, January 2002. 1994 [9] Srisuresh, P., Kuthan, J., Rosenberg, J., Molitor, A., and A. 1995 Rayhan, "Middlebox communication architecture and framework", 1996 RFC 3303, August 2002. 1998 [10] Rosenberg, J., Schulzrinne, H., Camarillo, G., Johnston, A., 1999 Peterson, J., Sparks, R., Handley, M., and E. Schooler, "SIP: 2000 Session Initiation Protocol", RFC 3261, June 2002. 2002 [11] Holdrege, M. and P. Srisuresh, "Protocol Complications with the 2003 IP Network Address Translator", RFC 3027, January 2001. 2005 [12] Schulzrinne, H., Casner, S., Frederick, R., and V. Jacobson, 2006 "RTP: A Transport Protocol for Real-Time Applications", 2007 RFC 3550, July 2003. 2009 [13] Krawczyk, H., Bellare, M., and R. Canetti, "HMAC: Keyed-Hashing 2010 for Message Authentication", RFC 2104, February 1997. 2012 [14] Kohl, J. and B. Neuman, "The Kerberos Network Authentication 2013 Service (V5)", RFC 1510, September 1993. 2015 [15] Fielding, R., Gettys, J., Mogul, J., Frystyk, H., Masinter, L., 2016 Leach, P., and T. Berners-Lee, "Hypertext Transfer Protocol -- 2017 HTTP/1.1", RFC 2616, June 1999. 2019 [16] Baugher, M., McGrew, D., Naslund, M., Carrara, E., and K. 2020 Norrman, "The Secure Real-time Transport Protocol (SRTP)", 2021 RFC 3711, March 2004. 2023 [17] Daigle, L. and IAB, "IAB Considerations for UNilateral Self- 2024 Address Fixing (UNSAF) Across Network Address Translation", 2025 RFC 3424, November 2002. 2027 [18] Huitema, C., "Real Time Control Protocol (RTCP) attribute in 2028 Session Description Protocol (SDP)", RFC 3605, October 2003. 2030 [19] Rosenberg, J., Weinberger, J., Huitema, C., and R. Mahy, "STUN 2031 - Simple Traversal of User Datagram Protocol (UDP) Through 2032 Network Address Translators (NATs)", RFC 3489, March 2003. 2034 [20] Handley, M. and V. Jacobson, "SDP: Session Description 2035 Protocol", RFC 2327, April 1998. 2037 [21] Rosenberg, J., "Interactive Connectivity Establishment (ICE): A 2038 Methodology for Network Address Translator (NAT) Traversal for 2039 Multimedia Session Establishment Protocols", 2040 draft-ietf-mmusic-ice-04 (work in progress), February 2005. 2042 Authors' Addresses 2044 Jonathan Rosenberg 2045 Cisco Systems 2046 600 Lanidex Plaza 2047 Parsippany, NJ 07054 2048 US 2050 Phone: +1 973 952-5000 2051 Email: jdrosen@cisco.com 2052 URI: http://www.jdrosen.net 2054 Christian Huitema 2055 Microsoft 2056 One Microsoft Way 2057 Redmond, WA 98052 2058 US 2060 Email: huitema@microsoft.com 2062 Rohan Mahy 2063 Airspace 2065 Email: rohan@ekabal.com 2067 Intellectual Property Statement 2069 The IETF takes no position regarding the validity or scope of any 2070 Intellectual Property Rights or other rights that might be claimed to 2071 pertain to the implementation or use of the technology described in 2072 this document or the extent to which any license under such rights 2073 might or might not be available; nor does it represent that it has 2074 made any independent effort to identify any such rights. Information 2075 on the procedures with respect to rights in RFC documents can be 2076 found in BCP 78 and BCP 79. 2078 Copies of IPR disclosures made to the IETF Secretariat and any 2079 assurances of licenses to be made available, or the result of an 2080 attempt made to obtain a general license or permission for the use of 2081 such proprietary rights by implementers or users of this 2082 specification can be obtained from the IETF on-line IPR repository at 2083 http://www.ietf.org/ipr. 2085 The IETF invites any interested party to bring to its attention any 2086 copyrights, patents or patent applications, or other proprietary 2087 rights that may cover technology that may be required to implement 2088 this standard. Please address the information to the IETF at 2089 ietf-ipr@ietf.org. 2091 Disclaimer of Validity 2093 This document and the information contained herein are provided on an 2094 "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS 2095 OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET 2096 ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, 2097 INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE 2098 INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED 2099 WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. 2101 Copyright Statement 2103 Copyright (C) The Internet Society (2005). This document is subject 2104 to the rights, licenses and restrictions contained in BCP 78, and 2105 except as set forth therein, the authors retain all their rights. 2107 Acknowledgment 2109 Funding for the RFC Editor function is currently provided by the 2110 Internet Society.