{"id":6229,"date":"2022-12-04T08:46:41","date_gmt":"2022-12-03T23:46:41","guid":{"rendered":"https:\/\/lab4ict.com\/system\/?p=6229"},"modified":"2024-09-22T11:21:23","modified_gmt":"2024-09-22T02:21:23","slug":"raspberry-pi%e3%81%a7%e3%83%ad%e3%83%bc%e3%82%ab%e3%83%ab%e3%81%aedns%e3%82%b5%e3%83%bc%e3%83%90%ef%bc%88dnsmasq%ef%bc%89%e3%82%92%e6%a7%8b%e7%af%89%e3%81%99%e3%82%8b%ef%bc%81","status":"publish","type":"post","link":"https:\/\/lab4ict.com\/system\/archives\/6229","title":{"rendered":"Raspberry Pi\u3067\u5b85\u5185\u7528\u306eDNS\u30b5\u30fc\u30d0\u3092Dnsmasq\u3067\u69cb\u7bc9\u3059\u308b\uff01"},"content":{"rendered":"<p>\u5b85\u5185\u7528\u306b\u72ec\u81ea\u306e\u30c9\u30e1\u30a4\u30f3\u3092\u7acb\u3066\u308b\u305f\u3081DNS\u30b5\u30fc\u30d0\u3092\u69cb\u7bc9\u3057\u307e\u3059\u3002DNS\u30b5\u30fc\u30d0\u306f\u3001\u5e38\u6642\u8d77\u52d5\u304c\u671b\u307e\u3057\u3044\u305f\u3081\u3001\u7701\u96fb\u529b\u306eRasberry Pi\u3092\u6d3b\u7528\u3057\u307e\u3059\u3002<br \/>\n<!--more--><\/p>\n<h2>\u4f7f\u7528\u3059\u308b\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u78ba\u8a8d\u3059\u308b\uff01<\/h2>\n<p>\u4f7f\u7528\u3059\u308bRaspberry Pi\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n$ cat \/etc\/debian_version \r\n11.5\r\n<\/pre>\n<h2>Dnsmasq\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\uff01<\/h2>\n<p>Dnsmasq\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nsudo apt install dnsmasq -y\r\n<\/pre>\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304c\u5b8c\u4e86\u3059\u308b\u3068\u3001Dnsmasq\u306f\u8d77\u52d5\u6e08\u307f\u306e\u72b6\u614b\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002\u81ea\u52d5\u8d77\u52d5\u3082\u8a2d\u5b9a\u6e08\u307f\u3067\u3059\u3002<\/p>\n<h2>Dnsmasq\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u52d5\u4f5c\u3092\u78ba\u8a8d\u3059\u308b\uff01<\/h2>\n<p>Dnsmasq\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u52d5\u4f5c\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u3001\u4ee5\u4e0b\u306e\u8a2d\u5b9a\u3068\u306a\u3063\u3066\u3044\u308b\u3053\u3068\u3092\u524d\u63d0\u306b\u8a2d\u5b9a\u3092\u884c\u3063\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<ul>\n<li>\u4e0a\u4f4d\u306e\u30b5\u30fc\u30d0\u306f\u3001\/etc\/resolv.conf\u3092\u53c2\u7167\u3059\u308b\u3002<\/li>\n<li>\u540d\u524d\u89e3\u6c7a\u306e\u60c5\u5831\u306f\u3001\/etc\/hosts\u3092\u53c2\u7167\u3059\u308b\u3002<\/li>\n<\/ul>\n<h2>Dnsmasq\u306e\u8a2d\u5b9a\u3092\u884c\u3046\uff01<\/h2>\n<p>\u30c9\u30e1\u30a4\u30f3\u306a\u3057\u306e\u554f\u3044\u5408\u308f\u305b\u3092\u3001\u4e0a\u4f4d\u306eDNS\u30b5\u30fc\u30d0\u306b\u554f\u3044\u5408\u308f\u305b\u3057\u306a\u3044\u3088\u3046\u306b\u3001\u4ee5\u4e0b\u306e\u8a2d\u5b9a\u3092\u6709\u52b9\u306b\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n# Never forward plain names (without a dot or domain part)\r\ndomain-needed\r\n<\/pre>\n<p>\u5b85\u5185\u306eIP\u30a2\u30c9\u30ec\u30b9\u306e\u554f\u3044\u5408\u308f\u305b\u3092\u3001\u4e0a\u4f4d\u306eDNS\u30b5\u30fc\u30d0\u306b\u554f\u3044\u5408\u308f\u305b\u3057\u306a\u3044\u3088\u3046\u306b\u3001\u4ee5\u4e0b\u306e\u8a2d\u5b9a\u3092\u6709\u52b9\u306b\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n# Never forward addresses in the non-routed address spaces.\r\nbogus-priv\r\n<\/pre>\n<p>\u5b85\u5185\u306e\u30c9\u30e1\u30a4\u30f3\u306e\u554f\u3044\u5408\u308f\u305b\u3092\u3001\u4e0a\u4f4d\u306eDNS\u30b5\u30fc\u30d0\u306b\u554f\u3044\u5408\u308f\u305b\u3057\u306a\u3044\u3088\u3046\u306b\u3001\u4ee5\u4e0b\u306e\u8a2d\u5b9a\u3092\u884c\u3044\u307e\u3059\u3002\u4ee5\u4e0b\u306f\u3001\u30ed\u30fc\u30ab\u30eb\u306e\u30c9\u30e1\u30a4\u30f3\u304c\u300clab4ict.local\u300d\u306e\u4f8b\u3067\u3059\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n# Add local-only domains here, queries in these domains are answered\r\n# from \/etc\/hosts or DHCP only.\r\nlocal=\/lab4ict.local\/\r\n<\/pre>\n<p>\u8a2d\u5b9a\u304c\u7d42\u308f\u3063\u305f\u3089\u3001Dnsmasq\u3092\u518d\u8d77\u52d5\u3057\u3066\u3001\u540d\u524d\u89e3\u6c7a\u306e\u30c6\u30b9\u30c8\u3092\u884c\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nsystemctl restart dnsmasq\r\n<\/pre>\n<h2>\u540d\u524d\u89e3\u6c7a\u306e\u8a2d\u5b9a\u3092\u884c\u3046\uff01<\/h2>\n<p>Dnsmasq\u3067\u306f\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u8a2d\u5b9a\u3067\u3001\u540d\u524d\u89e3\u6c7a\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3068\u3057\u3066\u300c\/etc\/hosts\u300d\u3092\u53c2\u7167\u3057\u307e\u3059\u3002\u540d\u524d\u89e3\u6c7a\u306e\u60c5\u5831\u306f\u3001\u300c\/etc\/hosts\u300d\u306b\u8ffd\u52a0\u3057\u3066\u3044\u304d\u307e\u3059\u3002\u300c\/etc\/hosts\u300d\u306b\u60c5\u5831\u3092\u8ffd\u52a0\u3057\u305f\u3089\u3001Dnsmasq\u3092\u518d\u8d77\u52d5\u3057\u307e\u3059\u3002<\/p>\n<h2>\u304a\u308f\u308a\u306b<\/h2>\n<p>\u5b85\u5185\u7528\u306eDNS\u30b5\u30fc\u30d0\u306b\u306f\u3001\u7701\u96fb\u529b\u306e\u30b5\u30fc\u30d0\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u304c\u671b\u307e\u3057\u3044\u3067\u3059\u3002\u7701\u96fb\u529b\u306eRaspberry Pi\u3067\u7c21\u5358\u306bDNS\u30b5\u30fc\u30d0\u3092\u69cb\u7bc9\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5b85\u5185\u7528\u306b\u72ec\u81ea\u306e\u30c9\u30e1\u30a4\u30f3\u3092\u7acb\u3066\u308b\u305f\u3081DNS\u30b5\u30fc\u30d0\u3092\u69cb\u7bc9\u3057\u307e\u3059\u3002DNS\u30b5\u30fc\u30d0\u306f\u3001\u5e38\u6642\u8d77\u52d5\u304c\u671b\u307e\u3057\u3044\u305f\u3081\u3001\u7701\u96fb\u529b\u306eRasberry Pi\u3092\u6d3b\u7528\u3057\u307e\u3059\u3002<\/p>\n","protected":false},"author":1,"featured_media":4710,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[135],"tags":[],"class_list":["post-6229","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-raspberry-pi"],"_links":{"self":[{"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/posts\/6229","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/comments?post=6229"}],"version-history":[{"count":1,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/posts\/6229\/revisions"}],"predecessor-version":[{"id":15975,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/posts\/6229\/revisions\/15975"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/media\/4710"}],"wp:attachment":[{"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/media?parent=6229"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/categories?post=6229"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/tags?post=6229"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}