﻿{"id":845,"date":"2021-11-02T22:21:10","date_gmt":"2021-11-02T19:21:10","guid":{"rendered":"http:\/\/allchina.a-lisa.org\/?p=845"},"modified":"2022-12-31T21:08:05","modified_gmt":"2022-12-31T18:08:05","slug":"%d0%be%d0%b1%d1%8a%d0%b5%d0%b4%d0%b8%d0%bd%d0%b5%d0%bd%d0%b8%d0%b5-%d0%b4%d0%b2%d1%83%d1%85-%d0%be%d1%84%d0%b8%d1%81%d0%be%d0%b2-%d0%bf%d0%be-vpn-%d0%bd%d0%b0-mikrotik","status":"publish","type":"post","link":"https:\/\/allchina.a-lisa.org\/?p=845","title":{"rendered":"\u041e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0434\u0432\u0443\u0445 \u043e\u0444\u0438\u0441\u043e\u0432 \u043f\u043e VPN \u043d\u0430 Mikrotik"},"content":{"rendered":"<p>\u0417\u0430\u0434\u0430\u0447\u0430 \u0441\u0442\u043e\u0438\u0442 \u201c\u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0434\u0432\u0430 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u0445 \u043e\u0444\u0438\u0441\u0430 \u043c\u0435\u0436\u0434\u0443 \u0441\u043e\u0431\u043e\u0439 \u043f\u043e VPN\u201d.<br \/>\n\u0412 \u043e\u0431\u043e\u0438\u0445 \u043e\u0444\u0438\u0441\u0430\u0445 \u0441\u0442\u043e\u044f\u0442 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0442\u043e\u0440\u044b Mikrotik.<\/p>\n<p><!--more--><\/p>\n<h5>\u0410\u0434\u0440\u0435\u0441\u0430\u0446\u0438\u044f \u043e\u0444\u0438\u0441\u043e\u0432.<\/h5>\n<p>\u0410\u0434\u0440\u0435\u0441\u0430\u0446\u0438\u044f \u041e\u0444\u0438\u0441\u0430 1 (MSK), \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0443 \u043d\u0430\u0441 VPN-\u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c:<br \/>\n<strong>WAN<\/strong> 88.53.44.1<br \/>\n<strong>LAN<\/strong> 192.168.10.0\/24<br \/>\n<strong>VPN<\/strong> 192.168.60.1<br \/>\n\u0410\u0434\u0440\u0435\u0441\u0430\u0446\u0438\u044f \u041e\u0444\u0438\u0441\u0430 2(SPB), \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 VPN-\u043a\u043b\u0438\u0435\u043d\u0442\u043e\u043c:<br \/>\n<strong>WAN<\/strong> 88.53.55.2<br \/>\n<strong>LAN<\/strong> 192.168.20.0\/24<br \/>\n<strong>VPN<\/strong> 192.168.60.2<\/p>\n<h5>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 VPN-server.<\/h5>\n<p>1. \u041f\u0435\u0440\u0432\u044b\u0439 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0442\u043e\u0440 \u0432 \u043e\u0444\u0438\u0441\u0435 MSK.<br \/>\n\u0412\u043a\u043b\u044e\u0447\u0430\u0435\u043c VPN-Server.<\/p>\n<pre>\/interface l2tp-server server set authentication=mschap2 enabled=yes<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/adminwin.ru\/wp-content\/uploads\/2017\/07\/L2TP-Server-Enable.jpg\" alt=\"L2TP-Server-Enable\" width=\"639\" height=\"488\" \/><\/p>\n<p>2. \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043a \u043d\u0430\u043c \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c\u0441\u044f.<\/p>\n<pre>\/ppp secret add local-address=192.168.60.1 name=User password=11225555 profile=default-encryption remote-address=192.168.60.2 service=l2tp<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/adminwin.ru\/wp-content\/uploads\/2017\/07\/L2TP-user-secret-1.jpg\" alt=\"\" width=\"441\" height=\"402\" \/><\/p>\n<p>3. \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u0430.<\/p>\n<pre>\/interface l2tp-server add name=l2tp-in2 user=User<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/adminwin.ru\/wp-content\/uploads\/2017\/07\/L2TP-Serv.jpg\" alt=\"L2TP-Serv\" width=\"326\" height=\"350\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/adminwin.ru\/wp-content\/uploads\/2017\/07\/L2TP-Serv2.jpg\" alt=\"L2TP-Serv2\" width=\"417\" height=\"239\" \/><\/p>\n<h5>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 VPN-\u043a\u043b\u0438\u0435\u043d\u0442\u0430.<\/h5>\n<p>\u0412\u0442\u043e\u0440\u043e\u0439 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0442\u043e\u0440 \u0432 \u043e\u0444\u0438\u0441\u0435 SPB, \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u043e\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a \u0433\u043e\u043b\u043e\u0432\u043d\u043e\u043c\u0443 \u043e\u0444\u0438\u0441\u0435 \u0432 \u041c\u043e\u0441\u043a\u0432\u0435. \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0441 \u0438\u043c\u0435\u043d\u0435\u043c User, \u043f\u0430\u0440\u043e\u043b\u044c 1225555<\/p>\n<pre>\/interface l2tp-client add allow=mschap2 connect-to-88.53.44.1 disabled=no name=\"SBP-MSK\" password=1225555 user=User<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/adminwin.ru\/wp-content\/uploads\/2017\/07\/L2tp-client.jpg\" alt=\"L2tp-client\" width=\"322\" height=\"345\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/adminwin.ru\/wp-content\/uploads\/2017\/07\/L2TP-client-general.jpg\" alt=\"L2TP-client-general\" width=\"414\" height=\"257\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/adminwin.ru\/wp-content\/uploads\/2017\/07\/L2TP-dial-out.jpg\" alt=\"L2TP-dial-out\" width=\"414\" height=\"393\" \/><\/p>\n<h5>\u041c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0446\u0438\u044f \u043e\u0444\u0438\u0441\u043e\u0432.<\/h5>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c, \u043f\u043e\u0441\u043b\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439 \u043d\u0430 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0442\u043e\u0440\u0430\u0445, \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u044b \u0432 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u0441\u0435\u0442\u0438 \u0447\u0435\u0440\u0435\u0437 VPN \u043d\u0430 Mikrotik \u0432 \u043e\u0431\u043e\u0438\u0445 \u043e\u0444\u0438\u0441\u0430\u0445.<\/p>\n<p><strong>\u041d\u0430\u0447\u043d\u0435\u043c \u0441 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043e\u0444\u0438\u0441\u0430 \u0432 MSK:<\/strong><br \/>\n<strong>dst-address<\/strong> \u2013 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u0443\u044e \u0441\u0435\u0442\u044c \u043e\u0444\u0438\u0441\u0430 \u0432 SPB, \u043a \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0431\u0443\u0434\u0435\u043c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c\u0441\u044f.<br \/>\n<strong>gateway<\/strong> \u2013 \u0448\u043b\u044e\u0437 \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u043c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c\u0441\u044f \u043a \u0441\u0435\u0442\u0438, ip VPN \u043a\u043b\u0438\u0435\u043d\u0442\u0430.<br \/>\n<strong>pref. source<\/strong> \u2013 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0441\u0432\u043e\u044e \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u0443\u044e \u0441\u0435\u0442\u044c, \u0441 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0431\u0443\u0434\u0435\u043c \u0432\u044b\u0445\u043e\u0434\u0438\u0442\u044c.<\/p>\n<pre>\/ip route add comment=\"route MSK-SPB VPN\" dst-address=192.168.20.0\/24 gateway=192.168.60.2 pref-src=192.168.10.1<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/adminwin.ru\/wp-content\/uploads\/2017\/07\/Route-MskToSpb.jpg\" alt=\"MskToSpb\" width=\"949\" height=\"492\" \/><\/p>\n<p><strong>\u0412\u0442\u043e\u0440\u043e\u0439 \u043e\u0444\u0438\u0441 \u0432 SPB:<\/strong><\/p>\n<pre>\/ip route add comment=\"route SPB-MSK VPN\" dst-address=192.168.10.0\/24 gateway=192.168.60.1 pref-src=192.168.20.1<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/adminwin.ru\/wp-content\/uploads\/2017\/07\/Route-SpbtoMsk.jpg\" alt=\"Route SpbtoMsk\" width=\"691\" height=\"403\" \/><\/p>\n<h5>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h5>\n<p>\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043c\u044b \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u043b\u0438 \u0434\u0432\u0430 \u043e\u0444\u0438\u0441\u0430 \u043c\u0435\u0436\u0434\u0443 \u0441\u043e\u0431\u043e\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0432 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c \u0447\u0443\u0432\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0441\u0435\u0431\u044f \u0432 \u043e\u0434\u043d\u043e\u0439 \u0441\u0435\u0442\u0438 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0435 \u043e\u0431\u0449\u0438\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u043d\u0435 \u0432\u0438\u0434\u0438\u0442\u0435 \u043e\u0431\u0449\u0438\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u044b \u043e\u0444\u0438\u0441\u043e\u0432 \u043c\u0435\u0436\u0434\u0443 \u0441\u043e\u0431\u043e\u0439 \u0438\u043b\u0438 \u043d\u0435 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442 ping \u2013 \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u0435 \u043d\u0430 \u043e\u0431\u043e\u0438\u0445 \u043c\u0430\u0448\u0438\u043d\u0430\u0445 <a href=\"https:\/\/adminwin.ru\/kak-otkrty-port-v-windows\/\">firewall<\/a> \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435 \u043e\u0442\u043a\u0440\u044b\u0442\u043e\u0441\u0442\u044c UDP \u043f\u043e\u0440\u0442\u0430 1701.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0417\u0430\u0434\u0430\u0447\u0430 \u0441\u0442\u043e\u0438\u0442 \u201c\u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0434\u0432\u0430 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u0445 \u043e\u0444\u0438\u0441\u0430 \u043c\u0435\u0436\u0434\u0443 \u0441\u043e\u0431\u043e\u0439 \u043f\u043e VPN\u201d. \u0412 \u043e\u0431\u043e\u0438\u0445 \u043e\u0444\u0438\u0441\u0430\u0445 \u0441\u0442\u043e\u044f\u0442 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0442\u043e\u0440\u044b Mikrotik.<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[98],"tags":[],"class_list":["post-845","post","type-post","status-publish","format-standard","hentry","category-arduino"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p7OYvE-dD","_links":{"self":[{"href":"https:\/\/allchina.a-lisa.org\/index.php?rest_route=\/wp\/v2\/posts\/845","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/allchina.a-lisa.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/allchina.a-lisa.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/allchina.a-lisa.org\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/allchina.a-lisa.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=845"}],"version-history":[{"count":1,"href":"https:\/\/allchina.a-lisa.org\/index.php?rest_route=\/wp\/v2\/posts\/845\/revisions"}],"predecessor-version":[{"id":895,"href":"https:\/\/allchina.a-lisa.org\/index.php?rest_route=\/wp\/v2\/posts\/845\/revisions\/895"}],"wp:attachment":[{"href":"https:\/\/allchina.a-lisa.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=845"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/allchina.a-lisa.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=845"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/allchina.a-lisa.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=845"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}