{"id":62,"date":"2023-02-10T00:00:00","date_gmt":"2023-02-09T15:00:00","guid":{"rendered":"https:\/\/hmhr.ath.cx\/?p=62"},"modified":"2023-02-08T01:42:30","modified_gmt":"2023-02-07T16:42:30","slug":"android%e3%81%a8vpn-2","status":"publish","type":"post","link":"https:\/\/hmhr.ath.cx\/?p=62","title":{"rendered":"Android\u3068VPN 2"},"content":{"rendered":"\n<p><a href=\"https:\/\/hmhr.ath.cx\/?p=59\">\u524d\u56de<\/a>\u306b\u5f15\u304d\u7d9a\u304d\u3001Android\u3067\u30ed\u30fc\u30ab\u30eb\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306eVPN\u306b\u63a5\u7d9a\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u3066\u307f\u308b\u3002<br>\u524d\u56de\u306f\u3001VPN\u306b\u4f7f\u7528\u3059\u308b\u30c4\u30fc\u30eb\u306e\u9078\u5b9a\u3068\u3001\u8a8d\u8a3c\u5c40\u306e\u4f5c\u6210\u307e\u3067\u884c\u306a\u3063\u305f\u3002<\/p>\n\n\n\n<!--more-->\n\n\n\n<h2 class=\"wp-block-heading\">OpenVPN\u306e\u8a3c\u660e\u66f8\u767a\u884c<\/h2>\n\n\n\n<p>VPN\u30b5\u30fc\u30d0\u306e\u8a3c\u660e\u66f8\u767a\u884c\u3092\u884c\u3046\u3002<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\ncd \/usr\/share\/doc\/openvpn\/examples\/easy-rsa\/2.0\n.\/build-key-server OpenVPN-server\n<\/pre><\/div>\n\n\n<p>\u3053\u306e\u30b3\u30de\u30f3\u30c9\u306e\u3001\u5f15\u6570\u304cCommon name\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u5024\u3068\u306a\u308b\u3002<br>Common name\u306f\u8a8d\u8a3c\u5c40\u3092\u4f5c\u6210\u3057\u305f\u969b\u306e\u3082\u306e\u3068\u306f\u9055\u3046\u540d\u524d\u306b\u306a\u308b\u3088\u3046\u306b\u3059\u308b\u3002<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nSign the certificate? &#x5B;y\/n]:\n1 out of 1 certificate requests certified, commit? &#x5B;y\/n]\n<\/pre><\/div>\n\n\n<p>\u3053\u306e2\u3064\u306b\u5bfe\u3057\u3066\u306fy\u3092\u5165\u529b\u3059\u308b\u3002<br>\u3053\u308c\u3067\u30b5\u30fc\u30d0\u7528\u306e\u8a3c\u660e\u66f8\u304c\u4f5c\u6210\u3067\u304d\u305f\u3002<\/p>\n\n\n\n<p>OpenVPN-server.csr\uff1a\u8a3c\u660e\u66f8\u8981\u6c42\u30d5\u30a1\u30a4\u30eb<br>OpenVPN-server.crt\uff1a\u8a3c\u660e\u66f8\u30d5\u30a1\u30a4\u30eb<br>OpenVPN-server.key\uff1a\u9375\u30d5\u30a1\u30a4\u30eb<\/p>\n\n\n\n<p>\u8a3c\u660e\u66f8\u8981\u6c42\u30d5\u30a1\u30a4\u30eb\u306f\u3001\u5225\u306e\u30b5\u30fc\u30d0\u306bCA\u304c\u3042\u308b\u5834\u5408\u305d\u306eCA\u306b\u5bfe\u3057\u3066\u8a3c\u660e\u66f8\u3092\u751f\u6210\u3057\u3066\u3082\u3089\u3046\u6642\u306b\u4f7f\u3046\u3002<br>\u6b21\u306bDiffieHellman\u306e\u8a2d\u5b9a\u3002<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n.\/build-dh\n<\/pre><\/div>\n\n\n<h2 class=\"wp-block-heading\">\u30b5\u30fc\u30d0\u8a2d\u5b9a<\/h2>\n\n\n\n<p>\u4eca\u307e\u3067\u4f5c\u6210\u3057\u3066\u304d\u305f\u30d5\u30a1\u30a4\u30eb\u306e\u4e2d\u304b\u3089<br>ca.crt<br>OpenVPN-server.crt<br>OpenVPN-server.key<br>dh2048.pem<br>\u3092<strong>&nbsp;\/etc\/openvpn<\/strong>&nbsp;\u306b\u30b3\u30d4\u30fc\u3059\u308b\u3002<\/p>\n\n\n\n<p>\u540c\u3058\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u3001\u30b5\u30fc\u30d0\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u306e\u30b5\u30f3\u30d7\u30eb\u3092\u30b3\u30d4\u30fc\u3059\u308b\u3002<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\ncp \/usr\/share\/doc\/openvpn\/examples\/sample-config-files\/server.config.gz \/etc\/openvpn\ncd \/etc\/openvpn\ngzip -d server.config.gz\n<\/pre><\/div>\n\n\n<p>OpenVPN\u306b\u306f2\u3064\u306e\u30e2\u30fc\u30c9\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u65b9\u5f0f(tun)\u3068\u30d6\u30ea\u30c3\u30b8\u65b9\u5f0f(tap)\u304c\u3042\u308b\u3002<br>\u4eca\u56de\u306f\u3001\u30d6\u30ed\u30fc\u30c9\u30ad\u30e3\u30b9\u30c8\u304c\u3067\u304d\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\u3082\u4f7f\u3044\u305f\u3044\u306e\u3067\u3001\u30d6\u30ea\u30c3\u30b8\u65b9\u5f0f\u3067\u8a2d\u5b9a\u3057\u3066\u3044\u304f\u3002<\/p>\n\n\n\n<p>\u30b5\u30f3\u30d7\u30eb\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u304b\u3089\u3001\u8ffd\u8a18\u30fb\u4fee\u6b63\u3057\u305f\u306e\u3092\u307e\u3068\u3081\u308b\u3002<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n#\u30d6\u30ea\u30c3\u30b8\u30e2\u30fc\u30c9\u3092\u4f7f\u7528\u3059\u308b\u305f\u3081\u306e\u8a2d\u5b9a\ndev tap0\n;dev tun\n#\u8a3c\u660e\u66f8\u30d5\u30a1\u30a4\u30eb\u3068\u9375\u30d5\u30a1\u30a4\u30eb\u306e\u8a2d\u5b9a&amp;amp;amp;lt;strong&amp;amp;amp;gt;&amp;amp;amp;lt;\/strong&amp;amp;amp;gt;\ncert OpenVPN-server.crt\nkey OpenVPN-server.key\n#\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u30e2\u30fc\u30c9\u306e\u8a2d\u5b9a\u3092\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8\n;server 10.8.0.0 255.255.255.0\n#\u30d6\u30ea\u30c3\u30b8\u8a2d\u5b9a\n#OpenVPN\u306eIP\u3001\u30b5\u30d6\u30cd\u30c3\u30c8\u30de\u30b9\u30af\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306b\u5272\u308a\u5f53\u3066\u308b\u30b9\u30bf\u30fc\u30c8IP\u3001\u30a8\u30f3\u30c9IP\nserver-bridge 192.168.1.251 255.255.255.0 192.168.1.252 192.168.1.253\n#\u30e6\u30fc\u30b6\u6a29\u9650\u306e\u8a2d\u5b9a\nuser nobody\ngroup nogroup\n<\/pre><\/div>\n\n\n<p>\u3068\u308a\u3042\u3048\u305a\u3001\u3053\u3053\u307e\u3067\u3067OpenVPN\u81ea\u4f53\u306e\u8a2d\u5b9a\u306f\u7d42\u4e86\u3002<br>\u9577\u304f\u306a\u3063\u3066\u304d\u305f\u306e\u3067\u3001<a href=\"https:\/\/hmhr.ath.cx\/?p=64\">\u6b21\u56de<\/a>\u306b\u3064\u3065\u304f<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u524d\u56de\u306b\u5f15\u304d\u7d9a\u304d\u3001Android\u3067\u30ed\u30fc\u30ab\u30eb\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306eVPN\u306b\u63a5\u7d9a\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u3066\u307f\u308b\u3002\u524d\u56de\u306f\u3001VPN\u306b\u4f7f\u7528\u3059\u308b\u30c4\u30fc\u30eb\u306e\u9078\u5b9a\u3068\u3001\u8a8d\u8a3c\u5c40\u306e\u4f5c\u6210\u307e\u3067\u884c\u306a\u3063\u305f\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9,4],"tags":[10],"class_list":["post-62","post","type-post","status-publish","format-standard","hentry","category-android","category-linux","tag-vpn"],"_links":{"self":[{"href":"https:\/\/hmhr.ath.cx\/index.php?rest_route=\/wp\/v2\/posts\/62","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hmhr.ath.cx\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hmhr.ath.cx\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hmhr.ath.cx\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hmhr.ath.cx\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=62"}],"version-history":[{"count":4,"href":"https:\/\/hmhr.ath.cx\/index.php?rest_route=\/wp\/v2\/posts\/62\/revisions"}],"predecessor-version":[{"id":72,"href":"https:\/\/hmhr.ath.cx\/index.php?rest_route=\/wp\/v2\/posts\/62\/revisions\/72"}],"wp:attachment":[{"href":"https:\/\/hmhr.ath.cx\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=62"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hmhr.ath.cx\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=62"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hmhr.ath.cx\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=62"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}