{"id":747,"date":"2024-01-14T12:38:39","date_gmt":"2024-01-14T03:38:39","guid":{"rendered":"https:\/\/intinfinity.com\/?p=747"},"modified":"2024-01-14T12:38:39","modified_gmt":"2024-01-14T03:38:39","slug":"openwrt-23-05-%e3%81%a7-nat64-dns64-with-a-filter-%e3%82%92%e5%ae%9f%e7%8f%be%e3%81%99%e3%82%8b","status":"publish","type":"post","link":"https:\/\/intinfinity.com\/index.php\/archives\/747","title":{"rendered":"OpenWRT 23.05 \u3067 NAT64 + DNS64 with A Filter \u3092\u5b9f\u73fe\u3059\u308b"},"content":{"rendered":"<h2>\u524d\u66f8\u304d<\/h2>\n<h3>DNS64<\/h3>\n<p>OpenWRT23.05\u306b\u306a\u308a\u3001dnsmasq2.89\u304c\u63a1\u7528\u3055\u308c\u3066\u3044\u308b\u3002<br \/>\ndnsmasq2.87\u4ee5\u4e0a\u3067\u3001A Filter\u304c\u5229\u7528\u3067\u304d\u308b\u3002<\/p>\n<p>\u4eca\u56de\u3001Unbound\u3068Dnsmasq\u3092\u7d44\u307f\u5408\u308f\u305b\u3066\u3001DNS64 with A Filter\u3092\u5b9f\u73fe\u3059\u308b\u3002<\/p>\n<h3>NAT64<\/h3>\n<p>IPv4\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u3078\u306e\u758e\u901a\u306b\u306f\u3001PPPoE\u3092\u4f7f\u7528\u3059\u308b\u3002<br \/>\n\u4ee5\u524d\u306f\u3001MAP-E(IPv4 over IPv6)\u3092\u4f7f\u7528\u3057\u3066\u3044\u305f\u3002<\/p>\n<p>\u5f0a\u5b85\u3067\u306f\u3001MAP-E\u306e\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u3092HGW\u304c\u62c5\u3063\u3066\u304a\u308a\u3001IP\u30de\u30b9\u30ab\u30ec\u30fc\u30c9\u6700\u59274096\u30bb\u30c3\u30b7\u30e7\u30f3\u3067\u3042\u308b\u3002<br \/>\n\u3053\u306e\u30bb\u30c3\u30b7\u30e7\u30f3\u6570\u3092\u307b\u304b\u306e\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u3068\u5171\u6709\u3057\u3066\u304a\u308a\u3001\u30bb\u30c3\u30b7\u30e7\u30f3\u306e\u67af\u6e07\u304c\u4ee5\u524d\u304b\u3089\u554f\u984c\u306b\u306a\u3063\u3066\u3044\u305f\u3002<\/p>\n<p><a href=\"\u2190\u8981\u30ea\u30f3\u30af\">[\u30c1\u30e5\u30fc\u30cb\u30f3\u30b0]<\/a>\u306b\u3088\u308a\u56de\u907f\u306f\u3057\u3066\u304d\u305f\u304c\u3001OpenWRT\u306e\u81a8\u5927\u306a\u30bb\u30c3\u30b7\u30e7\u30f3\u6570\u306f\u3001\u3053\u308c\u3092\u6839\u672c\u7684\u306b\u89e3\u6c7a\u3067\u304d\u308b\u3002<\/p>\n<p>\u4ee5\u524d\u3001NGN\u7db2\u306e\u7db2\u7d42\u7aef\u88c5\u7f6e\u306e\u6df7\u96d1\u306b\u3088\u308a\u3001\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u901a\u4fe1\u306e\u901f\u5ea6\u304c\u4f4e\u4e0b\u3059\u308b\u554f\u984c\u304c\u3042\u308aMAP-E\u306b\u79fb\u884c\u3057\u305f\u306e\u3060\u304c\u3001\u6628\u4eca\u306f\u3053\u306e\u79fb\u884c\u304c\u9032\u307fPPPoE\u306e\u7db2\u7d42\u7aef\u88c5\u7f6e\u304c\u7a7a\u3044\u3066\u304d\u305f\u306e\u3067\u3042\u308d\u3046\u3002<br \/>\n\u901a\u4fe1\u901f\u5ea6\u304c\u5341\u5206\u306b\u51fa\u308b\u3088\u3046\u306b\u306a\u3063\u3066\u304a\u308a\u3001\u5b9f\u7528\u306b\u8010\u3048\u308b\u3068\u5224\u65ad\u3057\u3001\u4eca\u56de\u306f\u3053\u3061\u3089\u3092\u63a1\u7528\u3059\u308b\u3053\u3068\u3068\u3057\u305f\u3002<\/p>\n<h4>\u30e1\u30ea\u30c3\u30c8<\/h4>\n<ul>\n<li>NAT64\u3092\u4f7f\u7528\u3059\u308b\u7d4c\u8def\u306eNAT\u56de\u6570\u3092\u6e1b\u3089\u305b\u308b\n<ul>\n<li>\u5f93\u6765\u306fOpenWRT\u306b\u3088\u308bNAT64\u3068HGW\u306b\u3088\u308bNAT44\u30672\u56de\u5b9f\u65bd\u3057\u3066\u3044\u305f<\/li>\n<li>NAT64\u3092\u4f7f\u7528\u3057\u306a\u3044\u7d4c\u8def\u306b\u3064\u3044\u3066\u306f\u3001OpenWRT\u3067Forward\u3001HGW\u3067\u9759\u7684\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u3092\u884c\u3046\u3053\u3068\u3067\u3001HGW\u306eNAT44\u306e\u307f\u3060\u3063\u305f<\/li>\n<\/ul>\n<\/li>\n<li>\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u304c\u7c21\u7d20\u5316\u3059\u308b\n<ul>\n<li>\u5916\u304b\u3089\u306e\u901a\u4fe1\u3092\u53d7\u3051\u5165\u308c\u308b\u5834\u5408\u3001\u5f93\u6765\u306fPPPoE\u3082\u4f75\u7528\u3057\u3066\u304a\u308a\u3001\u6b63\u3057\u3044I\/F\u304b\u3089\u901a\u4fe1\u3092\u8fd4\u3059\u3088\u3046\u306b\u3059\u308b\u5fc5\u8981\u304c\u3042\u3063\u305f<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h4>\u30c7\u30e1\u30ea\u30c3\u30c8<\/h4>\n<ul>\n<li>NGN\u306b\u304a\u3051\u308bPPPoE\u306eMTU\u304c1454\u3068\u4f4e\u304f\u3001\u7279\u306b\u5927\u304d\u306a\u5bb9\u91cf\u306e\u901a\u4fe1\u3092\u3059\u308b\u5834\u5408\u306b\u3001\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u6a5f\u5668\u3078\u306e\u8ca0\u8377\u304c\u5897\u3048\u308b\n<ul>\n<li>\u30d1\u30b1\u30c3\u30c8\u5f53\u305f\u308a\u306e\u5bb9\u91cf\u306e\u4f4e\u4e0b\u306b\u3088\u308a\u3001\u30d1\u30b1\u30c3\u30c8\u6570\u304c\u5897\u3048\u308b\u3053\u3068\u306b\u8d77\u56e0<\/li>\n<\/ul>\n<\/li>\n<li>NAT64\u306b\u4f7f\u3046jool\u3067\u306f\u3001\u4e00\u90e8\u306e\u30db\u30b9\u30c8\u3068\u306e\u758e\u901a\u6027\u304c\u60aa\u5316\u3059\u308b\n<ul>\n<li>Path MTU Discovery \u304c\u5229\u7528\u3067\u304d\u306a\u3044\u30db\u30b9\u30c8\u3068\u63a8\u6e2c<\/li>\n<li>OpenWRT\u306e\u300cMSS clamping\u300d\u304c\u6a5f\u80fd\u3057\u306a\u3044<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>MTU\u306e\u554f\u984c\u306b\u3064\u3044\u3066\u306f\u30c1\u30e5\u30fc\u30cb\u30f3\u30b0\u306b\u3088\u308a\u6539\u5584\u3067\u304d\u305f\u3002\u624b\u9806\u306e\u4e2d\u306b\u542b\u3081\u3066\u7d39\u4ecb\u3059\u308b\u3002<\/p>\n<h2>\u624b\u9806<\/h2>\n<h2>Firewall<\/h2>\n<p>\u30d5\u30a1\u30a4\u30a2\u30fc\u30a6\u30a9\u30fc\u30eb\u3092\u7528\u3044\u3066MSS\u3092\u66f8\u304d\u63db\u3048\u308b\u8a2d\u5b9a\u3002\u3053\u308c\u304c\u4eca\u56de\u306e\u30ad\u30e2\u3002<\/p>\n<p>\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u308b\u3002pppoe\u306e\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30a4\u30b9\u540d\u306f\u7570\u306a\u308b\u5834\u5408\u304c\u3042\u308b\u306e\u3067\u3001\u5fc5\u8981\u306a\u3089\u3070\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u308b\u3082\u306e\u306b\u5909\u66f4\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre><code>vi \/root\/nat64_pppoe-wan4.nft<\/code><\/pre>\n<pre><code>oifname &quot;pppoe-wan&quot; meta nfproto ipv4 meta l4proto tcp tcp flags syn tcp option maxseg size set rt mtu<\/code><\/pre>\n<p>\u4f5c\u3063\u305f\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u8aad\u307e\u305b\u308b\u8a2d\u5b9a\u3092\u8a18\u8ff0\u3002<\/p>\n<pre><code>vi \/etc\/config\/firewall<\/code><\/pre>\n<pre><code>config include\n        option type &#039;nftables&#039;\n        option path &#039;\/root\/nat64_pppoe-wan4.nft&#039;\n        option position &#039;chain-post&#039;\n        option chain &#039;mangle_postrouting&#039;<\/code><\/pre>\n<p>\u8a2d\u5b9a\u3092\u9069\u7528\u3059\u308b\u3002<\/p>\n<pre><code>\/etc\/init.d\/firewall restart<\/code><\/pre>\n<h2>NAT64<\/h2>\n<p>\u5fc5\u8981\u306a\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3002<\/p>\n<pre><code>opkg update\nopkg install jool-tools-netfilter<\/code><\/pre>\n<p>\u30b5\u30fc\u30d3\u30b9\u306e\u505c\u6b62\u3068\u6a19\u6e96\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u306e\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u3002<\/p>\n<pre><code>service jool stop\nmv \/etc\/jool\/jool-nat64.conf.json \/etc\/jool\/jool-nat64.conf.json.bk<\/code><\/pre>\n<p>\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u65b0\u305f\u306b\u4f5c\u6210\u3002<\/p>\n<pre><code>vi \/etc\/jool\/jool-nat64.conf.json<\/code><\/pre>\n<pre><code>{\n    &quot;instance&quot;: &quot;nat64-minimal&quot;,\n    &quot;framework&quot;: &quot;netfilter&quot;,\n\n    &quot;global&quot;: {\n        &quot;pool6&quot;: &quot;64:ff9b::\/96&quot;\n    }\n}<\/code><\/pre>\n<pre><code>vi \/etc\/config\/jool<\/code><\/pre>\n<pre><code>config jool &#039;general&#039;\n        option enabled &#039;1&#039;\n\nconfig jool &#039;nat64&#039;\n        option enabled &#039;1&#039;\n\nconfig jool &#039;siit&#039;\n        option enabled &#039;0&#039;<\/code><\/pre>\n<p>\u30b5\u30fc\u30d3\u30b9\u3092\u958b\u59cb\u3002<\/p>\n<pre><code>service jool start<\/code><\/pre>\n<h2>DNS64<\/h2>\n<p>\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3002<\/p>\n<pre><code>opkg install luci-app-unbound<\/code><\/pre>\n<p>unbound\u306eDNS64\u3092\u8a2d\u5b9a<\/p>\n<pre><code>uci set unbound.@unbound[0].dns64=&#039;1&#039;\nuci set unbound.@unbound[0].listen_port=&#039;5353&#039;\nuci commit unbound<\/code><\/pre>\n<p>WebUI\u3092\u958b\u3044\u3066\u3001\u6b21\u306e\u3088\u3046\u306b\u8a2d\u5b9a\u3002<br \/>\nCLI\u304b\u3089\u8a2d\u5b9a\u3059\u308b\u65b9\u6cd5\u3082\u3042\u308b\u304b\u3068\u601d\u3044\u307e\u3059\u304c\u3001\u9762\u5012\u306a\u306e\u3067WebUI\u306b\u9003\u3052\u308b<\/p>\n<p>Services \u2192 Recursive DNS \u2192 Unbound \u2192 Basic<\/p>\n<pre><code>Enable DNSSEC \u30c1\u30a7\u30c3\u30af<\/code><\/pre>\n<p>Services \u2192 Recursive DNS \u2192 Zones<\/p>\n<p>\u6a19\u6e96\u8a2d\u5b9a\u3092\u5168\u90e8\u6d88\u3057\u3066\u3001\u6b21\u306e\u3088\u3046\u306b\u8a2d\u5b9a\u3002<\/p>\n<pre><code>Zone Type: Forward\nZone names: flets-west.jp., flets-east.jp.\nServers: 2400:4153:e1c2:ef00:1eb1:7fff:fe12:b3c<\/code><\/pre>\n<pre><code>Zone Type: Forward\nZone Names: .\nServers: &lt;\u5404\u81ea\u304a\u597d\u307f\u306eDNS\u30d5\u30eb\u30b5\u30fc\u30d3\u30b9\u30ea\u30be\u30eb\u30d0\u3092\u6307\u5b9a&gt;\nDNS over TLS: \u30c1\u30a7\u30c3\u30af\nTLS Name Index: &lt;DNS\u30d5\u30eb\u30b5\u30fc\u30d3\u30b9\u30ea\u30be\u30eb\u30d0\u306e\u30c9\u30e1\u30a4\u30f3\u3092\u6307\u5b9a&gt;<\/code><\/pre>\n<p>Network \u2192 DNS and DHCP \u2192 General Settings<\/p>\n<pre><code>DNS forwardings ::1#5353<\/code><\/pre>\n<p>Network \u2192 DNS and DHCP \u2192 Advanced Settings<\/p>\n<pre><code>Filter IPv4 A records \u30c1\u30a7\u30c3\u30af<\/code><\/pre>\n<p>Network \u2192 Interfaces \u2192 wan6 [Edit] \u2192 Advanced Settings<\/p>\n<pre><code>Use DNS servers advertised by peer \u30c1\u30a7\u30c3\u30af\u7121\u3057<\/code><\/pre>\n<p>Save &amp; Apply \u3092\u3057\u3066\u8a2d\u5b9a\u4fdd\u5b58\u3057\u305f\u5f8c\u3001\u30b5\u30fc\u30d3\u30b9\u3092\u518d\u8d77\u52d5<\/p>\n<pre><code>service dnsmasq restart\nservice unbound restart<\/code><\/pre>\n<h2>\u53c2\u8003\u8cc7\u6599<\/h2>\n<p><a href=\"https:\/\/github.com\/openwrt\/openwrt\/pull\/11190\">https:\/\/github.com\/openwrt\/openwrt\/pull\/11190<\/a><br \/>\n<a href=\"https:\/\/openwrt.org\/releases\/23.05\/notes-23.05.0\">https:\/\/openwrt.org\/releases\/23.05\/notes-23.05.0<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u524d\u66f8\u304d DNS64 OpenWRT23.05\u306b\u306a\u308a\u3001dnsmasq2.89\u304c\u63a1\u7528\u3055\u308c\u3066\u3044\u308b\u3002 dnsmasq2.87\u4ee5\u4e0a\u3067\u3001A Filter\u304c\u5229\u7528\u3067\u304d\u308b\u3002 \u4eca\u56de\u3001Unbound\u3068Dnsmasq\u3092\u7d44\u307f\u5408\u308f\u305b\u3066\u3001DNS64  [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[],"class_list":["post-747","post","type-post","status-publish","format-standard","hentry","category-network"],"_links":{"self":[{"href":"https:\/\/intinfinity.com\/index.php\/wp-json\/wp\/v2\/posts\/747","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/intinfinity.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/intinfinity.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/intinfinity.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/intinfinity.com\/index.php\/wp-json\/wp\/v2\/comments?post=747"}],"version-history":[{"count":3,"href":"https:\/\/intinfinity.com\/index.php\/wp-json\/wp\/v2\/posts\/747\/revisions"}],"predecessor-version":[{"id":824,"href":"https:\/\/intinfinity.com\/index.php\/wp-json\/wp\/v2\/posts\/747\/revisions\/824"}],"wp:attachment":[{"href":"https:\/\/intinfinity.com\/index.php\/wp-json\/wp\/v2\/media?parent=747"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/intinfinity.com\/index.php\/wp-json\/wp\/v2\/categories?post=747"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/intinfinity.com\/index.php\/wp-json\/wp\/v2\/tags?post=747"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}