One document matched: draft-sivakumar-behave-nat-logging-00.txt




Behave                                                      S. Sivakumar
Internet-Draft                                             Cisco Systems
Intended status: Informational                        September 15, 2010
Expires: March 19, 2011


                         Logging of NAT Events
                 draft-sivakumar-behave-nat-logging-00

Abstract

   Carrier grade NAT (CGN) devices are required to log events like
   creation and deletion of translations and information about the
   resources it is managing.  The logs are required in many cases to
   identify an attacker or a host that was used to launch malicious
   attacks and/or for various other purposes of accounting.  Since there
   is no standard way of logging this information, different NAT devices
   behave differently and hence it is difficult to expect a consistent
   behavior.  The lack of a consistent way makes it difficult to write
   the collector applications that would receive this data and process
   it to present useful information.  This document describes the
   information that is required to be logged by the NAT devices.

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 March 19, 2011.

Copyright Notice

   Copyright (c) 2010 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



Sivakumar                Expires March 19, 2011                 [Page 1]

Internet-Draft            Logging of NAT Events           September 2010


   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.


Table of Contents

   1.  Terminology  . . . . . . . . . . . . . . . . . . . . . . . . .  3
   2.  Introduction . . . . . . . . . . . . . . . . . . . . . . . . .  3
     2.1.  Requirements Language  . . . . . . . . . . . . . . . . . .  3
   3.  Scope  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  3
   4.  Event based logging  . . . . . . . . . . . . . . . . . . . . .  4
     4.1.  Information Elements . . . . . . . . . . . . . . . . . . .  4
     4.2.  Definition of NAT events . . . . . . . . . . . . . . . . .  6
     4.3.  Templates for NAT events . . . . . . . . . . . . . . . . .  6
       4.3.1.  NAT44 create and delete session event  . . . . . . . .  6
       4.3.2.  NAT64 create and delete session event  . . . . . . . .  7
       4.3.3.  NAT44 BIB create and delete event  . . . . . . . . . .  8
       4.3.4.  NAT64 BIB create and delete event  . . . . . . . . . .  8
       4.3.5.  Addresses Exhausted event  . . . . . . . . . . . . . .  8
       4.3.6.  Ports Exhausted event  . . . . . . . . . . . . . . . .  9
       4.3.7.  Quota exceeded . . . . . . . . . . . . . . . . . . . .  9
   5.  Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 10
   6.  IANA Considerations  . . . . . . . . . . . . . . . . . . . . . 10
     6.1.  Information Elements . . . . . . . . . . . . . . . . . . . 10
     6.2.  Changes to existing IEs  . . . . . . . . . . . . . . . . . 10
   7.  Security Considerations  . . . . . . . . . . . . . . . . . . . 10
   8.  References . . . . . . . . . . . . . . . . . . . . . . . . . . 11
     8.1.  Normative References . . . . . . . . . . . . . . . . . . . 11
     8.2.  Informative References . . . . . . . . . . . . . . . . . . 11
   Author's Address . . . . . . . . . . . . . . . . . . . . . . . . . 11

















Sivakumar                Expires March 19, 2011                 [Page 2]

Internet-Draft            Logging of NAT Events           September 2010


1.  Terminology

   The usage of the term "NAT device" in this document refer to any
   NAT44, Firewall and NAT64 devices.  The usage of the term "collector"
   refers to any device that receives the binary data from a NAT device
   and converts that into meaningful information.


2.  Introduction

   This document details the Information Elements(IEs) that are required
   to be logged by a NAT device.  The document will specify the formats
   of each and every field that are required to be logged by every NAT
   device and all the optional fields.  The fields specified in this
   document are gleaned from RFC 4787 [RFC4787], RFC 5382 [RFC5382].

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 RFC 2119 [RFC2119].


