{"id":401,"date":"2015-07-28T16:56:42","date_gmt":"2015-07-28T10:56:42","guid":{"rendered":"https:\/\/workit.kz\/?p=401"},"modified":"2015-09-01T13:11:16","modified_gmt":"2015-09-01T07:11:16","slug":"dd-wrt-lan-nat-ext_ip","status":"publish","type":"post","link":"https:\/\/workit.kz\/?p=401","title":{"rendered":"DD-WRT \u0434\u043e\u0441\u0442\u0443\u043f \u0438\u0437 LAN \u043d\u0430 \u0441\u0432\u043e\u0439 \u0436\u0435 \u0432\u043d\u0435\u0448\u043d\u0438\u0439 IP"},"content":{"rendered":"<p>&#160;\u041f\u0440\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 \u0434\u043e\u043c\u0435\u043d\u043d\u044b\u0445 \u0438\u043c\u0435\u043d (\u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u043d\u0430\u0448 \u0432\u043d\u0435\u0448\u043d\u0438\u0439 IP \u0430\u0434\u0440\u0435\u0441), \u043c\u043e\u0436\u0435\u0442 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0443\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043d\u0430 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 (\u043f\u0440\u043e\u0431\u0440\u043e\u0441 \u043f\u043e\u0440\u0442\u043e\u0432).<\/p>\r\n<!--more-->\r\n<p>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0432\u043e \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0439 \u0441\u0435\u0442\u0438 \u0435\u0441\u0442\u044c \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440, \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0442\u043e\u0440 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d \u043d\u0430 \u043f\u0440\u043e\u0431\u0440\u043e\u0441 \u043f\u043e\u0440\u0442\u0430 80 \u0441 WAN (\u0432\u043d\u0435\u0448\u043d\u0438\u0439 IP \u0430\u0434\u0440\u0435\u0441) \u043d\u0430 IP \u0430\u0434\u0440\u0435\u0441 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440 \u0432\u043d\u0443\u0442\u0440\u0438 \u0441\u0435\u0442\u0438. \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442, \u0435\u0441\u043b\u0438 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440 \u0438\u0437 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0439 \u0441\u0435\u0442\u0438 \u043e\u0431\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u043f\u043e\u0440\u0442 \u043d\u0430 \u0432\u043d\u0435\u0448\u043d\u0438\u0439 IP \u0430\u0434\u0440\u0435\u0441:<\/p>\r\n<pre>\r\nInternet (port 80) ==&gt; WAN (IP 1.1.2.2) ==&gt; Web-server in LAN (IP 10.10.10.2) - \u0434\u0430\u043d\u043d\u0430\u044f \u0441\u0445\u0435\u043c\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u043f\u0440\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 \u043f\u0440\u043e\u0431\u0440\u043e\u0441\u0430 \u043f\u043e\u0440\u0442\u043e\u0432<\/pre>\r\n<pre>\r\nLAN PC (IP 10.10.10.65) ==&gt; WAN (IP 1.1.2.2) ==&gt; Web-server in LAN (IP 10.10.10.2) - \u0434\u0430\u043d\u043d\u0430\u044f \u0441\u0445\u0435\u043c\u0430 \u041d\u0415 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442\r\n<\/pre>\r\n<p>\u041a\u0430\u043a \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0412\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u0443 \u0438\u0437 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0439 \u0441\u0435\u0442\u0438 \u0447\u0435\u0440\u0435\u0437 WAN:<\/p>\r\n<pre>\r\ninsmod ipt_mark\r\ninsmod xt_mark\r\niptables -t mangle -A PREROUTING -i ! `get_wanface` -d `nvram get wan_ipaddr` -j MARK --set-mark 0xd001\r\niptables -t mangle -A PREROUTING -j CONNMARK --save-mark\r\niptables -t nat -A POSTROUTING -m mark --mark 0xd001 -j MASQUERADE<\/pre>\r\n","protected":false},"excerpt":{"rendered":"<p>&#160;\u041f\u0440\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 \u0434\u043e\u043c\u0435\u043d\u043d\u044b\u0445 \u0438\u043c\u0435\u043d (\u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u043d\u0430\u0448 \u0432\u043d\u0435\u0448\u043d\u0438\u0439 IP \u0430\u0434\u0440\u0435\u0441), \u043c\u043e\u0436\u0435\u0442 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0443\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043d\u0430 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 (\u043f\u0440\u043e\u0431\u0440\u043e\u0441 \u043f\u043e\u0440\u0442\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":[10,12],"tags":[25,27],"_links":{"self":[{"href":"https:\/\/workit.kz\/index.php?rest_route=\/wp\/v2\/posts\/401"}],"collection":[{"href":"https:\/\/workit.kz\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/workit.kz\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/workit.kz\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/workit.kz\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=401"}],"version-history":[{"count":1,"href":"https:\/\/workit.kz\/index.php?rest_route=\/wp\/v2\/posts\/401\/revisions"}],"predecessor-version":[{"id":402,"href":"https:\/\/workit.kz\/index.php?rest_route=\/wp\/v2\/posts\/401\/revisions\/402"}],"wp:attachment":[{"href":"https:\/\/workit.kz\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=401"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/workit.kz\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=401"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/workit.kz\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=401"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}