{"id":2247,"date":"2021-12-08T17:17:50","date_gmt":"2021-12-08T14:17:50","guid":{"rendered":"https:\/\/artem.services\/?p=2195"},"modified":"2022-06-08T20:42:44","modified_gmt":"2022-06-08T17:42:44","slug":"2247","status":"publish","type":"post","link":"https:\/\/artem.services\/?p=2247&lang=en","title":{"rendered":"\u00a0OpenVPN &#8212; Exclude specific IPs or networks from routes"},"content":{"rendered":"<p><img loading=\"lazy\" class=\"aligncenter wp-image-105 size-full\" src=\"https:\/\/artem.services\/wp-content\/uploads\/2018\/10\/OpenVPN.png\" alt=\"\" width=\"884\" height=\"258\" srcset=\"https:\/\/artem.services\/wp-content\/uploads\/2018\/10\/OpenVPN.png 884w, https:\/\/artem.services\/wp-content\/uploads\/2018\/10\/OpenVPN-300x88.png 300w, https:\/\/artem.services\/wp-content\/uploads\/2018\/10\/OpenVPN-768x224.png 768w\" sizes=\"(max-width: 884px) 100vw, 884px\" \/><\/p>\n<p><span class=\"VIiyi\" lang=\"en\"><span class=\"JLqJ4b ChMk0b\" data-language-for-alternatives=\"en\" data-language-to-translate-into=\"ru\" data-phrase-index=\"0\" data-number-of-phrases=\"1\"><span class=\"Q4iAWc\">In order to exclude a specific range or IP address, you need to add the parameter<\/span><\/span><\/span> &quot;<strong>net_gateway<\/strong>&quot;.<\/p>\n<p><span class=\"VIiyi\" lang=\"en\"><span class=\"JLqJ4b ChMk0b\" data-language-for-alternatives=\"en\" data-language-to-translate-into=\"ru\" data-phrase-index=\"0\" data-number-of-phrases=\"1\"><span class=\"Q4iAWc\">For example, it is necessary that the network &quot;<strong>10.0.0.0\/8<\/strong>&quot; is routed through the VPN, but at the same time the network &quot;<strong>10.0.1.0\/24<\/strong>&quot; is excluded from the route, the entry in the configuration file will look like this:<\/span><\/span><\/span><\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\npush &quot;route 10.0.0.0 255.0.0.0&quot;\r\npush &quot;route 10.0.1.0 255.255.255.0 net_gateway&quot;\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In order to exclude a specific range or IP address, you need to add the parameter &quot;net_gateway&quot;. For example, it is necessary that the network &quot;10.0.0.0\/8&quot; is routed through the VPN, but at the same time the network &quot;10.0.1.0\/24&quot; is excluded from the route, the entry in the configuration file will look like this: &nbsp; &hellip; <a href=\"https:\/\/artem.services\/?p=2247&#038;lang=en\" class=\"more-link\">\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c \u0447\u0438\u0442\u0430\u0442\u044c<span class=\"screen-reader-text\"> &quot;\u00a0OpenVPN &#8212; Exclude specific IPs or networks from routes&quot;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1335],"tags":[1823,1337],"_links":{"self":[{"href":"https:\/\/artem.services\/index.php?rest_route=\/wp\/v2\/posts\/2247"}],"collection":[{"href":"https:\/\/artem.services\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/artem.services\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/artem.services\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/artem.services\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2247"}],"version-history":[{"count":2,"href":"https:\/\/artem.services\/index.php?rest_route=\/wp\/v2\/posts\/2247\/revisions"}],"predecessor-version":[{"id":2250,"href":"https:\/\/artem.services\/index.php?rest_route=\/wp\/v2\/posts\/2247\/revisions\/2250"}],"wp:attachment":[{"href":"https:\/\/artem.services\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2247"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/artem.services\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2247"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/artem.services\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2247"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}