3.  Scope

   This document does not provide guidance on the transport protocol
   that is to be used to log NAT events.  The log events SHOULD NOT be
   lost but the choice of the actual transport protocol is beyond the
   scope of this document.

   This document assumes that the NAT device will send the events in a
   binary format to an off-box collector to be able to scale to carrier
   grade NAT requirements but the formats (binary or ASCII) itself is
   beyond the scope of this document.

   This document assumes that the NAT device will use some existing
   framework like IPFIX, Netflow version 9 etc to send the log events to
   the collector.  But it is beyond the scope of the document to define
   the framework to be used for logging.  However, the framework should
   support specifying a template that the NAT device will use to send
   its events.  The templates can be of varying length and there could
   be multiple templates that a NAT device could use to log the events.
   This document provides IPFIX IEs as examples as most of the IEs
   defined for NAT event logging are already allocated by IANA in the
   IPFIX registry.

   The implementation details of the collector application is beyond the
   scope of this document.



Sivakumar                Expires March 19, 2011                 [Page 3]

Internet-Draft            Logging of NAT Events           September 2010


   The optimization of logging the NAT events are left to the
   implementation and are beyond the scope of this document.


4.  Event based logging

   An event in a NAT device can be viewed as a happening as it relates
   to the management of NAT resources.  The creation and deletion of NAT
   sessions and bindings are examples of events as it results in the
   resources (addresses and ports) being allocated or freed.  The events
   can happen either through the processing of data packets flowing
   through the NAT device or through an external entity installing
   policies on the NAT router.  The list of events are provided in
   Section 4.1.  Each of these events SHOULD be logged, unless they are
   administratively prohibited.  A NAT device MAY log these events to
   multiple collectors if redudancy is required.  The network
   administrator will specify the collectors to which the log records
   are to be sent.

   Prior to logging any events, the NAT device MUST send the template of
   the record to the collector to declare the format of the data record
   that it is using to send the events.  The templates can be exchanged
   as frequently as required given the reliability of the connection.
   NAT device SHOULD combine as many events as possible in a single
   packet to effectively utilize the network bandwidth.

4.1.  Information Elements

   The templates could contain a subset of the Information Elements(IEs)
   shown in Table 1 depending upon the event being logged.  For example
   a NAT44 session creation template record will contain,

   {sourceIPv6Adress, postNATSourceIPv4Address, destinationIpv4Address,
   postNATDestinationIPv4Address, sourceTransportPort,
   postNAPTSourceTransportPort, destinationTransportPort,
   postNAPTDestTransportPort, natOriginatingAddressRealm, natEvent,
   timeStamp}

   An example of the actual event data record is shown below - in a
   readable form

   {192.168.16.1, 201.1.1.100, 207.85.231.104, 207.85.231.104, 14800,
   1024, 80, 80, 0, 1, 09:20:10:789}

   A single NAT device could be exporting multiple templates and the
   collector should support receiving multiple templates from the same
   source.




Sivakumar                Expires March 19, 2011                 [Page 4]

Internet-Draft            Logging of NAT Events           September 2010


   +----------------------------------+--------+--------+--------------+
   |            Field Name            |  Size  |  IANA  |  Description |
   |                                  | (bits) |  IPFIX |              |
   |                                  |        |   ID   |              |
   +----------------------------------+--------+--------+--------------+
   |             timeStamp            |   64   |   TBA  |  System Time |
   |                                  |        |        |   when the   |
   |                                  |        |        |     event    |
   |                                  |        |        |   occured.   |
   |         sourceIPv4Address        |   32   |    8   |  Source IPv4 |
   |                                  |        |        |    Address   |
   |     postNATSourceIPv4Address     |   32   |   225  |  Translated  |
   |                                  |        |        |  Source IPv4 |
   |                                  |        |        |    Address   |
   |        protocolIdentifier        |    8   |    4   |   Transport  |
   |                                  |        |        |   protocol   |
   |        sourceTransportPort       |   16   |    8   |  Source Port |
   |    postNAPTsourceTransportPort   |   16   |   227  |  Translated  |
   |                                  |        |        |  Source port |
   |      destinationIPv4Address      |   32   |   12   |  Destination |
   |                                  |        |        | IPv4 Address |
   |   postNATDestinationIPv4Address  |   32   |   226  |  Translated  |
   |                                  |        |        |     IPv4     |
   |                                  |        |        |  destination |
   |                                  |        |        |    address   |
   |     destinationTransportPort     |   16   |   11   |  Destination |
   |                                  |        |        |     port     |
   | postNAPTdestinationTransportPort |   16   |   228  |  Translated  |
   |                                  |        |        |  Destination |
   |                                  |        |        |     port     |
   |         sourceIPv6Address        |   128  |   27   |  Source IPv6 |
   |                                  |        |        |    address   |
   |      destinationIPv6Address      |   128  |   28   |  Destination |
   |                                  |        |        | IPv6 address |
   |     postNATSourceIPv6Address     |   128  |   TBA  |  Translated  |
   |                                  |        |        |  source IPv6 |
   |                                  |        |        |   addresss   |
   |   postNATDestinationIPv6Address  |   128  |   TBA  |  Translated  |
   |                                  |        |        |  Destination |
   |                                  |        |        | IPv6 address |
   |    natOriginatingAddressRealm    |    8   |   229  |    Address   |
   |                                  |        |        |     Realm    |
   |             natEvent             |    8   |   230  |    Type of   |
   |                                  |        |        |     Event    |
   |       postNATPortBlockStart      |   16   |   TBA  |   Allocated  |
   |                                  |        |        |  port block  |
   |                                  |        |        |     start    |




