{"id":841,"date":"2026-09-17T23:06:42","date_gmt":"2026-09-17T20:06:42","guid":{"rendered":"https:\/\/imaxis.ru\/?p=841"},"modified":"2026-09-18T00:06:07","modified_gmt":"2026-09-17T21:06:07","slug":"stub-i-forward-zony-v-bind-perenapravlenie-dns-zaprosov","status":"publish","type":"post","link":"https:\/\/imaxis.ru\/?p=841","title":{"rendered":"Stub \u0438 Forward \u0437\u043e\u043d\u044b \u0432 BIND: \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 DNS-\u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432"},"content":{"rendered":"<h1>Stub \u0438 Forward \u0437\u043e\u043d\u044b \u0432 BIND: \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 DNS-\u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432<\/h1>\n<p>\u0417\u043e\u043d\u044b <strong>Stub<\/strong> \u0438 <strong>Forward<\/strong> \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0442 DNS-\u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u0437\u043e\u043d\u044b \u043d\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0439 DNS-\u0441\u0435\u0440\u0432\u0435\u0440. \u0420\u0430\u0437\u043d\u0438\u0446\u0430:<\/p>\n<ul>\n<li><strong>Forward<\/strong> \u2014 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441\u044b;<\/li>\n<li><strong>Stub<\/strong> \u2014 \u0445\u0440\u0430\u043d\u0438\u0442 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u0445 \u0438\u043c\u0451\u043d (NS) \u0438 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0435\u0451 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442.<\/li>\n<\/ul>\n<p>\u0418\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u0434\u043b\u044f CentOS\/Rocky, Ubuntu\/Debian.<\/p>\n<hr \/>\n<h2>\u0420\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043d\u0430 allow-query<\/h2>\n<p>\u041f\u0435\u0440\u0435\u0434 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u043e\u0439 \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0440\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u043c \u0432\u043d\u0435\u0448\u043d\u0438\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b (\u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0441\u0435\u0440\u0432\u0435\u0440 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u043c).<\/p>\n<p><strong>Ubuntu \/ Debian \/ Astra Linux:<\/strong><\/p>\n<pre><code class=\"language-bash\">vi \/etc\/bind\/named.conf.options\n<\/code><\/pre>\n<p><strong>Rocky \/ CentOS \/ \u0420\u0415\u0414 \u041e\u0421:<\/strong><\/p>\n<pre><code class=\"language-bash\">vi \/etc\/named.conf\n<\/code><\/pre>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c:<\/p>\n<pre><code>allow-query     { any; };\n<\/code><\/pre>\n<p><strong><code>any<\/code> \u2014 \u0432\u0441\u0435 \u043a\u043b\u0438\u0435\u043d\u0442\u044b. \u0422\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0435\u0442\u0438:<\/strong><\/p>\n<pre><code>allow-query     { 192.168.0.0\/24; };\n<\/code><\/pre>\n<pre><code class=\"language-bash\">systemctl reload named || systemctl reload bind\n<\/code><\/pre>\n<hr \/>\n<h2>Static-stub<\/h2>\n<p><strong>CentOS \/ Red Hat:<\/strong><\/p>\n<pre><code class=\"language-bash\">vi \/etc\/named.conf\n<\/code><\/pre>\n<p><strong>Ubuntu \/ Debian:<\/strong><\/p>\n<pre><code class=\"language-bash\">vi \/etc\/bind\/named.conf.local\n<\/code><\/pre>\n<p>\u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u0437\u043e\u043d\u0443:<\/p>\n<pre><code>zone &quot;stub.local&quot; {\n        type static-stub;\n        server-addresses { 192.168.0.15; 192.168.0.14; 10.10.10.10; };\n};\n<\/code><\/pre>\n<p>\u0433\u0434\u0435 <code>stub.local<\/code> \u2014 \u0434\u043e\u043c\u0435\u043d \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f, <code>192.168.0.15<\/code>, <code>192.168.0.14<\/code>, <code>10.10.10.10<\/code> \u2014 \u0430\u0434\u0440\u0435\u0441\u0430 DNS-\u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432.<\/p>\n<pre><code class=\"language-bash\">systemctl reload named || systemctl reload bind\n<\/code><\/pre>\n<hr \/>\n<h2>Forward zone<\/h2>\n<pre><code>zone &quot;stub.local&quot; {\n        type forward;\n        forwarders { 192.168.0.15; 192.168.0.14; 10.10.10.10; };\n};\n<\/code><\/pre>\n<pre><code class=\"language-bash\">systemctl reload named || systemctl reload bind\n<\/code><\/pre>\n<hr \/>\n<h2>\u0422\u043e\u043d\u043a\u043e\u0441\u0442\u0438 \u0438 \u043f\u043e\u0434\u0432\u043e\u0434\u043d\u044b\u0435 \u043a\u0430\u043c\u043d\u0438<\/h2>\n<ul>\n<li><strong><code>allow-query<\/code> \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u0435\u043d<\/strong> \u2014 \u0431\u0435\u0437 \u043d\u0435\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440 \u0432\u0435\u0440\u043d\u0451\u0442 <code>REFUSED<\/code> \u0432\u043d\u0435\u0448\u043d\u0438\u043c \u043a\u043b\u0438\u0435\u043d\u0442\u0430\u043c.<\/li>\n<li><strong><code>static-stub<\/code> vs <code>stub<\/code><\/strong> \u2014 <code>static-stub<\/code> \u0437\u0430\u0434\u0430\u0451\u0442 \u0430\u0434\u0440\u0435\u0441\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438; \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0439 <code>stub<\/code> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 NS-\u0437\u0430\u043f\u0438\u0441\u0438 \u0438\u0437 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0439 \u0437\u043e\u043d\u044b.<\/li>\n<li><strong><code>forward<\/code> \u2014 \u043d\u0435 \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u044f<\/strong> \u2014 forward-\u0437\u043e\u043d\u0430 \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u0437\u043e\u043d\u044b, \u0430 \u043d\u0435 \u0432\u0441\u0435.<\/li>\n<li><strong><code>forward only<\/code> vs <code>forward first<\/code><\/strong> \u2014 \u0432 <code>named.conf.options<\/code> \u043c\u043e\u0436\u043d\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435\u043c: \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0435\u0440\u0435\u0441\u044b\u043b\u043a\u0430 \u0438\u043b\u0438 \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u0435\u0440\u0435\u0441\u044b\u043b\u043a\u0430, \u043f\u043e\u0442\u043e\u043c \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0440\u0435\u0437\u043e\u043b\u0432.<\/li>\n<li><strong>\u041f\u043e\u0440\u044f\u0434\u043e\u043a \u0437\u043e\u043d<\/strong> \u2014 forward\/stub \u0437\u043e\u043d\u044b \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0432 <code>named.conf.local<\/code> (Ubuntu) \u0438\u043b\u0438 <code>named.conf<\/code> (RPM).<\/li>\n<li><strong>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430<\/strong> \u2014 <code>dig @localhost stub.local<\/code> \u0438 <code>named-checkconf<\/code> \u0434\u043b\u044f \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u0438 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u0430.<\/li>\n<\/ul>\n<hr \/>\n<h2>\u0428\u043f\u0430\u0440\u0433\u0430\u043b\u043a\u0430<\/h2>\n<pre><code class=\"language-bash\"># allow-query\nvi \/etc\/bind\/named.conf.options\n#   allow-query { 192.168.0.0\/24; };\n\n# static-stub\nvi \/etc\/bind\/named.conf.local\n#   zone &quot;stub.local&quot; { type static-stub; server-addresses { 192.168.0.15; }; };\n\n# forward\n#   zone &quot;stub.local&quot; { type forward; forwarders { 192.168.0.15; }; };\n\nsystemctl reload bind9\nnamed-checkconf\n<\/code><\/pre>\n<p><em>\u041f\u0440\u043e\u0432\u0435\u0440\u0435\u043d\u043e \u043d\u0430: Ubuntu 22.04\/24.04\/26.04, CentOS\/Rocky + BIND 9.18+.<\/em><br \/>\n<em>\u0414\u0430\u0442\u0430: \u0421\u0435\u043d\u0442\u044f\u0431\u0440\u044c 2026.<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Stub \u0438 Forward \u0437\u043e\u043d\u044b \u0432 BIND: \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 DNS-\u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0417\u043e\u043d\u044b Stub<\/p>\n","protected":false},"author":0,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"footnotes":""},"categories":[3],"tags":[],"class_list":["post-841","post","type-post","status-publish","format-standard","hentry","category-linux"],"aioseo_notices":[],"views":6,"_links":{"self":[{"href":"https:\/\/imaxis.ru\/index.php?rest_route=\/wp\/v2\/posts\/841","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/imaxis.ru\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/imaxis.ru\/index.php?rest_route=\/wp\/v2\/types\/post"}],"replies":[{"embeddable":true,"href":"https:\/\/imaxis.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=841"}],"version-history":[{"count":2,"href":"https:\/\/imaxis.ru\/index.php?rest_route=\/wp\/v2\/posts\/841\/revisions"}],"predecessor-version":[{"id":844,"href":"https:\/\/imaxis.ru\/index.php?rest_route=\/wp\/v2\/posts\/841\/revisions\/844"}],"wp:attachment":[{"href":"https:\/\/imaxis.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=841"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/imaxis.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=841"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/imaxis.ru\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=841"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}