{"id":19608,"date":"2018-07-16T09:00:41","date_gmt":"2018-07-16T00:00:41","guid":{"rendered":"https:\/\/www.sssg.org\/blogs\/hiro345\/?p=19608"},"modified":"2018-07-16T09:13:11","modified_gmt":"2018-07-16T00:13:11","slug":"lan%e3%81%ae%e3%83%9e%e3%82%b7%e3%83%b3%e7%94%a8%e3%81%ablets-encrypt%e3%81%ae%e3%82%b5%e3%83%bc%e3%83%90%e3%83%bc%e8%a8%bc%e6%98%8e%e6%9b%b8%e3%82%92%e5%8f%96%e5%be%97%e3%81%99%e3%82%8b%e6%96%b9","status":"publish","type":"post","link":"https:\/\/www.hiro345.net\/blogs\/hiro345\/archives\/19608.html","title":{"rendered":"LAN\u306e\u30de\u30b7\u30f3\u7528\u306bLet&#8217;s encrypt\u306e\u30b5\u30fc\u30d0\u30fc\u8a3c\u660e\u66f8\u3092\u53d6\u5f97\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u8003\u3048\u3066\u307f\u305f"},"content":{"rendered":"<p>\u304b\u306a\u308a\u30ec\u30a2\u30b1\u30fc\u30b9\u3067\u3059\u304c\u3001\u666e\u6bb5\u306f\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u304b\u3089\u53c2\u7167\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u305f\u304f\u306a\u3044\u3051\u3069\u3001Let&#8217;s encrypt\u306e\u30b5\u30fc\u30d0\u30fc\u8a3c\u660e\u66f8\u3092\u53d6\u5f97\u3057\u305f\u3044\u3068\u304d\u3060\u3051LAN\u3067\u4f7f\u3063\u3066\u3044\u308bWeb\u30b5\u30fc\u30d0\u30fc\u3092\u516c\u958b\u3057\u305f\u3044\u3068\u304d\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u3046\u3044\u3063\u305f\u624b\u9593\u3092\u304b\u3051\u308b\u306a\u3089\u3001LAN\u7528\u306b\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8\u8a8d\u8a3c\u5c40\u3092\u7528\u610f\u3057\u3066\u81ea\u52d5\u66f4\u65b0\u3059\u308b\u4ed5\u7d44\u307f\u3092\u4f5c\u3063\u305f\u307b\u3046\u304c\u697d\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u304c\u3001\u6280\u8853\u7684\u306b\u8a2d\u7f6e\u3067\u304d\u308b\u3068\u3044\u3046\u3053\u3068\u3092\u77e5\u3063\u3066\u3044\u308b\u3068\u3044\u3046\u3053\u3068\u306b\u610f\u5473\u304c\u3042\u308b\u6c17\u304c\u3059\u308b\u306e\u3067\u3001\u5099\u5fd8\u9332\u3068\u3057\u3066\u66f8\u3044\u3066\u304a\u304d\u307e\u3059\u3002<br \/>\n<!--more--><br \/>\n\u3053\u3046\u3044\u3046\u3053\u3068\u3092\u3059\u308b\u3068\u3001\u305d\u3082\u305d\u3082\u3001\u540d\u524d\u89e3\u6c7a\u306e\u3068\u3053\u308d\u3067\u5c11\u3057\u9762\u5012\u306a\u3053\u3068\u3092\u3057\u306a\u3044\u3068\u3044\u3051\u306a\u3044\u3067\u3059\u3057\u3001\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u4e0a\u3067\u5229\u7528\u3067\u304d\u308b\u30b5\u30fc\u30d0\u30fc\u304c\u5fc5\u8981\u3060\u3068\u3044\u3046\u3053\u3068\u3067\u3001LAN\u5185\u306b\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8\u8a8d\u8a3c\u5c40\u3092\u7528\u610f\u3059\u308b\u3088\u308a\u3082\u30cf\u30fc\u30c9\u30eb\u306f\u9ad8\u3044\u3067\u3059\u3002<\/p>\n<h2>\u524d\u63d0<\/h2>\n<p>\u524d\u63d0\u304c\u3044\u304f\u3064\u304b\u3042\u308a\u307e\u3059\u3002\u307e\u305a\u3001\u30c9\u30e1\u30a4\u30f3\u306f\u3068\u3063\u3066\u3042\u308b\u3082\u306e\u3092\u4f7f\u3044\u307e\u3059\u3002\u3053\u3053\u3067\u306f\u3001example.jp\u3060\u3068\u3057\u307e\u3059\u3002LAN\u5185\u3067\u3057\u304b\u4f7f\u308f\u306a\u3044lan.example.jp\u3068\u3044\u3046\u30db\u30b9\u30c8\u540d\u304c\u3042\u3063\u305f\u3068\u3057\u3066\u3001\u3053\u308c\u306e\u540d\u524d\u89e3\u6c7a\u306b\u3064\u3044\u3066\u306f\u3001DNS\u3078A\u30ec\u30b3\u30fc\u30c9\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p>\n<p>\u307e\u305f\u3001VPS\u306a\u3069\u3067SSH\u30ed\u30b0\u30a4\u30f3\u3067\u304d\u308b\u30b5\u30fc\u30d0\u30fc\u3092\u7528\u610f\u3057\u307e\u3059\u3002\u3053\u308c\u306f\u666e\u6bb5\u306f\u5225\u30c9\u30e1\u30a4\u30f3\u3067Web\u30b5\u30a4\u30c8\u3092\u516c\u958b\u3059\u308b\u306e\u306b\u5229\u7528\u3082\u306e\u3060\u3068\u3057\u307e\u3059\u3002\u305b\u3063\u304b\u304f\u7528\u610f\u3059\u308b\u306e\u306a\u3089\u3001\u30b5\u30fc\u30d0\u30fc\u8a3c\u660e\u66f8\u53d6\u5f97\u7528\u3060\u3051\u306b\u5229\u7528\u3059\u308b\u306e\u306f\u3082\u3063\u305f\u3044\u306a\u304f\u3066\u3001\u6709\u52b9\u306b\u6d3b\u7528\u3057\u305f\u3044\u3067\u3059\u304b\u3089\u306d\u3002\u3053\u308c\u306fwww.example.org\u3060\u3068\u3057\u307e\u3059\u3002<\/p>\n<p>lan.example.jp\u7528\u306e\u30de\u30b7\u30f3\u306f\u81ea\u5b85\u306eLAN\u306b\u7528\u610f\u3059\u308b\u3068\u3057\u307e\u3059\u3002\u30d6\u30ed\u30fc\u30c9\u30d0\u30f3\u30c9\u30eb\u30fc\u30bf\u30fc\u3092\u63a5\u7d9a\u3057\u3066SSH\u3067www.example.org\u3078\u30a2\u30af\u30bb\u30b9\u3067\u304d\u308b\u74b0\u5883\u306b\u3042\u308b\u3068\u3057\u307e\u3059\u3002\u30de\u30b7\u30f3\u540d\u306fubuntu.local\u3068\u3057\u3066\u304a\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u3055\u3066\u3001\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u304b\u3089lan.example.jp\u304b\u3089\u30a2\u30af\u30bb\u30b9\u3059\u308b\u3068\u304d\u306f\u3001www.example.org\u306eIP\u30a2\u30c9\u30ec\u30b9\u3001LAN\u5185\u3067lan.example.jp\u3078\u30a2\u30af\u30bb\u30b9\u3059\u308b\u3068\u304d\u306f\u3001ubuntu.local\u306eIP\u30a2\u30c9\u30ec\u30b9\u3068\u306a\u308b\u3088\u3046\u306b\u540d\u524d\u89e3\u6c7a\u3092\u8a2d\u5b9a\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u65b9\u6cd5\u306f\u3044\u304f\u3064\u304b\u3042\u308a\u307e\u3059\u304c\u3001lan.example.jp\u3078\u30a2\u30af\u30bb\u30b9\u3059\u308b\u30de\u30b7\u30f3\u306ehosts\u30d5\u30a1\u30a4\u30eb\u3078\u540d\u524d\u89e3\u6c7a\u306e\u305f\u3081\u306e\u60c5\u5831\u3092\u8a18\u8ff0\u3059\u308b\u306e\u304c\u7c21\u5358\u3067\u3059\u3002\u4ed6\u306b\u306fLAN\u5185\u306e\u30cd\u30fc\u30e0\u30b5\u30fc\u30d0\u30fc\u3068\u3057\u3066dnsmasq\u3092\u7528\u610f\u3057\u3066\u3001\u3053\u308c\u3092\u4f7f\u3063\u3066\u540d\u524d\u89e3\u6c7a\u3092\u3059\u308b\u3068\u3044\u3046\u306e\u3082\u826f\u3044\u3067\u3057\u3087\u3046\u3002<\/p>\n<p>\u306a\u304a\u3001\u8907\u6570\u306e\u30de\u30b7\u30f3\u304b\u3089\u30a2\u30af\u30bb\u30b9\u304c\u5fc5\u8981\u306aubuntu.local\u306eIP\u30a2\u30c9\u30ec\u30b9\u306f\u56fa\u5b9a\u3057\u305f\u3044\u306e\u3067\u3001DHCP\u30b5\u30fc\u30d0\u30fc\u3078MAC\u30a2\u30c9\u30ec\u30b9\u306b\u5bfe\u3057\u3066IP\u30a2\u30c9\u30ec\u30b9\u3092\u56fa\u5b9a\u3059\u308b\u8a2d\u5b9a\u3092\u3057\u3066\u904b\u7528\u3059\u308b\u3068\u3057\u307e\u3059\u3002<\/p>\n<h2>ubuntu.local \u69cb\u7bc9\u624b\u9806<\/h2>\n<p>\u69cb\u7bc9\u624b\u9806\u4e0a\u306e\u91cd\u8981\u306a\u70b9\u3060\u3051\u66f8\u3044\u3066\u304a\u304d\u307e\u3059\u3002\u666e\u901a\u306bhttp, https\u306b\u5bfe\u5fdc\u3057\u305fWeb\u30b5\u30fc\u30d0\u30fc\u3092\u7528\u610f\u3057\u307e\u3059\u3002<\/p>\n<ul>\n<li>ubuntu.local\u3067http:\/\/lan.example.jp\u3001https:\/\/lan.example.jp\u304c\u52d5\u4f5c\u3059\u308b\u3088\u3046\u306bWeb\u30b5\u30fc\u30d0\u30fc\u3092\u69cb\u7bc9<\/li>\n<li>\u30ea\u30d0\u30fc\u30b9SSH\u30dd\u30fc\u30c8\u30d5\u30a9\u30ef\u30fc\u30c9\u3092\u4f7f\u3063\u3066ubuntu.local\u306e80, 443\u3092www.example.org\u306e8080, 8443\u3068\u3064\u306a\u3052\u308b<\/li>\n<\/ul>\n<h2>www.example.org \u69cb\u7bc9\u624b\u9806<\/h2>\n<p>ubuntu.local\u3067\u52d5\u4f5c\u3059\u308bWeb\u30b5\u30fc\u30d0\u30fc\u3068\u306e\u9023\u643a\u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002\u30ea\u30d0\u30fc\u30b9SSH\u30dd\u30fc\u30c8\u30d5\u30a9\u30ef\u30fc\u30c9\u3067127.0.0.1:8080\u3001127.0.0.1:8443\u3067ubuntu.local\u3068\u3064\u306a\u304c\u3063\u3066\u3044\u308b\u70b9\u304c\u30dd\u30a4\u30f3\u30c8\u3067\u3059\u3002\u306a\u304a\u3001\u300cLet&#8217;s encrypt\u306e\u30b5\u30fc\u30d0\u30fc\u8a3c\u660e\u66f8\u3092\u53d6\u5f97\u3059\u308b\u300d\u3060\u3051\u306a\u3089\u3001www.example.org\u3067https:\/\/lan.example.jp\u306f\u5fc5\u8981\u3042\u308a\u307e\u305b\u3093\u3002<\/p>\n<ul>\n<li>www.example.org\u3067\u306fhttp:\/\/www.example.org, https:\/\/www.example.org, http:\/\/lan.example.jp, https:\/\/lan.example.jp\u304c\u52d5\u4f5c\u3059\u308b\u3088\u3046\u306bWeb\u30b5\u30fc\u30d0\u30fc\u3092\u69cb\u7bc9<\/li>\n<li>www.example.org\u306e\/etc\/hosts\u306b\u300c127.0.0.1  lan.example.jp\u300d\u3092\u767b\u9332<\/li>\n<li>www.example.org\u306eWeb\u30b5\u30fc\u30d0\u30fc\u3067\u306f\u540d\u524d\u30d9\u30fc\u30b9\u306e\u30d0\u30fc\u30c1\u30e3\u30eb\u30db\u30b9\u30c8\u3092\u7528\u610f\u3057\u3066http:\/\/lan.example.jp, https:\/\/lan.example.jp\u306f\u30ea\u30d0\u30fc\u30b9\u30d7\u30ed\u30ad\u30b7\u30fc\u3067\u305d\u308c\u305e\u308clan.example.jp:8080\uff08\u3053\u308c\u306f127.0.0.1:8080\u3068\u540c\u3058\uff09\u3001lan.example.jp:8443\uff08\u3053\u308c\u306f127.0.0.1:8443\u3068\u540c\u3058\uff09\u3078\u8ee2\u9001<\/li>\n<li>www.example.org\u3067SELinux\u3092\u6709\u52b9\u306b\u3057\u3066\u3044\u308b\u5834\u5408\u306f\u3001\u300c\/usr\/sbin\/setsebool -P httpd_can_network_connect 1\u300d\u3092\u5b9f\u884c<\/li>\n<\/ul>\n<p>\u5c11\u3057\u6c17\u306b\u306a\u308b\u306e\u306f\/etc\/hosts\u306blan.example.jp\u3092\u767b\u9332\u3057\u3066\u3044\u308b\u3068\u3053\u308d\u3067\u3059\u3002lan.example.jp\u304cwww.example.org\u3068\u9055\u3046IP\u30a2\u30c9\u30ec\u30b9\u3078\u79fb\u52d5\u3059\u308b\u3053\u3068\u306b\u306a\u3063\u305f\u3068\u304d\u306b\u3001\u3053\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u66f4\u65b0\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u306e\u3067\u5fd8\u308c\u306a\u3044\u3088\u3046\u306b\u3057\u306a\u3044\u3068\u3044\u3051\u307e\u305b\u3093\u3002<\/p>\n<p>\/etc\/hosts\u3092\u66f8\u304d\u63db\u3048\u306a\u3044\u3067\u3001\u30ea\u30d0\u30fc\u30b9\u30d7\u30ed\u30ad\u30b7\u30fc\u306e\u8a2d\u5b9a\u6642\u306bhttp:\/\/localhost:8080\u3001https:\/\/localhost:8443\u3092\u6307\u5b9a\u3057\u3066\u3001ubuntu.local\u306eWeb\u30b5\u30fc\u30d0\u30fc\u3067http:\/\/localhost\u3001https:\/\/localhost\u3067\u3082\u63a5\u7d9a\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u3066\u304a\u304f\u65b9\u6cd5\u3082\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u3069\u3061\u3089\u304c\u826f\u3044\u306e\u304b\u306f\u3001\u516c\u958b\u3057\u305f\u3044Web\u30a2\u30d7\u30ea\u306b\u4f9d\u5b58\u3057\u307e\u3059\u3002Web\u30a2\u30d7\u30ea\u304c\u30ea\u30c0\u30a4\u30ec\u30af\u30c8\u3084\u30ec\u30b9\u30dd\u30f3\u30b9\u30d8\u30c3\u30c0\u30fc\u306b\u3044\u308d\u3044\u308d\u60c5\u5831\u3092\u8ffd\u52a0\u3059\u308b\u30bf\u30a4\u30d7\u306e\u5834\u5408\u306flocalhost\u3092\u4f7f\u3046\u3068\u3001\u30d8\u30c3\u30c0\u30fc\u60c5\u5831\u306e\u66f8\u304d\u63db\u3048\u306a\u3069\u306e\u51e6\u7406\u304c\u52d5\u304f\u3088\u3046\u306b\u8a2d\u5b9a\u3092\u8ffd\u52a0\u3059\u308b\u5fc5\u8981\u304c\u51fa\u3066\u304f\u308b\u306f\u305a\u3067\u3059\u3002\u305d\u306e\u624b\u9593\u3092\u8003\u3048\u308b\u3068\/etc\/hosts\u66f8\u304d\u63db\u3048\u304c\u697d\u306a\u306f\u305a\u3067\u3059\u3002<\/p>\n<h2>\u4ed6\u306e\u65b9\u6cd5<\/h2>\n<p>\u307e\u3041\u3001www.example.org\u3067Let&#8217;s encrypt\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u4f7f\u3063\u3066\u8a3c\u660e\u66f8\u3092\u66f4\u65b0\u3059\u308b\u3088\u3046\u306b\u3057\u3066\u3001\u53d6\u5f97\u3057\u305f\u8a3c\u660e\u66f8\u3092ubuntu.local\u3078\u8ee2\u9001\u3059\u308b\u3068\u3044\u3046\u65b9\u6cd5\u3082\u3042\u3063\u3066\u3001\u305d\u3063\u3061\u306e\u65b9\u304c\u7c21\u5358\u3060\u3063\u305f\u308a\u3057\u307e\u3059\u3002<\/p>\n<p>\u4eca\u56de\u3001\u4e0a\u8a18\u306e\u65b9\u6cd5\u3092\u8003\u3048\u305f\u306e\u306f\u3001\u3042\u308bWeb\u30a2\u30d7\u30ea\u3067SSL\u306e\u8a2d\u5b9a\u3092\u3059\u308b\u305f\u3081\u306e\u30b3\u30de\u30f3\u30c9\u304c\u3042\u3063\u3066\u3001\u305d\u308c\u304cLet&#8217;s encrypt\u3092\u4f7f\u3063\u3066\u3044\u3066LAN\u306e\u30de\u30b7\u30f3\u3067\u5b9f\u884c\u3059\u308b\u5fc5\u8981\u304c\u3042\u3063\u305f\u304b\u3089\u3067\u3059\u3002www.example.org\u306e\u30de\u30b7\u30f3\u3067\u3001\u305d\u306eWeb\u30a2\u30d7\u30ea\u3092\u52d5\u304b\u3059\u305f\u3081\u306e\u74b0\u5883\u3092\u69cb\u7bc9\u3057\u3066\u52d5\u304b\u3057\u3066\u8a3c\u660e\u66f8\u3092\u53d6\u5f97\u3057\u3066\u3082\u826f\u304b\u3063\u305f\u306e\u3067\u3059\u304c\u3001\u65e2\u5b58\u306e\u74b0\u5883\u306b\u5f71\u97ff\u304c\u51fa\u305d\u3046\u306a\u306e\u3067\u3084\u3081\u307e\u3057\u305f\u3002<\/p>\n<p>\u6700\u8fd1\u306f\u3001\u3053\u3046\u3044\u3046\u8a2d\u5b9a\u306b\u6642\u9593\u3092\u304b\u3051\u308b\u3088\u308a\u3001\u4ed6\u306e\u3053\u3068\u306b\u6642\u9593\u3092\u304b\u3051\u305f\u65b9\u304c\u3044\u3044\u3088\u3046\u306a\u5834\u9762\u3082\u591a\u3044\u3067\u3059\u304c\u3001\u306a\u3093\u3068\u306a\u304f\u3084\u3063\u3066\u307f\u305f\u304f\u306a\u308b\u306e\u3067\u3059\u3088\u306d\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u304b\u306a\u308a\u30ec\u30a2\u30b1\u30fc\u30b9\u3067\u3059\u304c\u3001\u666e\u6bb5\u306f\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u304b\u3089\u53c2\u7167\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u305f\u304f\u306a\u3044\u3051\u3069\u3001Let&#8217;s encrypt\u306e\u30b5\u30fc\u30d0\u30fc\u8a3c\u660e\u66f8\u3092\u53d6\u5f97\u3057\u305f\u3044\u3068\u304d\u3060\u3051LAN\u3067\u4f7f\u3063\u3066\u3044\u308bWeb\u30b5\u30fc\u30d0\u30fc\u3092\u516c\u958b\u3057\u305f\u3044\u3068\u304d\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u3046\u3044 &hellip; <a href=\"https:\/\/www.hiro345.net\/blogs\/hiro345\/archives\/19608.html\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[1299,1381],"class_list":["post-19608","post","type-post","status-publish","format-standard","hentry","category-linux","tag-lets-encrypt","tag-ssh"],"_links":{"self":[{"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/posts\/19608","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/comments?post=19608"}],"version-history":[{"count":4,"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/posts\/19608\/revisions"}],"predecessor-version":[{"id":19612,"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/posts\/19608\/revisions\/19612"}],"wp:attachment":[{"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/media?parent=19608"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/categories?post=19608"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/tags?post=19608"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}