{"id":1866,"date":"2015-07-28T15:58:00","date_gmt":"2015-07-28T09:58:00","guid":{"rendered":"http:\/\/notes.norfolks.org\/?p=1866"},"modified":"2015-08-02T13:14:10","modified_gmt":"2015-08-02T07:14:10","slug":"%d1%83%d1%81%d1%82%d0%b0%d0%bd%d0%be%d0%b2%d0%ba%d0%b0-bind9-%d0%bd%d0%b0-asus-wl-500gp","status":"publish","type":"post","link":"https:\/\/notes.norfolks.fun\/?p=1866","title":{"rendered":"\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 BIND9 \u043d\u0430 Asus WL-500gp"},"content":{"rendered":"<p>\u041e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u0430\u043a\u0435\u0442\u043e\u0432:<\/p>\n<pre lang=\"sh\"># opkg update<\/pre>\n<p>\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0441\u0435\u0440\u0432\u0435\u0440 \u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f<\/p>\n<pre lang=\"sh\"># opkg install bind-server bind-tools<\/pre>\n<p>\u0412 \/opt\/etc\/init.d\/S09named \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043a \u0441\u0442\u0440\u043e\u043a\u0435 ARGS= \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 -4 \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c<\/p>\n<pre lang=\"config\">ARGS=\"-4 -c \/opt\/etc\/bind\/named.conf\"<\/pre>\n<p>\u0423\u0434\u0430\u043b\u044f\u0435\u043c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u043a\u043e\u043d\u0444\u0438\u0433 bind (\/opt\/etc\/bind\/named.conf) \u0438 \u0437\u0430\u043c\u0435\u043d\u044f\u0435\u043c \u0435\u0433\u043e \u043d\u0430 \u0441\u0432\u043e\u0439 (\u043f\u0440\u0438\u0432\u043e\u0434\u0438\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e bind \u043a\u0430\u043a \u0432 debian):<br \/>\n<!--more--><\/p>\n<p>named.conf<\/p>\n<pre lang=\"config\">\/\/ This is the primary configuration file for the BIND DNS server named.\r\n\r\ninclude \"\/opt\/etc\/bind\/named.conf.options\";\r\ninclude \"\/opt\/etc\/bind\/named.conf.local\";\r\ninclude \"\/opt\/etc\/bind\/named.conf.default-zones\";\r\n<\/pre>\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b named.conf.options, named.conf.local, named.conf.default-zones \u0432 \/opt\/etc\/bind\/<\/p>\n<pre lang=\"sh\"># cd \/opt\/etc\/bind\/\r\n# touch named.conf.options\r\n# touch named.conf.local\r\n# touch named.conf.default-zones<\/pre>\n<p>named.conf.options<\/p>\n<pre lang=\"config\">acl sever.lan {192.168.4.0\/24; 127.0.0.1; };\r\noptions {\r\n        directory \"\/opt\/tmp\";\r\n\r\n        \/\/ If your ISP provided one or more IP addresses for stable\r\n        \/\/ nameservers, you probably want to use them as forwarders.\r\n        \/\/ Uncomment the following block, and insert the addresses replacing\r\n        \/\/ the all-0's placeholder.\r\n\r\n        \/\/ forwarders {\r\n        \/\/      0.0.0.0;\r\n        \/\/ };\r\n        allow-query { sever.lan; };\r\n        auth-nxdomain no;    # conform to RFC1035\r\n};<\/pre>\n<p>named.conf.local<\/p>\n<pre lang=\"config\">zone \"sever.lan\" {\r\n    type master;\r\n        file \"\/opt\/etc\/bind\/db.sever.lan\";\r\n        allow-query { any; };\r\n    };\r\n\r\nzone \"4.168.192.in-addr.arpa\" {\r\n    type master;\r\n        file \"\/opt\/etc\/bind\/4.168.192.in-addr.arpa.zone\";\r\n    };\r\n<\/pre>\n<p>named.conf.default-zones<\/p>\n<pre lang=\"config\">\/\/ prime the server with knowledge of the root servers\r\nzone \".\" {\r\n        type hint;\r\n        file \"\/opt\/etc\/bind\/db.root\";\r\n};\r\n\r\n\/\/ be authoritative for the localhost forward and reverse zones, and for\r\n\/\/ broadcast zones as per RFC 1912\r\n\r\nzone \"localhost\" {\r\n        type master;\r\n        file \"\/opt\/etc\/bind\/db.local\";\r\n};\r\n\r\nzone \"127.in-addr.arpa\" {\r\n        type master;\r\n        file \"\/opt\/etc\/bind\/db.127\";\r\n};\r\n\r\nzone \"0.in-addr.arpa\" {\r\n        type master;\r\n        file \"\/opt\/etc\/bind\/db.0\";\r\n};\r\n\r\nzone \"255.in-addr.arpa\" {\r\n        type master;\r\n        file \"\/opt\/etc\/bind\/db.255\";\r\n};\r\n\r\n<\/pre>\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0444\u0430\u0439\u043b\u044b \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0439 \u0437\u043e\u043d\u044b db.sever.lan, 4.168.192.in-addr.arpa.zone<\/p>\n<pre lang=\"sh\"># touch db.sever.lan\r\n# touch 4.168.192.in-addr.arpa.zone<\/pre>\n<p>db.sever.lan<\/p>\n<pre lang=\"config\">$TTL 30\r\n$ORIGIN sever.lan.\r\n\r\n@ IN SOA        sever.sever.lan. admin.sever.lan. (\r\n                2015072201 ;Serial\r\n                1d ;Refresh\r\n                1h ;Retry\r\n                1w ;Expire\r\n                2h ) ;Negative Cache TTL\r\n;\r\n@       IN      NS      sever.sever.lan.\r\n@       IN      A       192.168.4.1\r\n\r\nsever           IN      A       192.168.4.1\r\ndns             IN      A       192.168.4.1\r\nsever-srv       IN      A       192.168.4.100\r\nsiluet-srv      IN      A       192.168.4.101\r\nsiluet-cl       IN      A       192.168.4.4\r\napplications    IN      A       192.168.4.110\r\n<\/pre>\n<p>4.168.192.in-addr.arpa.zone<\/p>\n<pre lang=\"config\">$TTL 30\r\n$ORIGIN 4.168.192.in-addr.arpa.\r\n\r\n@ IN SOA        sever.sever.lan. admin.sever.lan. (\r\n                2015072201 ;Serial\r\n                1d ;Refresh\r\n                1h ;Retry\r\n                1w ;Expire\r\n                2h) ;Negative Cache TTL\r\n;\r\n                NS sever.sever.lan.\r\n\r\n1       PTR     dns.sever.lan.\r\n100     PTR     sever-srv.sever.lan.\r\n101     PTR     siluet-srv.sever.lan.\r\n4       PTR     siluet-cl.sever.lan.\r\n110     PTR     applications.sever.lan\r\n<\/pre>\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043a\u043e\u043d\u0444\u0438\u0433 rndc.key:<\/p>\n<pre lang=\"sh\"># rndc-confgen >> \/opt\/etc\/rndc.key<\/pre>\n<p>\u0415\u0441\u043b\u0438 \u0441\u0434\u0435\u043b\u0430\u0442\u044c <\/p>\n<pre lang=\"\"># rndc reload<\/pre>\n<p>\u0431\u0443\u0434\u0435\u0442 \u0440\u0443\u0433\u0430\u0442\u044c\u0441\u044f \u043d\u0430 options, \u043f\u043e\u043a\u0430 \u043d\u0435 \u044f\u0441\u043d\u043e \u043f\u043e\u0447\u0435\u043c\u0443.<\/p>\n<p>\u0421\u0442\u0430\u043d\u043e\u0432\u0438\u043c\u0441\u044f \u0441\u0430\u043c\u0438 \u0441\u0435\u0431\u0435 dns-\u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c, \u0442.\u0435 \u0434\u0435\u043b\u0430\u0435\u043c \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u0432 \/tmp\/resolv.conf \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u044b\u043b\u043e<\/p>\n<pre lang=\"config\">nameserver 127.0.0.1<\/pre>\n<p>\u042d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0447\u0435\u0440\u0435\u0437 web-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441. \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c 127.0.0.1 \u043a\u0430\u043a dns-\u0441\u0435\u0440\u0432\u0435\u0440 \u043d\u0430 \u0432\u043d\u0435\u0448\u043d\u0435\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0435.<br \/>\n\u0418\u043b\u0438 \u0441\u0434\u0435\u043b\u0430\u0442\u044c <\/p>\n<pre lang=\"\"># nvram set wan_dns_t=127.0.0.1 \r\n# nvram commit\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u041e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u0430\u043a\u0435\u0442\u043e\u0432: # opkg update \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0441\u0435\u0440\u0432\u0435\u0440 \u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f # opkg install bind-server bind-tools \u0412 \/opt\/etc\/init.d\/S09named \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043a \u0441\u0442\u0440\u043e\u043a\u0435 ARGS= \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 -4 \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c ARGS=&#187;-4 -c \/opt\/etc\/bind\/named.conf&#187; \u0423\u0434\u0430\u043b\u044f\u0435\u043c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u043a\u043e\u043d\u0444\u0438\u0433 bind (\/opt\/etc\/bind\/named.conf) \u0438 \u0437\u0430\u043c\u0435\u043d\u044f\u0435\u043c \u0435\u0433\u043e \u043d\u0430 \u0441\u0432\u043e\u0439 (\u043f\u0440\u0438\u0432\u043e\u0434\u0438\u043c &hellip; <a href=\"https:\/\/notes.norfolks.fun\/?p=1866\">\u0427\u0438\u0442\u0430\u0442\u044c \u0434\u0430\u043b\u0435\u0435 <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[18,14,8],"tags":[],"class_list":["post-1866","post","type-post","status-publish","format-standard","hentry","category-asus-wl500gp","category-linux","category-8"],"_links":{"self":[{"href":"https:\/\/notes.norfolks.fun\/index.php?rest_route=\/wp\/v2\/posts\/1866","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/notes.norfolks.fun\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/notes.norfolks.fun\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/notes.norfolks.fun\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/notes.norfolks.fun\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1866"}],"version-history":[{"count":15,"href":"https:\/\/notes.norfolks.fun\/index.php?rest_route=\/wp\/v2\/posts\/1866\/revisions"}],"predecessor-version":[{"id":1893,"href":"https:\/\/notes.norfolks.fun\/index.php?rest_route=\/wp\/v2\/posts\/1866\/revisions\/1893"}],"wp:attachment":[{"href":"https:\/\/notes.norfolks.fun\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1866"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/notes.norfolks.fun\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1866"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/notes.norfolks.fun\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1866"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}