{"id":254832,"date":"2014-09-28T07:44:45","date_gmt":"2014-09-27T23:44:45","guid":{"rendered":"http:\/\/blog.zhenglei.net\/?p=254832"},"modified":"2017-05-11T10:58:59","modified_gmt":"2017-05-11T02:58:59","slug":"vpn-tunneling-protocols","status":"publish","type":"post","link":"https:\/\/blog.zhenglei.net\/?p=254832","title":{"rendered":"VPN Tunneling Protocols"},"content":{"rendered":"<p>FROM<\/p>\n<h3><a href=\"http:\/\/technet.microsoft.com\/en-us\/library\/cc771298%28v=ws.10%29.aspx\">http:\/\/technet.microsoft.com\/en-us\/library\/cc771298%28v=ws.10%29.aspx<\/a><\/h3>\n<p>&nbsp;<\/p>\n<p><em><span style=\"color: #3366ff\">This article from Microsoft is outdated,\u00a0 as mentioned by Linda Garth ( linda@thebestvpn.com),\u00a0 and they have a\u00a0 review of the VPN technology, the link is:<\/span><\/em><\/p>\n<p><span style=\"color: #ff6600\"><em><a style=\"color: #ff6600\" href=\"https:\/\/thebestvpn.com\/pptp-l2tp-openvpn-sstp-ikev2\/\">https:\/\/thebestvpn.com\/pptp-l2tp-openvpn-sstp-ikev2\/<\/a><\/em><\/span><\/p>\n<p><em><span style=\"color: #3366ff\">Seem&#8217;s the Cisco VPN is still missing in their document, that is Ocserv &amp; OpenConnect client,\u00a0 an open source project\u00a0 hosted at <span style=\"color: #ff6600\"><a style=\"color: #ff6600\" href=\"http:\/\/www.infradead.org\">www.infradead.org<\/a><\/span><\/span><\/em><\/p>\n<p><em><span style=\"color: #3366ff\">Similar to OpenVPN,\u00a0 the Cisco VPN protocol is an application level protocol,\u00a0 and widely used in Corporation environment<\/span><\/em><\/p>\n<p><em><span style=\"color: #3366ff\">I put the link here,\u00a0 dosen&#8217;t mean any suggestions to adopt Cisco VPN, or OpenVPN.<\/span><\/em><\/p>\n<p><em><span style=\"color: #3366ff\">In fact, I am using <\/span><\/em><\/p>\n<p><em><span style=\"color: #3366ff\">Road Worrie:\u00a0 Just ssh socket forward, it&#8217;s easy and convenient,\u00a0 together with wpad text file for the sake of proxy selection.\u00a0 Performance or payload is not important for me, <\/span><\/em><\/p>\n<p>&nbsp;<\/p>\n<p><em><span style=\"color: #3366ff\">As I have my own VPS server.<\/span><\/em><\/p>\n<p><em><span style=\"color: #3366ff\">Access External Server\u00a0 with public IP,\u00a0 from Corp&#8217;s network:\u00a0\u00a0 Using Stunnel with SNI to enable setup multiple tcp link via http proxy<\/span><\/em><\/p>\n<p><em><span style=\"color: #3366ff\">Access Internal server within Corp&#8217;s network from public IP: \u00a0 Stunnel\u00a0 with SNI + tgcd<\/span><\/em><\/p>\n<p><em><span style=\"color: #3366ff\">Access Google Play from Handset,\u00a0 Using PPTP VPN<\/span><\/em><\/p>\n<p>&nbsp;<\/p>\n<p><em><span style=\"color: #3366ff\">From my experience:<\/span><\/em><\/p>\n<p><em><span style=\"color: #3366ff\">The Stunnel is the most stable software,\u00a0\u00a0 the dante (sock5) is the second stable,\u00a0 and\u00a0 OpenVPN.<\/span><\/em><\/p>\n<p><em><span style=\"color: #3366ff\">The unstable issue may caused by the fact that the handshake protocol of openvpn can be easy detected, not only the software code it&#8217;s self.\u00a0 The same for the shadowsocks\u00a0 or socks5 protocol.\u00a0 Traffic Obfuscation is more important than encryption strength in some use case.<\/span><\/em><\/p>\n<p><em><span style=\"color: #3366ff\">May 11 2017<\/span><\/em><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>Applies To: Windows Server 2008<\/p>\n<div id=\"mainSection\">\n<div id=\"mainBody\">\n<div id=\"sectionSection0\" class=\"section\">\n<p>Tunneling enables the encapsulation of a packet from one type of protocol within the datagram of a different protocol. For example, VPN uses PPTP to encapsulate IP packets over a public network, such as the Internet. A VPN solution based on Point-to-Point Tunneling Protocol (PPTP), Layer Two Tunneling Protocol (L2TP), or Secure Socket Tunneling Protocol (SSTP) can be configured.<\/p>\n<p>PPTP, L2TP, and SSTP depend heavily on the features originally specified for Point-to-Point Protocol (PPP). PPP was designed to send data across dial-up or dedicated point-to-point connections. For IP, PPP encapsulates IP packets within PPP frames and then transmits the encapsulated PPP-packets across a point-to-point link. PPP was originally defined as the protocol to use between a dial-up client and a network access server.<\/p>\n<h3 class=\"subHeading\">PPTP<\/h3>\n<div class=\"subSection\">\n<p>PPTP allows multiprotocol traffic to be encrypted and then encapsulated in an IP header to be sent across an IP network or a public IP network, such as the Internet. PPTP can be used for remote access and site-to-site VPN connections. When using the Internet as the public network for VPN, the PPTP server is a PPTP-enabled VPN server with one interface on the Internet and a second interface on the intranet.<\/p>\n<h4 class=\"subHeading\">Encapsulation<\/h4>\n<div class=\"subSection\">\n<p>PPTP encapsulates PPP frames in IP datagrams for transmission over the network. PPTP uses a TCP connection for tunnel management and a modified version of Generic Routing Encapsulation (GRE) to encapsulate PPP frames for tunneled data. The payloads of the encapsulated PPP frames can be encrypted, compressed, or both. The following figure shows the structure of a PPTP packet containing an IP datagram.<\/p>\n<p><strong>Structure of a PPTP Packet Containing an IP Datagram<\/strong><\/p>\n<p><img decoding=\"async\" id=\"426583bc-5015-4852-99d9-41a0568262ca\" title=\"Structure of PPTP Packet Containing IP Datagram\" src=\"http:\/\/i.technet.microsoft.com\/dynimg\/IC195201.gif\" alt=\"Structure of PPTP Packet Containing IP Datagram\" \/><\/p>\n<\/div>\n<h4 class=\"subHeading\">Encryption<\/h4>\n<div class=\"subSection\">\n<p>The PPP frame is encrypted with Microsoft Point-to-Point Encryption (MPPE) by using encryption keys generated from the MS-CHAP v2 or EAP-TLS authentication process. Virtual private networking clients must use the MS-CHAP v2 or EAP-TLS authentication protocol in order for the payloads of PPP frames to be encrypted. PPTP is taking advantage of the underlying PPP encryption and encapsulating a previously encrypted PPP frame.<\/p>\n<\/div>\n<\/div>\n<h3 class=\"subHeading\">L2TP<\/h3>\n<div class=\"subSection\">\n<p>L2TP allows multiprotocol traffic to be encrypted and then sent over any medium that supports point-to-point datagram delivery, such as IP or asynchronous transfer mode (ATM). L2TP is a combination of PPTP and Layer 2 Forwarding (L2F), a technology developed by Cisco Systems, Inc. L2TP represents the best features of PPTP and L2F.<\/p>\n<p>Unlike PPTP, the Microsoft implementation of L2TP does not use MPPE to encrypt PPP datagrams. L2TP relies on Internet Protocol security (IPsec) in Transport Mode for encryption services. The combination of L2TP and IPsec is known as L2TP\/IPsec.<\/p>\n<p>Both L2TP and IPsec must be supported by both the VPN client and the VPN server. Client support for L2TP is built in to the Windows\u00a0Vista\u00ae and Windows\u00a0XP remote access clients, and VPN server support for L2TP is built in to members of the Windows\u00a0Server\u00ae\u00a02008 and Windows Server\u00a02003 family.<\/p>\n<p>L2TP is installed with the TCP\/IP protocol.<\/p>\n<h4 class=\"subHeading\">Encapsulation<\/h4>\n<div class=\"subSection\">\n<p>Encapsulation for L2TP\/IPsec packets consists of two layers:<\/p>\n<h5 class=\"heading\">First layer: L2TP encapsulation<\/h5>\n<div class=\"subSection\">\n<p>A PPP frame (an IP datagram) is wrapped with an L2TP header and a UDP header.<\/p>\n<p>The following figure shows the structure of an L2TP packet containing an IP datagram.<\/p>\n<p><strong>Structure of an L2TP Packet Containing an IP Datagram<\/strong><\/p>\n<p><img decoding=\"async\" id=\"66eebc53-a8b3-483d-94b6-19c542be4766\" title=\"Structure of L2TP Packet Containing an IP Datagram\" src=\"http:\/\/i.technet.microsoft.com\/dynimg\/IC195202.gif\" alt=\"Structure of L2TP Packet Containing an IP Datagram\" \/><\/p>\n<\/div>\n<h5 class=\"heading\">Second layer: IPsec encapsulation<\/h5>\n<div class=\"subSection\">\n<p>The resulting L2TP message is then wrapped with an IPsec Encapsulating Security Payload (ESP) header and trailer, an IPsec Authentication trailer that provides message integrity and authentication, and a final IP header. In the IP header is the source and destination IP address that corresponds to the VPN client and VPN server.<\/p>\n<p>The following illustration shows L2TP and IPsec encapsulation for a PPP datagram.<\/p>\n<p><strong>Encryption of L2TP Traffic with IPsec ESP<\/strong><\/p>\n<p><img decoding=\"async\" id=\"71f15fbe-1ba4-4691-a0b6-3491bc38c077\" title=\"Encryption of L2TP Traffic with IPsec ESP\" src=\"http:\/\/i.technet.microsoft.com\/dynimg\/IC195203.gif\" alt=\"Encryption of L2TP Traffic with IPsec ESP\" \/><\/p>\n<\/div>\n<\/div>\n<h4 class=\"subHeading\">Encryption<\/h4>\n<div class=\"subSection\">\n<p>The L2TP message is encrypted with either Data Encryption Standard (DES) or Triple DES (3DES) by using encryption keys generated from the Internet Key Exchange (IKE) negotiation process.<\/p>\n<\/div>\n<\/div>\n<h3 class=\"subHeading\">SSTP<\/h3>\n<div class=\"subSection\">\n<p>Secure Socket Tunneling Protocol (SSTP) is a new tunneling protocol that uses the HTTPS protocol over TCP port 443 to pass traffic through firewalls and Web proxies that might block PPTP and L2TP\/IPsec traffic. SSTP provides a mechanism to encapsulate PPP traffic over the Secure Sockets Layer (SSL) channel of the HTTPS protocol. The use of PPP allows support for strong authentication methods, such as EAP-TLS. SSL provides transport-level security with enhanced key negotiation, encryption, and integrity checking.<\/p>\n<p>When a client tries to establish a SSTP-based VPN connection, SSTP first establishes a bidirectional HTTPS layer with the SSTP server. Over this HTTPS layer, the protocol packets flow as the data payload.<\/p>\n<h4 class=\"subHeading\">Encapsulation<\/h4>\n<div class=\"subSection\">\n<p>SSTP encapsulates PPP frames in IP datagrams for transmission over the network. SSTP uses a TCP connection (over port 443) for tunnel management as well as PPP data frames.<\/p>\n<\/div>\n<h4 class=\"subHeading\">Encryption<\/h4>\n<div class=\"subSection\">\n<p>The SSTP message is encrypted with the SSL channel of the HTTPS protocol.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<h2 class=\"heading\">Choosing between tunneling protocols<\/h2>\n<div id=\"sectionSection1\" class=\"section\">\n<p>When choosing between PPTP, L2TP\/IPsec, and SSTP remote access VPN solutions, consider the following:<\/p>\n<ul>\n<li class=\"unordered\">PPTP can be used with a variety of Microsoft clients including Microsoft Windows\u00a02000, Windows\u00a0XP, Windows\u00a0Vista, and Windows Server\u00a02008. Unlike L2TP\/IPsec, PPTP does not require the use of a public key infrastructure (PKI). By using encryption, PPTP-based VPN connections provide data confidentiality (captured packets cannot be interpreted without the encryption key). PPTP-based VPN connections, however, do not provide data integrity (proof that the data was not modified in transit) or data origin authentication (proof that the data was sent by the authorized user).<\/li>\n<li class=\"unordered\">L2TP can only be used with client computers running Windows\u00a02000, Windows\u00a0XP, or Windows\u00a0Vista. L2TP supports either computer certificates or a preshared key as the authentication method for IPsec. Computer certificate authentication, the recommended authentication method, requires a PKI to issue computer certificates to the VPN server computer and all VPN client computers. By using IPsec, L2TP\/IPsec VPN connections provide data confidentiality, data integrity, and data authentication.Unlike PPTP and SSTP, L2TP\/IPsec enables machine authentication at the IPsec layer and user level authentication at the PPP layer.<\/li>\n<li class=\"unordered\">SSTP can only be used with client computers running Windows\u00a0Vista Service Pack\u00a01\u00a0(SP1) or Windows Server\u00a02008. By using SSL, SSTP VPN connections provide data confidentiality, data integrity, and data authentication.<\/li>\n<li class=\"unordered\">All three tunnel types carry PPP frames on top of the network protocol stack. Therefore, the common features of PPP, such as authentication schemes, Internet Protocol version 4 (IPv4) and Internet Protocol version 6 (IPV6) negotiation, and Network Access Protection (NAP), remain the same for the three tunnel types.<\/li>\n<\/ul>\n<div class=\"subSection\">\n<h4 class=\"subHeading\">Additional references<\/h4>\n<div class=\"subSection\">\n<ul>\n<li class=\"unordered\">PPTP is documented in RFC 2637 in the <a href=\"http:\/\/go.microsoft.com\/fwlink\/?linkid=3952\">IETF RFC Database<\/a><\/li>\n<li class=\"unordered\">L2TP is documented in RFC 2661 in the <a href=\"http:\/\/go.microsoft.com\/fwlink\/?linkid=3952\">IETF RFC Database<\/a><\/li>\n<li class=\"unordered\">L2TP\/IPsec is documented in RFC 3193 in the <a href=\"http:\/\/go.microsoft.com\/fwlink\/?linkid=3952\">IETF RFC Database<\/a><\/li>\n<\/ul>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>FROM http:\/\/technet.microsoft.com\/en-us\/ &hellip; <a href=\"https:\/\/blog.zhenglei.net\/?p=254832\">\u7ee7\u7eed\u9605\u8bfb <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,9],"tags":[157,156,158,50],"class_list":["post-254832","post","type-post","status-publish","format-standard","hentry","category-internet","category-vps","tag-l2tp","tag-pptp","tag-sstp","tag-vpn"],"_links":{"self":[{"href":"https:\/\/blog.zhenglei.net\/index.php?rest_route=\/wp\/v2\/posts\/254832","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.zhenglei.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.zhenglei.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.zhenglei.net\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.zhenglei.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=254832"}],"version-history":[{"count":3,"href":"https:\/\/blog.zhenglei.net\/index.php?rest_route=\/wp\/v2\/posts\/254832\/revisions"}],"predecessor-version":[{"id":255773,"href":"https:\/\/blog.zhenglei.net\/index.php?rest_route=\/wp\/v2\/posts\/254832\/revisions\/255773"}],"wp:attachment":[{"href":"https:\/\/blog.zhenglei.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=254832"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.zhenglei.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=254832"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.zhenglei.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=254832"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}