{"id":317001,"date":"2021-01-26T21:00:18","date_gmt":"2021-01-26T21:00:18","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=317001"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=317001","title":{"rendered":"IKEv2 \u0442\u0443\u043d\u043d\u0435\u043b\u044c \u043c\u0435\u0436\u0434\u0443 MikroTik \u0438 StrongSwan: EAP ms-chapv2 \u0438 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0441\u0430\u0439\u0442\u0430\u043c"},"content":{"rendered":"\n<div class=\"post__text post__text_v2\" id=\"post-content-body\">\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/01a\/340\/be5\/01a340be51bec638270f524cd13df830.png\" width=\"1080\" height=\"650\"><figcaption><\/figcaption><\/figure>\n<h2>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h2>\n<p>\u0418\u0434\u0435\u044f \u0441\u0442\u0430\u0442\u044c\u0438 \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0430 \u0438\u0437 \u0436\u0435\u043b\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u0441\u0430\u0439\u0442\u044b \u0447\u0435\u0440\u0435\u0437 VPN-\u0442\u0443\u043d\u043d\u0435\u043b\u044c \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0447\u0435\u0440\u0435\u0437 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0442\u043e\u0440, \u0442\u0430\u043a \u043a\u0430\u043a \u0434\u043e\u043c\u0430 \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432, \u0430 \u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0432\u0435\u0441\u044c \u0442\u0440\u0430\u0444\u0438\u043a \u0447\u0435\u0440\u0435\u0437 VPN \u043d\u0435\u0443\u0434\u043e\u0431\u043d\u043e \u0432 \u0441\u0432\u044f\u0437\u0438 \u0441 \u043d\u0438\u0437\u043a\u043e\u0439 \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u043d\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u044c\u044e \u0442\u0443\u043d\u043d\u0435\u043b\u044f. \u0421\u0442\u0430\u0442\u044c\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0430 \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u0441\u043b\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438. \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442\u044c \u0432  Winbox MikroTik. <\/p>\n<ul>\n<li>\n<p><a href=\"#1\" rel=\"noopener noreferrer nofollow\">\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f StrongSwan<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#2\" rel=\"noopener noreferrer nofollow\">\u0418\u043c\u043f\u043e\u0440\u0442 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0432 \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 IPSec MikroTik<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#3\" rel=\"noopener noreferrer nofollow\">\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0442\u0440\u0430\u0444\u0438\u043a\u0430 \u0438 \u0441\u043f\u0438\u0441\u043a\u0430 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432<\/a><\/p>\n<\/li>\n<\/ul>\n<h2>\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f StrongSwan<\/h2>\n<p><a class=\"anchor\" name=\"1\" id=\"1\"><\/a><\/p>\n<p>\u0417\u0434\u0435\u0441\u044c \u044f \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u044e \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b StrongSwan, \u0431\u0435\u0437 \u0443\u0433\u043b\u0443\u0431\u043b\u0435\u043d\u0438\u044f \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0434\u0435\u043c\u043e\u043d\u0430.<\/p>\n<p>\/etc\/ipsec.conf<\/p>\n<pre><code class=\"bash\">config setup    charondebug=\"ike 2, knl 2, cfg 2, net 2, esp 2, dmn 2,  mgr 2\"    uniqueids=never  conn ikev2-vpn    auto=add    compress=no    type=tunnel    keyexchange=ikev2    fragmentation=yes    forceencaps=yes    dpdaction=clear    dpddelay=300s    rekey=no    left=%any    leftid=    leftcert=server-cert.pem    leftsendcert=always    leftsubnet=0.0.0.0\/0    right=%any    rightid=%any    rightauth=eap-mschapv2    rightsourceip=10.10.10.0\/24    rightdns=8.8.8.8,8.8.4.4    rightsendcert=never    eap_identity=%identity <\/code><\/pre>\n<p>\/etc\/ipsec.secrets<\/p>\n<pre><code class=\"bash\"># This file holds shared secrets or RSA private keys for authentication.  # RSA private key for this host, authenticating it to any other host # which knows the public part.  # this file is managed with debconf and will contain the automatically created $ include \/var\/lib\/strongswan\/ipsec.secrets.inc  : RSA \"server-key.pem\" user1 : EAP \"password1\" user2 : EAP \"password2\" <\/code><\/pre>\n<p>iptables \u043d\u0430 VPS<\/p>\n<pre><code class=\"bash\">-A FORWARD -s 10.10.10.0\/24 -o eth0 -p tcp -m policy --dir in --pol ipsec -m tcp --tcp-flags SYN,RST SYN -m tcpmss --mss 1361:1536 -j TCPMSS --set-mss 1360  -A POSTROUTING -s 10.10.10.0\/24 -o eth0 -m policy --dir out --pol ipsec -j ACCEPT -A POSTROUTING -s 10.10.10.0\/24 -o eth0 -j MASQUERADE  -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT -A INPUT -p tcp -m tcp --dport 22 -j ACCEPT -A INPUT -p tcp -m tcp --dport 443 -j ACCEPT -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT -A INPUT -i lo -j ACCEPT -A INPUT -p udp -m udp --dport 500 -j ACCEPT -A INPUT -p udp -m udp --dport 4500 -j ACCEPT -A INPUT -j DROP -A FORWARD -s 10.10.10.0\/24 -m policy --dir in --pol ipsec --proto esp -j ACCEPT -A FORWARD -d 10.10.10.0\/24 -m policy --dir out --pol ipsec --proto esp -j ACCEPT -A FORWARD -j DROP<\/code><\/pre>\n<h2>\u0418\u043c\u043f\u043e\u0440\u0442 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0432 \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 IPSec MikroTik<\/h2>\n<p><a class=\"anchor\" name=\"2\" id=\"2\"><\/a><\/p>\n<p><strong>\u0418\u043c\u043f\u043e\u0440\u0442 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0432<\/strong><\/p>\n<p>\u0414\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0432, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0442\u0438 \u0438\u0445 \u0432 \u043f\u0430\u043c\u044f\u0442\u044c \u0432\u0430\u0448\u0435\u0433\u043e MikroTik \u0432 \u0440\u0430\u0437\u0434\u0435\u043b Files.<\/p>\n<figure class=\"float full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/2f0\/f5e\/b6f\/2f0f5eb6f4e3d76e19a84ab071a78691.png\" width=\"799\" height=\"461\"><figcaption><\/figcaption><\/figure>\n<\/p>\n<p>System -&gt; Certificates<\/p>\n<p>\u0418\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0439 \u043a\u043b\u044e\u0447 \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0433\u043e \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430 \u0432\u0430\u0448\u0435\u0433\u043e \u0446\u0435\u043d\u0442\u0440\u0430 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u043d\u0430 VPS \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d StrongSwan.<\/p>\n<figure class=\"float full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/027\/304\/5c6\/0273045c6fc0b9afc0e2ceb11c21730b.png\" width=\"695\" height=\"299\"><figcaption><\/figcaption><\/figure>\n<\/p>\n<p>\u041f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0439 \u0438 \u0437\u0430\u043a\u0440\u044b\u0442\u044b\u0439 \u043a\u043b\u044e\u0447\u0438 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 StrongSwan.<\/p>\n<figure class=\"float full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/446\/469\/52b\/44646952b42ce0523be9460d920fc379.png\" width=\"691\" height=\"293\"><figcaption><\/figcaption><\/figure>\n<\/p>\n<figure class=\"float full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/fc4\/ddd\/316\/fc4ddd316a1699de629a1f03f49a4be1.png\" width=\"690\" height=\"300\"><figcaption><\/figcaption><\/figure>\n<\/p>\n<p><strong>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 IPsec<\/strong><\/p>\n<p>IP -&gt; IPsec<\/p>\n<p>\u0418\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u0437\u0430\u043a\u0440\u044b\u0442\u044b\u0439 \u043a\u043b\u044e\u0447 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 StrongSwan, \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432 \u043a\u043b\u0438\u0435\u043d\u0442\u0435.<\/p>\n<figure class=\"bordered full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/505\/6d9\/7a8\/5056d97a8a535a6e5519d239ccfd2682.png\" width=\"1268\" height=\"336\"><figcaption><\/figcaption><\/figure>\n<p>\u0414\u0430\u043b\u0435\u0435, \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u043f\u0440\u043e\u0444\u0438\u043b\u044c VPN-\u043a\u043b\u0438\u0435\u043d\u0442\u0430.<\/p>\n<figure class=\"float full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/852\/1f6\/a55\/8521f6a555c4cf03be831ae8cc91f119.png\" width=\"576\" height=\"585\"><figcaption><\/figcaption><\/figure>\n<\/p>\n<figure class=\"float bordered\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/42c\/a5f\/7fb\/42ca5f7fbcea9820609b2136c04d16ee.png\" width=\"340\" height=\"358\"><figcaption><\/figcaption><\/figure>\n<\/p>\n<figure class=\"float full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e56\/2f5\/c2b\/e562f5c2b55907151be81a51d2774885.png\" width=\"691\" height=\"815\"><figcaption><\/figcaption><\/figure>\n<\/p>\n<figure class=\"float bordered full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e71\/ed2\/785\/e71ed27855dcf4b7f92640e5d1967b46.png\" width=\"830\" height=\"429\"><figcaption><\/figcaption><\/figure>\n<\/p>\n<p>\u0412\u043c\u0435\u0441\u0442\u043e &#171;VPS IP&#187; \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0430\u0434\u0440\u0435\u0441 \u0432\u0430\u0448\u0435\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u0433\u0434\u0435 \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442 StrongSwan.<\/p>\n<figure class=\"float bordered full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/6e4\/5c1\/524\/6e45c152426843648d3f5cadc289faf7.png\" width=\"600\" height=\"394\"><figcaption><\/figcaption><\/figure>\n<\/p>\n<p>\u0412 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 IPsec Idenity \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u043f\u0440\u043e\u0444\u0438\u043b\u044c \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438, \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0443\u0447\u0451\u0442\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0440\u0430\u043d\u0435\u0435.<\/p>\n<figure class=\"float full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/0f1\/055\/64d\/0f105564d8854ec717256f6ff4a868ad.png\" width=\"628\" height=\"737\"><figcaption><\/figcaption><\/figure>\n<\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0433\u043e \u0448\u0430\u0433\u0430 \u0442\u0443\u043d\u043d\u0435\u043b\u044c \u043c\u0435\u0436\u0434\u0443 MikroTik \u0438 StrongSwan \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0434\u043d\u044f\u0442 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/68f\/bd2\/aae\/68fbd2aae9c0f0d2a96836888e0f65b3.png\" alt=\"\u0412\u044b\u0432\u043e\u0434 \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 Log \u043f\u0440\u0438 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0439 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438\" title=\"\u0412\u044b\u0432\u043e\u0434 \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 Log \u043f\u0440\u0438 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0439 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438\" width=\"1226\" height=\"77\"><figcaption>\u0412\u044b\u0432\u043e\u0434 \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 Log \u043f\u0440\u0438 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0439 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438<\/figcaption><\/figure>\n<p>\u0412 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 IP -&gt; Addresses \u043f\u0440\u0438 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0439 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438, \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f IP \u0430\u0434\u0440\u0435\u0441 \u0432\u044b\u0434\u0430\u043d\u043d\u044b\u0439 StrongSwan.<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/bf8\/269\/195\/bf8269195847807018e0f538977cfc7e.png\" width=\"482\" height=\"213\"><figcaption><\/figcaption><\/figure>\n<h2>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0442\u0440\u0430\u0444\u0438\u043a\u0430 \u0438 \u0441\u043f\u0438\u0441\u043a\u0430 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432<\/h2>\n<p><a class=\"anchor\" name=\"3\" id=\"3\"><\/a><\/p>\n<p>IP -&gt; Firewall<\/p>\n<p>\u0412 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 NAT \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0442\u0440\u0430\u0444\u0438\u043a\u0430.<\/p>\n<figure class=\"float full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/ea7\/d55\/437\/ea7d554378d77727a002740e8d110c61.png\" width=\"869\" height=\"707\"><figcaption><\/figcaption><\/figure>\n<\/p>\n<p>\u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u0441\u043f\u0438\u0441\u043a\u0438 \u0430\u0434\u0440\u0435\u0441\u043e\u0432.<\/p>\n<p>local &#8212; \u043f\u043e\u0434\u0441\u0435\u0442\u044c \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0442\u043e\u0440\u0430.<\/p>\n<p>List1 &#8212; \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u0430\u0439\u0442\u043e\u0432.<\/p>\n<figure class=\"float full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/052\/69a\/348\/05269a348a42cf0fcc9ec17e1fc03aa3.png\" width=\"868\" height=\"701\"><figcaption><\/figcaption><\/figure>\n<\/p>\n<p>\u041f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u0442\u0440\u0430\u0444\u0438\u043a \u043d\u0430 \u0448\u043b\u044e\u0437(IP \u0430\u0434\u0440\u0435\u0441 \u0432\u044b\u0434\u0430\u043d\u043d\u044b\u0439 StrongSwan)<\/p>\n<figure class=\"float full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/5dc\/5a3\/06e\/5dc5a306e0260de45a0525d28dd58b73.png\" width=\"869\" height=\"706\"><figcaption><\/figcaption><\/figure>\n<\/p>\n<p><strong>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0441\u043f\u0438\u0441\u043a\u043e\u0432<\/strong><\/p>\n<p>IP -&gt; Firewall <\/p>\n<p>\u0412 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 Address Lists \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0441\u043f\u0438\u0441\u043a\u0438:<\/p>\n<p>local &#8212; \u043f\u043e\u0434\u0441\u0435\u0442\u044c \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0442\u043e\u0440\u0430, \u0432 \u043c\u043e\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 192.168.1.0\/24<\/p>\n<p>List1 &#8212; \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u0430\u0439\u0442\u043e\u0432. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 habr.com, \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0430\u0439\u0442 \u043f\u043e fqdn, ip \u0430\u0434\u0440\u0435\u0441 \u0431\u0443\u0434\u0435\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438.<\/p>\n<figure class=\"float full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/d74\/c19\/172\/d74c19172181fc7520c93b4f7ddf5aba.png\" width=\"599\" height=\"464\"><figcaption><\/figcaption><\/figure>\n<\/p>\n<p>List1 &#8212; \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u0430\u0439\u0442\u043e\u0432. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 habr.com, \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0430\u0439\u0442 \u043f\u043e fqdn, ip \u0430\u0434\u0440\u0435\u0441 \u0431\u0443\u0434\u0435\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438.<\/p>\n<figure class=\"bordered\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/06b\/44a\/d74\/06b44ad749078200e2053e9b5514c1fa.png\" width=\"493\" height=\"374\"><figcaption><\/figcaption><\/figure>\n<h2>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>\u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u043b\u0441\u044f \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e\u043f\u0438\u0441\u0430\u0442\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443 \u0442\u0443\u043d\u043d\u0435\u043b\u044f \u043c\u0435\u0436\u0434\u0443 MicroTik \u0438 StrongSwan. \u041e\u0447\u0435\u043d\u044c \u0436\u0434\u0443 \u0444\u0438\u0434\u0431\u0435\u043a\u0430 \u0438 \u0432\u0430\u0448\u0435\u0439 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u0438\u0432\u043d\u043e\u0439 \u043a\u0440\u0438\u0442\u0438\u043a\u0438.<\/p>\n<\/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\/539426\/\"> https:\/\/habr.com\/ru\/post\/539426\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text_v2\" id=\"post-content-body\">\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<h2>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h2>\n<p>\u0418\u0434\u0435\u044f \u0441\u0442\u0430\u0442\u044c\u0438 \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0430 \u0438\u0437 \u0436\u0435\u043b\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u0441\u0430\u0439\u0442\u044b \u0447\u0435\u0440\u0435\u0437 VPN-\u0442\u0443\u043d\u043d\u0435\u043b\u044c \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0447\u0435\u0440\u0435\u0437 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0442\u043e\u0440, \u0442\u0430\u043a \u043a\u0430\u043a \u0434\u043e\u043c\u0430 \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432, \u0430 \u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0432\u0435\u0441\u044c \u0442\u0440\u0430\u0444\u0438\u043a \u0447\u0435\u0440\u0435\u0437 VPN \u043d\u0435\u0443\u0434\u043e\u0431\u043d\u043e \u0432 \u0441\u0432\u044f\u0437\u0438 \u0441 \u043d\u0438\u0437\u043a\u043e\u0439 \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u043d\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u044c\u044e \u0442\u0443\u043d\u043d\u0435\u043b\u044f. \u0421\u0442\u0430\u0442\u044c\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0430 \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u0441\u043b\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438. \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442\u044c \u0432  Winbox MikroTik. <\/p>\n<ul>\n<li>\n<p><a href=\"#1\" rel=\"noopener noreferrer nofollow\">\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f StrongSwan<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#2\" rel=\"noopener noreferrer nofollow\">\u0418\u043c\u043f\u043e\u0440\u0442 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0432 \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 IPSec MikroTik<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#3\" rel=\"noopener noreferrer nofollow\">\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0442\u0440\u0430\u0444\u0438\u043a\u0430 \u0438 \u0441\u043f\u0438\u0441\u043a\u0430 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432<\/a><\/p>\n<\/li>\n<\/ul>\n<h2>\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f StrongSwan<\/h2>\n<p><a class=\"anchor\" name=\"1\" id=\"1\"><\/a><\/p>\n<p>\u0417\u0434\u0435\u0441\u044c \u044f \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u044e \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b StrongSwan, \u0431\u0435\u0437 \u0443\u0433\u043b\u0443\u0431\u043b\u0435\u043d\u0438\u044f \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0434\u0435\u043c\u043e\u043d\u0430.<\/p>\n<p>\/etc\/ipsec.conf<\/p>\n<pre><code class=\"bash\">config setup    charondebug=\"ike 2, knl 2, cfg 2, net 2, esp 2, dmn 2,  mgr 2\"    uniqueids=never  conn ikev2-vpn    auto=add    compress=no    type=tunnel    keyexchange=ikev2    fragmentation=yes    forceencaps=yes    dpdaction=clear    dpddelay=300s    rekey=no    left=%any    leftid=    leftcert=server-cert.pem    leftsendcert=always    leftsubnet=0.0.0.0\/0    right=%any    rightid=%any    rightauth=eap-mschapv2    rightsourceip=10.10.10.0\/24    rightdns=8.8.8.8,8.8.4.4    rightsendcert=never    eap_identity=%identity <\/code><\/pre>\n<p>\/etc\/ipsec.secrets<\/p>\n<pre><code class=\"bash\"># This file holds shared secrets or RSA private keys for authentication.  # RSA private key for this host, authenticating it to any other host # which knows the public part.  # this file is managed with debconf and will contain the automatically created $ include \/var\/lib\/strongswan\/ipsec.secrets.inc  : RSA \"server-key.pem\" user1 : EAP \"password1\" user2 : EAP \"password2\" <\/code><\/pre>\n<p>iptables \u043d\u0430 VPS<\/p>\n<pre><code class=\"bash\">-A FORWARD -s 10.10.10.0\/24 -o eth0 -p tcp -m policy --dir in --pol ipsec -m tcp --tcp-flags SYN,RST SYN -m tcpmss --mss 1361:1536 -j TCPMSS --set-mss 1360  -A POSTROUTING -s 10.10.10.0\/24 -o eth0 -m policy --dir out --pol ipsec -j ACCEPT -A POSTROUTING -s 10.10.10.0\/24 -o eth0 -j MASQUERADE  -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT -A INPUT -p tcp -m tcp --dport 22 -j ACCEPT -A INPUT -p tcp -m tcp --dport 443 -j ACCEPT -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT -A INPUT -i lo -j ACCEPT -A INPUT -p udp -m udp --dport 500 -j ACCEPT -A INPUT -p udp -m udp --dport 4500 -j ACCEPT -A INPUT -j DROP -A FORWARD -s 10.10.10.0\/24 -m policy --dir in --pol ipsec --proto esp -j ACCEPT -A FORWARD -d 10.10.10.0\/24 -m policy --dir out --pol ipsec --proto esp -j ACCEPT -A FORWARD -j DROP<\/code><\/pre>\n<h2>\u0418\u043c\u043f\u043e\u0440\u0442 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0432 \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 IPSec MikroTik<\/h2>\n<p><a class=\"anchor\" name=\"2\" id=\"2\"><\/a><\/p>\n<p><strong>\u0418\u043c\u043f\u043e\u0440\u0442 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0432<\/strong><\/p>\n<p>\u0414\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0432, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0442\u0438 \u0438\u0445 \u0432 \u043f\u0430\u043c\u044f\u0442\u044c \u0432\u0430\u0448\u0435\u0433\u043e MikroTik \u0432 \u0440\u0430\u0437\u0434\u0435\u043b Files.<\/p>\n<figure class=\"float full-width\"><figcaption><\/figcaption><\/figure>\n<\/p>\n<p>System -&gt; Certificates<\/p>\n<p>\u0418\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0439 \u043a\u043b\u044e\u0447 \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0433\u043e \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430 \u0432\u0430\u0448\u0435\u0433\u043e \u0446\u0435\u043d\u0442\u0440\u0430 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u043d\u0430 VPS \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d StrongSwan.<\/p>\n<figure class=\"float full-width\"><figcaption><\/figcaption><\/figure>\n<\/p>\n<p>\u041f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0439 \u0438 \u0437\u0430\u043a\u0440\u044b\u0442\u044b\u0439 \u043a\u043b\u044e\u0447\u0438 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 StrongSwan.<\/p>\n<figure class=\"float full-width\"><figcaption><\/figcaption><\/figure>\n<\/p>\n<figure class=\"float full-width\"><figcaption><\/figcaption><\/figure>\n<\/p>\n<p><strong>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 IPsec<\/strong><\/p>\n<p>IP -&gt; IPsec<\/p>\n<p>\u0418\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u0437\u0430\u043a\u0440\u044b\u0442\u044b\u0439 \u043a\u043b\u044e\u0447 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 StrongSwan, \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432 \u043a\u043b\u0438\u0435\u043d\u0442\u0435.<\/p>\n<figure class=\"bordered full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0414\u0430\u043b\u0435\u0435, \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u043f\u0440\u043e\u0444\u0438\u043b\u044c VPN-\u043a\u043b\u0438\u0435\u043d\u0442\u0430.<\/p>\n<figure class=\"float full-width\"><figcaption><\/figcaption><\/figure>\n<\/p>\n<figure class=\"float bordered\"><figcaption><\/figcaption><\/figure>\n<\/p>\n<figure class=\"float full-width\"><figcaption><\/figcaption><\/figure>\n<\/p>\n<figure class=\"float bordered full-width\"><figcaption><\/figcaption><\/figure>\n<\/p>\n<p>\u0412\u043c\u0435\u0441\u0442\u043e &#171;VPS IP&#187; \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0430\u0434\u0440\u0435\u0441 \u0432\u0430\u0448\u0435\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u0433\u0434\u0435 \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442 StrongSwan.<\/p>\n<figure class=\"float bordered full-width\"><figcaption><\/figcaption><\/figure>\n<\/p>\n<p>\u0412 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 IPsec Idenity \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u043f\u0440\u043e\u0444\u0438\u043b\u044c \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438, \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0443\u0447\u0451\u0442\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0440\u0430\u043d\u0435\u0435.<\/p>\n<figure class=\"float full-width\"><figcaption><\/figcaption><\/figure>\n<\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0433\u043e \u0448\u0430\u0433\u0430 \u0442\u0443\u043d\u043d\u0435\u043b\u044c \u043c\u0435\u0436\u0434\u0443 MikroTik \u0438 StrongSwan \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0434\u043d\u044f\u0442 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438.<\/p>\n<figure class=\"full-width\"><figcaption>\u0412\u044b\u0432\u043e\u0434 \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 Log \u043f\u0440\u0438 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0439 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438<\/figcaption><\/figure>\n<p>\u0412 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 IP -&gt; Addresses \u043f\u0440\u0438 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0439 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438, \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f IP \u0430\u0434\u0440\u0435\u0441 \u0432\u044b\u0434\u0430\u043d\u043d\u044b\u0439 StrongSwan.<\/p>\n<figure class=\"\"><figcaption><\/figcaption><\/figure>\n<h2>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0442\u0440\u0430\u0444\u0438\u043a\u0430 \u0438 \u0441\u043f\u0438\u0441\u043a\u0430 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432<\/h2>\n<p><a class=\"anchor\" name=\"3\" id=\"3\"><\/a><\/p>\n<p>IP -&gt; Firewall<\/p>\n<p>\u0412 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 NAT \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0442\u0440\u0430\u0444\u0438\u043a\u0430.<\/p>\n<figure class=\"float full-width\"><figcaption><\/figcaption><\/figure>\n<\/p>\n<p>\u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u0441\u043f\u0438\u0441\u043a\u0438 \u0430\u0434\u0440\u0435\u0441\u043e\u0432.<\/p>\n<p>local &#8212; \u043f\u043e\u0434\u0441\u0435\u0442\u044c \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0442\u043e\u0440\u0430.<\/p>\n<p>List1 &#8212; \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u0430\u0439\u0442\u043e\u0432.<\/p>\n<figure class=\"float full-width\"><figcaption><\/figcaption><\/figure>\n<\/p>\n<p>\u041f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u0442\u0440\u0430\u0444\u0438\u043a \u043d\u0430 \u0448\u043b\u044e\u0437(IP \u0430\u0434\u0440\u0435\u0441 \u0432\u044b\u0434\u0430\u043d\u043d\u044b\u0439 StrongSwan)<\/p>\n<figure class=\"float full-width\"><figcaption><\/figcaption><\/figure>\n<\/p>\n<p><strong>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0441\u043f\u0438\u0441\u043a\u043e\u0432<\/strong><\/p>\n<p>IP -&gt; Firewall <\/p>\n<p>\u0412 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 Address Lists \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0441\u043f\u0438\u0441\u043a\u0438:<\/p>\n<p>local &#8212; \u043f\u043e\u0434\u0441\u0435\u0442\u044c \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0442\u043e\u0440\u0430, \u0432 \u043c\u043e\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 192.168.1.0\/24<\/p>\n<p>List1 &#8212; \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u0430\u0439\u0442\u043e\u0432. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 habr.com, \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0430\u0439\u0442 \u043f\u043e fqdn, ip \u0430\u0434\u0440\u0435\u0441 \u0431\u0443\u0434\u0435\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438.<\/p>\n<figure class=\"float full-width\"><figcaption><\/figcaption><\/figure>\n<\/p>\n<p>List1 &#8212; \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u0430\u0439\u0442\u043e\u0432. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 habr.com, \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0430\u0439\u0442 \u043f\u043e fqdn, ip \u0430\u0434\u0440\u0435\u0441 \u0431\u0443\u0434\u0435\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438.<\/p>\n<figure class=\"bordered\"><figcaption><\/figcaption><\/figure>\n<h2>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>\u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u043b\u0441\u044f \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e\u043f\u0438\u0441\u0430\u0442\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443 \u0442\u0443\u043d\u043d\u0435\u043b\u044f \u043c\u0435\u0436\u0434\u0443 MicroTik \u0438 StrongSwan. \u041e\u0447\u0435\u043d\u044c \u0436\u0434\u0443 \u0444\u0438\u0434\u0431\u0435\u043a\u0430 \u0438 \u0432\u0430\u0448\u0435\u0439 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u0438\u0432\u043d\u043e\u0439 \u043a\u0440\u0438\u0442\u0438\u043a\u0438.<\/p>\n<\/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\/539426\/\"> https:\/\/habr.com\/ru\/post\/539426\/<\/a><br \/><\/br><\/br><\/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-317001","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/317001","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=317001"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/317001\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=317001"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=317001"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=317001"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}