Sivakumar                Expires March 19, 2011                 [Page 5]

Internet-Draft            Logging of NAT Events           September 2010


   |        postNATPortBlockEnd       |   16   |   TBA  |   Allocated  |
   |                                  |        |        |  Port block  |
   |                                  |        |        |      end     |
   +----------------------------------+--------+--------+--------------+

                      Table 1: Template format Table

4.2.  Definition of NAT events

   The following are the list of NAT events and the corresponding
   values.  The list can be expanded in the future as necessary.  The
   data record will have the corresponding natEvent value to identify
   the event being logged.

                   +-------------------------+--------+
                   |        Event Name       | Values |
                   +-------------------------+--------+
                   |   NAT44 Session create  |    1   |
                   |   NAT44 Session delete  |    2   |
                   |   NAT64 Session create  |    3   |
                   |   NAT64 Session delete  |    4   |
                   |     NAT44 BIB create    |    5   |
                   |     NAT44 BIB delete    |    6   |
                   |     NAT64 BIB create    |    7   |
                   |     NAT64 BIB delete    |    8   |
                   | NAT Addresses exhausted |    9   |
                   |   NAT ports exhausted   |   10   |
                   |      Quota exceeded     |   11   |
                   +-------------------------+--------+

                        Table 2: NAT Event ID table

4.3.  Templates for NAT events

   The following events are identified at the time of this writing but
   the events are expandable.

4.3.1.  NAT44 create and delete session event

   This event will be generated when a NAT44 session is created or
   deleted.  The template will be the same, the natEvent will indicate
   whether it is a create or a delete event.  The following is a
   template of the event.








Sivakumar                Expires March 19, 2011                 [Page 6]

Internet-Draft            Logging of NAT Events           September 2010


   +----------------------------------+---------+----------+-----------+
   |            Field Name            |   Size  |   IANA   | Mandatory |
   |                                  |  (bits) | IPFIX ID |           |
   +----------------------------------+---------+----------+-----------+
   |             timeStamp            |    64   |    TBA   |    Yes    |
   |         sourceIPv4Address        |    32   |     8    |    Yes    |
   |     postNATSourceIPv4Address     |    32   |    225   |    Yes    |
   |        protocolIdentifier        |    8    |     4    |    Yes    |
   |        sourceTransportPort       |    16   |     8    |    Yes    |
   |    postNAPTsourceTransportPort   |    16   |    227   |    Yes    |
   |      destinationIPv4Address      |    32   |    12    |    Yes    |
   |   postNATDestinationIPv4Address  |    32   |    226   |    Yes    |
   |     destinationTransportPort     |    16   |    11    |    Yes    |
   | postNAPTdestinationTransportPort |    16   |    228   |    Yes    |
   |    natOriginatingAddressRealm    |    8    |    229   |    Yes    |
   |             natEvent             |    8    |    230   |    Yes    |
   +----------------------------------+---------+----------+-----------+

               Table 3: NAT44 Session delete/create template

