{"id":14,"date":"2008-02-15T09:17:24","date_gmt":"2008-02-15T00:17:24","guid":{"rendered":"https:\/\/hiro7216.mydns.jp\/blog\/?p=14"},"modified":"2024-01-30T23:40:47","modified_gmt":"2024-01-30T14:40:47","slug":"dns%e3%82%b5%e3%83%bc%e3%83%90%e3%83%bc%e9%9d%9e%e6%90%ad%e8%bc%89%e3%81%ab%e3%81%99%e3%82%8b","status":"publish","type":"post","link":"https:\/\/hiro7216.mydns.jp\/blog\/?p=14","title":{"rendered":"DNS\u30b5\u30fc\u30d0\u30fc\u975e\u642d\u8f09\u306b\u3059\u308b"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">DNS\u30b5\u30fc\u30d0\u30fc\u306e\u691c\u8a0e\u3092\u3057\u307e\u3057\u305f\u3002<br>BIND\u3084pdnsd\u306a\u3069\u3092\u691c\u8a0e\u3057\u3066\u307f\u307e\u3057\u305f\u304c\u79c1\u306e\u74b0\u5883\u3067\u306f\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306eWAN\u6700\u7d42\u53e3\u306b\u306fCTU\u3068\u3044\u3046\u540d\u306e\u30eb\u30fc\u30bf\u30fc\u304c\u5b58\u5728\u3057\u307e\u3059\u3002<br>\u306a\u306e\u3067\u76f4\u63a5\u305d\u3053\u3092\u898b\u308c\u3070\u6e08\u3080\u308f\u3051\u3067\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u5fc5\u8981\u6027\u3082\u4f59\u308a\u611f\u3058\u306a\u304b\u3063\u305f\u306e\u3067\u63a1\u7528\u3092\u3084\u3081\u307e\u3057\u305f\u3002<br>\u78ba\u304b\u306b\u30ed\u30fc\u30ab\u30eb\u5185\u306ePC\u3092\u7c21\u5358\u306bDNS\u3067\u5f15\u3051\u308bpdnsd\u306f\u5165\u308c\u3088\u3046\u3068\u601d\u3044\u307e\u3057\u305f\u304c<br>\u91cd\u8981\u306aPC\u7b49\u306f\u3069\u308c\u3082\u56fa\u5b9aIP\u3067IP\u3082\u899a\u3048\u3061\u3083\u3063\u3066\u308b\u306e\u3067\u5c0e\u5165\u3092\u898b\u9001\u308a\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u305f\u3060\u30eb\u30fc\u30bf\u5316\u3057\u305fLinux\u6a5f\u306b\u7e4b\u3050\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306e\u8a2d\u5b9a\u306f<br>gateway=192.168.0.1\uff08IP\u306f\u30b5\u30f3\u30d7\u30eb\u3067\u3059\u3001\u81ea\u5206\u306e\u74b0\u5883\u306b\u5408\u308f\u305b\u307e\u3057\u3087\u3046\uff09<br>DNS=192.168.24.1<br>\u3068gateway\u3068DNS\u306e\u8a2d\u5b9a\u304c\u5909\u308f\u308b\u306e\u3067\u3053\u308c\u3060\u3051\u7d71\u4e00\u8a2d\u5b9a\u51fa\u6765\u308b\u65b9\u5411\u3067\u8a2d\u5b9a\u3057\u307e\u3057\u305f\u3002<br>\u3053\u306e\u8a2d\u5b9a\u306fDHCP\u3060\u3068\u3069\u3046\u3067\u3082\u3044\u3044\u3067\u3059\u3057gateway\u3068DNS\u306eIP\u304c\u9055\u3046\u3060\u3051\u3067\u672c\u6765\u306f\u8a2d\u5b9a\u306e\u5fc5\u8981\u6027\u306f\u5168\u304f\u3042\u308a\u307e\u305b\u3093\uff08\u7b11\uff09<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4f5c\u6210\u6e08\u307f\u306eiptables\u306e\u30b7\u30a7\u30eb\u30b9\u30af\u30ea\u30d7\u30c8ip-masq\u306b\u4ee5\u4e0b\u306e\u6587\u3092\u8ffd\u52a0\u3059\u308b\u3060\u3051\u3067\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"># DNS\u554f\u3044\u5408\u308f\u305b\u3092router(192.168.24.1)\u306b\u9759\u7684\u5909\u63db\u3059\u308b<br>echo &#8220;setting SNAT: udp,tcp port 53 in eth0 &gt; routing 192.168.24.1&#8221;<br>iptables -t nat -A PREROUTING -i eth0 -p tcp &#8211;dport 53 -j DNAT &#8211;to-destination 192.168.24.1<br>iptables -t nat -A PREROUTING -i eth0 -p udp &#8211;dport 53 -j DNAT &#8211;to-destination 192.168.24.1<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u3053\u308c\u3067\u300cgateway\u306eIP=DNS\u306eIP\u300d\u306b\u306a\u3063\u3066\u6c17\u5206\u7684\u306b\u30b9\u30c3\u30ad\u30ea\u3057\u307e\u3057\u305f\uff08\u7b11\uff09<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u203beth0\u3068\u3044\u3046\u8a2d\u5b9a\u3082\u30b5\u30f3\u30d7\u30eb\u3067\u3059\u3002\u74b0\u5883\u306b\u3088\u3063\u3066\u9055\u3044\u307e\u3059\u306e\u3067WAN\u5074\u3067\u306a\u304fLAN\u5074\u306e\u30a2\u30c0\u30d7\u30bf\u30fc\u540d\u3092\u30bb\u30c3\u30c8\u3057\u3066\u4e0b\u3055\u3044\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>DNS\u30b5\u30fc\u30d0\u30fc\u306e\u691c\u8a0e\u3092\u3057\u307e\u3057\u305f\u3002BIND\u3084pdnsd\u306a\u3069\u3092\u691c\u8a0e\u3057\u3066\u307f\u307e\u3057\u305f\u304c\u79c1\u306e\u74b0\u5883\u3067\u306f\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306eWAN\u6700\u7d42\u53e3\u306b\u306fCTU\u3068\u3044\u3046\u540d\u306e\u30eb\u30fc\u30bf\u30fc\u304c\u5b58\u5728\u3057\u307e\u3059\u3002\u306a\u306e\u3067\u76f4\u63a5\u305d\u3053\u3092\u898b\u308c\u3070\u6e08\u3080\u308f\u3051\u3067\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u5fc5\u8981\u6027\u3082\u4f59\u308a\u611f\u3058\u306a\u304b &hellip; <a href=\"https:\/\/hiro7216.mydns.jp\/blog\/?p=14\" class=\"more-link\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"screen-reader-text\">DNS\u30b5\u30fc\u30d0\u30fc\u975e\u642d\u8f09\u306b\u3059\u308b<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,287],"tags":[166],"class_list":["post-14","post","type-post","status-publish","format-standard","hentry","category-linkstation","category-nas","tag-linkstation"],"_links":{"self":[{"href":"https:\/\/hiro7216.mydns.jp\/blog\/index.php?rest_route=\/wp\/v2\/posts\/14","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hiro7216.mydns.jp\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hiro7216.mydns.jp\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hiro7216.mydns.jp\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hiro7216.mydns.jp\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=14"}],"version-history":[{"count":0,"href":"https:\/\/hiro7216.mydns.jp\/blog\/index.php?rest_route=\/wp\/v2\/posts\/14\/revisions"}],"wp:attachment":[{"href":"https:\/\/hiro7216.mydns.jp\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=14"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hiro7216.mydns.jp\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=14"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hiro7216.mydns.jp\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=14"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}