Behave S. Sivakumar Internet-Draft Cisco Systems Intended status: Informational March 5, 2012 Expires: September 6, 2012 Issues with End-point dependent mapping draft-sivakumar-behave-edm-harmful-00 Abstract Some NAT devices implement the End-point dependent mapping and filtering behavior. This document describes the issues that would arise with End-point dependent mapping and filtering behavior. Status of this Memo This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet- Drafts is at http://datatracker.ietf.org/drafts/current/. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress." This Internet-Draft will expire on September 6, 2012. Copyright Notice Copyright (c) 2012 IETF Trust and the persons identified as the document authors. All rights reserved. This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License. Sivakumar Expires September 6, 2012 [Page 1] Internet-Draft Issues with End-point dependent mapping March 2012 Table of Contents 1. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . . 3 2. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 2.1. Requirements Language . . . . . . . . . . . . . . . . . . . 3 3. Why is End-point dependent mapping and filtering used . . . . . 4 4. Peer to Peer applications . . . . . . . . . . . . . . . . . . . 5 5. Issues with End-point dependent mapping and filtering . . . . . 5 6. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 5 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . . 5 8. Security Considerations . . . . . . . . . . . . . . . . . . . . 6 9. References . . . . . . . . . . . . . . . . . . . . . . . . . . 6 9.1. Normative References . . . . . . . . . . . . . . . . . . . 6 9.2. Informative References . . . . . . . . . . . . . . . . . . 6 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . . 6 Sivakumar Expires September 6, 2012 [Page 2] Internet-Draft Issues with End-point dependent mapping March 2012 1. Terminology The usage of the term "NAT device" in this document refer to any NAT44 and NAT64 devices. Address dependent end-point mapping - A NAT device creates a mapping taking into account the destination address and port. The same mapping is reused if a packet from the same source address, source port destined to the same destination address. Address and port dependent end-point mapping - A NAT device creates a mapping taking into account the destination address and port. The same mapping is reused if a packet from the same source address, source port destined to the same destination address and destination port. End-point dependent mapping - A NAT device that does either Address dependent mapping and/or Address and port dependent mapping is referred to follow End-point dependent mapping. Address dependent end-point filtering - A NAT device that allows inbound traffic to the internal hosts only if the internal host had previously communicated to the external address. Address and port dependent end-point filtering - A NAT device that allow inbound traffic to the internal hosts only if the internal host had previously communicated to the same external address and port. End-point dependent filtering - A NAT device that filters the incoming traffic based on the external hosts' source address and/or port. 2. Introduction End-point dependent mapping and filtering is still prevalent in many NAT devices. Even though [RFC4787] and [RFC5382] recommends against using end point dependent mapping and filtering, these two RFCs does not go into the details of why it is end point dependent mapping is bad for applications. This document focuses on the negative impacts of End point dependent mapping and filtering on applications. 2.1. Requirements Language The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC2119]. Sivakumar Expires September 6, 2012 [Page 3] Internet-Draft Issues with End-point dependent mapping March 2012 3. Why is End-point dependent mapping and filtering used There are two main reasons that End-point dependent mapping and filtering is used. a. End-point independent mapping can be used to extend the number of ports available per global address, often referred to as port overloading. For example, if there are two hosts behind the same NAT device +---------+ X1,x1 P,p +---------+ | X1 |---------+ +---------| Y1 | +---------+ | +--------+ | +---------+ |---| NAT |---| +---------+ | +--------+ | P,p +---------+ | X2 |---------+ +---------| Y2 | +---------+ X2, x2 +---------+ Figure 1 Host X1 (X1, x1) initiating communication to destination (Y1, y1) and host X2 (Y1, y1) initiating communication to destination (Y2, y2). NAT device will translate the source address and port (X1, x1) to public address (P, p) and it will translate the source address and port (X2, x2) also to public address and port (P, p), as long as both the hosts are not destined to the same end point. In order to correctly demultiplex the return packets, the NAT device will store the destination information. So, when the return packet from (Y1, y1) to (P, p) is seen the NAT device can translate the destination to (X1, x1). Similarly, when the return packet from (Y2, y2) destined to (P, p) is seen, the destination will be translated to (X2, x2). As can be seen with this example, the same external port p can be used for multiple flows thus by maximizing the use of a single external IPv4 address. This kind of implementation also gives a perception that the NAT device is actually doing end-point dependent filtering. The End-point dependent filtering is perceived to offer security. Since the outbound packet was sent to the external address, it is assumed that is a trusted entry. Hence the return packets from the same external address is assumed to be trusted and doing filtering based on the external address and port is perceived to offer security. Secondly, most of the client server based applications with End-point dependent filtering will work fine. This leads one to believe that End-point dependent filtering will work for all other applications as Sivakumar Expires September 6, 2012 [Page 4] Internet-Draft Issues with End-point dependent mapping March 2012 well. 4. Peer to Peer applications Peer to Peer (P2P) applications use a variety of techniques to traverse NATs like using Relay servers, TCP/UDP hole punching etc as described in [RFC5128]. For P2P applications to work reliably across NATs it is expected that the NAT devices does End-point independent mapping and filtering. Peer to Peer applications are becoming very common and some real life examples of P2P applications are SIP used by VoIP service providers, instant messaging, voice and video chat, Google Talk, Apple Facetime and several famous gaming applications. The notion of not supporting P2P applications is not just practical and NATs MUST be designed to facilitate these applications. While it is tempting to maximize the return on the investment by maximizing the use of the existing IPv4 addresses, doing End point dependent mapping, the harmful effects of this overrides any benefits that it offers. 5. Issues with End-point dependent mapping and filtering 1. End point dependent mapping does not guarantee that the same External address and port will be used regardless of the destination. This would prevent the inbound connection from an application. 2. End point dependent filtering will allow inbound connections only if a previous flow to the same host was previously initiated from an internal host. This will prevent incoming connection requests from an application. 6. Acknowledgements Thanks to Dan Wing for providing the idea to write this document and reviewing it. 7. IANA Considerations None Sivakumar Expires September 6, 2012 [Page 5] Internet-Draft Issues with End-point dependent mapping March 2012 8. Security Considerations None. 9. References 9.1. Normative References [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997. [RFC2663] Srisuresh, P. and M. Holdrege, "IP Network Address Translator (NAT) Terminology and Considerations", RFC 2663, August 1999. [RFC4787] Audet, F. and C. Jennings, "Network Address Translation (NAT) Behavioral Requirements for Unicast UDP", BCP 127, RFC 4787, January 2007. [RFC5382] Guha, S., Biswas, K., Ford, B., Sivakumar, S., and P. Srisuresh, "NAT Behavioral Requirements for TCP", BCP 142, RFC 5382, October 2008. [RFC6146] Bagnulo, M., Matthews, P., and I. van Beijnum, "Stateful NAT64: Network Address and Protocol Translation from IPv6 Clients to IPv4 Servers", RFC 6146, April 2011. 9.2. Informative References [RFC5128] Srisuresh, P., Ford, B., and D. Kegel, "State of Peer-to- Peer (P2P) Communication across Network Address Translators (NATs)", RFC 5128, March 2008. Author's Address Senthil Sivakumar Cisco Systems 7100-8 Kit Creek Road Research Triangle Park, North Carolina 27709 USA Phone: +1 919 392 5158 Email: ssenthil@cisco.com Sivakumar Expires September 6, 2012 [Page 6]