RFC 3193 - Securing L2TP Using IPsec
RFC 3193 - Securing L2TP Using IPsec
W. Dixon
Microsoft
G. Zorn
S. Booth
Cisco Systems
November 2001
Copyright Notice
Abstract
This document discusses how L2TP (Layer Two Tunneling Protocol) may
https://datatracker.ietf.org/doc/html/rfc3193 1/28
3/13/22, 10:32 PM RFC 3193 - Securing L2TP using IPsec
Table of Contents
1. Introduction .................................................. 2
6. References .................................................... 21
Acknowledgments .................................................. 22
1. Introduction
AH, described in [3] and IPsec ESP, described in [4]. IKE is the key
This document proposes use of the IPsec protocol suite for protecting
L2TP traffic over IP networks, and discusses how IPsec and L2TP
https://datatracker.ietf.org/doc/html/rfc3193 2/28
3/13/22, 10:32 PM RFC 3193 - Securing L2TP using IPsec
tunnel security.
Although L2TP does not mandate the use of IP/UDP for its transport
1.1. Terminology
Voluntary Tunneling
client will send L2TP packets to the NAS which will forward
not need to support L2TP, and the LAC resides on the same
Compulsory Tunneling
action from the client and without allowing the client any
Initiator The initiator can be the LAC or the LNS and is the device
Responder The responder can be the LAC or the LNS and is the device
In this document, the key words "MAY", "MUST, "MUST NOT", "OPTIONAL",
described in [2].
https://datatracker.ietf.org/doc/html/rfc3193 3/28
3/13/22, 10:32 PM RFC 3193 - Securing L2TP using IPsec
L2TP tunnels PPP traffic over the IP and non-IP public networks.
Therefore, both the control and data packets of L2TP protocol are
packets.
[2] An adversary may try to modify packets (both control and data).
[3] An adversary may try to hijack the L2TP tunnel or the PPP
The L2TP protocol, and PPP authentication and encryption do not meet
provides mutual authentication between the LAC and the LNS at tunnel
https://datatracker.ietf.org/doc/html/rfc3193 4/28
3/13/22, 10:32 PM RFC 3193 - Securing L2TP using IPsec
Note that several of the attacks outlined above can be carried out on
PPP packets sent over the link between the client and the NAS/LAC,
for PPP packets sent over the dial-up link. Authentication, replay
(described in RFC 2406 [4] and RFC 2402 [3]), including NULL
L2TP security MUST meet the key management requirements of the IPsec
association negotiation, and key management using the IPsec DOI [5].
https://datatracker.ietf.org/doc/html/rfc3193 5/28
3/13/22, 10:32 PM RFC 3193 - Securing L2TP using IPsec
important when L2TP is run over non-IP media such as IEEE 802, ATM,
Mechanisms within PPP and L2TP provide for both graceful and non-
and L2TP tunnel hellos provide the capability to detect when a non-
this occurs.
notify L2TP this event has occurred. If the L2TP state is such that
a ZLB ack has been sent in response to a STOPCCN, this can be assumed
to be positive acknowledgment that the peer received the ZLB ack and
has performed a teardown of any L2TP tunnel state associated with the
peer. The L2TP tunnel state and any associated filters can now be
safely removed.
of the extra headers. This should occur after the L2TP tunnel has
been setup and but before LCP negotiations begin. If the MTU value
default MTU, it may replace the value being used. This value may
also be used as the initial value proposed for the MRU in the LCP
config req.
https://datatracker.ietf.org/doc/html/rfc3193 6/28
3/13/22, 10:32 PM RFC 3193 - Securing L2TP using IPsec
this event to L2TP so that the new MTU value can be reflected into
the PPP interface. Any new PTMU discoveries seen at the PPP
accordingly.
MUST:
packet arrived in the correct SA, L2TP can be assured that the
packet was indeed sent by a trusted peer and that it did not
[2] Verify that the IP addresses and UDP port values in the packet
match the socket information which was used to setup the L2TP
L2TP), can cause problems within the current IKE framework. The L2TP
assigned UDP source port. This port change is reflected in the SCCRP
protection of L2TP via IPsec SHOULD NOT do this. To allow for this
behavior when using L2TP and IPsec, when the responder chooses a new
and Error Code AVP present. The Result Code MUST be set to 2
(General Error) and the Error Code SHOULD be set to 7 (Try Another).
If the Error Code is set to 7, then the optional error message MUST
format for IPv4 or in RFC 2373 [17] format for IPv6. The initiator
MUST parse the result and error code information and send a new SCCRQ
https://datatracker.ietf.org/doc/html/rfc3193 7/28
3/13/22, 10:32 PM RFC 3193 - Securing L2TP using IPsec
reduces complexity since now the initiator always knows precisely the
Per IKE [7], when using pre-shared key authentication, a key must be
When using Main Mode (which provides identity protection), this key
pre-shared key must map to one of the valid id types defined in the
If the initiator receives a StopCCN with the result and error code
message, it MAY bind the original pre-shared key used by IKE to the
the number of LAC and LNS endpoints grow, pre-shared keys become
During the IKE phase 2 negotiations, the peers agree on what traffic
represent the traffic which the peers agree to protect and are
considered:
https://datatracker.ietf.org/doc/html/rfc3193 8/28
3/13/22, 10:32 PM RFC 3193 - Securing L2TP using IPsec
Cases:
+--------------------------------------------------+
+--------------------------------------------------+
+--------------------------------------------------+
+--------------------------------------------------+
+--------------------------------------------------+
+--------------------------------------------------+
+--------------------------------------------------+
+--------------------------------------------------+
+--------------------------------------------------+
+--------------------------------------------------+
By solving the most general case of the above permutations, all cases
are covered. The most general case is the last one in the list.
This scenario is when the initiator chooses a new port number and the
responder chooses a new address and port number. The L2TP message
<- New IKE Phase 2 to for port number change by the responder
such as load balancing and QoS. This may require that the port and
https://datatracker.ietf.org/doc/html/rfc3193 9/28
3/13/22, 10:32 PM RFC 3193 - Securing L2TP using IPsec
and IPsec which allow L2TP to inject filters into the IPsec filter
following sections.
address and port. However, the initiator MUST allow the responder to
float its port and SHOULD allow the responder to choose a new IP
described below.
socket.
L2TP traffic.
this address.
R-IPAddr The IP address which the responder uses for sending and
of the quick mode IDs sent by the peer during IKE phase 2
https://datatracker.ietf.org/doc/html/rfc3193 10/28
3/13/22, 10:32 PM RFC 3193 - Securing L2TP using IPsec
IKE phase 2.
The filters defined in the following sections are listed from highest
protect the SCCRQ sent by the initiator to open the L2TP tunnel.
filter MUST be present before the L2TP tunnel setup messages start to
flow.
Responder Filters:
1701
Initiator Filters:
dst 1701
dst I-Port
dst I-Port
When the initiator uses dynamic ports, L2TP must inject the filters
into the IPsec filter database, once its source port number is known.
statically defined.
is needed to handle the potential port change which may occur as the
https://datatracker.ietf.org/doc/html/rfc3193 11/28
3/13/22, 10:32 PM RFC 3193 - Securing L2TP using IPsec
the sending of a SCCRQ by the initiator SHOULD cause IKE to setup the
The port numbers in the Quick Mode IDs sent by the initiator MUST
contain the specific port numbers used to identify the UDP socket.
initial SCCRQ. The quick mode IDs sent by the initiator will be a
quick mode exchange will finish and IKE should inject a specific
filter set into the IPsec filter database and associate this filter
set with the phase 2 SA established between the peers. These filters
should persist as long as the L2TP tunnel exists. The new filter set
Responder Filters:
dst I-Port
dst 1701
dst 1701
Mechanisms SHOULD exist between L2TP and IPsec such that L2TP is not
been established. This will help avoid timeouts which may occur as
Once the phase 2 SA has been established between the peers, the SCCRQ
This step describes the process which should be followed when the
The new address the responder chooses to use MUST be reflected in the
result and error code AVP of a STOPCCN message. The Result Code MUST
be set to 2 (General Error) and the Error Code MUST be set to 7 (Try
https://datatracker.ietf.org/doc/html/rfc3193 12/28
3/13/22, 10:32 PM RFC 3193 - Securing L2TP using IPsec
encoded in dotted decimal format for IPv4 or in RFC 2373 [17] format
for IPv6.
The STOPCCN Message MUST be sent using the same address and UDP port
information which the initiator used to send the SCCRQ. This message
SCCRQ.
Upon receiving the STOPCCN, the initiator MUST parse the IP address
from the Result and Error Code AVP and perform the necessary sanity
are found L2TP should inject a new set of filters into the IPsec
request IKE to bind the new IP address to the pre-shared key which
phase 2 SA must be established between the peers before the new SCCRQ
is sent.
Assuming the initial tunnel has been torn down and the filters needed
to create the tunnel removed, the new filters for the initiator and
Initiator Filters:
dst 1701
dst I-Port
dst I-Port
Once IKE phase 2 completes, the new filter set at the responder will
be:
Responder Filters:
dst I-Port
dst 1701
dst 1701
https://datatracker.ietf.org/doc/html/rfc3193 13/28
3/13/22, 10:32 PM RFC 3193 - Securing L2TP using IPsec
If the responder chooses not to move to a new port number, the L2TP
The responder MAY choose a new UDP source port to use for L2TP tunnel
new port number is chosen, then L2TP must inject new filters into the
IPsec filter database. The responder must start new IKE phase 2
Initiator Filters:
R-Port
1701
I-Port
I-Port
I-Port
Responder Filters:
I-Port
I-Port
R-Port
1701
1701
Once the negotiations have completed, the SCCRP is sent and the L2TP
tunnel can complete establishment. After the L2TP tunnel has been
deleted.
https://datatracker.ietf.org/doc/html/rfc3193 14/28
3/13/22, 10:32 PM RFC 3193 - Securing L2TP using IPsec
followed with one addition. The initial filter set at both sides
Inbound Filter:
When either peer decides to start a tunnel, L2TP should inject the
sections.
5. Security Considerations
packet.
no way to verify that only the user authenticated within PPP is using
https://datatracker.ietf.org/doc/html/rfc3193 15/28
3/13/22, 10:32 PM RFC 3193 - Securing L2TP using IPsec
is used, the client MUST ensure that only traffic from that
authentication policy.
own certificate credential from their chosen PKI. Client and server
source and destination ports only if security for each source and
When user certificates are used, the user certificate can be stored
the ease with which an attacker can obtain one under false pretenses,
https://datatracker.ietf.org/doc/html/rfc3193 16/28
3/13/22, 10:32 PM RFC 3193 - Securing L2TP using IPsec
Thus when pre-shared keys are used in remote access scenarios, the
neither the client nor the server identifies itself during IKE phase
1; it is only known that both parties are a member of the group with
As a result, where main mode is used with pre-shared keys, unless PPP
https://datatracker.ietf.org/doc/html/rfc3193 17/28
3/13/22, 10:32 PM RFC 3193 - Securing L2TP using IPsec
implementations.
group pre-shared key for IKE authentication to the LNS. IKE pre-
When L2TP is protected with IPsec, both PPP and IPsec security
servers are able to set and get the properties of IPsec security
are able to influence the negotiation process for PPP encryption and
compression.
the LAC, and will typically not be aware that the frames are being
tunneled, nor that any security services are in place between the LAC
and LNS. At the LNS, a data packet will arrive, which includes a PPP
up between the LNS and the LAC, the LNS can obtain information about
security services in place between itself and the LAC. Thus in the
compulsory tunneling case, the client and the LNS have unequal
itself and the LAC, it can use this knowledge in order to modify its
behavior during PPP ECP [10] and CCP [9] negotiation. Let us assume
https://datatracker.ietf.org/doc/html/rfc3193 18/28
3/13/22, 10:32 PM RFC 3193 - Securing L2TP using IPsec
act as though these policies were satisfied, and would not mandate
between the LAC and the LNS, and since it may not trust the LAC or
the wire between itself and the LAC, the client will typically want
path would not modify this behavior even if it had knowledge of the
security services in place between the LAC and the LNS. The client
order to provide privacy on the wire between itself and the LAC. The
The client will typically not trust the LAC and will negotiate
the LAC may only wish to negotiate IPsec ESP with null encryption
with the LNS, and the LNS will request replay protection. This will
duplicated over the path between the LAC and the LNS. This results
The client can satisfy its desire for confidentiality services in one
instead. If the client does not know that all end-stations it will
contact are IPsec capable (the most likely case), then it will
that since the LNS knows that the client's packets are being tunneled
but the client does not, the LNS can ensure that stateless
negotiations.
https://datatracker.ietf.org/doc/html/rfc3193 19/28
3/13/22, 10:32 PM RFC 3193 - Securing L2TP using IPsec
packets to the NAS, which will route them to the LNS. Over a dialup
between itself and the LNS. It will also have knowledge of PPP
NAS.
From the LNS point of view, it will note a PPP frame encapsulated in
them. Thus in the voluntary tunneling case, the client and the LNS
them.
place between itself and the LNS. Thus, it can request that PPP
Thus in the voluntary tunneling case the client and LNS will
https://datatracker.ietf.org/doc/html/rfc3193 20/28
3/13/22, 10:32 PM RFC 3193 - Securing L2TP using IPsec
Security Associations with the LNS, one with ESP with null
to an IPsec- capable end-station would run over the ESP with null
end-station would run over the other security association. Note that
Also note that the client may wish to put confidentiality services in
place for non-tunneled packets traveling between itself and the NAS.
per-packet basis.
6. References
[1] Townsley, W., Valencia, A., Rubens, A., Pall, G., Zorn, G., and
[2] Bradner, S., "Key words for use in RFCs to Indicate Requirement
November 1998.
[8] Simpson, W., "The Point-to-Point Protocol (PPP)", STD 51, RFC
[9] Rand, D., "The PPP Compression Control Protocol (CCP)", RFC
https://datatracker.ietf.org/doc/html/rfc3193 21/28
3/13/22, 10:32 PM RFC 3193 - Securing L2TP using IPsec
[10] Meyer, G., "The PPP Encryption Control Protocol (ECP)", RFC
[14] Dierks, T. and C. Allen, "The TLS Protocol Version 1.0", RFC
Acknowledgments
Thanks to Gurdeep Singh Pall, David Eitelbach, Peter Ford, and Sanjay
https://datatracker.ietf.org/doc/html/rfc3193 22/28
3/13/22, 10:32 PM RFC 3193 - Securing L2TP using IPsec
Authors' Addresses
Baiju V. Patel
Intel Corp
Hillsboro, OR 97124
EMail: [email protected]
Bernard Aboba
Microsoft Corporation
Redmond, WA 98052
EMail: [email protected]
William Dixon
Microsoft Corporation
Redmond, WA 98052
EMail: [email protected]
Glen Zorn
EMail: [email protected]
Skip Booth
Cisco Systems
RTP, NC 27709
EMail: [email protected]
https://datatracker.ietf.org/doc/html/rfc3193 23/28
3/13/22, 10:32 PM RFC 3193 - Securing L2TP using IPsec
This section provides examples of IPsec filter sets for L2TP tunnel
This is the most simple of the cases since nothing changes during
L2TP tunnel establishment. Since the initiator does not know whether
the responder will change its port number, it still must be prepared
for this case. In this example, the initiator will use an IPv4
2.2.2.1.
Initiator Filters:
Responder Filters:
Initiator Filters:
Responder Filters:
https://datatracker.ietf.org/doc/html/rfc3193 24/28
3/13/22, 10:32 PM RFC 3193 - Securing L2TP using IPsec
dynamic ports
occur to protect the SCCRP sent from the responder to the initiator.
Other than the additional phase 2 setup, the only other difference is
that L2TP on the responder must inject an additional filter into the
This example also shows the additional filter needed by the initiator
which allows either side to start the tunnel. In either the dial-out
required.
For this example, assume the dynamic port given to the initiator is
Any-Addr.
Initiator Filters:
Responder Filters:
https://datatracker.ietf.org/doc/html/rfc3193 25/28
3/13/22, 10:32 PM RFC 3193 - Securing L2TP using IPsec
Initiator Filters:
Responder Filters:
use. New filters should be injected by L2TP to reflect this new port
assignment.
Responder Filters:
The second phase 2 will start once L2TP sends the SCCRP. Once the
Initiator Filters:
https://datatracker.ietf.org/doc/html/rfc3193 26/28
3/13/22, 10:32 PM RFC 3193 - Securing L2TP using IPsec
Responder Filters:
Once the L2TP tunnel has been successfully established, the original
this document or the extent to which any license under such rights
has made any effort to identify any such rights. Information on the
The IETF invites any interested party to bring to its attention any
Director.
https://datatracker.ietf.org/doc/html/rfc3193 27/28
3/13/22, 10:32 PM RFC 3193 - Securing L2TP using IPsec
kind, provided that the above copyright notice and this paragraph are
English.
The limited permissions granted above are perpetual and will not be
"AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
Acknowledgement
Internet Society.
https://datatracker.ietf.org/doc/html/rfc3193 28/28