{"id":91,"date":"2010-06-18T14:16:50","date_gmt":"2010-06-18T11:16:50","guid":{"rendered":"http:\/\/skeletor.org.ua\/wordpress\/?p=91"},"modified":"2016-10-07T12:42:18","modified_gmt":"2016-10-07T09:42:18","slug":"%d1%83%d1%81%d1%82%d0%b0%d0%bd%d0%be%d0%b2%d0%ba%d0%b0-%d0%b8-%d0%bd%d0%b0%d1%81%d1%82%d1%80%d0%be%d0%b9%d0%ba%d0%b0-dns-%d1%81%d0%b5%d1%80%d0%b2%d0%b5%d1%80%d0%b0-bind9","status":"publish","type":"post","link":"https:\/\/skeletor.org.ua\/?p=91","title":{"rendered":"\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 DNS \u0441\u0435\u0440\u0432\u0435\u0440\u0430 Bind9"},"content":{"rendered":"<p><strong><span style=\"color: #008000;\"><em>\u041e\u0431\u043d\u043e\u0432\u0438\u043b \u0441\u0442\u0430\u0442\u044c\u044e 12.10.2009<\/em><\/span><br \/>\n<\/strong><\/p>\n<p><strong>Bind<\/strong> &#8211; \u0434\u0430\u0432\u043d\u043e \u0438\u0434\u0451\u0442 \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u0448\u0442\u0430\u0442\u043d\u044b\u043c\u00a0<strong>DNS<\/strong>-\u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c \u0432 \u043b\u044e\u0431\u043e\u0439\u00a0<strong>*nix<\/strong> \u0441\u0438\u0441\u0442\u0435\u043c\u0435. \u041a\u0441\u0442\u0430\u0442\u0438, \u043f\u043e\u043c\u0438\u043c\u043e\u00a0<strong>bind\u00a0<\/strong>\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043c\u043d\u043e\u0433\u043e \u0434\u0440\u0443\u0433\u0438\u0445 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a\u00a0<strong>NDS, Unbound, PowerDNS<\/strong>, \u0438 \u043c\u043d\u043e\u0433\u043e \u0434\u0440\u0443\u0433\u0438\u0445. \u0423 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0441\u0432\u043e\u0438 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430 \u0438 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u0438.<\/p>\n<p><!--more--><\/p>\n<p>\u0418\u0434\u0451\u043c \u0432 \u043f\u0430\u043f\u043a\u0443 \u0441 \u043f\u043e\u0440\u0442\u0430\u043c\u0438 \u0438 \u0441\u0442\u0430\u0432\u0438\u043c\u00a0<strong>bind<\/strong> \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 (\u043d\u0430 \u043c\u043e\u043c\u0435\u043d\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u044c\u0438 \u0431\u044b\u043b\u0430 \u0432\u0435\u0440\u0441\u0438\u044f <strong>9.5<\/strong>) (\u041a\u043e\u0433\u0434\u0430 \u0432\u044b\u043b\u0435\u0437\u0435\u0442 \u043e\u043a\u043e\u0448\u043a\u043e, \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u043e\u043f\u0446\u0438\u044e\u00a0<strong><em>Replace base BIND with this version<\/em><\/strong>)<\/p>\n<p><code>#cd \/usr\/ports\/dns\/bind95<br \/>\n#make install clean<\/code><\/p>\n<p>\u0414\u0430\u043b\u0435\u0435\u00a0 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u00a0<strong>\/etc\/named<\/strong> \u0434\u043b\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430. \u0412\u043e\u0442 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u043e\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430.<\/p>\n<p><code>options {<br \/>\n\/\/ Relative to the chroot directory, if any<br \/>\ndirectory\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \"\/etc\/namedb\";<br \/>\npid-file\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \"\/var\/run\/named\/pid\";<br \/>\ndump-file\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \"\/var\/dump\/named_dump.db\";<br \/>\nstatistics-file \"\/var\/stats\/named.stats\";<br \/>\n<\/code><br \/>\n<code>listen-on\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 { 127.0.0.1; 10.0.52.254; }; \/\/ - \u0437\u0434\u0435\u0441\u044c \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043b\u0443\u0448\u0430\u0435\u0442 DNS \u0441\u0435\u0440\u0432\u0435\u0440 (\u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0442\u043e\u043b\u044c\u043a\u043e \u044d\u0442\u0438 \u0430\u0434\u0440\u0435\u0441\u0430 \u043c\u043e\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 DNS \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432 \u043d\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0430\u0445)<br \/>\n};<\/code><\/p>\n<p><code>zone \".\" { type hint; file \"named.root\"; };<\/code><\/p>\n<p><code>zone \"lan\" {<br \/>\ntype master;<br \/>\nfile \"master\/lan.rev\";<br \/>\n};<\/code><\/p>\n<p><code>zone \"0.0.127.IN-ADDR.ARPA\" {<br \/>\ntype master;<br \/>\nfile \"master\/localhost.rev\";<br \/>\n};<\/code><\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c\u00a0<strong>localhost.rev<\/strong>. \u0412 \u043f\u0430\u043f\u043a\u0435\u00a0<strong>\/etc\/named<\/strong> \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c 2 \u0444\u0430\u0439\u043b\u0430:<strong>PROTO.localhost.rev<\/strong> \u0438\u00a0<strong>make-localhost<\/strong>. \u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0438\u0445 \u043d\u0435\u0442, \u0442\u043e \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u0437\u044f\u0442\u044c \u0438\u0445 \u043e\u0442\u0441\u044e\u0434\u0430 (\u043d\u0438\u0436\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u043d \u043b\u0438\u0441\u0442\u0438\u043d\u0433 \u044d\u0442\u0438\u0445 \u0444\u0430\u0439\u043b\u043e\u0432)<\/p>\n<p><code>#cat PROTO.localhost.rev<br \/>\n;\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 From: @(#)localhost.rev 5.1 (Berkeley) 6\/30\/90<br \/>\n; $FreeBSD: src\/etc\/namedb\/PROTO.localhost.rev,v 1.6 2000\/01\/10 15:31:40 peter Exp $<br \/>\n;<br \/>\n; This file is automatically edited by the `make-localhost' script in<br \/>\n; the \/etc\/namedb directory.<br \/>\n;<br \/>\n<\/code><br \/>\n<code>$TTL\u00a0\u00a0\u00a0 3600<br \/>\n@\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 IN\u00a0\u00a0\u00a0\u00a0\u00a0 SOA\u00a0\u00a0\u00a0\u00a0 @host@. root.@host@.\u00a0 (<br \/>\n@date@\u00a0 ; Serial<br \/>\n3600\u00a0\u00a0\u00a0 ; Refresh<br \/>\n900\u00a0\u00a0\u00a0\u00a0 ; Retry<br \/>\n3600000 ; Expire<br \/>\n3600 )\u00a0 ; Minimum<br \/>\nIN\u00a0\u00a0\u00a0\u00a0\u00a0 NS\u00a0\u00a0\u00a0\u00a0\u00a0 @host@.<br \/>\n1\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 IN\u00a0\u00a0\u00a0\u00a0\u00a0 PTR\u00a0\u00a0\u00a0\u00a0 localhost.@domain@.<\/code><\/p>\n<p>========================================<\/p>\n<p><code>$cat make-localhost<\/code><\/p>\n<p><code>#!\/bin\/sh<br \/>\n#<br \/>\n# $FreeBSD: src\/etc\/namedb\/make-localhost,v 1.6.8.1 2004\/09\/30 23:36:07 dougb Exp $<br \/>\n#<br \/>\n# make-localhost - edit the appropriate local information into<br \/>\n# \/etc\/namedb\/localhost.rev<br \/>\n#<\/code><\/p>\n<p><code>PATH=\/sbin:\/bin:\/usr\/sbin:\/usr\/bin:\/usr\/local\/sbin<br \/>\nexport PATH<\/code><\/p>\n<p><code>if [ \"`hostname -s`\" != \"`hostname`\" ]; then<br \/>\n# hostname must contain domain<\/code><\/p>\n<p><code>host=`hostname -s`<br \/>\nfullhost=`hostname`<br \/>\ndomain=`echo $fullhost | sed \"s\/^$host\\.\/\/\"`<br \/>\nelse<br \/>\nhost=`hostname`<\/code><\/p>\n<p><code>if [ -z \"$1\" ]; then<br \/>\necho -n 'Enter your domain name: '<br \/>\nread domain<br \/>\nelse<br \/>\ndomain=\"$1\"<br \/>\nfi<\/code><\/p>\n<p><code># strip trailing dot, if any<br \/>\ndomain=`echo $domain | sed 's\/\\.$\/\/'`<br \/>\nfullhost=\"$host.$domain\"<br \/>\nfi<\/code><\/p>\n<p><code>date=`date +\"%Y%m%d\"`<br \/>\nmkdir -p master<br \/>\nmv -f master\/localhost.rev master\/localhost.rev.BAK 2&gt;\/dev\/null<br \/>\n<\/code><br \/>\n<code>exec sed -e \"s\/@host@\/$fullhost\/g\" \\<br \/>\n-e \"s\/@domain@\/$domain\/g\" \\<br \/>\n-e \"s\/@date@\/$date\/g\" \\<br \/>\n&lt; PROTO.localhost.rev &gt; master\/localhost.rev<\/code><\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0443\u0436\u043d\u043e \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u00a0<strong>localhost.rev<\/strong>\u00a0\u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u044d\u0442\u0438\u0445 2 \u0444\u0430\u0439\u043b\u043e\u0432.<\/p>\n<p><code>#sh make-localhost<\/code><\/p>\n<p>\u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u0432 \u043f\u0430\u043f\u043a\u0435 master \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u0444\u0430\u0439\u043b\u00a0<strong>localhost.rev<\/strong>. \u0415\u0441\u043b\u0438 \u044d\u0442\u043e \u043d\u0435 \u0442\u0430\u043a &#8211; \u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u043b\u043e\u0433\u0438.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043e\u043f\u0438\u0448\u0435\u043c \u0437\u043e\u043d\u0443\u00a0<strong>lan<\/strong>.<\/p>\n<p><code>$cat \/etc\/namedb\/master\/lan.rev<\/code><\/p>\n<p><code>$ORIGIN lan.<br \/>\n$TTL\u00a0\u00a0\u00a0 86400<br \/>\n@\u00a0\u00a0\u00a0 IN\u00a0\u00a0\u00a0\u00a0\u00a0 SOA\u00a0\u00a0\u00a0\u00a0 ns.domain.ua. hostmaster.domain.ua. (<br \/>\n2006060537\u00a0\u00a0\u00a0\u00a0\u00a0 ; Serial<br \/>\n86400\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 ; Refresh<br \/>\n7200\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 ; Retry<br \/>\n604800\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 ; Expire<br \/>\n86400 )\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 ; Default Minimum TTL<br \/>\nIN\u00a0\u00a0\u00a0\u00a0\u00a0 NS\u00a0\u00a0\u00a0\u00a0\u00a0 domain.ua.<br \/>\nns1\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 IN\u00a0\u00a0\u00a0\u00a0 A\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 15.15.15.15<br \/>\nmy\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 IN\u00a0\u00a0\u00a0\u00a0\u00a0 A\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 13.13.13.13<br \/>\n*.my\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 IN\u00a0\u00a0\u00a0\u00a0\u00a0 A\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 13.13.13.13<br \/>\n*\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 IN\u00a0\u00a0\u00a0\u00a0\u00a0 A\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 14.14.14.14<br \/>\n<\/code><br \/>\n\u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443, \u0447\u0442\u043e \u0437\u0434\u0435\u0441\u044c \u043e\u043f\u0438\u0441\u0430\u043d\u043e. \u041f\u0440\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0435 \u0447\u0435\u0440\u0435\u0437 nslookup \u0434\u043b\u044f \u0438\u043c\u0435\u043d\u0438\u00a0<strong>blabla.lan<\/strong> &#8211; \u0431\u0443\u0434\u0435\u0442 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f <strong>14.14.14.14<\/strong>, \u043f\u0440\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0435\u00a0<strong>blabla.my.lan<\/strong> \u0431\u0443\u0434\u0435\u0442 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f <strong>13.13.13.13<\/strong>, \u043f\u0440\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0435<strong>ns1.lan<\/strong> \u0431\u0443\u0434\u0435\u0442 &#8211; <strong>15.15.15.15<\/strong><\/p>\n<p>\u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043a \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0430. \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0442\u0430\u043a\u0438\u0435 \u0441\u0442\u0440\u043e\u0447\u043a\u0438 \u0432\u00a0<strong>\/etc\/rc.conf<\/strong><\/p>\n<p><code>named_enable=\"YES\"<br \/>\nnamed_flags=\"-u bind\"<\/code><\/p>\n<p>\u0447\u0442\u043e \u0431\u044b \u0441\u0435\u0440\u0432\u0438\u0441 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u043b\u0441\u044f \u043f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u041e\u0421. \u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0441\u0435\u0440\u0432\u0438\u0441<\/p>\n<p><code>#\/etc\/rc.d\/named start<\/code><\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u0441\u0442\u0430\u043b\u043e \u0432\u0440\u0435\u043c\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0443 \u043d\u0430\u0448\u0435\u0433\u043e\u00a0<strong>DNS<\/strong> \u0441\u0435\u0440\u0432\u0435\u0440\u0430. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0432 \u0444\u0430\u0439\u043b\u00a0<strong>\/etc\/resolv.conf<\/strong> \u043f\u0435\u0440\u0432\u043e\u0439 \u0441\u0442\u0440\u043e\u0447\u043a\u043e\u0439 \u0442\u0430\u043a\u0443\u044e:<\/p>\n<p><code>nameserver 127.0.0.1<\/code><\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043c\u00a0<strong>nslookup<\/strong> \u0434\u043b\u044f \u0440\u0435\u0437\u043e\u043b\u0432\u0430 \u0438\u043c\u0451\u043d:<\/p>\n<p><code>$ nslookup meta.ua<br \/>\nServer:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 127.0.0.1<br \/>\nAddress:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 127.0.0.1#53<\/code><\/p>\n<p><code>Non-authoritative answer:<br \/>\nName:\u00a0\u00a0 meta.ua<br \/>\nAddress: 194.0.131.18<\/code><\/p>\n<p>\u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0442\u0430\u043a\u043e\u0435, \u0437\u043d\u0430\u0447\u0438\u0442 \u0441\u0435\u0440\u0432\u0435\u0440 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u0422\u0430\u043a \u0436\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u0432\u0442\u043e\u0440\u043e\u0439 \u0430\u0434\u0440\u0435\u0441 (<strong>10.0.0.52.254<\/strong> \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0432\u043d\u043e\u0441\u0438\u043b\u0438 \u0432 \u0444\u0430\u0439\u043b\u00a0<strong>\/etc\/named\/named.conf<\/strong>) \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043f\u0440\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u043a\u043b\u0438\u0435\u043d\u0442\u0430\u043c \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435<strong>DNS<\/strong> \u0441\u0435\u0440\u0432\u0435\u0440\u0430:<\/p>\n<p><code>$ nslookup ukr.net 10.0.52.254<br \/>\nServer:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 10.0.52.254<br \/>\nAddress:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 10.0.52.254#53<br \/>\n<\/code><br \/>\n<code>Non-authoritative answer:<br \/>\nName:\u00a0\u00a0 ukr.net<br \/>\nAddress: 195.214.195.105<\/code><\/p>\n<p>\u0412\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u0432\u0441\u0451 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442.<\/p>\n<p>\u0414\u043b\u044f \u0432\u043d\u0435\u0441\u0435\u043d\u0438\u044f \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0438 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0438\u0445 \u043f\u0435\u0440\u0435\u0447\u0438\u0442\u043a\u0430. \u041f\u0435\u0440\u0435\u0447\u0438\u0442\u0430\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433\u0438 \u043c\u043e\u0436\u043d\u043e \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439<\/p>\n<p><code>#\/etc\/rc.d\/named reload<\/code><\/p>\n<p>\u0412\u0441\u0451 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043a\u0435\u0448\u0430, \u043e\u0447\u0438\u0449\u0430\u0442\u044c \u0435\u0433\u043e, \u0434\u0430 \u0438 \u043c\u043d\u043e\u0433\u043e \u0434\u0440\u0443\u0433\u043e\u0433\u043e, \u0447\u0442\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437\u00a0<strong>rndc<\/strong>. \u0427\u0442\u043e \u0431\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c\u00a0<strong>DNS<\/strong>-\u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u0434\u043f\u0440\u0430\u0432\u0438\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0438. \u0418 \u0442\u0430\u043a, \u043f\u043e\u0441\u043b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438\u00a0<strong>bind&#8217;a<\/strong> \u0443 \u043d\u0430\u0441 \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 \u0435\u0441\u0442\u044c \u0435\u0449\u0451 \u043e\u0434\u0438\u043d \u0444\u0430\u0439\u043b, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e\u00a0<strong>rndc.conf.sample<\/strong>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u0432\u00a0<strong>rndc.conf<\/strong> \u0438 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u043c \u043f\u0440\u0430\u0432\u0438\u0442\u044c. \u041f\u0440\u0438\u0432\u043e\u0434\u0438\u043c \u0435\u0433\u043e \u043a \u0442\u0430\u043a\u043e\u043c\u0443 \u0432\u0438\u0434\u0443:<\/p>\n<p><code>key \"rndc-key\" {<br \/>\nalgorithm hmac-md5;<br \/>\nsecret \"ejjddRFsdkljrRdlj45jdDFdfkUJJGJddOOJGdd\";<br \/>\n};<br \/>\noptions {<br \/>\ndefault-key \"rndc-key\";<br \/>\ndefault-server 127.0.0.1;<br \/>\ndefault-port 953;<br \/>\n};<\/code><\/p>\n<p>\u0421\u0430\u043c \u043a\u043b\u044e\u0447\u00a0<strong>secret<\/strong> \u0443 \u0432\u0430\u0441 \u0431\u0443\u0434\u0435\u0442 \u0434\u0440\u0443\u0433\u0438\u043c. \u0422\u0435\u043f\u0435\u0440\u044c \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0442\u0430\u043a\u043e\u0435 \u0432\u00a0<strong>named.conf<\/strong>:<\/p>\n<p><code>key \"rndc-key\" {<br \/>\nalgorithm hmac-md5;<br \/>\nsecret \"ejjddRFsdkljrRdlj45jdDFdfkUJJGJddOOJGdd\";<br \/>\n};<br \/>\ncontrols {<br \/>\ninet 127.0.0.1 port 953<br \/>\nallow { 127.0.0.1; } keys { \"rndc-key\"; };<br \/>\n};<\/code><\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0435\u0440\u0435\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0438 \u0438 \u0441\u043c\u043e\u0442\u0440\u0438\u043c\u00a0<strong>sockstat<\/strong>: \u0443 \u043d\u0430\u0441 \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u043b\u0443\u0448\u0430\u0442\u044c\u0441\u044f \u0435\u0449\u0451 \u043f\u043e\u0440\u0442 <strong>953<\/strong>. \u0415\u0441\u043b\u0438 \u0432\u0441\u0451 \u0445\u043e\u0440\u043e\u0448\u043e, \u0437\u043d\u0430\u0447\u0438\u0442 \u0432\u0441\u0451 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u043b\u0438. \u0415\u0441\u043b\u0438 \u043d\u0435\u0442 &#8211; \u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u043b\u043e\u0433\u0438.<\/p>\n<p>\u042f \u0437\u0430\u043c\u0435\u0442\u0438\u043b, \u0447\u0442\u043e \u043f\u0440\u0438 \u0443\u0441\u0442\u043d\u043e\u0432\u043a\u0435 \u0432\u0435\u0440\u0441\u0438\u0439 <strong>9.5<\/strong> \u0438 \u0432\u044b\u0448\u0435 \u0443 \u043c\u0435\u043d\u044f \u0432 \u043b\u043e\u0433\u0430\u0445 \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u0430\u043a\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430:<\/p>\n<p><code>working directory is not writeable<\/code><\/p>\n<p>\u042d\u0442\u043e \u043f\u043e\u0431\u0435\u0436\u0434\u0430\u0435\u0442\u0441\u044f \u043b\u0435\u0433\u043a\u043e. \u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u0444\u0430\u0439\u043b\u00a0<strong>\/etc\/mtree\/BIND.chroot.dist<\/strong> \u0438 \u043d\u0430\u0445\u043e\u0434\u0438\u043c \u0438 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u043c \u0435\u0433\u043e \u043a \u0442\u0430\u043a\u043e\u043c\u0443 \u0432\u0438\u0434\u0443:<\/p>\n<p><code>\/set type=dir uname=root gname=wheel mode=0755<br \/>\n.<br \/>\ndev\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 mode=0555<br \/>\n..<br \/>\netc<br \/>\nnamedb uname=bind<br \/>\ndynamic uname=bind<br \/>\n..<br \/>\nmaster\u00a0 uname=bind<br \/>\n..<br \/>\nslave\u00a0\u00a0 uname=bind<br \/>\n..<br \/>\n..<br \/>\n..<br \/>\n\/set type=dir uname=bind gname=wheel mode=0755<br \/>\nvar\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 uname=root<br \/>\ndump<br \/>\n..<br \/>\nlog<br \/>\n..<br \/>\nrun<br \/>\nnamed<br \/>\n..<br \/>\n..<br \/>\nstats<br \/>\n..<br \/>\n..<br \/>\n..<\/code><\/p>\n<p>\u0442\u043e \u0435\u0441\u0442\u044c, \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438\u00a0<strong>uname=bind<\/strong> \u0433\u0434\u0435 \u044d\u0442\u043e\u0433\u043e \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442. \u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0434\u043b\u044f \u0447\u0435\u0433\u043e \u044d\u0442\u043e \u043d\u0443\u0436\u043d\u043e. \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0443 \u043c\u0435\u043d\u044f\u00a0<strong>bind<\/strong> \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u043e\u0442 \u0438\u043c\u0435\u043d\u0438 \u044e\u0437\u0435\u0440\u0430\u00a0<strong>bind<\/strong>, \u0430 \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u044d\u0442\u043e\u043c\u0443 \u0444\u0430\u0439\u043b\u0443 (\u0434\u043e \u0432\u043d\u0435\u0441\u0435\u043d\u0438\u044f \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439) \u043f\u0440\u0430\u0432\u0430 \u043f\u0440\u0438\u043d\u0443\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u044f\u043b\u0438 \u0432\u043b\u0430\u0434\u0435\u043b\u044c\u0446\u0435\u043c \u044e\u0437\u0435\u0440\u0430\u00a0<strong>root<\/strong>, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044e\u0437\u0435\u0440\u00a0<strong>bind<\/strong> \u0438\u043c\u0435\u043b \u0442\u043e\u043b\u044c\u043a\u043e<strong>ReadOnly<\/strong> \u043f\u0440\u0430\u0432\u0430. \u041f\u043e\u0441\u043b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u043d\u0443\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c\u00a0<strong>named<\/strong>.<\/p>\n<p>\u0418\u043d\u043e\u0433\u0434\u0430 \u0431\u044b\u0432\u0430\u0435\u0442 \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u043c \u043e\u0447\u0438\u0441\u0442\u0438\u0442\u044c \u043a\u044d\u0448\u00a0<strong>DNS<\/strong>. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432\u044b \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u043d\u043e\u0432\u044b\u0439 \u0430\u0434\u0440\u0435\u0441, \u0430 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0435\u0449\u0451 \u043d\u0435 \u043f\u0440\u0438\u0448\u043b\u0438 \u0432 \u0441\u0438\u043b\u0443. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439<\/p>\n<p><code>#rndc flush internal <\/code>(\u0435\u0441\u043b\u0438 \u0432\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 \u0432\u0435\u0440\u0441\u0438\u044e 9.2.0 \u0438\u043b\u0438 \u0432\u044b\u0448\u0435)<br \/>\n<code>#rndc stop &amp;&amp; rndc start<\/code> (\u0435\u0441\u043b\u0438 \u0432\u0435\u0440\u0441\u0438\u044f 9.0 \u0438 \u0432\u044b\u0448\u0435)<br \/>\n<code>#ndc stop &amp;&amp; sleep 30 &amp;&amp; ndc start<\/code> (\u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0432\u0435\u0440\u0441\u0438\u044f 8 )<br \/>\n<code># cat \/dev\/null &gt; \/var\/named\/etc\/namedb\/named.run &amp;&amp; \/etc\/rc.d\/named restart<\/code> (\u0433\u0440\u0443\u0431\u044b\u0439 \u0441\u0431\u0440\u043e\u0441)<\/p>\n<p>&nbsp;<\/p>\n<p><em><strong><span style=\"color: #ff6600;\">\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u04351<\/span><\/strong><\/em><\/p>\n<p>\u041e\u0447\u0435\u043d\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0439 <a href=\"http:\/\/gnudip2.sourceforge.net\/gnudip-www\/latest\/gnudip\/html\/owndomain.html\" target=\"_blank\" rel=\"nofollow\">\u043e\u0431\u0437\u043e\u0440<\/a>, \u043f\u043e\u0447\u0435\u043c\u0443 \u043d\u0435\u043b\u044c\u0437\u044f \u0434\u0435\u043b\u0430\u0442\u044c <strong>CNAME<\/strong> \u043d\u0430 \u043a\u043e\u0440\u0435\u043d\u044c \u0434\u043e\u043c\u0435\u043d\u043d\u043e\u0439 \u0437\u043e\u043d\u044b<\/p>\n<p><span style=\"color: #ff6600;\"><strong><em>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u04352<\/em><\/strong><\/span><\/p>\n<p>\u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441 DNS \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c, \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e <a href=\"http:\/\/dadv.livejournal.com\/207897.html\">\u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u041e\u0431\u043d\u043e\u0432\u0438\u043b \u0441\u0442\u0430\u0442\u044c\u044e 12.10.2009 Bind &#8211; \u0434\u0430\u0432\u043d\u043e \u0438\u0434\u0451\u0442 \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u0448\u0442\u0430\u0442\u043d\u044b\u043c\u00a0DNS-\u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c \u0432 \u043b\u044e\u0431\u043e\u0439\u00a0*nix \u0441\u0438\u0441\u0442\u0435\u043c\u0435. \u041a\u0441\u0442\u0430\u0442\u0438, \u043f\u043e\u043c\u0438\u043c\u043e\u00a0bind\u00a0\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043c\u043d\u043e\u0433\u043e \u0434\u0440\u0443\u0433\u0438\u0445 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a\u00a0NDS, Unbound, PowerDNS, \u0438 \u043c\u043d\u043e\u0433\u043e \u0434\u0440\u0443\u0433\u0438\u0445. \u0423 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0441\u0432\u043e\u0438 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430 \u0438 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u0438.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-91","post","type-post","status-publish","format-standard","hentry","category-freebsd"],"_links":{"self":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts\/91","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=91"}],"version-history":[{"count":7,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts\/91\/revisions"}],"predecessor-version":[{"id":5046,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts\/91\/revisions\/5046"}],"wp:attachment":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=91"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=91"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=91"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}