{"id":4298,"date":"2014-07-01T14:53:03","date_gmt":"2014-07-01T11:53:03","guid":{"rendered":"http:\/\/skeletor.org.ua\/?p=4298"},"modified":"2025-06-19T11:15:30","modified_gmt":"2025-06-19T08:15:30","slug":"mikrotik-%d0%b2-%d1%80%d0%be%d0%bb%d0%b8-openvpn-%d0%ba%d0%bb%d0%b8%d0%b5%d0%bd%d1%82%d0%b0","status":"publish","type":"post","link":"https:\/\/skeletor.org.ua\/?p=4298","title":{"rendered":"mikrotik \u0432 \u0440\u043e\u043b\u0438 openvpn \u043a\u043b\u0438\u0435\u043d\u0442\u0430."},"content":{"rendered":"<p>\u0418 \u0442\u0430\u043a, \u0435\u0441\u0442\u044c \u0440\u043e\u0443\u0442\u0435\u0440 \u043d\u0430 \u0431\u0430\u0437\u0435 <strong>mikrotik&#8217;a<\/strong> \u0438 <strong>4G<\/strong> \u043c\u043e\u0434\u0435\u043c <strong>Yota<\/strong> \u0438 \u043d\u0443\u0436\u043d\u043e\u00a0\u0438\u043c\u0435\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c\u0441\u044f \u043a \u0440\u043e\u0443\u0442\u0435\u0440\u0443 \u0438\u0437-\u0432\u043d\u0435 (\u0443 \u0440\u043e\u0443\u0442\u0435\u0440\u0430 \u043d\u0435\u0442 \u0432\u043d\u0435\u0448\u043d\u0435\u0433\u043e <strong>IP<\/strong>). \u0411\u044b\u043b\u043e \u043f\u0440\u0438\u043d\u044f\u0442\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043f\u043e\u0434\u043d\u044f\u0442\u044c <strong>openvpn<\/strong>.<\/p>\n<p><strong><span style=\"color: #ff0000;\">1) \u0421\u0435\u0440\u0432\u0435\u0440\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c Openvpn<\/span><\/strong><\/p>\n<p>Openvpn \u0441\u0435\u0440\u0432\u0435\u0440 \u043f\u043e\u0434\u043d\u0438\u043c\u0430\u0435\u0442\u0441\u044f \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e, \u043d\u043e \u0435\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043d\u044e\u0430\u043d\u0441\u043e\u0432:<\/p>\n<p><!--more--><\/p>\n<p><em><span style=\"color: #ff6600;\">&#8211; \u0442\u0440\u0430\u043d\u0441\u043f\u043e\u0440\u0442 \u0442\u043e\u043b\u044c\u043a\u043e <strong>tcp<\/strong> (\u0432 7-\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u043c\u043e\u0436\u043d\u0430 <strong>udp<\/strong>)<\/span><\/em><br \/>\n<em><span style=\"color: #ff6600;\"> &#8211; \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0441\u0436\u0430\u0442\u0438\u0435 <strong>lzo<\/strong><\/span><\/em><br \/>\n<em><span style=\"color: #ff6600;\"> &#8211; \u043d\u0435\u043b\u044c\u0437\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <strong>tls<\/strong> (\u043c\u043e\u0436\u043d\u043e, \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 \u0432\u0435\u0440\u0441\u0438\u0438 7.17rc3)<\/span><\/em><\/p>\n<p>\u041d\u0430 \u0432\u0441\u044f\u043a\u0438\u0439 \u0441\u043b\u0443\u0447\u0430\u0439 \u0432\u044b\u043b\u043e\u0436\u0443 \u043a\u043e\u043d\u0444\u0438\u0433 \u0441\u0435\u0440\u0432\u0435\u0440\u0430:<\/p>\n<p><code>port 2294<br \/>\nproto tcp<br \/>\ndev tun0<br \/>\nca \/usr\/local\/etc\/openvpn\/easy-rsa\/keys\/ca.crt<br \/>\ncert \/usr\/local\/etc\/openvpn\/easy-rsa\/keys\/server.crt<br \/>\nkey \/usr\/local\/etc\/openvpn\/easy-rsa\/keys\/server.key<br \/>\ndh \/usr\/local\/etc\/openvpn\/easy-rsa\/keys\/dh1024.pem<br \/>\nserver 192.168.10.0 255.255.255.0<br \/>\npush \"route 192.168.10.0 255.255.255.0\"<br \/>\nclient-config-dir \/usr\/local\/etc\/openvpn\/ccd<br \/>\nclient-to-client<br \/>\ncipher BF-CBC<br \/>\npersist-key<br \/>\npersist-tun<br \/>\nstatus \/var\/log\/openvpn_status.log<br \/>\nlog-append \/var\/log\/openvpn.log<br \/>\nwritepid \/var\/run\/openvpn.pid<br \/>\nverb 3<br \/>\nkeepalive 10 120<\/code><\/p>\n<p><strong><span style=\"color: #ff6600;\">2) \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043c\u043e\u0434\u0435\u043c\u0430<\/span><\/strong><\/p>\n<p>\u0422\u0443\u0442 \u0432\u0441\u0451 \u043f\u0440\u043e\u0441\u0442\u043e: \u043b\u043e\u0433\u0438\u043d\u0438\u043c\u0441\u044f \u043d\u0430 <strong>miktotik<\/strong> \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c 3 \u043a\u043e\u043c\u0430\u043d\u0434\u044b (\u043a\u0430\u0436\u0434\u0430\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0441\u043e \u0441\u043b\u0435\u0448\u0430):<\/p>\n<p><code>[admin@MikroTik] &gt; \/interface lte set 0 apn=\"\" modem-init=\"\" name=lte1 network-mode=auto password=\"\" pin=\"\" user=\"\"<br \/>\n[admin@MikroTik] &gt; \/ip dhcp-client add disabled=no interface=lte1<br \/>\n[admin@MikroTik] &gt; \/ip firewall nat add action=masquerade chain=srcnat comment=\"default configuration\" out-interface=lte1 to-addresses=0.0.0.0<\/code><\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0446\u0438\u0438:<\/p>\n<pre>[admin@MikroTik] &gt; ip route print \nFlags: X - disabled, A - active, D - dynamic, C - connect, S - static, r - rip, b - bgp, o - ospf, m - mme, B - blackhole, U - unreachable, P - prohibit \n #      DST-ADDRESS        PREF-SRC        GATEWAY            DISTANCE\n 0 ADS  0.0.0.0\/0                          10.0.0.1                  1\n 1 X S  ;;; isp\n        0.0.0.0\/0                          1.2.3.254                 2\n 2 ADC  10.0.0.0\/24        10.0.0.10       lte1                      0\n 3 ADC  192.168.3.0\/24     192.168.3.37    wan                       0\n<\/pre>\n<p>\u0412\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0441\u044f <strong>default route 10.0.0.1<\/strong>, \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043d\u0430\u0448 \u043c\u043e\u0434\u0435\u043c.<\/p>\n<p><strong><span style=\"color: #ff6600;\">3) \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 openvpn.<\/span><\/strong><\/p>\n<p>\u041f\u0435\u0440\u0432\u044b\u043c \u0434\u0435\u043b\u043e\u043c \u0437\u0430\u043b\u0438\u0432\u0430\u0435\u043c \u0444\u0430\u0439\u043b\u044b \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0432 (\u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0439 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 <strong>ca.crt<\/strong>, \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 <strong>client.crt<\/strong> \u0438 \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u0439 \u043a\u043b\u044e\u0447 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 <strong>client.key<\/strong>) \u0447\u0435\u0440\u0435\u0437 <strong>Web<\/strong> \u043c\u0435\u043d\u044e <strong>File<\/strong> (\u0438\u043b\u0438 \u0434\u0440\u0443\u0433\u0438\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c \u0432 \u043a\u043e\u0440\u0435\u043d\u044c). \u0414\u0430\u043b\u0435\u0435 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 \u0438\u043c\u043f\u043e\u0440\u0442\u0430 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0432. \u041e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0432 \u0442\u0430\u043a\u043e\u0439 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c:<\/p>\n<pre>[admin@MikroTik] &gt; \/certificate import file-name=ca.crt\n     certificates-imported: 1\n     private-keys-imported: 0\n            files-imported: 1\n       decryption-failures: 0\n  keys-with-no-certificate: 0\n[admin@MikroTik] &gt; \/certificate import file-name=client.crt\n     certificates-imported: 1\n     private-keys-imported: 0\n            files-imported: 1\n       decryption-failures: 0\n  keys-with-no-certificate: 0\n[admin@MikroTik] &gt; \/certificate import file-name=client.key\npassphrase:\n     certificates-imported: 0\n     private-keys-imported: 1\n            files-imported: 1\n       decryption-failures: 0\n  keys-with-no-certificate: 0<\/pre>\n<p>\u0415\u0441\u043b\u0438 \u0438\u043c\u043f\u043e\u0440\u0442 \u0432\u044b\u0432\u0430\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0441 \u043e\u0448\u0438\u0431\u043a\u043e\u0439:<\/p>\n<p><code>action timed out - try again, if error continues contact MikroTik support and send a supout file (13)<\/code><\/p>\n<p>\u0422\u043e \u043d\u0443\u0436\u043d\u043e \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0443, \u0445\u043e\u0442\u044f \u0431\u044b \u0434\u043e <strong>6.6<\/strong> (\u044d\u0442\u043e\u0442 \u0431\u0430\u0433 \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u0432 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 <strong>6.5<\/strong>, \u043d\u043e \u043d\u0435 \u0431\u044b\u043b\u043e \u0434\u043e \u0432\u0435\u0440\u0441\u0438\u0438 <strong>6.4<\/strong> \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e). \u042f \u043e\u0431\u043d\u043e\u0432\u0438\u043b\u0441\u044f \u0434\u043e <strong>6.15<\/strong>, \u0442\u0430\u043a \u043a\u0430\u043a \u0443 \u043c\u0435\u043d\u044f \u0431\u044b\u043b\u0430 \u043a\u0430\u043a \u0440\u0430\u0437 \u0432\u0435\u0440\u0441\u0438\u044f <strong>6.5<\/strong>. \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u044b \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043b\u0438\u0441\u044c.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435:<\/p>\n<p><code>[admin@MikroTik] &gt; \/interface ovpn-client add name=\"test\" connect-to=xxx.xxx.xxx.xxx port=2294 user=\"none\" password=\"none\" disabled=no profile=default certificate=\"cert1\" add-default-route=no<\/code><\/p>\n<p>\u0415\u0441\u043b\u0438 \u043e\u043f\u044f\u0442\u044c \u043f\u043e\u044f\u0432\u044f\u0442\u0441\u044f \u043e\u0448\u0438\u0431\u043a\u0438, \u0442\u043e \u0443\u043a\u0430\u0436\u0438\u0442\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0438\u043c\u044f <strong>certificate=&#8221;cert1&#8243;.<\/strong> \u0412\u0441\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u0438\u043c\u0435\u043d\u0430 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439<\/p>\n<p><code>[admin@MikroTik] &gt; \/certificate print<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0418 \u0442\u0430\u043a, \u0435\u0441\u0442\u044c \u0440\u043e\u0443\u0442\u0435\u0440 \u043d\u0430 \u0431\u0430\u0437\u0435 mikrotik&#8217;a \u0438 4G \u043c\u043e\u0434\u0435\u043c Yota \u0438 \u043d\u0443\u0436\u043d\u043e\u00a0\u0438\u043c\u0435\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c\u0441\u044f \u043a \u0440\u043e\u0443\u0442\u0435\u0440\u0443 \u0438\u0437-\u0432\u043d\u0435 (\u0443 \u0440\u043e\u0443\u0442\u0435\u0440\u0430 \u043d\u0435\u0442 \u0432\u043d\u0435\u0448\u043d\u0435\u0433\u043e IP). \u0411\u044b\u043b\u043e \u043f\u0440\u0438\u043d\u044f\u0442\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043f\u043e\u0434\u043d\u044f\u0442\u044c openvpn. 1) \u0421\u0435\u0440\u0432\u0435\u0440\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c Openvpn Openvpn \u0441\u0435\u0440\u0432\u0435\u0440 \u043f\u043e\u0434\u043d\u0438\u043c\u0430\u0435\u0442\u0441\u044f \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e, \u043d\u043e \u0435\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043d\u044e\u0430\u043d\u0441\u043e\u0432:<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[38,12],"tags":[],"class_list":["post-4298","post","type-post","status-publish","format-standard","hentry","category-mikrotik","category-routers"],"_links":{"self":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts\/4298","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4298"}],"version-history":[{"count":5,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts\/4298\/revisions"}],"predecessor-version":[{"id":6610,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts\/4298\/revisions\/6610"}],"wp:attachment":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4298"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4298"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4298"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}