{"id":167331,"date":"2018-10-18T16:18:20","date_gmt":"2018-10-18T09:18:20","guid":{"rendered":"https:\/\/www.icez.net\/blog\/?p=167331"},"modified":"2018-10-18T16:18:20","modified_gmt":"2018-10-18T09:18:20","slug":"0234-named-allow-recursion-query-for-only-specific-zone","status":"publish","type":"post","link":"https:\/\/www.icez.net\/blog\/167331\/0234-named-allow-recursion-query-for-only-specific-zone","title":{"rendered":"0234 | named allow recursion query for only specific zone"},"content":{"rendered":"<p>first> define dummy ip address (e.g. 192.0.2.1) set it to loopback interface<\/p>\n<pre>\nip addr add 192.0.2.1\/32 dev lo\n<\/pre>\n<p>second> named configuration:<\/p>\n<ul>\n<li>define acl for blackhole query to the dummy ip address defined<\/li>\n<\/ul>\n<pre>\nacl acl_blackhole { 192.0.2.1; };\n<\/pre>\n<ul>\n<li>declare view for blackhole dns request<\/li>\n<\/ul>\n<pre>\nview blackhole {\n    match-destinations { acl_blackhole; };\n    recursion no;\n}\n<\/pre>\n<ul>\n<li>declare default view for accepting the query. recursion should be yes for allowing the query<\/li>\n<\/ul>\n<pre>\nview default {\n    recursion yes;\n    forward only;\n    forwarders { 192.0.2.1; }; # by default forward to blackhole\n\n    zone \"example.com.\" IN {\n        type forward;\n        forward only;\n        #  specify your real recursion dns server here\n        forwarders { 1.0.0.1; 1.1.1.1; }; \n    }\n}\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>first> define dummy ip address (e.g. 192.0.2.1) set it to loopback interface ip addr add 192.0.2.1\/32 dev lo second> named configuration: define acl for blackhole query to the dummy ip address defined acl acl_blackhole { 192.0.2.1; }; declare view for blackhole dns request view blackhole { match-destinations { acl_blackhole; }; recursion no; } declare default [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,50,1],"tags":[],"class_list":["post-167331","post","type-post","status-publish","format-standard","hentry","category-network","category-linux","category-misc"],"_links":{"self":[{"href":"https:\/\/www.icez.net\/blog\/wp-json\/wp\/v2\/posts\/167331","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.icez.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.icez.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.icez.net\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.icez.net\/blog\/wp-json\/wp\/v2\/comments?post=167331"}],"version-history":[{"count":3,"href":"https:\/\/www.icez.net\/blog\/wp-json\/wp\/v2\/posts\/167331\/revisions"}],"predecessor-version":[{"id":167334,"href":"https:\/\/www.icez.net\/blog\/wp-json\/wp\/v2\/posts\/167331\/revisions\/167334"}],"wp:attachment":[{"href":"https:\/\/www.icez.net\/blog\/wp-json\/wp\/v2\/media?parent=167331"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.icez.net\/blog\/wp-json\/wp\/v2\/categories?post=167331"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.icez.net\/blog\/wp-json\/wp\/v2\/tags?post=167331"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}