{"id":824,"date":"2025-11-12T11:17:59","date_gmt":"2025-11-12T02:17:59","guid":{"rendered":"https:\/\/clouds.ddo.jp\/wordpress\/?p=824"},"modified":"2025-11-12T16:35:16","modified_gmt":"2025-11-12T07:35:16","slug":"raspberry-pi%e3%81%ae%e3%83%ab%e3%83%bc%e3%82%bf%e3%83%bc%e5%8c%96","status":"publish","type":"post","link":"https:\/\/clouds.ddo.jp\/wordpress\/?p=824","title":{"rendered":"RaspBerry PI\u306e\u30eb\u30fc\u30bf\u30fc\u5316"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u306e\u8ca0\u8377\u5206\u6563\u306e\u305f\u3081\u306b\u30de\u30eb\u30c1\u30bb\u30c3\u30b7\u30e7\u30f3\u5316\u3057\u305f\u304c\u3001\u5149\u30e2\u30c7\u30e0\u3067\u8a2d\u5b9a\u3067\u304d\u308b\u7aef\u672b\u306f\uff14\u53f0\u307e\u3067\u306a\u306e\u3067\u4f7f\u3044\u304c\u3063\u3066\u304c\u60aa\u3044\u3002\u305d\u3053\u3067\u30d6\u30ed\u30fc\u30c9\u30d0\u30f3\u30c9\u30eb\u30fc\u30bf\u30fc\u3092\uff13\u53f0\u8a2d\u7f6e\u3057\u305d\u308c\u305e\u308c\u30bb\u30c3\u30b7\u30e7\u30f3\uff12\uff0c\uff13\uff0c\uff14\u306b\u5272\u308a\u5f53\u3066\u305f\u3002\u30d6\u30ed\u30fc\u30c9\u30d0\u30f3\u30c9\u30eb\u30fc\u30bf\u30fc\u306f\u305d\u308c\u305e\u308c\u7121\u7ddaLAN\u304c\u8a2d\u5b9a\u3057\u3066\u3042\u308b\u306e\u3067\u3001\u63a5\u7d9a\u5148\u3092\u5909\u3048\u308b\u3053\u3068\u3067\u4f7f\u7528\u3059\u308b\u30bb\u30c3\u30b7\u30e7\u30f3\u3092\u5207\u308a\u66ff\u3048\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3002\u4eca\u307e\u3067\u306f\u30d6\u30ed\u30fc\u30c9\u30d0\u30f3\u30c9\u30eb\u30fc\u30bf\u30fc\u306e\u8a2d\u5b9a\u5909\u66f4\u306f\u30e1\u30a4\u30f3\u306e\u30c7\u30b9\u30af\u30c8\u30c3\u30d7\u306e\u7121\u7ddaLAN\u3067\u30d6\u30ed\u30fc\u30c9\u30d0\u30f3\u30c9\u30eb\u30fc\u30bf\u30fc\u306b\u63a5\u7d9a\u3057\u3066\u884c\u3063\u3066\u3044\u305f\u304c\u9762\u5012\u306a\u306e\u3067Raspberry Pi\u3092\u30eb\u30fc\u30bf\u30fc\u3068\u3057\u3066\u5e38\u8a2d\u3059\u308b\u3053\u3068\u306b\u3057\u305f\u3002\u30e1\u30a4\u30f3\u306eLAN\u306b\u6709\u7dda\u63a5\u7d9a\u3057\u3001VNC Viewer\u3067\u7121\u7dda\u6a5f\u80fd\u3092ON\u3057\u30d6\u30ed\u30fc\u30c9\u30d0\u30f3\u30c9\u30eb\u30bf\u30fc\u306b\u63a5\u7d9a\u3057\u6709\u7dda\u30dd\u30fc\u30c8\u3068\u7121\u7dda\u30dd\u30fc\u30c8\u9593\u306e\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u3092\u884c\u3046\u3088\u3046\u306b\u3057\u305f\u3002<br>\u203b\u7121\u7ddaLAN\u63a5\u7d9a\u6642IP\u30a2\u30c9\u30ec\u30b9\u4ee5\u5916\u306f\u7a7a\u6b04\u3067\u63a5\u7d9a\u3057\u305f\u3002\u5f8c\u306f\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3067Raspi\u3092\u30eb\u30fc\u30bf\u30fc\u5316\u3057\u305f\u3002<br>route add -p \u30d6\u30ed\u30fc\u30c9\u30d0\u30f3\u30c9\u30eb\u30fc\u30bf\u30fc\u306eIP mask 255.255.255.0 Raspi\u306eIP\u3067\u30eb\u30fc\u30c8\u8a2d\u5b9a\u3057\u305f\u3002<br>\u304a\u304b\u3052\u3067\u30d6\u30eb\u30fc\u30c9\u30d0\u30f3\u30c9\u30eb\u30fc\u30bf\u30fc\u304c\uff11\u53f0\u7bc0\u7d04\u3067\u304d\u305f\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u30eb\u30fc\u30bf\u30fc\u3068\u3057\u3066\u306e\u8a2d\u5b9a\u3092\u4fdd\u5b58\u3059\u308b\u30b3\u30de\u30f3\u30c9\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<br>$ sudo apt-get install iptables-persistent<br>\u30d1\u30c3\u30b1\u30c3\u30c8\u306e\u30d5\u30a9\u30ef\u30fc\u30c9\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u8a2d\u5b9a<br>$ echo &#8220;net.ipv4.ip_forward = 1&#8221; | sudo tee -a \/etc\/sysctl.conf<br>$ sudo sysctl -p<br>net.ipv4.ip_forward = 1<br>\u30eb\u30fc\u30bf\u30fc\u3068\u3057\u3066\u52d5\u4f5c\u3059\u308b\u3088\u3046\u306b iptables \u3092\u8a2d\u5b9a<br>NAPT(IP\u30de\u30b9\u30ab\u30ec\u30fc\u30c9)\u306e\u8a2d\u5b9a<br>sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE<br>\u3059\u3079\u3066\u306e\u30d5\u30a9\u30ef\u30fc\u30c9\u3092\u8a31\u53ef<br>sudo iptables -A FORWARD -i eth0 -o wlan0 -j ACCEPT<br>sudo iptables -A FORWARD -i wlan0 -o eth0 -j ACCEPT<br>\u8a2d\u5b9a\u3092\u6c38\u7d9a\u5316\u3059\u308b<br>$ sudo sh -c &#8216;iptables-save &gt; \/etc\/iptables\/rules.v4&#8217;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4ee5\u524d\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u5236\u9650\u3092\u8d85\u3048\u305f\u3053\u3068\u3067\u901a\u4fe1\u901f\u5ea6\u5236\u9650\u3055\u308c\u305f\u904e\u53bb\u304c\u3042\u308b\u306e\u3067\u3001\u901f\u5ea6\u5236\u9650\u3055\u308c\u305f\u5834\u5408\u306b\u5099\u3048\u3066\u30de\u30eb\u30c1\u30bb\u30c3\u30b7\u30e7\u30f3\u5316\u3092\u884c\u3063\u305f\u3002\u30de\u30eb\u30c1\u30bb\u30c3\u30b7\u30e7\u30f3\u5316\u3057\u305f\u3053\u3068\u30674\u53f0\u306eWeb\u30b5\u30fc\u30d0\u30fc\u3092\u904b\u7528\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u3063\u305f\u3002<br>\u4e0b\u56f3\u306f\u8a2d\u7f6e\u30a4\u30e1\u30fc\u30b8<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"541\" height=\"478\" src=\"https:\/\/clouds.ddo.jp\/wordpress\/wp-content\/uploads\/2025\/11\/04b61760c6446f1e2695a7d7752295fd.jpg\" alt=\"\" class=\"wp-image-828\" srcset=\"https:\/\/clouds.ddo.jp\/wordpress\/wp-content\/uploads\/2025\/11\/04b61760c6446f1e2695a7d7752295fd.jpg 541w, https:\/\/clouds.ddo.jp\/wordpress\/wp-content\/uploads\/2025\/11\/04b61760c6446f1e2695a7d7752295fd-300x265.jpg 300w\" sizes=\"auto, (max-width: 541px) 100vw, 541px\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u306e\u8ca0\u8377\u5206\u6563\u306e\u305f\u3081\u306b\u30de\u30eb\u30c1\u30bb\u30c3\u30b7\u30e7\u30f3\u5316\u3057\u305f\u304c\u3001\u5149\u30e2\u30c7\u30e0\u3067\u8a2d\u5b9a\u3067\u304d\u308b\u7aef\u672b\u306f\uff14\u53f0\u307e\u3067\u306a\u306e\u3067\u4f7f\u3044\u304c\u3063\u3066\u304c\u60aa\u3044\u3002\u305d\u3053\u3067\u30d6\u30ed\u30fc\u30c9\u30d0\u30f3\u30c9\u30eb\u30fc\u30bf\u30fc\u3092\uff13\u53f0\u8a2d\u7f6e\u3057\u305d\u308c\u305e\u308c\u30bb\u30c3\u30b7\u30e7\u30f3\uff12\uff0c\uff13\uff0c\uff14\u306b\u5272\u308a\u5f53\u3066\u305f\u3002\u30d6\u30ed\u30fc\u30c9\u30d0\u30f3\u30c9\u30eb\u30fc\u30bf\u30fc &#8230;<\/p>\n<p><a href=\"https:\/\/clouds.ddo.jp\/wordpress\/?p=824\" class=\"more-link\">Continue reading &lsquo;RaspBerry PI\u306e\u30eb\u30fc\u30bf\u30fc\u5316&rsquo; &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-824","post","type-post","status-publish","format-standard","hentry","category-2"],"_links":{"self":[{"href":"https:\/\/clouds.ddo.jp\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/824","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/clouds.ddo.jp\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/clouds.ddo.jp\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/clouds.ddo.jp\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/clouds.ddo.jp\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=824"}],"version-history":[{"count":3,"href":"https:\/\/clouds.ddo.jp\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/824\/revisions"}],"predecessor-version":[{"id":829,"href":"https:\/\/clouds.ddo.jp\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/824\/revisions\/829"}],"wp:attachment":[{"href":"https:\/\/clouds.ddo.jp\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=824"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/clouds.ddo.jp\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=824"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/clouds.ddo.jp\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=824"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}