{"id":310023,"date":"2020-09-16T15:00:26","date_gmt":"2020-09-16T15:00:26","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=310023"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=310023","title":{"rendered":"IPSec \u0442\u0443\u043d\u043d\u0435\u043b\u044c \u043c\u0435\u0436\u0434\u0443 Strongswan \u0437\u0430 NAT \u0438 VMWare NSX Edge"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/519410\/\">\u0412 \u0441\u0438\u043b\u0443 \u0440\u044f\u0434\u0430 \u043f\u0440\u0438\u0447\u0438\u043d, \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u043e\u0441\u044c \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u0442\u044c VPN-\u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 \u0441\u0435\u0442\u044c\u044e \u0432 VMWare Cloud Director \u0438 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u043e\u0439 Ubuntu \u0432 \u043e\u0431\u043b\u0430\u043a\u0435. \u0417\u0430\u043c\u0435\u0442\u043a\u0430 \u043d\u0435 \u043f\u0440\u0435\u0442\u0435\u043d\u0434\u0443\u0435\u0442 \u043d\u0430 \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435, \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0435 howto.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/hi\/0w\/lh\/hi0wlhissggeqcjopmfsflq6-x8.jpeg\" alt=\"IPSec \u0442\u0443\u043d\u043d\u0435\u043b\u044c \u043c\u0435\u0436\u0434\u0443 Strongswan \u0437\u0430 NAT \u0438 VMWare NSX Edge\"><br \/>  <a name=\"habracut\"><\/a><br \/>  \u0412 \u0441\u0435\u0442\u0438 \u043d\u0430\u0448\u043b\u0430\u0441\u044c \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f 2015 \u0433\u043e\u0434\u0430 \u043d\u0430 \u044d\u0442\u0443 \u0442\u0435\u043c\u0443 \u00ab<a href=\"http:\/\/www.routereflector.com\/2015\/03\/site-to-site-ipsec-vpn-between-nsx-edge-and-linux-strongswan\/\" rel=\"nofollow\">Site to Site IPSEC VPN between NSX Edge and Linux strongSwan<\/a>\u00bb.<\/p>\n<p>  \u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0435\u0451 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c, \u0442.\u043a. \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e\u043d\u0430\u0434\u0451\u0436\u043d\u0435\u0435, \u043d\u0435 \u0441\u0430\u043c\u043e\u043f\u043e\u0434\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0433\u043e \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430, \u0434\u0430 \u0438 \u0437\u0430 NAT-\u043e\u043c \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c\u044b\u0439 \u043a\u043e\u043d\u0444\u0438\u0433 \u043d\u0435 \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u043b \u0431\u044b.<\/p>\n<p>  \u041f\u043e\u044d\u0442\u043e\u043c\u0443, \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0441\u0435\u0441\u0442\u044c \u0438 \u043f\u043e\u043a\u043e\u043f\u0430\u0442\u044c\u0441\u044f \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438.<\/p>\n<p>  \u0417\u0430 \u043e\u0441\u043d\u043e\u0432\u0443 \u044f \u0432\u0437\u044f\u043b \u0434\u0430\u0432\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0439 \u043c\u043d\u043e\u0439 \u043a\u043e\u043d\u0444\u0438\u0433, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0439 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c\u0441\u044f \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0438\u0437 \u043b\u044e\u0431\u043e\u0439 \u041e\u0421 \u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u043b \u043a \u043d\u0435\u043c\u0443 \u043a\u0443\u0441\u043e\u043a, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0439 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u0441\u044f \u043a NSX Edge.<\/p>\n<p>  \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0438 \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u0430\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 Strongswan \u0432\u044b\u0445\u043e\u0434\u044f\u0442 \u0437\u0430 \u0440\u0430\u043c\u043a\u0438 \u0437\u0430\u043c\u0435\u0442\u043a\u0438, \u043f\u043e\u0437\u0432\u043e\u043b\u044e \u0441\u0435\u0431\u0435 \u0441\u043e\u0441\u043b\u0430\u0442\u044c\u0441\u044f \u043d\u0430 <a href=\"https:\/\/eboyko.ru\/blog\/posts\/strongswan-ipsec-vpn-late-2017\" rel=\"nofollow\">\u043d\u0435\u043f\u043b\u043e\u0445\u043e\u0439 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b \u043d\u0430 \u044d\u0442\u0443 \u0442\u0435\u043c\u0443<\/a>.<\/p>\n<p>  \u0418\u0442\u0430\u043a, \u043f\u0435\u0440\u0435\u0439\u0434\u0451\u043c \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043a \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u043c.<\/p>\n<p>  \u0421\u0445\u0435\u043c\u0430 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u0443 \u043d\u0430\u0441 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0432\u043e\u0442 \u0442\u0430\u043a:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/d3\/y1\/ls\/d3y1lsfx3jgkmphtgjoiebsnbbm.png\">  <\/p>\n<pre><code class=\"plaintext\">\u0441\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u044b VMWare \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u0430\u0434\u0440\u0435\u0441 33.33.33.33 \u0438 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u044f\u044f \u0441\u0435\u0442\u044c 192.168.1.0\/24 \u0441\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u044b Linux \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u0430\u0434\u0440\u0435\u0441 22.22.22.22 \u0438 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u044f\u044f \u0441\u0435\u0442\u044c 10.10.10.0\/24 \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c Let's encrypt \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442 \u0434\u043b\u044f \u0430\u0434\u0440\u0435\u0441\u0430 vpn.linux.ext PSK \u0441 \u043e\u0431\u0435\u0438\u0445 \u0441\u0442\u043e\u0440\u043e\u043d: ChangeMeNow!<\/code><\/pre>\n<p>  \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0441\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u044b NSX Edge:<\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u0422\u0435\u043a\u0441\u0442<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"plaintext\">Enabled: yes Enable perfect forward secrecy (PFS): yes Name: VPN_strongswan (\u043b\u044e\u0431\u043e\u0435, \u043f\u043e \u0432\u0430\u0448\u0435\u043c\u0443 \u0432\u044b\u0431\u043e\u0440\u0443) Local Id: 33.33.33.33 Local Endpoint: 33.33.33.33 Local Subnets: 192.168.1.0\/24 Peer Id: vpn.linux.ext Peer Endpoint: 22.22.22.22 Peer Subnets: 10.10.10.0\/24 Encryption Algorithm: AES256 Authentication: PSK Pre-Shared Key: ChangeMeNow! Diffie-Hellman Group: 14 (2048 bit \u2014\u00a0\u043f\u0440\u0438\u0435\u043c\u043b\u0435\u043c\u044b\u0439 \u043a\u043e\u043c\u043f\u0440\u043e\u043c\u0438\u0441\u0441 \u043c\u0435\u0436\u0434\u0443 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c\u044e \u0438 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c\u044e. \u041d\u043e \u0435\u0441\u043b\u0438 \u0445\u043e\u0442\u0438\u0442\u0435, \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435) Digest Algorithm: SHA256 IKE Option: IKEv2 IKE Responder Only: no Session Type: Policy Based Session<\/code><\/pre>\n<\/div><\/div>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u0421\u043a\u0440\u0438\u043d\u0448\u043e\u0442\u044b<\/b>                         <\/p>\n<div class=\"spoiler_text\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/qs\/oc\/jr\/qsocjregmooieo5xc9ric5kzuty.png\"><br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/wn\/_s\/oa\/wn_soaz027bfzsdf1ns8rrqavlk.png\"><\/div>\n<\/p><\/div>\n<p>  \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0441\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u044b Strongswan:<\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">ipsec.conf<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"plaintext\"># \/etc\/ipsec.conf config setup  conn %default \tdpdaction=clear \tdpddelay=35s \tdpdtimeout=300s  \tfragmentation=yes \trekey=no  \tike=aes256gcm16-aes256gcm12-aes128gcm16-aes128gcm12-sha256-sha1-modp2048-modp4096-modp1024,aes256-aes128-sha256-sha1-modp2048-modp4096-modp1024,3des-sha1-modp1024! \tesp=aes128gcm12-aes128gcm16-aes256gcm12-aes256gcm16-modp2048-modp4096-modp1024,aes128-aes256-sha1-sha256-modp2048-modp4096-modp1024,aes128-sha1-modp2048,aes128-sha1-modp1024,3des-sha1-modp1024,aes128-aes256-sha1-sha256,aes128-sha1,3des-sha1!  \tleft=%any \tleftsubnet=10.10.10.0\/24         leftcert=certificate.pem \tleftfirewall=yes \tleftsendcert=always  \tright=%any \trightsourceip=192.168.1.0\/24 \trightdns=77.88.8.8,8.8.4.4  \teap_identity=%identity  # IKEv2 conn IPSec-IKEv2 \tkeyexchange=ikev2 \tauto=add  # BlackBerry, Windows, Android conn IPSec-IKEv2-EAP \talso=&quot;IPSec-IKEv2&quot; \trightauth=eap-mschapv2  # macOS, iOS conn IKEv2-MSCHAPv2-Apple \talso=&quot;IPSec-IKEv2&quot; \trightauth=eap-mschapv2 \tleftid=vpn.linux.ext  # Android IPsec Hybrid RSA conn IKEv1-Xauth \tkeyexchange=ikev1 \trightauth=xauth \tauto=add  # VMWare IPSec VPN conn linux-nsx-psk \tauthby=secret \tauto=start \tleftid=vpn.linux.ext \tleft=10.10.10.10 \tleftsubnet=10.10.10.0\/24 \trightid=33.33.33.33 \tright=33.33.33.33 \trightsubnet=192.168.1.0\/24 \tikelifetime=28800 \tkeyexchange=ikev2 \tlifebytes=0 \tlifepackets=0 \tlifetime=1h<\/code><\/pre>\n<\/div><\/div>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">ipsec.secret<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"plaintext\"># \/etc\/ipsec.secrets : RSA privkey.pem  # Create VPN users accounts # \u0412\u041d\u0418\u041c\u0410\u041d\u0418\u0415! \u041f\u043e\u0441\u043b\u0435 \u043b\u043e\u0433\u0438\u043d\u0430 \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u0440\u043e\u0431\u0435\u043b, \u043f\u043e\u0442\u043e\u043c \u0434\u0432\u043e\u0435\u0442\u043e\u0447\u0438\u0435.  user1 : EAP &quot;stongPass1&quot; user2 : EAP &quot;stongPass2&quot; %any 33.33.33.33 : PSK &quot;ChangeMeNow!&quot;<\/code><\/pre>\n<\/div><\/div>\n<p>  \u043f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0435\u0440\u0435\u0447\u0438\u0442\u0430\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433, \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u0447\u0442\u043e \u043e\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043e:<\/p>\n<pre><code class=\"plaintext\">ipsec update ipsec rereadsecrets ipsec up linux-nsx-psk ipsec status<\/code><\/pre>\n<p>  \u041d\u0430\u0434\u0435\u044e\u0441\u044c, \u044d\u0442\u0430 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0430\u044f \u0437\u0430\u043c\u0435\u0442\u043a\u0430 \u043e\u043a\u0430\u0436\u0435\u0442\u0441\u044f \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0439 \u0438 \u0441\u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0442 \u043a\u043e\u043c\u0443-\u043d\u0438\u0431\u0443\u0434\u044c \u043f\u0430\u0440\u0443 \u0447\u0430\u0441\u043e\u0432.<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/519410\/\"> https:\/\/habr.com\/ru\/post\/519410\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/519410\/\">\u0412 \u0441\u0438\u043b\u0443 \u0440\u044f\u0434\u0430 \u043f\u0440\u0438\u0447\u0438\u043d, \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u043e\u0441\u044c \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u0442\u044c VPN-\u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 \u0441\u0435\u0442\u044c\u044e \u0432 VMWare Cloud Director \u0438 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u043e\u0439 Ubuntu \u0432 \u043e\u0431\u043b\u0430\u043a\u0435. \u0417\u0430\u043c\u0435\u0442\u043a\u0430 \u043d\u0435 \u043f\u0440\u0435\u0442\u0435\u043d\u0434\u0443\u0435\u0442 \u043d\u0430 \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435, \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0435 howto.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/hi\/0w\/lh\/hi0wlhissggeqcjopmfsflq6-x8.jpeg\" alt=\"IPSec \u0442\u0443\u043d\u043d\u0435\u043b\u044c \u043c\u0435\u0436\u0434\u0443 Strongswan \u0437\u0430 NAT \u0438 VMWare NSX Edge\">  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-310023","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/310023","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=310023"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/310023\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=310023"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=310023"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=310023"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}