4.3.2.  NAT64 create and delete session event

   This event will be generated when a NAT64 session is created.  The
   following is a template of the event.

   +----------------------------------+---------+----------+-----------+
   |            Field Name            |   Size  |   IANA   | Mandatory |
   |                                  |  (bits) | IPFIX ID |           |
   +----------------------------------+---------+----------+-----------+
   |             timeStamp            |    64   |    TBA   |    Yes    |
   |         sourceIPv6Address        |   128   |    27    |    Yes    |
   |     postNATSourceIPv4Address     |    32   |    225   |    Yes    |
   |        protocolIdentifier        |    8    |     4    |    Yes    |
   |        sourceTransportPort       |    16   |     8    |    Yes    |
   |    postNAPTsourceTransportPort   |    16   |    227   |    Yes    |
   |      destinationIPv6Address      |   128   |    28    |    Yes    |
   |   postNATDestinationIPv4Address  |    32   |    226   |    Yes    |
   |     destinationTransportPort     |    16   |    11    |    Yes    |
   | postNAPTdestinationTransportPort |    16   |    228   |    Yes    |
   |    natOriginatingAddressRealm    |    8    |    229   |    Yes    |
   |             natEvent             |    8    |    230   |    Yes    |
   +----------------------------------+---------+----------+-----------+

            Table 4: NAT64 session create/delete event template







Sivakumar                Expires March 19, 2011                 [Page 7]

Internet-Draft            Logging of NAT Events           September 2010


4.3.3.  NAT44 BIB create and delete event

   This event will be generated when a NAT44 Bind entry is created.  The
   following is a template of the event.

   +-----------------------------+------------+------------+-----------+
   |          Field Name         |    Size    | IANA IPFIX | Mandatory |
   |                             |   (bits)   |     ID     |           |
   +-----------------------------+------------+------------+-----------+
   |          timeStamp          |     64     |     TBA    |    Yes    |
   |      sourceIPv4Address      |     32     |      8     |    Yes    |
   |   postNATSourceIPv4Address  |     32     |     225    |    Yes    |
   |      protocolIdentifier     |      8     |      4     |     No    |
   |     sourceTransportPort     |     16     |      8     |     No    |
   | postNAPTsourceTransportPort |     16     |     227    |     No    |
   |  natOriginatingAddressRealm |      8     |     229    |    Yes    |
   |           natEvent          |      8     |     230    |    Yes    |
   +-----------------------------+------------+------------+-----------+

              Table 5: NAT44 BIB create/delete event template

4.3.4.  NAT64 BIB create and delete event

   This event will be generated when a NAT64 Bind entry is created.  The
   following is a template of the event.

   +-----------------------------+------------+------------+-----------+
   |          Field Name         |    Size    | IANA IPFIX | Mandatory |
   |                             |   (bits)   |     ID     |           |
   +-----------------------------+------------+------------+-----------+
   |          timeStamp          |     64     |     TBA    |    Yes    |
   |      sourceIPv6Address      |     128    |     27     |    Yes    |
   |   postNATSourceIPv4Address  |     32     |     225    |    Yes    |
   |      protocolIdentifier     |      8     |      4     |     No    |
   |     sourceTransportPort     |     16     |      8     |     No    |
   | postNAPTsourceTransportPort |     16     |     227    |     No    |
   |  natOriginatingAddressRealm |      8     |     229    |    Yes    |
   |           natEvent          |      8     |     230    |    Yes    |
   +-----------------------------+------------+------------+-----------+

              Table 6: NAT64 BIB create/delete event template

4.3.5.  Addresses Exhausted event

   This event will be generated when a NAT device runs out of global
   IPv4 addresses.  Typically, this event would mean that the NAT device
   wont be able to create any new translations until some addresses/
   ports are freed.  The following is a template of the event.



Sivakumar                Expires March 19, 2011                 [Page 8]

