{"id":5844,"date":"2022-03-14T12:11:31","date_gmt":"2022-03-14T10:11:31","guid":{"rendered":"https:\/\/skeletor.org.ua\/?p=5844"},"modified":"2022-03-14T12:11:31","modified_gmt":"2022-03-14T10:11:31","slug":"openvpn-iroute-not-working","status":"publish","type":"post","link":"https:\/\/skeletor.org.ua\/?p=5844","title":{"rendered":"OpenVPN: iroute not working"},"content":{"rendered":"\n<p><strong>iroute<\/strong> \u0432 <strong>OpenVPN<\/strong> \u043d\u0443\u0436\u0435\u043d \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0431\u044b \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u044b \u0432 \u043f\u043e\u0434\u0441\u0435\u0442\u044c \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432, \u043a\u043e\u0433\u0434\u0430 \u043e\u043d\u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u044e\u0442\u0441\u044f. \u0414\u0430\u043d\u043d\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u043f\u0440\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432 <strong>CCD<\/strong> (<strong>client-config-dir<\/strong>). \u041d\u043e \u0435\u0441\u0442\u044c \u043d\u044e\u0430\u043d\u0441: \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0441 <strong>iroute<\/strong> \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c <strong>route<\/strong> \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0435 <strong>server.conf<\/strong>. \u0414\u0430, \u043f\u0440\u043e \u044d\u0442\u043e \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u043e \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438, \u043d\u043e \u043d\u0435 \u0432\u0441\u0435 \u0451\u0451 \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0447\u0438\u0442\u0430\u044e\u0442<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p><mark style=\"background-color:rgba(0, 0, 0, 0);color:#854f89\" class=\"has-inline-color\">Remember that you must also add the route to the system routing table as well (such as by using the\u00a0<strong>&#8211;route<\/strong>\u00a0directive). The reason why two routes are needed is that the\u00a0<strong>&#8211;route<\/strong>\u00a0directive routes the packet from the kernel to OpenVPN. Once in OpenVPN, the\u00a0<strong>&#8211;iroute<\/strong>\u00a0directive routes to the specific client.<\/mark><\/p><\/blockquote>\n\n\n\n<p>\u0422\u043e \u0435\u0441\u0442\u044c, \u0435\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u0443\u044e \u043f\u043e\u0434\u0441\u0435\u0442\u044c <strong>192.168.10.0\/24<\/strong>, \u0442\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0442\u0430\u043a:<\/p>\n\n\n\n<p><em>ccd\/client<\/em>:<\/p>\n\n\n\n<p><code>iroute 192.168.10.0 255.255.255.0<\/code><\/p>\n\n\n\n<p><em>server.conf:<\/em><\/p>\n\n\n\n<p><code>route 192.168.10.0 255.255.255.0<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>iroute \u0432 OpenVPN \u043d\u0443\u0436\u0435\u043d \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0431\u044b \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u044b \u0432 \u043f\u043e\u0434\u0441\u0435\u0442\u044c \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432, \u043a\u043e\u0433\u0434\u0430 \u043e\u043d\u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u044e\u0442\u0441\u044f. \u0414\u0430\u043d\u043d\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u043f\u0440\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432 CCD (client-config-dir). \u041d\u043e \u0435\u0441\u0442\u044c \u043d\u044e\u0430\u043d\u0441: \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0441 iroute \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c route \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0435 server.conf. \u0414\u0430, \u043f\u0440\u043e \u044d\u0442\u043e \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u043e \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438, \u043d\u043e \u043d\u0435 \u0432\u0441\u0435 \u0451\u0451 \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0447\u0438\u0442\u0430\u044e\u0442 Remember that you must also add the route [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10,12],"tags":[],"class_list":["post-5844","post","type-post","status-publish","format-standard","hentry","category-others","category-routers"],"_links":{"self":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts\/5844","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=5844"}],"version-history":[{"count":1,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts\/5844\/revisions"}],"predecessor-version":[{"id":5845,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts\/5844\/revisions\/5845"}],"wp:attachment":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5844"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5844"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5844"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}