{"id":3210,"date":"2019-04-04T21:32:36","date_gmt":"2019-04-04T12:32:36","guid":{"rendered":"https:\/\/tech.akat.info\/?p=3210"},"modified":"2019-04-04T21:32:36","modified_gmt":"2019-04-04T12:32:36","slug":"onion-%e3%83%89%e3%83%a1%e3%82%a4%e3%83%b3%e3%81%a7%e3%82%b5%e3%82%a4%e3%83%88%e3%82%92%e6%a7%8b%e7%af%89%e3%81%97%e3%81%a6%e3%81%bf%e3%81%9f","status":"publish","type":"post","link":"https:\/\/tech.akat.info\/?p=3210","title":{"rendered":"onion \u30c9\u30e1\u30a4\u30f3\u3067\u30b5\u30a4\u30c8\u3092\u69cb\u7bc9\u3057\u3066\u307f\u305f"},"content":{"rendered":"<p><a href=\"https:\/\/qiita.com\/charichuma_hack\/items\/ba3fc74f73f1929ef50b\">onion\u30c9\u30e1\u30a4\u30f3\u306e\u30b5\u30fc\u30d0\u3092\u5efa\u3066\u3066\u307f\u305f<\/a>\u3092\u53c2\u8003\u306b\u69cb\u7bc9\u3057\u305f\u3002<\/p>\n<h2>Tor\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h2>\n<p>\u516c\u5f0f\u306b\u3088\u308b\u3068Debian\/Ubuntu\u30d1\u30c3\u30b1\u30fc\u30b8\u306f\u3057\u3070\u3089\u304f\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3055\u308c\u3066\u3044\u306a\u3044\u305f\u3081\u3001\u5229\u7528\u3057\u306a\u3044\u307b\u3046\u304c\u3088\u3044\u3068\u8a18\u8f09\u3055\u308c\u3066\u3044\u305f\u3002<br \/>\n\u78ba\u304b\u306b\u6700\u7d42\u66f4\u65b0\u65e5\u306f\u30012018\u5e743\u6708\u3068\u53e4\u304b\u3063\u305f\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nroot@tech:\/home\/ubuntu# cat \/etc\/lsb-release\r\nDISTRIB_ID=Ubuntu\r\nDISTRIB_RELEASE=18.04\r\nDISTRIB_CODENAME=bionic\r\nDISTRIB_DESCRIPTION=&quot;Ubuntu 18.04.2 LTS&quot;\r\n# apt changelog tor\r\ntor (0.3.2.10-1) unstable; urgency=medium\r\n\r\n  * New upstream version.\r\n    - Includes an important security fix for a remote crash attack against\r\n      directory authorities.\r\n      &#x5B;TROVE-2018-001 and CVE-2018-0490]\r\n    - Additionally, backports a fix for Tor#24700, which was originally\r\n      fixed in 0.3.3.2-alpha but had its severity upgraded now as it can be\r\n      remotely triggered and can crash relays.\r\n      &#x5B;TROVE-2018-002 and CVE-2018-0491]\r\n\r\n -- Peter Palfrader &lt;weasel@debian.org&gt;  Sat, 03 Mar 2018 14:37:34 +0100\r\n...\r\n<\/pre>\n<p>\u516c\u5f0f\u306e\u901a\u308a\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n# echo 'deb https:\/\/deb.torproject.org\/torproject.org bionic main' &gt;&gt; \/etc\/apt\/sources.list.d\/tor.list\r\n# echo 'deb-src https:\/\/deb.torproject.org\/torproject.org bionic main' &gt;&gt; \/etc\/apt\/sources.list.d\/tor.list\r\n# curl https:\/\/deb.torproject.org\/torproject.org\/A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89.asc | gpg --import\r\n...\r\n# gpg --export A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89 | apt-key add -\r\n# apt update\r\n# apt install tor\r\n...\r\n# tor --version\r\nTor version 0.3.5.8.\r\n<\/pre>\n<h2>Tor\u8a2d\u5b9a<\/h2>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n# cp \/etc\/tor\/torrc \/etc\/tor\/torrc.default\r\n# vi \/etc\/tor\/torrc\r\n...\r\n# diff \/etc\/tor\/torrc \/etc\/tor\/torrc.default\r\n71,72c71,72\r\n&lt; HiddenServiceDir \/var\/lib\/tor\/hidden_service\/\r\n&lt; HiddenServicePort 80 127.0.0.1:80\r\n---\r\n&gt; #HiddenServiceDir \/var\/lib\/tor\/hidden_service\/\r\n&gt; #HiddenServicePort 80 127.0.0.1:80\r\n# cat \/var\/lib\/tor\/hidden_service\/hostname\r\nu5bsgenv7mshtwmh6jbroelnajmxz3dfov6dpiktwrtazjafmzhszpad.onion\r\n<\/pre>\n<p>HiddenServicePort\u306b\u3064\u3044\u3066\u306fTor\u3067\u516c\u958b\u3059\u308b\u30dd\u30fc\u30c8\u3092\u8a2d\u5b9a\u3059\u308b\u3068\u7406\u89e3\u3057\u305f\u3002<\/p>\n<h2>Nginx\u8a2d\u5b9a<\/h2>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n# mkdir \/var\/www\/onion\r\nroot@tech:\/home\/ubuntu# echo &quot;Hello Onion :)&quot; | sudo tee \/var\/www\/onion\/index.html\r\nHello Onion :)\r\nroot@tech:\/home\/ubuntu# chown -R www-data:www-data \/var\/www\/onion\r\n# vi \/etc\/nginx\/sites-available\/u5bsgenv7mshtwmh6jbroelnajmxz3dfov6dpiktwrtazjafmzhszpad.onion\r\nserver {\r\n    server_name u5bsgenv7mshtwmh6jbroelnajmxz3dfov6dpiktwrtazjafmzhszpad.onion;\r\n    root \/var\/www\/onion\/;\r\n}\r\n\r\n# ln -s \/etc\/nginx\/sites-available\/u5bsgenv7mshtwmh6jbroelnajmxz3dfov6dpiktwrtazjafmzhszpad.onion \/etc\/nginx\/sites-enabled\/\r\n\r\n# nginx -t\r\nnginx: &#x5B;emerg] could not build server_names_hash, you should increase server_names_hash_bucket_size: 64\r\nnginx: configuration file \/etc\/nginx\/nginx.conf test failed\r\n\r\n# vi \/etc\/nginx\/nginx.conf\r\n  # \u4ee5\u4e0b\u3092\u8ffd\u52a0\u3059\u308b\r\n  server_names_hash_bucket_size 128;\r\n\r\n# systemctl restart nginx\r\n<\/pre>\n<p>Tor Browser\u306b\u3066\u30a2\u30af\u30bb\u30b9\u3059\u308b\u3068\u3001\u30b5\u30a4\u30c8\u304c\u8868\u793a\u3055\u308c\u305f\u3002<br \/>\n<a href=\"https:\/\/tech.akat.info\/wp-content\/uploads\/2019\/04\/2019-04-04_194133.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/tech.akat.info\/wp-content\/uploads\/2019\/04\/2019-04-04_194133-300x50.png\" alt=\"\" width=\"300\" height=\"50\" class=\"alignnone size-medium wp-image-3211\" srcset=\"https:\/\/tech.akat.info\/wp-content\/uploads\/2019\/04\/2019-04-04_194133-300x50.png 300w, https:\/\/tech.akat.info\/wp-content\/uploads\/2019\/04\/2019-04-04_194133-768x129.png 768w, https:\/\/tech.akat.info\/wp-content\/uploads\/2019\/04\/2019-04-04_194133-1024x171.png 1024w, https:\/\/tech.akat.info\/wp-content\/uploads\/2019\/04\/2019-04-04_194133.png 1654w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<h2>\u53c2\u8003<\/h2>\n<p>https:\/\/qiita.com\/charichuma_hack\/items\/ba3fc74f73f1929ef50b<br \/>\nhttps:\/\/hackmd.io\/s\/HyxJs1A9W<br \/>\nhttps:\/\/medium.com\/gyoza-x\/tor-hidden-service-%E3%81%A7%E3%82%A6%E3%82%A7%E3%83%96%E3%82%B5%E3%82%A4%E3%83%88%E3%82%92%E5%85%AC%E9%96%8B%E3%81%97%E3%81%A6%E3%81%BF%E3%82%8B-5eab0d968d10<\/p>\n","protected":false},"excerpt":{"rendered":"<p>onion\u30c9\u30e1\u30a4\u30f3\u306e\u30b5\u30fc\u30d0\u3092\u5efa\u3066\u3066\u307f\u305f\u3092\u53c2\u8003\u306b\u69cb\u7bc9\u3057\u305f\u3002 Tor\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb \u516c\u5f0f\u306b\u3088\u308b\u3068Debian\/Ubuntu\u30d1\u30c3\u30b1\u30fc\u30b8\u306f\u3057\u3070\u3089\u304f\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3055\u308c\u3066\u3044\u306a\u3044\u305f\u3081\u3001\u5229\u7528\u3057\u306a\u3044\u307b\u3046\u304c\u3088\u3044\u3068\u8a18\u8f09\u3055\u308c\u3066\u3044\u305f\u3002 \u78ba\u304b\u306b\u6700\u7d42\u66f4 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[98],"tags":[],"_links":{"self":[{"href":"https:\/\/tech.akat.info\/index.php?rest_route=\/wp\/v2\/posts\/3210"}],"collection":[{"href":"https:\/\/tech.akat.info\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tech.akat.info\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tech.akat.info\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tech.akat.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3210"}],"version-history":[{"count":1,"href":"https:\/\/tech.akat.info\/index.php?rest_route=\/wp\/v2\/posts\/3210\/revisions"}],"predecessor-version":[{"id":3212,"href":"https:\/\/tech.akat.info\/index.php?rest_route=\/wp\/v2\/posts\/3210\/revisions\/3212"}],"wp:attachment":[{"href":"https:\/\/tech.akat.info\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3210"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tech.akat.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3210"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tech.akat.info\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3210"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}