Internet-Draft            Logging of NAT Events           September 2010


   +--------------------------+-------------+--------------+-----------+
   |        Field Name        | Size (bits) |  IANA IPFIX  | Mandatory |
   |                          |             |      ID      |           |
   +--------------------------+-------------+--------------+-----------+
   |         timeStamp        |      64     |      TBA     |    Yes    |
   |         natEvent         |      8      |      230     |    Yes    |
   | postNATSourceIPv4Address |      32     |      225     |    Yes    |
   +--------------------------+-------------+--------------+-----------+

               Table 7: NAT Address Exhausted event template

4.3.6.  Ports Exhausted event

   This event will be generated when a NAT device runs out of ports for
   a global IPv4 addresses.  Port exhaustion shall be reported per
   protocol (UDP, TCP etc) The following is a template of the event.

   +--------------------------+-------------+--------------+-----------+
   |        Field Name        | Size (bits) |  IANA IPFIX  | Mandatory |
   |                          |             |      ID      |           |
   +--------------------------+-------------+--------------+-----------+
   |         timeStamp        |      64     |      TBA     |    Yes    |
   |         natEvent         |      8      |      230     |    Yes    |
   | postNATSourceIPv4Address |      32     |      225     |    Yes    |
   |    protocolIdentifier    |      8      |       4      |    Yes    |
   +--------------------------+-------------+--------------+-----------+

                Table 8: NAT Ports Exhausted event template

4.3.7.  Quota exceeded

   This event will be generated when a NAT device cannot allocate
   resources as a result of an administratively defined policy.  The
   examples of Quota exceeded are to allow only certain number of NAT
   sessions per device, certain number of NAT sessions per user etc.
   The following is a template of the event.

     +--------------------+-------------+---------------+-----------+
     |     Field Name     | Size (bits) | IANA IPFIX ID | Mandatory |
     +--------------------+-------------+---------------+-----------+
     |      timeStamp     |      64     |      TBA      |    Yes    |
     |      natEvent      |      8      |      230      |    Yes    |
     |     Limit value    |      32     |      TBA      |    Yes    |
     | sourceIPv4 address |      32     |       8       |     No    |
     | sourceIPv6 address |     128     |       27      |     No    |
     +--------------------+-------------+---------------+-----------+

                Table 9: NAT Quota Exceeded event template



Sivakumar                Expires March 19, 2011                 [Page 9]

Internet-Draft            Logging of NAT Events           September 2010


5.  Acknowledgements

   Thanks to Dan Wing and Selvi Shanmugam for reviewing this draft.


6.  IANA Considerations

   IANA is requested to perform the following actions:

6.1.  Information Elements

   IANA shall allocate the values for the following IEs in the IPFIX
   registries:

   postNATSourceIPv6Address

   postNATDestinationIPv6Address

   postNATPortBlockStart

   postNATPortBlockEnd

   timeStamp

   Limit value

   The fields are described in Table 1.

6.2.  Changes to existing IEs

   IANA shall change the allowed values for the following fields :

   natOriginatingAddressRealm to allow values 3 and 4 for IPv6
   originated and IPv4 originated respectively.

   natEvent to allow values 1 - 11 as described in Table 2.


7.  Security Considerations

   None.


8.  References







Sivakumar                Expires March 19, 2011                [Page 10]

Internet-Draft            Logging of NAT Events           September 2010


8.1.  Normative References

   [I-D.ietf-behave-v6v4-xlate-stateful]
              Bagnulo, M., Matthews, P., and I. Beijnum, "Stateful
              NAT64: Network Address and Protocol Translation from IPv6
              Clients to IPv4 Servers",
              draft-ietf-behave-v6v4-xlate-stateful-12 (work in
              progress), July 2010.

   [RFC2119]  Bradner, S., "Key words for use in RFCs to Indicate
              Requirement Levels", BCP 14, RFC 2119, March 1997.

   [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.

8.2.  Informative References

   [RFC5226]  Narten, T. and H. Alvestrand, "Guidelines for Writing an
              IANA Considerations Section in RFCs", BCP 26, RFC 5226,
              May 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 March 19, 2011                [Page 11]



PAFTECH AB 2003-20262026-04-24 07:13:11