{"id":451,"date":"2023-02-20T09:07:03","date_gmt":"2023-08-06T09:26:27","guid":{"rendered":"https:\/\/www.silicloud.com\/ja\/blog\/index.php\/2023\/11\/30\/debian-11%e3%81%a7openvpn%e3%82%b5%e3%83%bc%e3%83%90%e3%83%bc%e3%82%92%e3%82%bb%e3%83%83%e3%83%88%e3%82%a2%e3%83%83%e3%83%97%e3%81%99%e3%82%8b%e6%96%b9%e6%b3%95\/"},"modified":"2025-07-31T23:42:03","modified_gmt":"2025-07-31T14:42:03","slug":"debian-11%e3%81%a7openvpn%e3%82%b5%e3%83%bc%e3%83%90%e3%83%bc%e3%82%92%e3%82%bb%e3%83%83%e3%83%88%e3%82%a2%e3%83%83%e3%83%97%e3%81%99%e3%82%8b%e6%96%b9%e6%b3%95","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/ja\/blog\/debian-11%e3%81%a7openvpn%e3%82%b5%e3%83%bc%e3%83%90%e3%83%bc%e3%82%92%e3%82%bb%e3%83%83%e3%83%88%e3%82%a2%e3%83%83%e3%83%97%e3%81%99%e3%82%8b%e6%96%b9%e6%b3%95\/","title":{"rendered":"Debian 11\u3067OpenVPN\u30b5\u30fc\u30d0\u30fc\u3092\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u306e\u65b9\u6cd5"},"content":{"rendered":"<h3>\u4ee5\u4e0b\u306e\u6587\u7ae0\u3092\u65e5\u672c\u8a9e\u3067\u8a00\u3044\u63db\u3048\u3066\u304f\u3060\u3055\u3044\uff08\u9078\u629e\u80a2\u306f\u4e00\u3064\u3060\u3051\u3067\u7d50\u69cb\u3067\u3059\uff09\uff1a<br \/>\n\u30a4\u30f3\u30c8\u30ed\u30c0\u30af\u30b7\u30e7\u30f3<\/h3>\n<p>\u30c1\u30fc\u30e0\u306f\u3001\u4fe1\u983c\u3067\u304d\u306a\u3044\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u3092\u4ecb\u3057\u3066\u30ea\u30e2\u30fc\u30c8\u5834\u6240\u304b\u3089\u5185\u90e8\u30ea\u30bd\u30fc\u30b9\u306b\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8\u304b\u3064\u5b89\u5168\u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u4eee\u60f3\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\uff08VPN\uff09\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u3067\u3001\u305d\u308c\u304c\u53ef\u80fd\u306b\u306a\u308a\u307e\u3059\u3002VPN\u30b5\u30fc\u30d0\u30fc\u306f\u3001\u30ea\u30e2\u30fc\u30c8\u30e6\u30fc\u30b6\u30fc\u304c\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306b\u63a5\u7d9a\u3057\u3066\u3044\u308b\u304b\u306e\u3088\u3046\u306b\u52d5\u4f5c\u3057\u3001SSH\u30b8\u30e3\u30f3\u30d7\u30b5\u30fc\u30d0\u30fc\u3068\u6bd4\u3079\u3066\u3001\u3088\u308a\u67d4\u8edf\u3067\u9069\u5207\u306a\u89e3\u6c7a\u7b56\u3067\u3059\u3002\u30e6\u30fc\u30b6\u30fc\u3092\u8a8d\u8a3c\u3057\u3001\u5f7c\u3089\u306e\u30c7\u30d0\u30a4\u30b9\u3068\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u9593\u306b\u6697\u53f7\u5316\u3055\u308c\u305f\u30c8\u30f3\u30cd\u30eb\u3092\u4f5c\u6210\u3057\u3001\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u5168\u4f53\u3068\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u3078\u306e\u5b89\u5168\u306a\u30dd\u30fc\u30bf\u30eb\u3068\u3057\u3066\u6a5f\u80fd\u3057\u307e\u3059\uff08\u8a2d\u5b9a\u306b\u3088\u3063\u3066\u306f\uff09\u3002<\/p>\n<p>\u5546\u7528\u306eVPN\u3092\u8003\u3048\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u304c\u3001\u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u306b\u3042\u308b\u3088\u3046\u306a\u7121\u6599\u306eVPN\u3092\u81ea\u5206\u3067\u904b\u7528\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002OpenVPN\u306f\u3001\u3055\u307e\u3056\u307e\u306a\u8a2d\u5b9a\u306b\u5bfe\u5fdc\u3057\u305f\u30d5\u30eb\u6a5f\u80fd\u306e\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u306eSecure Socket Layer\uff08SSL\uff09VPN\u30bd\u30ea\u30e5\u30fc\u30b7\u30e7\u30f3\u3067\u3059\u3002\u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u306f\u3001Debian 11\u30b5\u30fc\u30d0\u30fc\u4e0a\u306bOpenVPN\u30b5\u30fc\u30d0\u30fc\u3092\u8a2d\u5b9a\u3057\u3001Windows\u3001macOS\u3001Linux\u3001iOS\u3001\u304a\u3088\u3073\/\u307e\u305f\u306fAndroid\u304b\u3089\u30a2\u30af\u30bb\u30b9\u3059\u308b\u65b9\u6cd5\u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<div class=\"post-conf-note\">\n<p class=\"post-conf-desc\">Note<\/p>\n<div>\u6ce8\u610f\uff1aSilicon Cloud\u306evServer\u4e0a\u306bOpenVPN\u30b5\u30fc\u30d0\u30fc\u3092\u8a2d\u5b9a\u3059\u308b\u4e88\u5b9a\u306e\u5834\u5408\u3001\u591a\u304f\u306e\u30db\u30b9\u30c6\u30a3\u30f3\u30b0\u30d7\u30ed\u30d0\u30a4\u30c0\u30fc\u3068\u540c\u69d8\u306b\u3001\u5e2f\u57df\u5e45\u306e\u8d85\u904e\u6599\u91d1\u304c\u767a\u751f\u3059\u308b\u3053\u3068\u306b\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002VPN\u30e6\u30fc\u30b6\u30fc\u304cVPN\u306b\u63a5\u7d9a\u3057\u3066\u3044\u308b\u9593\u306b\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u4e0a\u3067\u884c\u3046\u3059\u3079\u3066\u306e\u30a2\u30af\u30b7\u30e7\u30f3\u306f\u3001Silicon Cloud\u306e\u5e2f\u57df\u5e45\u3092\u6d88\u8cbb\u3057\u307e\u3059\uff08VPN\u3092\u4ecb\u3057\u3066\u30c8\u30e9\u30d5\u30a3\u30c3\u30af\u3092\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u3059\u308b\u3053\u3068\u3092\u9078\u629e\u3057\u305f\u5834\u5408\u3092\u60f3\u5b9a\u3057\u3066\u3044\u307e\u3059\uff09\u3002<br \/>\n\u8a73\u7d30\u306b\u3064\u3044\u3066\u306f\u3001\u3053\u306e\u30da\u30fc\u30b8\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002<\/div>\n<\/div>\n<h2>\u5fc5\u8981\u306a\u524d\u63d0\u6761\u4ef6<\/h2>\n<p>\u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3092\u5b8c\u4e86\u3059\u308b\u305f\u3081\u306b\u306f\u3001\u6b21\u306e\u3082\u306e\u304c\u5fc5\u8981\u3067\u3059\uff1a<\/p>\n<ul class=\"post-ul\">\n<li>Two Debian 11 servers: one to host your OpenVPN service, and one to serve as your certificate authority (CA).<\/li>\n<li>A non-root user with sudo privileges on both servers. You can follow our Debian 11 Initial Server Setup guide to set up a user with appropriate permissions. That tutorial will also set up a firewall, which is assumed to be in place on both servers throughout this guide.<\/li>\n<li>Easy-RSA installed on both servers. This is the utility you will use to manage the certificates for your VPN. Follow Steps 1\u20132 of this guide on your VPN server, and follow Steps 1\u20133 on your CA server.<\/li>\n<\/ul>\n<p>\u904b\u7528\u4e0a\u306f\u3001\u81ea\u5206\u306eOpenVPN\u30b5\u30fc\u30d0\u30fc\u3084\u30ed\u30fc\u30ab\u30eb\u30de\u30b7\u30f3\u304b\u3089CA\u3092\u52d5\u304b\u3059\u3053\u3068\u306f\u6280\u8853\u7684\u306b\u53ef\u80fd\u3067\u3059\u304c\u3001\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u306b\u5e38\u6642\u63a5\u7d9a\u3055\u308c\u3066\u3044\u308b\u5225\u306e\u30b5\u30fc\u30d0\u30fc\u306bCA\uff08\u7279\u306b\u305d\u306e\u79d8\u5bc6\u9375\uff09\u3092\u4fdd\u7ba1\u3059\u308b\u65b9\u304c\u5b89\u5168\u3067\u3059\u3002VPN\u30b5\u30fc\u30d0\u30fc\u309224\u6642\u9593365\u65e5\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u306b\u63a5\u7d9a\u3057\u305f\u307e\u307e\u306b\u3059\u308b\u4e88\u5b9a\u3067\u3042\u308b\u5834\u5408\u3001\u653b\u6483\u8005\u306b\u3088\u308b\u4fb5\u5bb3\u306e\u30ea\u30b9\u30af\u304c\u9ad8\u307e\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002\u516c\u958b\u30b5\u30fc\u30d0\u30fc\u306bCA\u306e\u79d8\u5bc6\u9375\u3092\u4fdd\u7ba1\u3059\u308b\u3053\u3068\u306f\u907f\u3051\u308b\u3079\u304d\u3067\u3042\u308a\u3001\u653b\u6483\u8005\u304c\u79d8\u5bc6\u9375\u306b\u30a2\u30af\u30bb\u30b9\u3067\u304d\u305f\u5834\u5408\u3001\u65b0\u3057\u3044\u8a3c\u660e\u66f8\u306b\u7f72\u540d\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u3001VPN\u3078\u306e\u30a2\u30af\u30bb\u30b9\u6a29\u9650\u3092\u5f97\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002\u516c\u5f0f\u306eOpenVPN\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306b\u3088\u308c\u3070\u3001CA\u306f\u3001\u8a3c\u660e\u66f8\u30ea\u30af\u30a8\u30b9\u30c8\u306e\u30a4\u30f3\u30dd\u30fc\u30c8\u3068\u7f72\u540d\u306b\u5c02\u7528\u3055\u308c\u305f\u30b9\u30bf\u30f3\u30c9\u30a2\u30ed\u30f3\u30b5\u30fc\u30d0\u30fc\u306b\u914d\u7f6e\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u6700\u5f8c\u306b\u3001\u3053\u308c\u3089\u306e\u30b5\u30fc\u30d0\u30fc\u3092\u8a2d\u5b9a\u3059\u308b\u969b\u306b\u30d1\u30b9\u30ef\u30fc\u30c9\u8a8d\u8a3c\u3092\u7121\u52b9\u306b\u3059\u308b\u3068\u3001\u3053\u306e\u30ac\u30a4\u30c9\u306e\u5f8c\u534a\u3067\u3053\u308c\u3089\u306e\u30b5\u30fc\u30d0\u30fc\u9593\u3067\u30d5\u30a1\u30a4\u30eb\u3092\u8ee2\u9001\u3059\u308b\u969b\u306b\u554f\u984c\u304c\u767a\u751f\u3059\u308b\u53ef\u80fd\u6027\u304c\u3042\u308b\u3053\u3068\u306b\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u3053\u306e\u554f\u984c\u3092\u89e3\u6c7a\u3059\u308b\u305f\u3081\u306b\u306f\u3001\u5404\u30b5\u30fc\u30d0\u30fc\u3067\u30d1\u30b9\u30ef\u30fc\u30c9\u8a8d\u8a3c\u3092\u518d\u5ea6\u6709\u52b9\u306b\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u307e\u305f\u306f\u3001\u5404\u30b5\u30fc\u30d0\u30fc\u306b\u5bfe\u3057\u3066SSH\u30ad\u30fc\u30da\u30a2\u3092\u751f\u6210\u3057\u3001OpenVPN\u30b5\u30fc\u30d0\u30fc\u306e\u516c\u958bSSH\u30ad\u30fc\u3092CA\u30de\u30b7\u30f3\u306eauthorized_keys\u30d5\u30a1\u30a4\u30eb\u306b\u8ffd\u52a0\u3057\u3001\u9006\u3082\u884c\u3046\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u3053\u308c\u3089\u306e\u89e3\u6c7a\u7b56\u306e\u3044\u305a\u308c\u304b\u3092\u5b9f\u884c\u3059\u308b\u624b\u9806\u306b\u3064\u3044\u3066\u306f\u3001\u300cDebian 11\u3067SSH\u30ad\u30fc\u3092\u8a2d\u5b9a\u3059\u308b\u65b9\u6cd5\u300d\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u3053\u308c\u3089\u306e\u524d\u63d0\u6761\u4ef6\u304c\u6574\u3063\u3066\u3044\u308b\u5834\u5408\u306b\u306f\u3001\u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u306e\u30b9\u30c6\u30c3\u30d71\u306b\u9032\u3080\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<h2>\u30b9\u30c6\u30c3\u30d71 &#8211; OpenVPN\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h2>\n<p>\u307e\u305a\u306f\u3058\u3081\u306b\u3001VPN\u30b5\u30fc\u30d0\u30fc\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u66f4\u65b0\u3057\u3001OpenVPN\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u304f\u3060\u3055\u3044\u3002OpenVPN\u306fDebian\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u30ea\u30dd\u30b8\u30c8\u30ea\u306b\u5229\u7528\u3067\u304d\u308b\u305f\u3081\u3001\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306b\u306fapt\u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u7528\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"$\"><span class=\"token function\">sudo<\/span> <span class=\"token function\">apt<\/span> update<\/li>\n<li data-prefix=\"$\"><span class=\"token function\">sudo<\/span> <span class=\"token function\">apt<\/span> <span class=\"token function\">install<\/span> openvpn<\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u3053\u308c\u3067OK\u3067\u3059\u3002\u65e2\u306b\u4e21\u65b9\u306e\u30b5\u30fc\u30d0\u30fc\u306b\u524d\u63d0\u6761\u4ef6\u3068\u3057\u3066Easy-RSA\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3001CA\u3082\u521d\u671f\u5316\u3055\u308c\u307e\u3057\u305f\u306e\u3067\u3001VPN\u30b5\u30fc\u30d0\u30fc\u306e\u8a3c\u660e\u66f8\u3092\u751f\u6210\u3059\u308b\u6e96\u5099\u304c\u6574\u3044\u307e\u3057\u305f\u3002<\/p>\n<h2>\u30b9\u30c6\u30c3\u30d72: \u30b5\u30fc\u30d0\u30fc\u8a3c\u660e\u66f8\u3001\u9375\u3001\u6697\u53f7\u5316\u30d5\u30a1\u30a4\u30eb\u306e\u4f5c\u6210<\/h2>\n<p>OpenVPN\u30b5\u30fc\u30d0\u30fc\u3067\u306f\u3001\u30eb\u30fc\u30c8\u4ee5\u5916\u306e\u30e6\u30fc\u30b6\u30fc\u306e\u30db\u30fc\u30e0\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u5185\u306e\/easy-rsa\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u79fb\u52d5\u3057\u3001easyrsa\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002\u305d\u306e\u5f8c\u3001\u6a5f\u68b0\u306e\u305f\u3081\u306e\u4e00\u822c\u540d\u3092\u6307\u5b9a\u3057\u3066gen-req\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002\u3053\u306e\u4e00\u822c\u540d\u306f\u4f55\u3067\u3082\u69cb\u3044\u307e\u305b\u3093\u304c\u3001\u8aac\u660e\u7684\u306a\u3082\u306e\u306b\u3059\u308b\u3068\u5f79\u7acb\u3061\u307e\u3059\u3002\u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u306f\u3001OpenVPN\u30b5\u30fc\u30d0\u30fc\u306e\u4e00\u822c\u540d\u306f\u5358\u7d14\u306b\u300c\u30b5\u30fc\u30d0\u30fc\u300d\u3067\u3059\u3002\u307e\u305f\u3001nopass\u30aa\u30d7\u30b7\u30e7\u30f3\u3082\u542b\u3081\u308b\u3088\u3046\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u3053\u308c\u3092\u884c\u308f\u306a\u3044\u3068\u3001\u30ea\u30af\u30a8\u30b9\u30c8\u30d5\u30a1\u30a4\u30eb\u306b\u30d1\u30b9\u30ef\u30fc\u30c9\u304c\u8a2d\u5b9a\u3055\u308c\u3001\u5f8c\u3067\u8a31\u53ef\u306e\u554f\u984c\u304c\u767a\u751f\u3059\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<div class=\"post-conf-note\">\n<p class=\"post-conf-desc\">Note<\/p>\n<div>\u6ce8\uff1a\u3053\u3053\u3067\u300cserver\u300d\u3068\u3044\u3046\u540d\u524d\u4ee5\u5916\u3092\u9078\u629e\u3059\u308b\u5834\u5408\u3001\u4ee5\u4e0b\u306e\u624b\u9806\u3092\u5909\u66f4\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u4f8b\u3048\u3070\u3001\u751f\u6210\u3055\u308c\u305f\u30d5\u30a1\u30a4\u30eb\u3092\/etc\/openvpn\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u30b3\u30d4\u30fc\u3059\u308b\u969b\u306b\u3001\u6b63\u3057\u3044\u540d\u524d\u306b\u7f6e\u304d\u63db\u3048\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u307e\u305f\u3001\u5f8c\u3067\/etc\/openvpn\/server.conf \u30d5\u30a1\u30a4\u30eb\u3092\u4fee\u6b63\u3057\u3066\u3001\u6b63\u3057\u3044.crt\u304a\u3088\u3073.key\u30d5\u30a1\u30a4\u30eb\u3092\u6307\u3059\u3088\u3046\u306b\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/div>\n<\/div>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"$\"><span class=\"token builtin class-name\">cd<\/span> ~\/easyrsa<\/li>\n<li data-prefix=\"$\">.\/easyrsa gen-req server nopass<\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u30b9\u30af\u30ea\u30d7\u30c8\u306f\u3001\u8a3c\u660e\u66f8\u7f72\u540d\u8981\u6c42\uff08CSR\uff09\u306b\u8868\u793a\u3055\u308c\u308b\u5171\u901a\u540d\u3092\u5165\u529b\u3059\u308b\u3088\u3046\u306b\u4fc3\u3057\u307e\u3059\u3002\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306f\u3001.\/easyrsa gen-req \u306b\u6e21\u3057\u305f\u540d\u524d\uff08\u305f\u3068\u3048\u3070\u3001\u30b5\u30fc\u30d0\u30fc\uff09\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u540d\u524d\u3092\u53d7\u3051\u5165\u308c\u308b\u306b\u306f\u3001ENTER\u30ad\u30fc\u3092\u62bc\u3059\u304b\u3001\u7570\u306a\u308b\u540d\u524d\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u3053\u308c\u306b\u3088\u308a\u3001\u30b5\u30fc\u30d0\u30fc\u306e\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8\u30ad\u30fc\u3068server.req\u3068\u3044\u3046\u540d\u524d\u306e\u8a3c\u660e\u66f8\u30ea\u30af\u30a8\u30b9\u30c8\u30d5\u30a1\u30a4\u30eb\u304c\u4f5c\u6210\u3055\u308c\u307e\u3059\u3002\u30b5\u30fc\u30d0\u30fc\u30ad\u30fc\u3092\/etc\/openvpn\/\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u30b3\u30d4\u30fc\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"$\"><span class=\"token function\">sudo<\/span> <span class=\"token function\">cp<\/span> ~\/easy-rsa\/pki\/private\/server.key \/etc\/openvpn\/<\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u5b89\u5168\u306a\u65b9\u6cd5\uff08\u4ee5\u4e0b\u306e\u4f8b\u306e\u3088\u3046\u306bSCP\u306a\u3069\uff09\u3092\u4f7f\u7528\u3057\u3066\u3001server.req\u30d5\u30a1\u30a4\u30eb\u3092CA\u30de\u30b7\u30f3\u306b\u8ee2\u9001\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"$\"><span class=\"token function\">scp<\/span> ~\/easy-rsa\/pki\/reqs\/server.req <mark>sammy<\/mark>@<mark>your_CA_ip<\/mark>:\/tmp<\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u6b21\u306b\u3001CA\u30de\u30b7\u30f3\u3067\u3001~\/easy-rsa\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u79fb\u52d5\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"$\"><span class=\"token builtin class-name\">cd<\/span> ~\/easy-rsa<\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u300ceasyrsa\u300d\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u4f7f\u7528\u3057\u3066\u3001\u30b5\u30fc\u30d0\u30fc.req\u30d5\u30a1\u30a4\u30eb\u3092\u30a4\u30f3\u30dd\u30fc\u30c8\u3057\u307e\u3059\u3002CSR\u3092\u4f5c\u6210\u3059\u308b\u969b\u306b\u5165\u529b\u3057\u305f\u30b3\u30e2\u30f3\u30cd\u30fc\u30e0\u3092\u30d5\u30a1\u30a4\u30eb\u30d1\u30b9\u306b\u7d9a\u3051\u3066\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"$\">.\/easyrsa import-req \/tmp\/server.req server<\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u305d\u306e\u5f8c\u3001sign-req\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u4f7f\u7528\u3057\u3066easyrsa\u3092\u5b9f\u884c\u3057\u3001\u30ea\u30af\u30a8\u30b9\u30c8\u30bf\u30a4\u30d7\u3068\u30b3\u30e2\u30f3\u30cd\u30fc\u30e0\u3067\u30ea\u30af\u30a8\u30b9\u30c8\u306b\u7f72\u540d\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u30ea\u30af\u30a8\u30b9\u30c8\u30bf\u30a4\u30d7\u306f\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u307e\u305f\u306f\u30b5\u30fc\u30d0\u30fc\u306e\u3069\u3061\u3089\u304b\u3092\u4f7f\u7528\u3067\u304d\u307e\u3059\u306e\u3067\u3001OpenVPN\u30b5\u30fc\u30d0\u30fc\u306e\u8a3c\u660e\u66f8\u30ea\u30af\u30a8\u30b9\u30c8\u306e\u5834\u5408\u306f\u5fc5\u305a\u30b5\u30fc\u30d0\u30fc\u30ea\u30af\u30a8\u30b9\u30c8\u30bf\u30a4\u30d7\u3092\u4f7f\u7528\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"$\">.\/easyrsa sign-req server server<\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u4ee5\u4e0b\u306e\u65e5\u672c\u8a9e\u3067\u306e\u8868\u73fe\u3092\uff11\u3064\u9078\u3093\u3067\u8a00\u3044\u63db\u3048\u3066\u304f\u3060\u3055\u3044\uff1a<br \/>\n\u300c\u51fa\u529b\u7d50\u679c\u3067\u3001\u4fe1\u983c\u3067\u304d\u308b\u30bd\u30fc\u30b9\u304b\u3089\u306e\u30ea\u30af\u30a8\u30b9\u30c8\u3067\u3042\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3059\u308b\u3088\u3046\u306b\u6c42\u3081\u3089\u308c\u307e\u3059\u3002 &#8216;\u306f\u3044&#8217; \u3068\u5165\u529b\u3057\u3066ENTER\u30ad\u30fc\u3092\u62bc\u3057\u3066\u3001\u3053\u308c\u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u300d<\/p>\n<pre class=\"post-pre\"><code>You are about to sign the following certificate.\r\nPlease check over the details shown below for accuracy. Note that this request\r\nhas not been cryptographically verified. Please be sure it came from a trusted\r\nsource or that you have verified the request checksum with the sender.\r\n\r\nRequest subject, to be signed as a server certificate for 825 days:\r\n\r\nsubject=\r\n    commonName                = server\r\n\r\n\r\nType the word 'yes' to continue, or any other input to abort.\r\n  Confirm request details: <mark>yes<\/mark>\r\n<\/code><\/pre>\n<p>\u524d\u63d0\u6761\u4ef6\u3067\u30ea\u30b9\u30c8\u3055\u308c\u3066\u3044\u308b\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u306b\u5f93\u3063\u3066CA\u30ad\u30fc\u3092\u6697\u53f7\u5316\u3057\u305f\u5834\u5408\u3001\u3053\u306e\u6642\u70b9\u3067\u30d1\u30b9\u30d5\u30ec\u30fc\u30ba\u304c\u8981\u6c42\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>\u6b21\u306b\u3001\u5b89\u5168\u306a\u65b9\u6cd5\u3092\u4f7f\u7528\u3057\u3066\u7f72\u540d\u3055\u308c\u305f\u8a3c\u660e\u66f8\u3092VPN\u30b5\u30fc\u30d0\u30fc\u306b\u8ee2\u9001\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"$\"><span class=\"token function\">scp<\/span> pki\/issued\/server.crt <mark>sammy<\/mark>@<mark>your_server_ip<\/mark>:\/tmp<\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>VPN\u30b5\u30fc\u30d0\u30fc\u306b\u3082ca.crt\u30d5\u30a1\u30a4\u30eb\u3092\u8ee2\u9001\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"$\"><span class=\"token function\">scp<\/span> pki\/ca.crt <mark>sammy<\/mark>@<mark>your_server_ip<\/mark>:\/tmp<\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u3042\u306a\u305f\u306eOpenVPN\u30b5\u30fc\u30d0\u30fc\u306f\u3001server.crt\u306b\u7f72\u540d\u3057\u305f\u30a8\u30f3\u30c6\u30a3\u30c6\u30a3\u3092\u4fe1\u983c\u3067\u304d\u308b\u3053\u3068\u3092\u77e5\u308b\u305f\u3081\u306b\u3001ca.crt\u304c\u5fc5\u8981\u3067\u3059\u3002<\/p>\n<p>\u6b21\u306b\u3001OpenVPN\u30b5\u30fc\u30d0\u30fc\u4e0a\u3067\u3001server.crt\u3068ca.crt\u30d5\u30a1\u30a4\u30eb\u3092\/etc\/openvpn\/\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u30b3\u30d4\u30fc\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"$\"><span class=\"token function\">sudo<\/span> <span class=\"token function\">cp<\/span> \/tmp\/<span class=\"token punctuation\">{<\/span>server.crt,ca.crt<span class=\"token punctuation\">}<\/span> \/etc\/openvpn\/<\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u305d\u306e\u5f8c\u3001~\/easy-rsa\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u79fb\u52d5\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"$\"><span class=\"token builtin class-name\">cd<\/span> ~\/easy-rsa<\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u305d\u3053\u304b\u3089\u3001\u30ad\u30fc\u4ea4\u63db\u4e2d\u306b\u4f7f\u7528\u3059\u308b\u5f37\u529b\u306aDiffie-Hellman\u30ad\u30fc\u3092\u4f5c\u6210\u3059\u308b\u305f\u3081\u306b\u3001\u6b21\u306e\u3088\u3046\u306b\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"$\">.\/easyrsa gen-dh<\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u5c11\u3057\u6642\u9593\u304c\u304b\u304b\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u304c\u3001\u5b8c\u4e86\u3057\u305f\u3089HMAC\u7f72\u540d\u3092\u751f\u6210\u3057\u3066\u3001\u30b5\u30fc\u30d0\u30fc\u306eTLS\u6574\u5408\u6027\u691c\u8a3c\u6a5f\u80fd\u3092\u5f37\u5316\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"$\"><span class=\"token function\">sudo<\/span> openvpn <span class=\"token parameter variable\">&#8211;genkey<\/span> secret ta.key<\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u30b3\u30de\u30f3\u30c9\u304c\u5b8c\u4e86\u3057\u305f\u3089\u30012\u3064\u306e\u65b0\u3057\u3044\u30d5\u30a1\u30a4\u30eb\u3092\/etc\/openvpn\/\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u30b3\u30d4\u30fc\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"$\"><span class=\"token function\">sudo<\/span> <span class=\"token function\">cp<\/span> ~\/easy-rsa\/ta.key \/etc\/openvpn\/<\/li>\n<li data-prefix=\"$\"><span class=\"token function\">sudo<\/span> <span class=\"token function\">cp<\/span> ~\/easy-rsa\/pki\/dh.pem \/etc\/openvpn\/<\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u305d\u308c\u306b\u3088\u308a\u3001\u30b5\u30fc\u30d0\u30fc\u3067\u5fc5\u8981\u306a\u3059\u3079\u3066\u306e\u8a3c\u660e\u66f8\u304a\u3088\u3073\u30ad\u30fc\u30d5\u30a1\u30a4\u30eb\u304c\u751f\u6210\u3055\u308c\u307e\u3057\u305f\u3002OpenVPN\u30b5\u30fc\u30d0\u30fc\u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u305f\u3081\u306b\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u30de\u30b7\u30f3\u304c\u4f7f\u7528\u3059\u308b\u5bfe\u5fdc\u3059\u308b\u8a3c\u660e\u66f8\u3068\u30ad\u30fc\u3092\u4f5c\u6210\u3059\u308b\u6e96\u5099\u304c\u6574\u3044\u307e\u3057\u305f\u3002<\/p>\n<h2>\u30b9\u30c6\u30c3\u30d73 \u2014 \u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u8a3c\u660e\u66f8\u3068\u30ad\u30fc\u30da\u30a2\u306e\u751f\u6210<\/h2>\n<p>\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u30de\u30b7\u30f3\u3067\u79d8\u5bc6\u9375\u3068\u8a3c\u660e\u66f8\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u751f\u6210\u3057\u3001\u305d\u308c\u3092CA\u306b\u7f72\u540d\u3057\u3066\u3082\u3089\u3046\u305f\u3081\u306b\u9001\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u304c\u3001\u3053\u306e\u30ac\u30a4\u30c9\u3067\u306fVPN\u30b5\u30fc\u30d0\u3067\u8a3c\u660e\u66f8\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u751f\u6210\u3059\u308b\u30d7\u30ed\u30bb\u30b9\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u5fc5\u8981\u306a\u3059\u3079\u3066\u306e\u9375\u3001\u8a3c\u660e\u66f8\u3001\u304a\u3088\u3073\u8a2d\u5b9a\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u542b\u3080\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u81ea\u52d5\u7684\u306b\u751f\u6210\u3059\u308b\u30b5\u30fc\u30d0\u30fc\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u4f5c\u6210\u3067\u304d\u307e\u3059\u3002\u901a\u5e38\u3001\u30e1\u30a4\u30f3\u306e\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3067\u306f\u3001\u5225\u3005\u306e\u9375\u3068\u8a3c\u660e\u66f8\u30d5\u30a1\u30a4\u30eb\u306e\u30d5\u30a1\u30a4\u30eb\u540d\u304c\u6307\u5b9a\u3055\u308c\u3001\u305d\u308c\u305e\u308c\u306e\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306b\u8907\u6570\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u914d\u5e03\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u3057\u304b\u3057\u3001VPN\u306b\u53c2\u52a0\u3059\u308b\u30d7\u30ed\u30bb\u30b9\u3092\u52b9\u7387\u5316\u3059\u308b\u305f\u3081\u306b\u3001\u9375\u3068\u8a3c\u660e\u66f8\u306e\u5185\u5bb9\u3092\u30e1\u30a4\u30f3\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u81ea\u4f53\u306b\u542b\u3081\u308b\u65b9\u304c\u306f\u308b\u304b\u306b\u826f\u3044\u3067\u3059\u3002\u305d\u306e\u5358\u4e00\u306e\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u306f\u3001\u30b9\u30c6\u30c3\u30d78\u3067\u751f\u6210\u3057\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u624b\u9806\u3067\u306f\u307e\u305a\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306e\u9375\u3068\u8a3c\u660e\u66f8\u3092\u751f\u6210\u3057\u307e\u3059\u3002\u8907\u6570\u306e\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u3092\u6301\u3063\u3066\u3044\u308b\u5834\u5408\u306f\u3001\u305d\u308c\u305e\u308c\u306b\u5bfe\u3057\u3066\u3053\u306e\u30d7\u30ed\u30bb\u30b9\u3092\u7e70\u308a\u8fd4\u3059\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u305f\u3060\u3057\u3001\u5404\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306b\u5bfe\u3057\u3066\u30b9\u30af\u30ea\u30d7\u30c8\u306b\u30e6\u30cb\u30fc\u30af\u306a\u540d\u524d\u5024\u3092\u6e21\u3059\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u5168\u4f53\u3067\u3001\u6700\u521d\u306e\u8a3c\u660e\u66f8\/\u9375\u30da\u30a2\u306f\u300cclient1\u300d\u3068\u547c\u3070\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>VPN\u30b5\u30fc\u30d0\u30fc\u4e0a\u3067\u306f\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u8a3c\u660e\u66f8\u3068\u30ad\u30fc\u30d5\u30a1\u30a4\u30eb\u3092\u683c\u7d0d\u3059\u308b\u305f\u3081\u306b\u3001\u30db\u30fc\u30e0\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u5185\u306b\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u69cb\u9020\u3092\u4f5c\u6210\u3057\u3066\u59cb\u3081\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"$\"><span class=\"token function\">mkdir<\/span> <span class=\"token parameter variable\">-p<\/span> ~\/client-configs\/keys<\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u3053\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306e\u8a3c\u660e\u66f8\/\u9375\u30da\u30a2\u3068\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u4fdd\u5b58\u3059\u308b\u305f\u3081\u3001\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u5bfe\u7b56\u3068\u3057\u3066\u3001\u305d\u306e\u30d1\u30fc\u30df\u30c3\u30b7\u30e7\u30f3\u3092\u4eca\u3059\u3050\u30ed\u30c3\u30af\u30c0\u30a6\u30f3\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"$\"><span class=\"token function\">chmod<\/span> <span class=\"token parameter variable\">-R<\/span> <span class=\"token number\">700<\/span> ~\/client-configs<\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u305d\u306e\u5f8c\u3001\u300c~\/easy-rsa\u300d\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u623b\u308a\u3001easyrsa\u30b9\u30af\u30ea\u30d7\u30c8\u3092gen-req\u30aa\u30d7\u30b7\u30e7\u30f3\u3068nopass\u30aa\u30d7\u30b7\u30e7\u30f3\u3068\u5171\u306b\u5b9f\u884c\u3057\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306e\u30b3\u30e2\u30f3\u30cd\u30fc\u30e0\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"$\"><span class=\"token builtin class-name\">cd<\/span> ~\/easy-rsa<\/li>\n<li data-prefix=\"$\">.\/easyrsa gen-req client1 nopass<\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u3010\u65e5\u672c\u8a9e\u3067\u306e\u8a00\u3044\u63db\u3048\u3011<br \/>\n\u5171\u901a\u306e\u540d\u524d\u3092\u78ba\u8a8d\u3059\u308b\u305f\u3081\u306bENTER\u30ad\u30fc\u3092\u62bc\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u305d\u308c\u304b\u3089\u3001\u5148\u307b\u3069\u4f5c\u6210\u3057\u305f\/client-configs\/keys\/\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306bclient1.key\u30d5\u30a1\u30a4\u30eb\u3092\u30b3\u30d4\u30fc\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"$\"><span class=\"token function\">cp<\/span> pki\/private\/client1.key ~\/client-configs\/keys\/<\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u6b21\u306b\u3001\u30bb\u30ad\u30e5\u30a2\u306a\u65b9\u6cd5\u3092\u7528\u3044\u3066\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c81\u306e.req\u30d5\u30a1\u30a4\u30eb\u3092\u3042\u306a\u305f\u306eCA\u30de\u30b7\u30f3\u306b\u8ee2\u9001\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"$\"><span class=\"token function\">scp<\/span> pki\/reqs\/client1.req <mark>sammy<\/mark>@<mark>your_CA_ip<\/mark>:\/tmp<\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u3042\u306a\u305f\u306eCA\u30de\u30b7\u30f3\u3067\u3001~\/easy-rsa\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u79fb\u52d5\u3057\u3001\u8a3c\u660e\u66f8\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u30a4\u30f3\u30dd\u30fc\u30c8\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"$\"><span class=\"token builtin class-name\">cd<\/span> ~\/easy-rsa<\/li>\n<li data-prefix=\"$\">.\/easyrsa import-req \/tmp\/client1.req client1<\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u524d\u306e\u624b\u9806\u3067\u30b5\u30fc\u30d0\u30fc\u306b\u5bfe\u3057\u3066\u884c\u3063\u305f\u3088\u3046\u306b\u3001\u3053\u306e\u30ea\u30af\u30a8\u30b9\u30c8\u306b\u3082\u7f72\u540d\u3092\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u305f\u3060\u3057\u3001\u4eca\u56de\u306f\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306e\u30ea\u30af\u30a8\u30b9\u30c8\u30bf\u30a4\u30d7\u3092\u660e\u78ba\u306b\u6307\u5b9a\u3059\u308b\u3088\u3046\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"$\">.\/easyrsa sign-req client client1<\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u30d7\u30ed\u30f3\u30d7\u30c8\u3067\u3001\u8a3c\u660e\u66f8\u30ea\u30af\u30a8\u30b9\u30c8\u306b\u7f72\u540d\u3057\u305f\u3044\u610f\u56f3\u304c\u3042\u308b\u3053\u3068\u3068\u3001\u305d\u308c\u304c\u4fe1\u983c\u3067\u304d\u308b\u30bd\u30fc\u30b9\u304b\u3089\u6765\u305f\u3053\u3068\u3092\u78ba\u8a8d\u3059\u308b\u5834\u5408\u306f\u3001\u306f\u3044\u3068\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<div class=\"secondary-code-label\" title=\"Output\">Output<\/div>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>Type the word &#8216;yes&#8217; to continue, or any other input to abort. Confirm request details: <mark>yes<\/mark><\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u518d\u5ea6\u3001\u3082\u3057CA\u30ad\u30fc\u3092\u6697\u53f7\u5316\u3057\u3066\u3044\u308b\u5834\u5408\u3001\u3053\u3053\u3067\u30d1\u30b9\u30d5\u30ec\u30fc\u30ba\u3092\u5165\u529b\u3059\u308b\u3088\u3046\u306b\u6c42\u3081\u3089\u308c\u307e\u3059\u3002<\/p>\n<p>\u3053\u308c\u306b\u3088\u308a\u3001client1.crt\u3068\u3044\u3046\u540d\u524d\u306e\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u8a3c\u660e\u66f8\u30d5\u30a1\u30a4\u30eb\u304c\u4f5c\u6210\u3055\u308c\u307e\u3059\u3002\u3053\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u30b5\u30fc\u30d0\u30fc\u306b\u8ee2\u9001\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"$\"><span class=\"token function\">scp<\/span> pki\/issued\/client1.crt <mark>sammy<\/mark>@<mark>your_server_ip<\/mark>:\/tmp<\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u3042\u306a\u305f\u306eOpenVPN\u30b5\u30fc\u30d0\u30fc\u4e0a\u3067\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u8a3c\u660e\u66f8\u3092\/client-configs\/keys\/\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u30b3\u30d4\u30fc\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"$\"><span class=\"token function\">cp<\/span> \/tmp\/client1.crt ~\/client-configs\/keys\/<\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u6b21\u306b\u3001ca.crt\u3068ta.key\u30d5\u30a1\u30a4\u30eb\u3092\/client-configs\/keys\/\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u3082\u30b3\u30d4\u30fc\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"$\"><span class=\"token function\">sudo<\/span> <span class=\"token function\">cp<\/span> ~\/easy-rsa\/ta.key ~\/client-configs\/keys\/<\/li>\n<li data-prefix=\"$\"><span class=\"token function\">sudo<\/span> <span class=\"token function\">cp<\/span> \/etc\/openvpn\/ca.crt ~\/client-configs\/keys\/<\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u305d\u308c\u306b\u3088\u3063\u3066\u3001\u30b5\u30fc\u30d0\u30fc\u3068\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306e\u8a3c\u660e\u66f8\u3068\u30ad\u30fc\u304c\u3059\u3079\u3066\u751f\u6210\u3055\u308c\u3001\u9069\u5207\u306a\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u4fdd\u5b58\u3055\u308c\u307e\u3057\u305f\u3002\u3053\u308c\u3089\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u4f7f\u7528\u3057\u3066\u307e\u3060\u3044\u304f\u3064\u304b\u306e\u30a2\u30af\u30b7\u30e7\u30f3\u3092\u5b9f\u884c\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u304c\u3001\u305d\u308c\u306f\u30b9\u30c6\u30c3\u30d78\u3067\u884c\u308f\u308c\u307e\u3059\u3002\u4eca\u306e\u3068\u3053\u308d\u3001\u30b5\u30fc\u30d0\u30fc\u3067OpenVPN\u3092\u8a2d\u5b9a\u3059\u308b\u3053\u3068\u306b\u79fb\u3063\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<h2>\u30b9\u30c6\u30c3\u30d74 \u2014 OpenVPN\u30b5\u30fc\u30d3\u30b9\u306e\u8a2d\u5b9a<\/h2>\n<p>\u3042\u306a\u305f\u306e\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u8a3c\u660e\u66f8\u3068\u30b5\u30fc\u30d0\u30fc\u8a3c\u660e\u66f8\u3001\u305d\u3057\u3066\u30ad\u30fc\u306e\u751f\u6210\u304c\u5b8c\u4e86\u3057\u307e\u3057\u305f\u306e\u3067\u3001\u3053\u308c\u3089\u306e\u8cc7\u683c\u60c5\u5831\u3092\u4f7f\u7528\u3059\u308b\u305f\u3081\u306bOpenVPN\u30b5\u30fc\u30d3\u30b9\u3092\u8a2d\u5b9a\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u6700\u521d\u306b\u3001\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u306e\u57fa\u76e4\u3068\u3057\u3066\u4f7f\u7528\u3059\u308b\u305f\u3081\u306b\u3001\u30b5\u30f3\u30d7\u30eb\u306eOpenVPN\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u8a2d\u5b9a\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u30b3\u30d4\u30fc\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"$\"><span class=\"token function\">sudo<\/span> <span class=\"token function\">cp<\/span> \/usr\/share\/doc\/openvpn\/examples\/sample-config-files\/server.conf \/etc\/openvpn\/<\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u3054\u5e0c\u671b\u306e\u30c6\u30ad\u30b9\u30c8\u30a8\u30c7\u30a3\u30bf\u3067\u30b5\u30fc\u30d0\u30fc\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u958b\u3044\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"$\"><span class=\"token function\">sudo<\/span> <span class=\"token function\">nano<\/span> \/etc\/openvpn\/server.conf<\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>tls-auth\u30c7\u30a3\u30ec\u30af\u30c6\u30a3\u30d6\u3092\u63a2\u3057\u3066\u3001HMAC\u30bb\u30af\u30b7\u30e7\u30f3\u3092\u898b\u3064\u3051\u3066\u304f\u3060\u3055\u3044\u3002\u3053\u306e\u884c\u306f\u3059\u3067\u306b\u30b3\u30e1\u30f3\u30c8\u89e3\u9664\u3055\u308c\u3066\u3044\u308b\u306f\u305a\u3067\u3059\u304c\u3001\u305d\u3046\u3067\u306a\u3044\u5834\u5408\u306f\u300c;\u300d\u3092\u524a\u9664\u3057\u3066\u30b3\u30e1\u30f3\u30c8\u89e3\u9664\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<div>\/etc\/openvpn\/server.conf<br \/>\n\u300c\/etc\/openvpn\/server.conf\u300d<\/div>\n<pre class=\"post-pre\"><code>tls-auth ta.key 0 # This file is secret\r\n<\/code><\/pre>\n<p>\u6b21\u306b\u3001\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8\u3055\u308c\u305f\u6697\u53f7\u884c\u3092\u63a2\u3057\u3066\u3001\u6697\u53f7\u5316\u6697\u53f7\u306b\u95a2\u3059\u308b\u30bb\u30af\u30b7\u30e7\u30f3\u3092\u898b\u3064\u3051\u3066\u304f\u3060\u3055\u3044\u3002AES-256-CBC\u6697\u53f7\u306f\u9ad8\u3044\u6697\u53f7\u5316\u30ec\u30d9\u30eb\u3092\u63d0\u4f9b\u3057\u3001\u5341\u5206\u306b\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u307e\u305f\u3001\u3053\u306e\u884c\u306f\u65e2\u306b\u30b3\u30e1\u30f3\u30c8\u89e3\u9664\u3055\u308c\u3066\u3044\u308b\u306f\u305a\u3067\u3059\u304c\u3001\u3082\u3057\u30b3\u30e1\u30f3\u30c8\u89e3\u9664\u3055\u308c\u3066\u3044\u306a\u3044\u5834\u5408\u306f\u3001\u5358\u306b\u524d\u306b\u3042\u308b\u300c;\u300d\u3092\u524a\u9664\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<div>\/etc\/openvpn\/server.conf \u306f\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u65e5\u672c\u8a9e\u3067\u8a00\u3044\u63db\u3048\u3089\u308c\u307e\u3059\u3002<br \/>\n\u300c\/etc\/openvpn\/server.conf\u300d\u3068\u3044\u3046\u30d5\u30a1\u30a4\u30eb\u3067\u3059\u3002<\/div>\n<pre class=\"post-pre\"><code>cipher AES-256-CBC\r\n<\/code><\/pre>\n<p>\u4ee5\u4e0b\u306b\u3001HMAC\u30e1\u30c3\u30bb\u30fc\u30b8\u30c0\u30a4\u30b8\u30a7\u30b9\u30c8\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u3092\u9078\u629e\u3059\u308b\u305f\u3081\u306eauth\u30c7\u30a3\u30ec\u30af\u30c6\u30a3\u30d6\u3092\u8ffd\u52a0\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u3053\u306e\u5834\u5408\u3001SHA256\u304c\u826f\u3044\u9078\u629e\u80a2\u3067\u3059\u3002<\/p>\n<div>\u4ee5\u4e0b\u306e\u30c6\u30ad\u30b9\u30c8\u3092\u65e5\u672c\u8a9e\u3067\u8ff0\u3079\u63db\u3048\u308b\u5834\u5408\u30011\u3064\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u306e\u307f\u5fc5\u8981\u3067\u3059\uff1a<br \/>\n\/etc\/openvpn\/server.conf\u300c\/etc\/openvpn\/server.conf\u300d<\/p>\n<\/div>\n<pre class=\"post-pre\"><code><mark>auth SHA256<\/mark>\r\n<\/code><\/pre>\n<p>\u6b21\u306b\u3001Diffie-Hellman\u30d1\u30e9\u30e1\u30fc\u30bf\u3092\u5b9a\u7fa9\u3059\u308bdh\u30c7\u30a3\u30ec\u30af\u30c6\u30a3\u30d6\u3092\u542b\u3080\u884c\u3092\u898b\u3064\u3051\u3066\u304f\u3060\u3055\u3044\u3002Easy-RSA\u306b\u6700\u8fd1\u306e\u5909\u66f4\u304c\u52a0\u3048\u3089\u308c\u305f\u305f\u3081\u3001Diffie-Hellman\u30ad\u30fc\u306e\u30d5\u30a1\u30a4\u30eb\u540d\u306f\u3001\u4f8b\u793a\u3055\u308c\u305f\u30b5\u30fc\u30d0\u30fc\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u306b\u8a18\u8f09\u3055\u308c\u3066\u3044\u308b\u3082\u306e\u3068\u306f\u7570\u306a\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002\u5fc5\u8981\u306a\u5834\u5408\u306f\u3001\u4ee5\u524d\u306e\u30b9\u30c6\u30c3\u30d7\u3067\u751f\u6210\u3057\u305f\u30ad\u30fc\u3068\u4e00\u81f4\u3059\u308b\u3088\u3046\u3001\u3053\u3053\u306b\u8a18\u8f09\u3055\u308c\u3066\u3044\u308b\u30d5\u30a1\u30a4\u30eb\u540d\u304b\u30892048\u3092\u524a\u9664\u3057\u3066\u5909\u66f4\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<div>\u4ee5\u4e0b\u306e\u6587\u3092\u65e5\u672c\u8a9e\u3067\u81ea\u7136\u306b\u8a00\u3044\u63db\u3048\u3066\u304f\u3060\u3055\u3044\u30021\u3064\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u306e\u307f\u3067\u69cb\u3044\u307e\u305b\u3093\uff1a<br \/>\n\u300c\/etc\/openvpn\/server.conf\u300d<\/div>\n<pre class=\"post-pre\"><code>dh dh.pem\r\n<\/code><\/pre>\n<p>\u6700\u7d42\u7684\u306b\u3001\u30e6\u30fc\u30b6\u30fc\u3068\u30b0\u30eb\u30fc\u30d7\u306e\u8a2d\u5b9a\u3092\u898b\u3064\u3051\u3001\u30b3\u30e1\u30f3\u30c8\u3092\u89e3\u9664\u3059\u308b\u305f\u3081\u306b\u5404\u884c\u306e\u5148\u982d\u306e\u300c;\u300d\u3092\u524a\u9664\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<div>\u4ee5\u4e0b\u306e\u3082\u306e\u3092\u65e5\u672c\u8a9e\u3067\u8868\u73fe\u3059\u308b\u3068\u3001<br \/>\n\u300c\/etc\/openvpn\/server.conf\u300d<\/div>\n<pre class=\"post-pre\"><code>user nobody\r\ngroup nogroup\r\n<\/code><\/pre>\n<p>\u3053\u3053\u307e\u3067\u306e\u30b5\u30f3\u30d7\u30ebserver.conf\u30d5\u30a1\u30a4\u30eb\u306e\u5909\u66f4\u306f\u3001OpenVPN\u306e\u6b63\u5e38\u306a\u52d5\u4f5c\u306e\u305f\u3081\u306b\u5fc5\u8981\u3067\u3059\u3002\u4ee5\u4e0b\u306b\u793a\u3059\u5909\u66f4\u306f\u3001\u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u3059\u304c\u3001\u4e00\u822c\u7684\u306a\u4f7f\u7528\u4f8b\u306b\u3082\u5fc5\u8981\u3067\u3059\u3002<\/p>\n<h3>\u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u3001VPN\u3092\u4ecb\u3057\u3066\u3059\u3079\u3066\u306e\u30c8\u30e9\u30d5\u30a3\u30c3\u30af\u3092\u30ea\u30c0\u30a4\u30ec\u30af\u30c8\u3059\u308b\u305f\u3081\u306bDNS\u306e\u5909\u66f4\u3092\u63a8\u9032\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/h3>\n<p>\u4e0a\u8a18\u306e\u8a2d\u5b9a\u306f\u30012\u3064\u306e\u30de\u30b7\u30f3\u9593\u306bVPN\u63a5\u7d9a\u3092\u4f5c\u6210\u3057\u307e\u3059\u304c\u3001\u63a5\u7d9a\u3092\u30c8\u30f3\u30cd\u30eb\u7d4c\u7531\u306b\u5f37\u5236\u3059\u308b\u3053\u3068\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u3059\u3079\u3066\u306e\u30c8\u30e9\u30d5\u30a3\u30c3\u30af\u3092VPN\u7d4c\u7531\u3067\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u3059\u308b\u5834\u5408\u306f\u3001\u304a\u305d\u3089\u304f\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u306bDNS\u8a2d\u5b9a\u3092\u30d7\u30c3\u30b7\u30e5\u3059\u308b\u3053\u3068\u3092\u5e0c\u671b\u3059\u308b\u3067\u3057\u3087\u3046\u3002<\/p>\n<p>\u3053\u306e\u6a5f\u80fd\u3092\u6709\u52b9\u306b\u3059\u308b\u305f\u3081\u306b\u306f\u3001server.conf\u30d5\u30a1\u30a4\u30eb\u306b\u3044\u304f\u3064\u304b\u306e\u6307\u793a\u304c\u3042\u308a\u307e\u3059\u3002redirect-gateway\u30bb\u30af\u30b7\u30e7\u30f3\u3092\u898b\u3064\u3051\u3001redirect-gateway\u306e\u884c\u306e\u5148\u982d\u306b\u3042\u308b\u30bb\u30df\u30b3\u30ed\u30f3\u300c;\u300d\u3092\u524a\u9664\u3057\u3066\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8\u3092\u89e3\u9664\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<div>\n<p>\/etc\/openvpn\/server.conf\u3092\u65e5\u672c\u8a9e\u3067\u7ffb\u8a33\u3059\u308b\u3068\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u300c\/etc\/openvpn\/server.conf\u300d<\/p>\n<\/div>\n<pre class=\"post-pre\"><code>push \"redirect-gateway def1 bypass-dhcp\"\r\n<\/code><\/pre>\n<p>\u3053\u306e\u4e0b\u306b\u3001dhcp-option\u30bb\u30af\u30b7\u30e7\u30f3\u304c\u3042\u308a\u307e\u3059\u3002\u518d\u3073\u3001\u3053\u308c\u3089\u306e\u4e21\u884c\u306e\u524d\u306e\u300c;\u300d\u3092\u524a\u9664\u3057\u3066\u30b3\u30e1\u30f3\u30c8\u89e3\u9664\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<div>\/etc\/openvpn\/server.conf\u306e\u65e5\u672c\u8a9e\u3067\u306e\u8868\u73fe\u306f\u6b21\u306e\u901a\u308a\u3067\u3059\u3002<\/div>\n<pre class=\"post-pre\"><code>push \"dhcp-option DNS 208.67.222.222\"\r\npush \"dhcp-option DNS 208.67.220.220\"\r\n<\/code><\/pre>\n<p>\u3053\u308c\u306b\u3088\u308a\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306fVPN\u30c8\u30f3\u30cd\u30eb\u3092\u30c7\u30d5\u30a9\u30eb\u30c8\u30b2\u30fc\u30c8\u30a6\u30a7\u30a4\u3068\u3057\u3066\u4f7f\u7528\u3059\u308b\u305f\u3081\u306b\u3001DNS\u8a2d\u5b9a\u3092\u518d\u69cb\u6210\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<h3>\u30dd\u30fc\u30c8\u3068\u30d7\u30ed\u30c8\u30b3\u30eb\u3092\u8abf\u6574\u3057\u307e\u3059\uff08\u30aa\u30d7\u30b7\u30e7\u30f3\uff09\u3002<\/h3>\n<p>\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306f\u3001OpenVPN\u30b5\u30fc\u30d0\u30fc\u306f\u30dd\u30fc\u30c81194\u3068UDP\u30d7\u30ed\u30c8\u30b3\u30eb\u3092\u4f7f\u7528\u3057\u3066\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u63a5\u7d9a\u3092\u53d7\u3051\u5165\u308c\u307e\u3059\u3002\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u304c\u5236\u9650\u306e\u3042\u308b\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u74b0\u5883\u306b\u3044\u308b\u305f\u3081\u3001\u5225\u306e\u30dd\u30fc\u30c8\u3092\u4f7f\u7528\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u5834\u5408\u306f\u3001\u30dd\u30fc\u30c8\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u5909\u66f4\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002OpenVPN\u30b5\u30fc\u30d0\u30fc\u3067\u30a6\u30a7\u30d6\u30b3\u30f3\u30c6\u30f3\u30c4\u3092\u30db\u30b9\u30c6\u30a3\u30f3\u30b0\u3057\u3066\u3044\u306a\u3044\u5834\u5408\u3001\u30dd\u30fc\u30c8443\u306f\u4e00\u822c\u7684\u306a\u9078\u629e\u80a2\u3067\u3059\u3002\u306a\u305c\u306a\u3089\u3001\u901a\u5e38\u30d5\u30a1\u30a4\u30a2\u30a6\u30a9\u30fc\u30eb\u306e\u30eb\u30fc\u30eb\u3092\u901a\u904e\u3059\u308b\u3053\u3068\u304c\u8a31\u53ef\u3055\u308c\u3066\u3044\u308b\u304b\u3089\u3067\u3059\u3002<\/p>\n<div>\u4ee5\u4e0b\u306e\u6587\u3092\u65e5\u672c\u8a9e\u306b\u81ea\u7136\u306b\u8a00\u3044\u63db\u3048\u3066\u304f\u3060\u3055\u3044\u3002\u305f\u3060\u3057\u30011\u3064\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u306e\u307f\u304c\u5fc5\u8981\u3067\u3059\uff1a<br \/>\n\/etc\/openvpn\/server.conf\u300c\/etc\/openvpn\/server.conf\u300d<\/p>\n<\/div>\n<pre class=\"post-pre\"><code># Optional!\r\nport <mark>443<\/mark>\r\n<\/code><\/pre>\n<p>\u3088\u304f\u3042\u308b\u3053\u3068\u3067\u3059\u304c\u3001\u305d\u306e\u30dd\u30fc\u30c8\u306b\u30d7\u30ed\u30c8\u30b3\u30eb\u304c\u5236\u9650\u3055\u308c\u3066\u3044\u308b\u3053\u3068\u3082\u3042\u308a\u307e\u3059\u3002\u305d\u306e\u5834\u5408\u306f\u3001UDP\u304b\u3089TCP\u306b\u30d7\u30ed\u30c8\u30b3\u30eb\u3092\u5909\u66f4\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<div>\/etc\/openvpn\/server.conf\u3092\u65e5\u672c\u8a9e\u3067\u8a00\u3044\u63db\u3048\u308b\u3068\u300c\u30aa\u30ea\u30b8\u30ca\u30eb\u3067\u306f\u4ee5\u4e0b\u306e\u30d1\u30b9\u306b\u3042\u308b\u30d5\u30a1\u30a4\u30eb\u3067\u3059\uff1a\/etc\/openvpn\/server.conf\u300d\u3068\u306a\u308a\u307e\u3059\u3002<\/div>\n<pre class=\"post-pre\"><code># Optional!\r\nproto <mark>tcp<\/mark>\r\n<\/code><\/pre>\n<p>\u3082\u3057\u30d7\u30ed\u30c8\u30b3\u30eb\u3092TCP\u306b\u5207\u308a\u66ff\u3048\u308b\u5834\u5408\u306f\u3001explicit-exit-notify\u30c7\u30a3\u30ec\u30af\u30c6\u30a3\u30d6\u306e\u5024\u30921\u304b\u30890\u306b\u5909\u66f4\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u306e\u30c7\u30a3\u30ec\u30af\u30c6\u30a3\u30d6\u306fUDP\u306e\u307f\u3067\u4f7f\u7528\u3055\u308c\u308b\u305f\u3081\u3001TCP\u3092\u4f7f\u7528\u3057\u306a\u304c\u3089\u5909\u66f4\u3057\u306a\u3044\u3068OpenVPN\u30b5\u30fc\u30d3\u30b9\u306e\u958b\u59cb\u6642\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3059\u3002<\/p>\n<div>\u4ee5\u4e0b\u306f\u3001\u65e5\u672c\u8a9e\u3067\u30d1\u30e9\u30d5\u30ec\u30fc\u30ba\u3055\u308c\u305f&#8221;Natively in Japanese&#8221;\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u3059\uff1a<br \/>\n\u300c\/etc\/openvpn\/server.conf\u300d<\/div>\n<pre class=\"post-pre\"><code># Optional!\r\nexplicit-exit-notify <mark>0<\/mark>\r\n<\/code><\/pre>\n<p>\u7570\u306a\u308b\u30dd\u30fc\u30c8\u3068\u30d7\u30ed\u30c8\u30b3\u30eb\u3092\u4f7f\u7528\u3059\u308b\u5fc5\u8981\u304c\u306a\u3044\u5834\u5408\u306f\u3001\u3053\u308c\u3089\u306e3\u3064\u306e\u8a2d\u5b9a\u3092\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u307e\u307e\u306b\u3057\u3066\u304a\u304f\u306e\u304c\u6700\u9069\u3067\u3059\u3002<\/p>\n<h3>\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306f\u306a\u3044\u8cc7\u683c\u60c5\u5831\u3092\u6307\u5b9a\u3059\u308b\u30aa\u30d7\u30b7\u30e7\u30f3\u304c\u3042\u308a\u307e\u3059\u3002<\/h3>\n<p>\u3082\u3057\u3082Step2\u306e.\/easyrsa gen-req \u30b3\u30de\u30f3\u30c9\u3067\u30b5\u30fc\u30d0\u8a3c\u660e\u66f8\u306e\u305f\u3081\u306b\u7570\u306a\u308b\u540d\u524d\u3092\u9078\u629e\u3057\u305f\u5834\u5408\u306f\u3001\u8868\u793a\u3055\u308c\u308b.cert\u3068.key\u306e\u884c\u3092\u9069\u5207\u306a.crt\u3068.key\u30d5\u30a1\u30a4\u30eb\u306b\u5411\u3051\u3066\u4fee\u6b63\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u3082\u3057\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u540d\u524d\u3067\u3042\u308b\u300cserver\u300d\u3092\u4f7f\u7528\u3057\u305f\u5834\u5408\u306f\u3001\u65e2\u306b\u6b63\u3057\u304f\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<div>\u4ee5\u4e0b\u306f\u65e5\u672c\u8a9e\u3067\u306e\u8868\u73fe\u4f8b\u3067\u3059\uff1a<br \/>\n\u300c\/etc\/openvpn\/server.conf\u300d<\/div>\n<pre class=\"post-pre\"><code>cert <mark>server<\/mark>.crt\r\nkey <mark>server<\/mark>.key\r\n<\/code><\/pre>\n<p>\u4f5c\u696d\u304c\u7d42\u308f\u3063\u305f\u3089\u3001\u30d5\u30a1\u30a4\u30eb\u3092\u4fdd\u5b58\u3057\u3066\u9589\u3058\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u3042\u306a\u305f\u306e\u30b5\u30fc\u30d0\u30fc\u306eOpenVPN\u8a2d\u5b9a\u306b\u5fc5\u8981\u306a\u5909\u66f4\u3092\u7d4c\u3066\u3001\u7279\u5b9a\u306e\u5229\u7528\u65b9\u6cd5\u306b\u5408\u308f\u305b\u3066\u3001\u30b5\u30fc\u30d0\u30fc\u306e\u30cd\u30c3\u30c8\u30ef\u30fc\u30ad\u30f3\u30b0\u306b\u5909\u66f4\u3092\u52a0\u3048\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<h2>\u30b9\u30c6\u30c3\u30d75- \u30b5\u30fc\u30d0\u30fc\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306e\u8a2d\u5b9a\u3092\u8abf\u6574\u3059\u308b<\/h2>\n<p>OpenVPN\u304cVPN\u7d4c\u7531\u3067\u30c8\u30e9\u30d5\u30a3\u30c3\u30af\u3092\u6b63\u3057\u304f\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u3067\u304d\u308b\u3088\u3046\u306b\u3001\u30b5\u30fc\u30d0\u30fc\u306e\u30cd\u30c3\u30c8\u30ef\u30fc\u30ad\u30f3\u30b0\u69cb\u6210\u306e\u3044\u304f\u3064\u304b\u306e\u5074\u9762\u3092\u8abf\u6574\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u305d\u306e\u4e2d\u3067\u6700\u521d\u306b\u5fc5\u8981\u306a\u306e\u306fIP\u30d5\u30a9\u30ef\u30fc\u30c7\u30a3\u30f3\u30b0\u3067\u3059\u3002\u3053\u308c\u306fIP\u30c8\u30e9\u30d5\u30a3\u30c3\u30af\u3092\u3069\u3053\u306b\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u3059\u308b\u304b\u3092\u6c7a\u5b9a\u3059\u308b\u305f\u3081\u306e\u65b9\u6cd5\u3067\u3059\u3002<\/p>\n<p>\/etc\/sysctl.conf\u30d5\u30a1\u30a4\u30eb\u3092\u4fee\u6b63\u3057\u3066\u3001\u30b5\u30fc\u30d0\u30fc\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u306eIP\u30d5\u30a9\u30ef\u30fc\u30c7\u30a3\u30f3\u30b0\u8a2d\u5b9a\u3092\u8abf\u6574\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"$\"><span class=\"token function\">sudo<\/span> <span class=\"token function\">nano<\/span> \/etc\/sysctl.conf<\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u4e2d\u306b\u3042\u308b\u3001net.ipv4.ip_forward\u3092\u8a2d\u5b9a\u3057\u3066\u3044\u308b\u30b3\u30e1\u30f3\u30c8\u884c\u3092\u63a2\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u3053\u306e\u8a2d\u5b9a\u3092\u6709\u52b9\u306b\u3059\u308b\u305f\u3081\u306b\u3001\u884c\u306e\u5148\u982d\u306e\u300c#\u300d\u3092\u524a\u9664\u3057\u3066\u30b3\u30e1\u30f3\u30c8\u3092\u5916\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<div>\n<p>\u4ee5\u4e0b\u306e\u5185\u5bb9\u3092\u65e5\u672c\u8a9e\u3067\u8868\u73fe\u3059\u308b\u3068\u3001\u6b21\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\uff1a<\/p>\n<p>\u300c\/etc\/sysctl.conf\u300d<\/p>\n<\/div>\n<pre class=\"post-pre\"><code>net.ipv4.ip_forward=1\r\n<\/code><\/pre>\n<p>\u5b8c\u4e86\u3057\u305f\u3089\u3001\u30d5\u30a1\u30a4\u30eb\u3092\u4fdd\u5b58\u3057\u3066\u9589\u3058\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u30d5\u30a1\u30a4\u30eb\u3092\u8aad\u307f\u8fbc\u3093\u3067\u73fe\u5728\u306e\u30bb\u30c3\u30b7\u30e7\u30f3\u306b\u5024\u3092\u8abf\u6574\u3059\u308b\u306b\u306f\u3001\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"$\"><span class=\"token function\">sudo<\/span> <span class=\"token function\">sysctl<\/span> <span class=\"token parameter variable\">-p<\/span><\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<div class=\"secondary-code-label\" title=\"Output\">Output<\/div>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>net.ipv4.ip_forward = 1<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>Debian 11\u306e\u521d\u671f\u30b5\u30fc\u30d0\u30fc\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u30ac\u30a4\u30c9\u306b\u5f93\u3063\u3066UFW\u30d5\u30a1\u30a4\u30a2\u30a6\u30a9\u30fc\u30eb\u3092\u8a2d\u7f6e\u3057\u3066\u3044\u308b\u5834\u5408\u3001\u30d5\u30a1\u30a4\u30a2\u30a6\u30a9\u30fc\u30eb\u306f\u65e2\u306b\u6a5f\u80fd\u3057\u3066\u3044\u308b\u306f\u305a\u3067\u3059\u3002\u4e0d\u8981\u306a\u30c8\u30e9\u30d5\u30a3\u30c3\u30af\u3092\u30d6\u30ed\u30c3\u30af\u3059\u308b\u305f\u3081\u306b\u30d5\u30a1\u30a4\u30a2\u30a6\u30a9\u30fc\u30eb\u3092\u4f7f\u7528\u3059\u308b\u304b\u3069\u3046\u304b\u306b\u95a2\u308f\u3089\u305a\uff08\u307b\u3068\u3093\u3069\u306e\u5834\u5408\u3001\u4f7f\u7528\u3059\u308b\u3053\u3068\u3092\u304a\u3059\u3059\u3081\u3057\u307e\u3059\uff09\u3001\u3053\u306e\u30ac\u30a4\u30c9\u3067\u306f\u30b5\u30fc\u30d0\u30fc\u3078\u306e\u4e00\u90e8\u306e\u30c8\u30e9\u30d5\u30a3\u30c3\u30af\u3092\u64cd\u4f5c\u3059\u308b\u305f\u3081\u306b\u30d5\u30a1\u30a4\u30a2\u30a6\u30a9\u30fc\u30eb\u304c\u5fc5\u8981\u3067\u3059\u3002\u30d5\u30a1\u30a4\u30a2\u30a6\u30a9\u30fc\u30eb\u306e\u3044\u304f\u3064\u304b\u306e\u30eb\u30fc\u30eb\u3092\u5909\u66f4\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306e\u63a5\u7d9a\u3092\u6b63\u3057\u304f\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u3059\u308b\u305f\u3081\u306b\u3001\u30a2\u30c9\u30ec\u30b9\u5909\u63db\u3092\u63d0\u4f9b\u3059\u308biptables\u306e\u6982\u5ff5\u3067\u3042\u308b\u30de\u30b9\u30ab\u30ec\u30fc\u30c9\u304c\u6709\u52b9\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u30d5\u30a1\u30a4\u30a2\u30a6\u30a9\u30fc\u30eb\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u958b\u304f\u524d\u306b\u3001\u307e\u305a\u30de\u30b9\u30ab\u30ec\u30fc\u30c9\u30eb\u30fc\u30eb\u3092\u8ffd\u52a0\u3059\u308b\u305f\u3081\u306b\u81ea\u5206\u306e\u30de\u30b7\u30f3\u306e\u30d1\u30d6\u30ea\u30c3\u30af\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u3092\u898b\u3064\u3051\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u308c\u3092\u884c\u3046\u306b\u306f\u3001\u6b21\u306e\u3088\u3046\u306b\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"$\"><span class=\"token function\">ip<\/span> route <span class=\"token operator\">|<\/span> <span class=\"token function\">grep<\/span> default<\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u30b3\u30de\u30f3\u30c9\u306e\u51fa\u529b\u306b\u8868\u793a\u3055\u308c\u308b\u300cdev\u300d\u306b\u7d9a\u304f\u6587\u5b57\u5217\u304c\u3042\u306a\u305f\u306e\u516c\u958b\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u3067\u3059\u3002\u4ee5\u4e0b\u306e\u51fa\u529b\u4f8b\u3067\u306f\u3001eth0\u3068\u3044\u3046\u540d\u524d\u306e\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u304c\u30cf\u30a4\u30e9\u30a4\u30c8\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<div class=\"secondary-code-label\" title=\"Output\">Output<\/div>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>default via 203.0.113.1 dev <mark>eth0<\/mark> proto static<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u30c7\u30d5\u30a9\u30eb\u30c8\u30eb\u30fc\u30c8\u306b\u95a2\u9023\u3059\u308b\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u304c\u3042\u308b\u5834\u5408\u3001\u9069\u5207\u306a\u8a2d\u5b9a\u3092\u8ffd\u52a0\u3059\u308b\u305f\u3081\u306b\/etc\/ufw\/before.rules\u30d5\u30a1\u30a4\u30eb\u3092\u958b\u3044\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"$\"><span class=\"token function\">sudo<\/span> <span class=\"token function\">nano<\/span> \/etc\/ufw\/before.rules<\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u901a\u5e38\u3001UFW\u306e\u30eb\u30fc\u30eb\u306fufw\u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u7528\u3057\u3066\u8ffd\u52a0\u3055\u308c\u307e\u3059\u3002\u305f\u3060\u3057\u3001before.rules\u30d5\u30a1\u30a4\u30eb\u306b\u30ea\u30b9\u30c8\u3055\u308c\u305f\u30eb\u30fc\u30eb\u306f\u3001\u901a\u5e38\u306eUFW\u306e\u30eb\u30fc\u30eb\u304c\u8aad\u307f\u8fbc\u307e\u308c\u308b\u524d\u306b\u8aad\u307f\u8fbc\u307e\u308c\u3001\u914d\u7f6e\u3055\u308c\u307e\u3059\u3002\u30d5\u30a1\u30a4\u30eb\u306e\u4e0a\u90e8\u306b\u3001\u4e0b\u8a18\u306e\u30cf\u30a4\u30e9\u30a4\u30c8\u3055\u308c\u305f\u884c\u3092\u8ffd\u52a0\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u3053\u308c\u306b\u3088\u308a\u3001nat\u30c6\u30fc\u30d6\u30eb\u306ePOSTROUTING\u30c1\u30a7\u30fc\u30f3\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u30dd\u30ea\u30b7\u30fc\u304c\u8a2d\u5b9a\u3055\u308c\u3001VPN\u304b\u3089\u306e\u30c8\u30e9\u30d5\u30a3\u30c3\u30af\u304c\u30de\u30b9\u30ab\u30ec\u30fc\u30c9\u3055\u308c\u307e\u3059\u3002\u4ee5\u4e0b\u306e -A POSTROUTING \u884c\u306eeth0\u3092\u3001\u4e0a\u8a18\u306e\u30b3\u30de\u30f3\u30c9\u3067\u898b\u3064\u3051\u305f\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u306b\u7f6e\u304d\u63db\u3048\u308b\u3053\u3068\u3092\u304a\u5fd8\u308c\u306a\u304f\u3002<\/p>\n<div>\/etc\/ufw\/before.rules\u3092\u65e5\u672c\u8a9e\u3067\u8ff0\u3079\u308b\u3068\u3001\u300c\u3042\u308b\u30aa\u30d7\u30b7\u30e7\u30f3\u300d\u3068\u306a\u308a\u307e\u3059\u3002<\/div>\n<pre class=\"post-pre\"><code>#\r\n# rules.before\r\n#\r\n# Rules that should be run before the ufw command line added rules. Custom\r\n# rules should be added to one of these chains:\r\n#   ufw-before-input\r\n#   ufw-before-output\r\n#   ufw-before-forward\r\n#\r\n\r\n<mark># START OPENVPN RULES<\/mark>\r\n<mark># NAT table rules<\/mark>\r\n<mark>*nat<\/mark>\r\n<mark>:POSTROUTING ACCEPT [0:0]<\/mark> \r\n<mark># Allow traffic from OpenVPN client to <\/mark>eth0<mark> (change to the interface you discovered!)<\/mark>\r\n<mark>-A POSTROUTING -s 10.8.0.0\/8 -o <\/mark>eth0<mark> -j MASQUERADE<\/mark>\r\n<mark>COMMIT<\/mark>\r\n<mark># END OPENVPN RULES<\/mark>\r\n\r\n# Don't delete these required lines, otherwise there will be errors\r\n*filter\r\n. . .\r\n<\/code><\/pre>\n<p>\u7d42\u308f\u3063\u305f\u3089\u3001\u30d5\u30a1\u30a4\u30eb\u3092\u4fdd\u5b58\u3057\u3066\u9589\u3058\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u6b21\u306b\u3001UFW\u306b\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u8ee2\u9001\u30d1\u30b1\u30c3\u30c8\u3092\u8a31\u53ef\u3059\u308b\u3088\u3046\u306b\u6307\u793a\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u308c\u3092\u884c\u3046\u306b\u306f\u3001\/etc\/default\/ufw \u30d5\u30a1\u30a4\u30eb\u3092\u958b\u3044\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"$\"><span class=\"token function\">sudo<\/span> <span class=\"token function\">nano<\/span> \/etc\/default\/ufw<\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u4e2d\u306b\u5165\u308a\u3001DEFAULT_FORWARD_POLICY\u306e\u6307\u793a\u3092\u898b\u3064\u3051\u3001\u5024\u3092DROP\u304b\u3089ACCEPT\u306b\u5909\u66f4\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<div>\/etc\/default\/ufw\u3092\u65e5\u672c\u8a9e\u3067\u8a00\u3044\u63db\u3048\u308b\u3068\u3001\u300c\/etc\/default\/ufw\u300d\u3068\u306a\u308a\u307e\u3059\u3002<\/div>\n<pre class=\"post-pre\"><code>DEFAULT_FORWARD_POLICY=\"<mark>ACCEPT<\/mark>\"\r\n<\/code><\/pre>\n<p>\u304a\u308f\u3063\u305f\u3089\u3001\u30d5\u30a1\u30a4\u30eb\u3092\u4fdd\u5b58\u3057\u3066\u9589\u3058\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u6b21\u306b\u3001\u30d5\u30a1\u30a4\u30a2\u30a6\u30a9\u30fc\u30eb\u81ea\u4f53\u3092\u8abf\u6574\u3057\u3066\u3001OpenVPN\u3078\u306e\u30c8\u30e9\u30d5\u30a3\u30c3\u30af\u3092\u8a31\u53ef\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u3082\u3057\/etc\/openvpn\/server.conf\u30d5\u30a1\u30a4\u30eb\u3067\u30dd\u30fc\u30c8\u3068\u30d7\u30ed\u30c8\u30b3\u30eb\u3092\u5909\u66f4\u3057\u3066\u3044\u306a\u3044\u5834\u5408\u306f\u3001UDP\u30c8\u30e9\u30d5\u30a3\u30c3\u30af\u3092\u30dd\u30fc\u30c81194\u306b\u958b\u653e\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u3082\u3057\u30dd\u30fc\u30c8\u304a\u3088\u3073\/\u307e\u305f\u306f\u30d7\u30ed\u30c8\u30b3\u30eb\u3092\u5909\u66f4\u3057\u305f\u5834\u5408\u306f\u3001\u9078\u629e\u3057\u305f\u5024\u3067\u7f6e\u304d\u63db\u3048\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u307e\u305f\u3001\u524d\u63d0\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u306e\u5b8c\u4e86\u6642\u306bSSH\u30dd\u30fc\u30c8\u3092\u8ffd\u52a0\u3057\u306a\u304b\u3063\u305f\u5834\u5408\u306f\u3001\u3053\u3061\u3089\u3067\u3082\u8ffd\u52a0\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"$\"><span class=\"token function\">sudo<\/span> ufw allow <mark><span class=\"token number\">1194<\/span><\/mark>\/<mark>udp<\/mark><\/li>\n<li data-prefix=\"$\"><span class=\"token function\">sudo<\/span> ufw allow OpenSSH<\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u3053\u308c\u3089\u306e\u30eb\u30fc\u30eb\u3092\u8ffd\u52a0\u3057\u305f\u5f8c\u3067\u3001UFW\u3092\u7121\u52b9\u306b\u3057\u3066\u304b\u3089\u518d\u5ea6\u6709\u52b9\u306b\u3059\u308b\u3053\u3068\u3067\u3001\u5909\u66f4\u3057\u305f\u5168\u3066\u306e\u30d5\u30a1\u30a4\u30eb\u304b\u3089\u306e\u5909\u66f4\u3092\u30ed\u30fc\u30c9\u3057\u3066UFW\u3092\u518d\u8d77\u52d5\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"$\"><span class=\"token function\">sudo<\/span> ufw disable<\/li>\n<li data-prefix=\"$\"><span class=\"token function\">sudo<\/span> ufw <span class=\"token builtin class-name\">enable<\/span><\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u3042\u306a\u305f\u306e\u30b5\u30fc\u30d0\u30fc\u306f\u3001OpenVPN\u30c8\u30e9\u30d5\u30a3\u30c3\u30af\u3092\u6b63\u3057\u304f\u51e6\u7406\u3059\u308b\u3088\u3046\u306b\u8a2d\u5b9a\u3055\u308c\u307e\u3057\u305f\u3002<\/p>\n<h2>\u30b9\u30c6\u30c3\u30d76 \u2014 OpenVPN\u30b5\u30fc\u30d3\u30b9\u306e\u8d77\u52d5\u3068\u6709\u52b9\u5316<\/h2>\n<p>\u3042\u306a\u305f\u306e\u30b5\u30fc\u30d0\u30fc\u3067OpenVPN\u30b5\u30fc\u30d3\u30b9\u3092\u958b\u59cb\u3059\u308b\u6e96\u5099\u304c\u3088\u3046\u3084\u304f\u6574\u3044\u307e\u3057\u305f\u3002\u3053\u308c\u306fsystemd\u30e6\u30fc\u30c6\u30a3\u30ea\u30c6\u30a3\u306esystemctl\u3092\u4f7f\u7528\u3057\u3066\u884c\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"$\"><span class=\"token function\">sudo<\/span> systemctl start openvpn@server<\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u3053\u306e\u30b3\u30de\u30f3\u30c9\u306f\u3001\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3068\u3057\u3066 \/etc\/openvpn\/server.conf \u3092\u4f7f\u7528\u3057\u3066 openvpn \u30b5\u30fc\u30d3\u30b9\u3092\u8d77\u52d5\u3057\u307e\u3059\u3002\u3082\u3057 openvpn@server2 \u3068\u6307\u5b9a\u3057\u305f\u5834\u5408\u3001systemd \u306f\u30b5\u30fc\u30d3\u30b9\u306e\u8d77\u52d5\u6642\u306b\u30d5\u30a1\u30a4\u30eb\u540d \/etc\/openvpn\/server2.conf \u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n<p>\u30bf\u30a4\u30d7\u3057\u3066\u3001\u30b5\u30fc\u30d3\u30b9\u304c\u6b63\u5e38\u306b\u958b\u59cb\u3055\u308c\u3066\u3044\u308b\u3053\u3068\u3092\u4e8c\u91cd\u30c1\u30a7\u30c3\u30af\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"$\"><span class=\"token function\">sudo<\/span> systemctl status openvpn@server<\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u3082\u3057\u5168\u3066\u3046\u307e\u304f\u3044\u3051\u3070\u3001\u3042\u306a\u305f\u306e\u51fa\u529b\u306f\u3053\u306e\u3088\u3046\u306b\u306a\u308b\u3067\u3057\u3087\u3046\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<div class=\"secondary-code-label\" title=\"Output\">Output<\/div>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u25cf openvpn@server.service &#8211; OpenVPN connection to server Loaded: loaded (\/lib\/systemd\/system\/openvpn@.service; disabled; vendor preset: enabled) Active: <mark>active (running)<\/mark> since Wed 2022-12-21 03:39:24 UTC; 29s ago Docs: man:openvpn(8) https:\/\/community.openvpn.net\/openvpn\/wiki\/Openvpn24ManPage https:\/\/community.openvpn.net\/openvpn\/wiki\/HOWTO Main PID: 3371 (openvpn) Status: &#8220;Initialization Sequence Completed&#8221; Tasks: 1 (limit: 3587) Memory: 1.2M CGroup: \/system.slice\/system-openvpn.slice\/openvpn@server.service \u2514\u25003371 \/usr\/sbin\/openvpn &#8211;daemon ovpn-server &#8211;status \/run\/openvpn\/server.status 10 &#8211;cd \/etc\/openvpn &#8211;config \/etc\/openvpn\/server.conf &#8211;writepid \/run\/openvpn\/<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u300cOpenVPN\u306etun0\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u304c\u5229\u7528\u53ef\u80fd\u3067\u3042\u308b\u3053\u3068\u3082\u3001\u6b21\u306e\u3088\u3046\u306b\u5165\u529b\u3057\u3066\u78ba\u8a8d\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u300d<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"$\"><span class=\"token function\">ip<\/span> addr show tun0<\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u3053\u308c\u306f\u8a2d\u5b9a\u3055\u308c\u305f\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u3092\u51fa\u529b\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<div class=\"secondary-code-label\" title=\"Output\">Output<\/div>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>3: tun0: &lt;POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP&gt; mtu 1500 qdisc pfifo_fast state UNKNOWN group default qlen 100 link\/none inet 10.8.0.1 peer 10.8.0.2\/32 scope global tun0 valid_lft forever preferred_lft forever inet6 fe80::dd60:3a78:b0ca:1659\/64 scope link stable-privacy valid_lft forever preferred_lft forever<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u30b5\u30fc\u30d3\u30b9\u3092\u958b\u59cb\u3057\u305f\u5f8c\u3001\u81ea\u52d5\u7684\u306b\u8d77\u52d5\u3059\u308b\u3088\u3046\u306b\u6709\u52b9\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"$\"><span class=\"token function\">sudo<\/span> systemctl <span class=\"token builtin class-name\">enable<\/span> openvpn@server<\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u3054\u5229\u7528\u306eOpenVPN\u30b5\u30fc\u30d3\u30b9\u306f\u3001\u73fe\u5728\u7a3c\u50cd\u3057\u3066\u3044\u307e\u3059\u3002\u305f\u3060\u3057\u3001\u4f7f\u7528\u3059\u308b\u524d\u306b\u3001\u307e\u305a\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u30de\u30b7\u30f3\u306e\u305f\u3081\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u306f\u3059\u3067\u306b\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306e\u305f\u3081\u306e\u8a3c\u660e\u66f8\/\u30ad\u30fc\u30da\u30a2\u306e\u4f5c\u6210\u65b9\u6cd5\u306b\u3064\u3044\u3066\u8aac\u660e\u3057\u307e\u3057\u305f\u3002\u6b21\u306e\u30b9\u30c6\u30c3\u30d7\u3067\u306f\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u751f\u6210\u3059\u308b\u305f\u3081\u306e\u30a4\u30f3\u30d5\u30e9\u30b9\u30c8\u30e9\u30af\u30c1\u30e3\u306e\u4f5c\u6210\u65b9\u6cd5\u3092\u8aac\u660e\u3057\u307e\u3059\u3002<\/p>\n<h2>\u30b9\u30c6\u30c3\u30d77 &#8211; \u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u8a2d\u5b9a\u30a4\u30f3\u30d5\u30e9\u306e\u4f5c\u6210<\/h2>\n<p>OpenVPN\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u306e\u4f5c\u6210\u306f\u3084\u3084\u624b\u9593\u304c\u304b\u304b\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002\u306a\u305c\u306a\u3089\u3001\u5404\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306f\u72ec\u81ea\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u6301\u3061\u3001\u305d\u308c\u305e\u308c\u304c\u30b5\u30fc\u30d0\u30fc\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3067\u6307\u5b9a\u3055\u308c\u305f\u8a2d\u5b9a\u3068\u4e00\u81f4\u3057\u3066\u3044\u308b\u5fc5\u8981\u304c\u3042\u308b\u304b\u3089\u3067\u3059\u30021\u3064\u306e\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306b\u3057\u304b\u4f7f\u7528\u3067\u304d\u306a\u3044\u5358\u4e00\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3059\u308b\u4ee3\u308f\u308a\u306b\u3001\u3053\u306e\u624b\u9806\u3067\u306f\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u8a2d\u5b9a\u306e\u30a4\u30f3\u30d5\u30e9\u30b9\u30c8\u30e9\u30af\u30c1\u30e3\u3092\u69cb\u7bc9\u3059\u308b\u30d7\u30ed\u30bb\u30b9\u3092\u793a\u3057\u3066\u3044\u307e\u3059\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u30d9\u30fc\u30b9\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3068\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306e\u56fa\u6709\u306e\u8a3c\u660e\u66f8\u3068\u30ad\u30fc\u3092\u7d44\u307f\u5408\u308f\u305b\u3066\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u52d5\u7684\u306b\u751f\u6210\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u306f\u3058\u3081\u306b\u3001\u4ee5\u524d\u306b\u4f5c\u6210\u3057\u305fclient-configs\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u5185\u306b\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u4fdd\u5b58\u3059\u308b\u305f\u3081\u306e\u65b0\u3057\u3044\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092OpenVPN\u30b5\u30fc\u30d0\u30fc\u4e0a\u306b\u4f5c\u6210\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"$\"><span class=\"token function\">mkdir<\/span> <span class=\"token parameter variable\">-p<\/span> ~\/client-configs\/files<\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u6b21\u306b\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u306e\u4f8b\u3092\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u8a2d\u5b9a\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u30b3\u30d4\u30fc\u3057\u3066\u3001\u57fa\u672c\u8a2d\u5b9a\u3068\u3057\u3066\u4f7f\u7528\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"$\"><span class=\"token function\">cp<\/span> \/usr\/share\/doc\/openvpn\/examples\/sample-config-files\/client.conf ~\/client-configs\/base.conf<\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u3042\u306a\u305f\u306e\u30c6\u30ad\u30b9\u30c8\u30a8\u30c7\u30a3\u30bf\u3067\u3001\u3053\u306e\u65b0\u3057\u3044\u30d5\u30a1\u30a4\u30eb\u3092\u958b\u3044\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"$\"><span class=\"token function\">nano<\/span> ~\/client-configs\/base.conf<\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u5185\u90e8\u3067\u3001\u30ea\u30e2\u30fc\u30c8\u30c7\u30a3\u30ec\u30af\u30c6\u30a3\u30d6\u3092\u898b\u3064\u3051\u3066\u304f\u3060\u3055\u3044\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306f\u3042\u306a\u305f\u306eOpenVPN\u30b5\u30fc\u30d0\u30fc\u30a2\u30c9\u30ec\u30b9\uff08OpenVPN\u30b5\u30fc\u30d0\u30fc\u306e\u516c\u958bIP\u30a2\u30c9\u30ec\u30b9\uff09\u306b\u63a5\u7d9a\u3055\u308c\u307e\u3059\u3002\u3082\u3057OpenVPN\u30b5\u30fc\u30d0\u30fc\u306e\u5f85\u3061\u53d7\u3051\u30dd\u30fc\u30c8\u3092\u5909\u66f4\u3059\u308b\u3053\u3068\u3092\u6c7a\u3081\u305f\u5834\u5408\u30011194\u3092\u9078\u629e\u3057\u305f\u30dd\u30fc\u30c8\u306b\u5909\u66f4\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<div>\u4ee5\u4e0b\u306e\u5185\u5bb9\u3092\u65e5\u672c\u8a9e\u3067\u8a00\u3044\u63db\u3048\u308b\u3002<br \/>\n~\/client-configs\/base.conf~\/client-configs\/base.conf\u3092\u65e5\u672c\u8a9e\u3067\u8a00\u3044\u63db\u3048\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<\/div>\n<pre class=\"post-pre\"><code>. . .\r\n# The hostname\/IP and port of the server.\r\n# You can have multiple remote entries\r\n# to load balance between the servers.\r\nremote <mark>your_server_ip<\/mark> <mark>1194<\/mark>\r\n. . .\r\n<\/code><\/pre>\n<p>\u30b5\u30fc\u30d0\u30fc\u306e\u8a2d\u5b9a\u3067\u4f7f\u7528\u3057\u3066\u3044\u308b\u5024\u3068\u30d7\u30ed\u30c8\u30b3\u30eb\u304c\u4e00\u81f4\u3057\u3066\u3044\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<div>~\/client-configs\/base.conf \u3092\u65e5\u672c\u8a9e\u3067\u8a00\u3044\u63db\u3048\u308b\u3068\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\uff1a\u300c~\/client-configs\/base.conf\u300d<\/div>\n<pre class=\"post-pre\"><code>proto <mark>udp<\/mark>\r\n<\/code><\/pre>\n<p>\u6b21\u306b\u3001\u30e6\u30fc\u30b6\u30fc\u3068\u30b0\u30eb\u30fc\u30d7\u306e\u6307\u793a\u6587\u306e\u300c;\u300d\u3092\u5404\u884c\u306e\u5148\u982d\u304b\u3089\u524a\u9664\u3057\u3066\u3001\u30b3\u30e1\u30f3\u30c8\u3092\u89e3\u9664\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<div>\n<p>\u4ee5\u4e0b\u306e\u30c6\u30ad\u30b9\u30c8\u300c~\/client-configs\/base.conf\u300d\u3092\u65e5\u672c\u8a9e\u3067\u8a00\u3044\u63db\u3048\u3066\u304f\u3060\u3055\u3044\u3002\uff11\u3064\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u7d50\u69cb\u3067\u3059\u3002<\/p>\n<p>\uff5e\/\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u8a2d\u5b9a\/\u30d9\u30fc\u30b9\u30d5\u30a1\u30a4\u30eb.conf<\/p>\n<\/div>\n<pre class=\"post-pre\"><code># Downgrade privileges after initialization (non-Windows only)\r\nuser nobody\r\ngroup nogroup\r\n<\/code><\/pre>\n<p>\u76f4\u3050\u306b\u8a3c\u660e\u66f8\u3068\u9375\u306e\u5168\u5185\u5bb9\u3092\u57fa\u672c\u30d5\u30a1\u30a4\u30eb\u306b\u8ffd\u52a0\u3059\u308b\u305f\u3081\u3001ca\u30d5\u30a1\u30a4\u30eb\u3001cert\u30d5\u30a1\u30a4\u30eb\u3001\u304a\u3088\u3073key\u30d5\u30a1\u30a4\u30eb\u3092\u8a2d\u5b9a\u3059\u308b\u6307\u793a\u3092\u898b\u3064\u3051\u3066\u304f\u3060\u3055\u3044\u3002\u3053\u308c\u3089\u306e\u6307\u793a\u3092\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<div>\u4ee5\u4e0b\u306e\u6587\u3092\u65e5\u672c\u8a9e\u3067\u81ea\u7136\u306b\u8a00\u3044\u63db\u3048\u3066\u304f\u3060\u3055\u3044\u3002\uff11\u3064\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u306e\u307f\u5fc5\u8981\u3067\u3059:<br \/>\n~\/client-configs\/base.conf\u2192\u30e6\u30fc\u30b6\u30fc\/\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u8a2d\u5b9a\/base.conf<\/p>\n<\/div>\n<pre class=\"post-pre\"><code># SSL\/TLS parms.\r\n# See the server config file for more\r\n# description.  It's best to use\r\n# a separate .crt\/.key file pair\r\n# for each client.  A single ca\r\n# file can be used for all clients.\r\n<mark>#<\/mark>ca ca.crt\r\n<mark>#<\/mark>cert client.crt\r\n<mark>#<\/mark>key client.key\r\n<\/code><\/pre>\n<p>\u540c\u69d8\u306b\u3001tls-auth\u30c7\u30a3\u30ec\u30af\u30c6\u30a3\u30d6\u3092\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8\u3057\u3001ta.key\u3092\u76f4\u63a5\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u306b\u8ffd\u52a0\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<div>\u4ee5\u4e0b\u306e\u3082\u306e\u3092\u65e5\u672c\u8a9e\u3067\u8868\u73fe\u3059\u308b\u305f\u3081\u306e\u4e00\u3064\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u63d0\u4f9b\u3057\u307e\u3059\uff1a<br \/>\n~\/client-configs\/base.conf \u2192 \uff5e\/client-configs\/base.conf<\/div>\n<pre class=\"post-pre\"><code># If a tls-auth key is used on the server\r\n# then every client must also have the key.\r\n<mark>#<\/mark>tls-auth ta.key 1\r\n<\/code><\/pre>\n<p>\/etc\/openvpn\/server.conf \u30d5\u30a1\u30a4\u30eb\u3067\u8a2d\u5b9a\u3057\u305f\u6697\u53f7\u5316\u3068\u8a8d\u8a3c\u8a2d\u5b9a\u3092\u30df\u30e9\u30fc\u3067\u53cd\u6620\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<div>\u4ee5\u4e0b\u306e\u5185\u5bb9\u3092\u65e5\u672c\u8a9e\u3067\u8868\u73fe\u3057\u3066\u304f\u3060\u3055\u3044\uff08\u4e00\u3064\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u306e\u307f\u5fc5\u8981\u3067\u3059\uff09\uff1a<br \/>\n~\/client-configs\/base.conf\u301c\/client-configs\/base.conf<\/p>\n<\/div>\n<pre class=\"post-pre\"><code><mark>cipher AES-256-CBC<\/mark>\r\n<mark>auth SHA256<\/mark>\r\n<\/code><\/pre>\n<p>\u6b21\u306b\u3001\u30d5\u30a1\u30a4\u30eb\u306e\u3069\u3053\u304b\u306b\u30ad\u30fc\u65b9\u5411\u306e\u6307\u4ee4\u3092\u8ffd\u52a0\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u30de\u30b7\u30f3\u3067VPN\u304c\u6b63\u3057\u304f\u6a5f\u80fd\u3059\u308b\u305f\u3081\u306b\u3001\u3053\u308c\u3092\u300c1\u300d\u306b\u8a2d\u5b9a\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<div>~\/client-configs\/base.conf\u3092\u65e5\u672c\u8a9e\u3067\u8a00\u3044\u63db\u3048\u308b\u3068\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\uff1a<br \/>\n\u30db\u30fc\u30e0\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\/\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u8a2d\u5b9a\/\u30d9\u30fc\u30b9.conf<\/div>\n<pre class=\"post-pre\"><code><mark>key-direction 1<\/mark>\r\n<\/code><\/pre>\n<p>\u6700\u5f8c\u306b\u3001\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8\u3055\u308c\u305f\u884c\u3092\u6570\u884c\u8ffd\u52a0\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u3053\u308c\u3089\u306e\u30c7\u30a3\u30ec\u30af\u30c6\u30a3\u30d6\u306f\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u306b\u542b\u3081\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u304c\u3001\/etc\/openvpn\/update-resolv-conf \u30d5\u30a1\u30a4\u30eb\u304c\u5b58\u5728\u3059\u308bLinux\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u3067\u306e\u307f\u6709\u52b9\u306b\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u306f\u3001Linux\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306eDNS\u60c5\u5831\u3092\u66f4\u65b0\u3059\u308b\u305f\u3081\u306bresolvconf\u30e6\u30fc\u30c6\u30a3\u30ea\u30c6\u30a3\u3092\u4f7f\u7528\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<div>~\/client-configs\/base.conf\u3092\u65e5\u672c\u8a9e\u3067\u8868\u73fe\u3059\u308b\u3068\u3001\u6b21\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059: \u300c~\/client-configs\/base.conf\u300d<\/div>\n<pre class=\"post-pre\"><code><mark># script-security 2<\/mark>\r\n<mark># up \/etc\/openvpn\/update-resolv-conf<\/mark>\r\n<mark># down \/etc\/openvpn\/update-resolv-conf<\/mark>\r\n<\/code><\/pre>\n<p>\u304a\u5ba2\u69d8\u306e\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u304cLinux\u3092\u5b9f\u884c\u3057\u3066\u304a\u308a\u3001\/etc\/openvpn\/update-resolv-conf \u30d5\u30a1\u30a4\u30eb\u3092\u6301\u3063\u3066\u3044\u308b\u5834\u5408\u306f\u3001\u751f\u6210\u3055\u308c\u305f\u5f8c\u306b\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u304b\u3089\u3053\u308c\u3089\u306e\u884c\u306e\u30b3\u30e1\u30f3\u30c8\u3092\u89e3\u9664\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u7d42\u308f\u308a\u307e\u3057\u305f\u3089\u3001\u30d5\u30a1\u30a4\u30eb\u3092\u4fdd\u5b58\u3057\u3066\u9589\u3058\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u6b21\u306b\u3001~\/client-configs\/files\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u8a3c\u660e\u66f8\u3001\u30ad\u30fc\u3001\u6697\u53f7\u5316\u30d5\u30a1\u30a4\u30eb\u3001\u304a\u3088\u3073\u57fa\u672c\u8a2d\u5b9a\u3092\u542b\u3080\u65b0\u3057\u3044\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3059\u308b\u30b7\u30f3\u30d7\u30eb\u306a\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002~\/client-configs\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u5185\u306bmake_config.sh\u3068\u3044\u3046\u65b0\u3057\u3044\u30d5\u30a1\u30a4\u30eb\u3092\u958b\u3044\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"$\"><span class=\"token function\">nano<\/span> ~\/client-configs\/make_config.sh<\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u5185\u90e8\u3067\u3001\u6b21\u306e\u30b3\u30f3\u30c6\u30f3\u30c4\u3092\u8ffd\u52a0\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u305f\u3060\u3057\u3001&#8221;sammy&#8221; \u3092\u30b5\u30fc\u30d0\u30fc\u306e\u975e\u30eb\u30fc\u30c8\u30e6\u30fc\u30b6\u30fc\u30a2\u30ab\u30a6\u30f3\u30c8\u306b\u5909\u66f4\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<div>~\/client-configs\/make_config.sh\u306e\u5185\u5bb9\u3092\u65e5\u672c\u8a9e\u3067\u8ff0\u3079\u308b\u3068\u3001&#8221;\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u8a2d\u5b9a\u3092\u4f5c\u6210\u3059\u308b\u305f\u3081\u306emake_config.sh&#8221;\u3067\u3059\u3002<\/div>\n<pre class=\"post-pre\"><code><span class=\"token shebang important\">#!\/bin\/bash<\/span>\r\n\r\n<span class=\"token comment\"># First argument: Client identifier<\/span>\r\n\r\n<span class=\"token assign-left variable\">KEY_DIR<\/span><span class=\"token operator\">=<\/span>\/home\/<mark>sammy<\/mark>\/client-configs\/keys\r\n<span class=\"token assign-left variable\">OUTPUT_DIR<\/span><span class=\"token operator\">=<\/span>\/home\/<mark>sammy<\/mark>\/client-configs\/files\r\n<span class=\"token assign-left variable\">BASE_CONFIG<\/span><span class=\"token operator\">=<\/span>\/home\/<mark>sammy<\/mark>\/client-configs\/base.conf\r\n\r\n<span class=\"token function\">cat<\/span> <span class=\"token variable\">${BASE_CONFIG}<\/span> <span class=\"token punctuation\">\\<\/span>\r\n    <span class=\"token operator\">&lt;<\/span><span class=\"token punctuation\">(<\/span><span class=\"token builtin class-name\">echo<\/span> <span class=\"token parameter variable\">-e<\/span> <span class=\"token string\">'&lt;ca&gt;'<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">\\<\/span>\r\n    <span class=\"token variable\">${KEY_DIR}<\/span>\/ca.crt <span class=\"token punctuation\">\\<\/span>\r\n    <span class=\"token operator\">&lt;<\/span><span class=\"token punctuation\">(<\/span><span class=\"token builtin class-name\">echo<\/span> <span class=\"token parameter variable\">-e<\/span> <span class=\"token string\">'&lt;\/ca&gt;\\n&lt;cert&gt;'<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">\\<\/span>\r\n    <span class=\"token variable\">${KEY_DIR}<\/span>\/<span class=\"token variable\">${1}<\/span>.crt <span class=\"token punctuation\">\\<\/span>\r\n    <span class=\"token operator\">&lt;<\/span><span class=\"token punctuation\">(<\/span><span class=\"token builtin class-name\">echo<\/span> <span class=\"token parameter variable\">-e<\/span> <span class=\"token string\">'&lt;\/cert&gt;\\n&lt;key&gt;'<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">\\<\/span>\r\n    <span class=\"token variable\">${KEY_DIR}<\/span>\/<span class=\"token variable\">${1}<\/span>.key <span class=\"token punctuation\">\\<\/span>\r\n    <span class=\"token operator\">&lt;<\/span><span class=\"token punctuation\">(<\/span><span class=\"token builtin class-name\">echo<\/span> <span class=\"token parameter variable\">-e<\/span> <span class=\"token string\">'&lt;\/key&gt;\\n&lt;tls-auth&gt;'<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">\\<\/span>\r\n    <span class=\"token variable\">${KEY_DIR}<\/span>\/ta.key <span class=\"token punctuation\">\\<\/span>\r\n    <span class=\"token operator\">&lt;<\/span><span class=\"token punctuation\">(<\/span><span class=\"token builtin class-name\">echo<\/span> <span class=\"token parameter variable\">-e<\/span> <span class=\"token string\">'&lt;\/tls-auth&gt;'<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">\\<\/span>\r\n    <span class=\"token operator\">&gt;<\/span> <span class=\"token variable\">${OUTPUT_DIR}<\/span>\/<span class=\"token variable\">${1}<\/span>.ovpn\r\n<\/code><\/pre>\n<p>\u7d42\u308f\u3063\u305f\u3089\u3001\u30d5\u30a1\u30a4\u30eb\u3092\u4fdd\u5b58\u3057\u3066\u9589\u3058\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u6b21\u306b\u9032\u3080\u524d\u306b\u3001\u6b21\u306e\u3088\u3046\u306b\u3057\u3066\u3053\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u5b9f\u884c\u53ef\u80fd\u306b\u30de\u30fc\u30af\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"$\"><span class=\"token function\">chmod<\/span> <span class=\"token number\">700<\/span> ~\/client-configs\/make_config.sh<\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u3053\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u306f\u3001\u4f5c\u6210\u3057\u305fbase.conf\u30d5\u30a1\u30a4\u30eb\u306e\u30b3\u30d4\u30fc\u3092\u4f5c\u6210\u3057\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u7528\u306b\u4f5c\u6210\u3057\u305f\u3059\u3079\u3066\u306e\u8a3c\u660e\u66f8\u3068\u9375\u30d5\u30a1\u30a4\u30eb\u3092\u53ce\u96c6\u3057\u3001\u305d\u306e\u5185\u5bb9\u3092\u62bd\u51fa\u3057\u3001base\u69cb\u6210\u30d5\u30a1\u30a4\u30eb\u306e\u30b3\u30d4\u30fc\u306b\u8ffd\u52a0\u3057\u3001\u3053\u306e\u5185\u5bb9\u3092\u65b0\u3057\u3044\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u69cb\u6210\u30d5\u30a1\u30a4\u30eb\u306b\u30a8\u30af\u30b9\u30dd\u30fc\u30c8\u3057\u307e\u3059\u3002\u3064\u307e\u308a\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306e\u69cb\u6210\u3001\u8a3c\u660e\u66f8\u3001\u304a\u3088\u3073\u9375\u30d5\u30a1\u30a4\u30eb\u3092\u500b\u5225\u306b\u7ba1\u7406\u3059\u308b\u5fc5\u8981\u304c\u306a\u304f\u3001\u5fc5\u8981\u306a\u60c5\u5831\u306f\u3059\u3079\u30661\u3064\u306e\u5834\u6240\u306b\u4fdd\u5b58\u3055\u308c\u307e\u3059\u3002\u305d\u306e\u5229\u70b9\u306f\u3001\u5c06\u6765\u306b\u304a\u3044\u3066\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u3092\u8ffd\u52a0\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u5834\u5408\u3001\u3053\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u4e2d\u592e\u306e\u5834\u6240\u304b\u3089\u5b9f\u884c\u3059\u308b\u3060\u3051\u3067\u3001\u3059\u3079\u3066\u306e\u5fc5\u8981\u306a\u60c5\u5831\u304c1\u3064\u306e\u3001\u7c21\u5358\u306b\u914d\u5e03\u53ef\u80fd\u306a\u30d5\u30a1\u30a4\u30eb\u306b\u542b\u307e\u308c\u305f\u69cb\u6210\u30d5\u30a1\u30a4\u30eb\u3092\u8fc5\u901f\u306b\u4f5c\u6210\u3067\u304d\u308b\u3053\u3068\u3067\u3059\u3002<\/p>\n<p>\u65b0\u3057\u3044\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u3092\u8ffd\u52a0\u3059\u308b\u305f\u3073\u306b\u3001\u3053\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u5b9f\u884c\u3057\u3066\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u751f\u6210\u3059\u308b\u524d\u306b\u3001\u65b0\u3057\u3044\u30ad\u30fc\u3068\u8a3c\u660e\u66f8\u3092\u751f\u6210\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u3053\u3068\u306b\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u6b21\u306e\u30b9\u30c6\u30c3\u30d7\u3067\u3001\u3053\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u4f7f\u7528\u3059\u308b\u7df4\u7fd2\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<h2>\u30b9\u30c6\u30c3\u30d78 &#8211; \u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u8a2d\u5b9a\u306e\u751f\u6210<\/h2>\n<p>\u3082\u3057\u30ac\u30a4\u30c9\u306b\u5f93\u3063\u3066\u9032\u3081\u305f\u306a\u3089\u3001\u30b9\u30c6\u30c3\u30d73\u3067\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u8a3c\u660e\u66f8\u3068\u3057\u3066client1.crt\u3068client1.key\u3068\u3044\u3046\u540d\u524d\u306e\u30ad\u30fc\u3092\u4f5c\u6210\u3057\u307e\u3057\u305f\u3002\u3053\u308c\u3089\u306e\u8a8d\u8a3c\u60c5\u5831\u306b\u5bfe\u3059\u308b\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u751f\u6210\u3059\u308b\u306b\u306f\u3001~\/client-configs\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u79fb\u52d5\u3057\u3001\u524d\u306e\u30b9\u30c6\u30c3\u30d7\u306e\u6700\u5f8c\u306b\u4f5c\u6210\u3057\u305f\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u5b9f\u884c\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"$\"><span class=\"token builtin class-name\">cd<\/span> ~\/client-configs<\/li>\n<li data-prefix=\"$\"><span class=\"token function\">sudo<\/span> .\/make_config.sh <mark>client1<\/mark><\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u3042\u306a\u305f\u306e~\/client-configs\/files\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306bclient1.ovpn\u3068\u3044\u3046\u540d\u524d\u306e\u30d5\u30a1\u30a4\u30eb\u304c\u4f5c\u6210\u3055\u308c\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"$\"><span class=\"token function\">ls<\/span> ~\/client-configs\/files<\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<div class=\"secondary-code-label\" title=\"Output\">Output<\/div>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>client1.ovpn<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u3042\u306a\u305f\u306f\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u3068\u3057\u3066\u4f7f\u7528\u3059\u308b\u30c7\u30d0\u30a4\u30b9\u306b\u3053\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u8ee2\u9001\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u4f8b\u3048\u3070\u3001\u3053\u308c\u306f\u3042\u306a\u305f\u306e\u30ed\u30fc\u30ab\u30eb\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u30fc\u307e\u305f\u306f\u30e2\u30d0\u30a4\u30eb\u30c7\u30d0\u30a4\u30b9\u306e\u3069\u3061\u3089\u304b\u3067\u3059\u3002<\/p>\n<p>\u3053\u306e\u8ee2\u9001\u3092\u884c\u3046\u305f\u3081\u306b\u4f7f\u7528\u3055\u308c\u308b\u5177\u4f53\u7684\u306a\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306f\u3001\u30c7\u30d0\u30a4\u30b9\u306e\u30aa\u30da\u30ec\u30fc\u30c6\u30a3\u30f3\u30b0\u30b7\u30b9\u30c6\u30e0\u3068\u500b\u4eba\u306e\u597d\u307f\u306b\u3088\u3063\u3066\u7570\u306a\u308a\u307e\u3059\u304c\u3001\u4fe1\u983c\u6027\u3068\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u306e\u9ad8\u3044\u65b9\u6cd5\u306f\u3001\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u3067SFTP\uff08SSH\u30d5\u30a1\u30a4\u30eb\u8ee2\u9001\u30d7\u30ed\u30c8\u30b3\u30eb\uff09\u307e\u305f\u306fSCP\uff08\u30bb\u30ad\u30e5\u30a2\u30b3\u30d4\u30fc\uff09\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u3067\u3059\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306eVPN\u8a8d\u8a3c\u30d5\u30a1\u30a4\u30eb\u304c\u6697\u53f7\u5316\u3055\u308c\u305f\u63a5\u7d9a\u3067\u8ee2\u9001\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>\u4ee5\u4e0b\u306f\u3001\u30ed\u30fc\u30ab\u30eb\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u30fc\uff08macOS\u307e\u305f\u306fLinux\uff09\u304b\u3089\u5b9f\u884c\u3067\u304d\u308bclient1.ovpn\u306e\u4f8b\u3092\u4f7f\u7528\u3057\u305fSFTP\u30b3\u30de\u30f3\u30c9\u3067\u3059\u3002.ovpn\u30d5\u30a1\u30a4\u30eb\u306f\u30db\u30fc\u30e0\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u914d\u7f6e\u3055\u308c\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"local$\"><span class=\"token function\">sftp<\/span> <mark>sammy<\/mark>@<mark>your_server_ip<\/mark>:client-configs\/files\/client1.ovpn ~\/<\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u4ee5\u4e0b\u306b\u306f\u3001\u30b5\u30fc\u30d0\u30fc\u304b\u3089\u30ed\u30fc\u30ab\u30eb\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u306b\u30d5\u30a1\u30a4\u30eb\u3092\u5b89\u5168\u306b\u8ee2\u9001\u3059\u308b\u305f\u3081\u306e\u3044\u304f\u3064\u304b\u306e\u30c4\u30fc\u30eb\u3068\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<ul class=\"post-ul\">\n<li>How To Use SFTP to Securely Transfer Files with a Remote Server<\/li>\n<li>WinSCP<\/li>\n<li>FileZilla<\/li>\n<li>Cyberduck<\/li>\n<\/ul>\n<h2>\u30b9\u30c6\u30c3\u30d79\uff1a\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306e\u8a2d\u5b9a\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<\/h2>\n<p>\u3053\u306e\u30bb\u30af\u30b7\u30e7\u30f3\u3067\u306f\u3001Windows\u3001macOS\u3001Linux\u3001iOS\u3001Android\u306b\u30af\u30e9\u30a4\u30a2\u30f3\u30c8VPN\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u8aac\u660e\u3057\u307e\u3059\u3002\u3053\u308c\u3089\u306e\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306e\u624b\u9806\u306f\u4e92\u3044\u306b\u4f9d\u5b58\u3057\u3066\u3044\u306a\u3044\u305f\u3081\u3001\u3054\u81ea\u8eab\u306e\u30c7\u30d0\u30a4\u30b9\u306b\u9069\u7528\u3055\u308c\u308b\u3082\u306e\u306b\u76f4\u63a5\u79fb\u52d5\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>OpenVPN\u306e\u63a5\u7d9a\u540d\u306f\u3001.ovpn\u30d5\u30a1\u30a4\u30eb\u306b\u6307\u5b9a\u3057\u305f\u540d\u524d\u3068\u540c\u3058\u306b\u306a\u308a\u307e\u3059\u3002\u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u306b\u95a2\u3057\u3066\u306f\u3001\u63a5\u7d9a\u540d\u306fclient1.ovpn\u3068\u306a\u308a\u3001\u6700\u521d\u306b\u751f\u6210\u3057\u305f\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u30d5\u30a1\u30a4\u30eb\u3068\u4e00\u81f4\u3057\u307e\u3059\u3002<\/p>\n<h3>\u30a6\u30a3\u30f3\u30c9\u30a6\u30ba<\/h3>\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b<\/p>\n<p>OpenVPN\u306e\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u30da\u30fc\u30b8\u304b\u3089\u3001Windows\u7528\u306eOpenVPN\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u304f\u3060\u3055\u3044\u3002Windows\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u306b\u5408\u308f\u305b\u305f\u9069\u5207\u306a\u30a4\u30f3\u30b9\u30c8\u30fc\u30e9\u30fc\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u9078\u629e\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<div class=\"post-conf-note\">\n<p class=\"post-conf-desc\">Note<\/p>\n<div>\u6ce8\u610f: OpenVPN\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306b\u306f\u7ba1\u7406\u8005\u6a29\u9650\u304c\u5fc5\u8981\u3067\u3059\u3002<\/div>\n<\/div>\n<p>OpenVPN\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u5f8c\u3001.ovpn\u30d5\u30a1\u30a4\u30eb\u3092\u4ee5\u4e0b\u306b\u30b3\u30d4\u30fc\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code>C:\\Program Files\\OpenVPN\\config\r\n<\/code><\/pre>\n<p>\u3082\u3057\u3082\u30d5\u30a1\u30a4\u30eb\u8ee2\u9001\u30d7\u30ed\u30b0\u30e9\u30e0\uff08\u4f8b\uff1aWinSCP\uff09\u3092\u7ba1\u7406\u8005\u3068\u3057\u3066\u5b9f\u884c\u3057\u3066\u3044\u306a\u3051\u308c\u3070\u3001\u3053\u306e\u5834\u6240\u3078\u306e\u76f4\u63a5\u306e\u30d5\u30a1\u30a4\u30eb\u8ee2\u9001\u306f\u3067\u304d\u306a\u3044\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002\u7ba1\u7406\u8005\u3068\u3057\u3066\u5b9f\u884c\u3059\u308b\u304b\u3001\u30d5\u30a1\u30a4\u30eb\u3092\u7ba1\u7406\u8005\u6a29\u9650\u306e\u306a\u3044\u30e6\u30fc\u30b6\u30fc\u306e\u30db\u30fc\u30e0\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u8ee2\u9001\u3057\u3001\u305d\u308c\u304b\u3089\u30ed\u30fc\u30ab\u30eb\u3067C:\\Program Files\\OpenVPN\\config\u306b\u30b3\u30d4\u30fc\u3057\u3001\u7ba1\u7406\u8005\u306e\u5834\u6240\u3078\u306e\u30b3\u30d4\u30fc\u3092\u8a31\u53ef\u3059\u308b\u3088\u3046\u6307\u793a\u304c\u3042\u3063\u305f\u5834\u5408\u306b\u627f\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>OpenVPN\u3092\u8d77\u52d5\u3059\u308b\u3068\u3001\u81ea\u52d5\u7684\u306b\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb\u304c\u8a8d\u8b58\u3055\u308c\u3001\u5229\u7528\u53ef\u80fd\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>OpenVPN\u3092\u4f7f\u7528\u3059\u308b\u5834\u5408\u306f\u3001\u7ba1\u7406\u8005\u30a2\u30ab\u30a6\u30f3\u30c8\u3067\u3082\u6bce\u56de\u7ba1\u7406\u8005\u3068\u3057\u3066\u5b9f\u884c\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002VPN\u3092\u4f7f\u7528\u3059\u308b\u305f\u3073\u306b\u53f3\u30af\u30ea\u30c3\u30af\u3057\u3066\u300c\u7ba1\u7406\u8005\u3068\u3057\u3066\u5b9f\u884c\u300d\u3092\u9078\u629e\u3059\u308b\u624b\u9593\u3092\u7701\u304f\u305f\u3081\u306b\u3001\u7ba1\u7406\u8005\u30a2\u30ab\u30a6\u30f3\u30c8\u304b\u3089\u4e88\u3081\u8a2d\u5b9a\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u307e\u305f\u3001\u4e00\u822c\u30e6\u30fc\u30b6\u30fc\u306fOpenVPN\u3092\u4f7f\u7528\u3059\u308b\u305f\u3081\u306b\u7ba1\u7406\u8005\u306e\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u5165\u529b\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u4e00\u65b9\u3067\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u5074\u306eOpenVPN\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306b\u7ba1\u7406\u8005\u6a29\u9650\u304c\u306a\u3044\u3068\u3001\u4e00\u822c\u30e6\u30fc\u30b6\u30fc\u306f\u30b5\u30fc\u30d0\u30fc\u306b\u6b63\u3057\u304f\u63a5\u7d9a\u3067\u304d\u306a\u3044\u305f\u3081\u3001\u6607\u683c\u6a29\u9650\u306f\u5fc5\u8981\u3067\u3059\u3002<\/p>\n<p>OpenVPN\u30a2\u30d7\u30ea\u3092\u5e38\u306b\u7ba1\u7406\u8005\u3068\u3057\u3066\u5b9f\u884c\u3059\u308b\u306b\u306f\u3001\u30b7\u30e7\u30fc\u30c8\u30ab\u30c3\u30c8\u30a2\u30a4\u30b3\u30f3\u3092\u53f3\u30af\u30ea\u30c3\u30af\u3057\u3066\u30d7\u30ed\u30d1\u30c6\u30a3\u306b\u79fb\u52d5\u3057\u307e\u3059\u3002\u4e92\u63db\u6027\u30bf\u30d6\u306e\u4e00\u756a\u4e0b\u306b\u3042\u308b\u300c\u3059\u3079\u3066\u306e\u30e6\u30fc\u30b6\u30fc\u306e\u305f\u3081\u306b\u8a2d\u5b9a\u3092\u5909\u66f4\u300d\u30dc\u30bf\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u65b0\u3057\u3044\u30a6\u30a3\u30f3\u30c9\u30a6\u3067\u3001\u300c\u3053\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u7ba1\u7406\u8005\u3068\u3057\u3066\u5b9f\u884c\u3059\u308b\u300d\u306b\u30c1\u30a7\u30c3\u30af\u3092\u5165\u308c\u3001\u9069\u7528\u30dc\u30bf\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u63a5\u7d9a\u3057\u307e\u3059<\/p>\n<p>\u6bce\u56deOpenVPN GUI\u3092\u8d77\u52d5\u3059\u308b\u305f\u3073\u306b\u3001Windows\u306f\u3053\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u304c\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u30fc\u306b\u5909\u66f4\u3092\u52a0\u3048\u308b\u3053\u3068\u3092\u8a31\u53ef\u3059\u308b\u304b\u3069\u3046\u304b\u5c0b\u306d\u307e\u3059\u3002\u306f\u3044\u3092\u30af\u30ea\u30c3\u30af\u3057\u3066\u304f\u3060\u3055\u3044\u3002OpenVPN\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u8d77\u52d5\u3059\u308b\u3068\u3001VPN\u63a5\u7d9a\u81ea\u4f53\u306f\u884c\u308f\u305a\u3001\u30b7\u30b9\u30c6\u30e0\u30c8\u30ec\u30a4\u306b\u30a2\u30d7\u30ec\u30c3\u30c8\u3092\u8868\u793a\u3059\u308b\u3060\u3051\u3067\u3059\u3002\u5fc5\u8981\u306b\u5fdc\u3058\u3066VPN\u63a5\u7d9a\u306e\u30aa\u30f3\u30fb\u30aa\u30d5\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>OpenVPN\u3092\u8d77\u52d5\u3057\u305f\u5f8c\u3001\u30b7\u30b9\u30c6\u30e0\u30c8\u30ec\u30a4\u306e\u30a2\u30d7\u30ec\u30c3\u30c8\u306b\u5165\u308a\u3001OpenVPN\u30a2\u30d7\u30ec\u30c3\u30c8\u30a2\u30a4\u30b3\u30f3\u3092\u53f3\u30af\u30ea\u30c3\u30af\u3057\u3066\u63a5\u7d9a\u3092\u958b\u59cb\u3057\u307e\u3059\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u30e1\u30cb\u30e5\u30fc\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002\u30e1\u30cb\u30e5\u30fc\u306e\u4e0a\u90e8\u306b\u3042\u308bclient1\uff08\u305d\u308c\u306f\u3042\u306a\u305f\u306eclient1.ovpn\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb\u3067\u3059\uff09\u3092\u9078\u629e\u3057\u3001\u63a5\u7d9a\u3092\u9078\u629e\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u63a5\u7d9a\u304c\u78ba\u7acb\u3055\u308c\u308b\u9593\u3001\u30ed\u30b0\u306e\u51fa\u529b\u3092\u8868\u793a\u3059\u308b\u30b9\u30c6\u30fc\u30bf\u30b9\u30a6\u30a3\u30f3\u30c9\u30a6\u304c\u958b\u304d\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u304c\u63a5\u7d9a\u3055\u308c\u305f\u969b\u306b\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>\u540c\u3058\u65b9\u6cd5\u3067VPN\u3092\u5207\u65ad\u3057\u3066\u304f\u3060\u3055\u3044\uff1a\u30b7\u30b9\u30c6\u30e0\u30c8\u30ec\u30a4\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30a2\u30a4\u30b3\u30f3\u306b\u5165\u3063\u3066\u3001OpenVPN\u306e\u30a2\u30d7\u30ec\u30c3\u30c8\u30a2\u30a4\u30b3\u30f3\u3092\u53f3\u30af\u30ea\u30c3\u30af\u3057\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb\u3092\u9078\u629e\u3057\u3001\u5207\u65ad\u3092\u30af\u30ea\u30c3\u30af\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<h3>\u4ee5\u4e0b\u306f\u3001macOS\u306e\u6587\u3092\u65e5\u672c\u8a9e\u3067\u66f8\u304d\u63db\u3048\u307e\u3059\u3002<\/h3>\n<p>&#8211; Apple\u306e\u30aa\u30da\u30ec\u30fc\u30c6\u30a3\u30f3\u30b0\u30b7\u30b9\u30c6\u30e0\u3067\u3042\u308bmacOS<\/p>\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b (Insut\u014dru suru)<\/p>\n<p>Tunnelblick\u306f\u3001macOS\u7528\u306e\u7121\u6599\u3067\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u306eOpenVPN\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u3067\u3059\u3002Tunnelblick\u306e\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u30da\u30fc\u30b8\u304b\u3089\u6700\u65b0\u306e\u30c7\u30a3\u30b9\u30af\u30a4\u30e1\u30fc\u30b8\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3067\u304d\u307e\u3059\u3002\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u305f.dmg\u30d5\u30a1\u30a4\u30eb\u3092\u30c0\u30d6\u30eb\u30af\u30ea\u30c3\u30af\u3057\u3001\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u305f\u3081\u306e\u6848\u5185\u306b\u5f93\u3063\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306e\u6700\u5f8c\u306b\u3001Tunnelblick\u306f\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u304c\u3042\u308b\u304b\u5c0b\u306d\u307e\u3059\u3002\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u6301\u3063\u3066\u3044\u308b\u3068\u7b54\u3048\u3001Tunnelblick\u306b\u7d42\u4e86\u3055\u305b\u3066\u304f\u3060\u3055\u3044\u3002Finder\u30a6\u30a3\u30f3\u30c9\u30a6\u3092\u958b\u304d\u3001client1.ovpn\u3092\u30c0\u30d6\u30eb\u30af\u30ea\u30c3\u30af\u3057\u307e\u3059\u3002Tunnelblick\u306f\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002\u7ba1\u7406\u8005\u6a29\u9650\u304c\u5fc5\u8981\u3067\u3059\u3002<\/p>\n<p>\u7e4b\u3050 (\u3064\u306a\u3050)<\/p>\n<p>\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30d5\u30a9\u30eb\u30c0\u5185\u306eTunnelblick\u30a2\u30a4\u30b3\u30f3\u3092\u30c0\u30d6\u30eb\u30af\u30ea\u30c3\u30af\u3057\u3066\u3001Tunnelblick\u3092\u8d77\u52d5\u3057\u307e\u3059\u3002Tunnelblick\u304c\u8d77\u52d5\u3055\u308c\u308b\u3068\u3001\u753b\u9762\u53f3\u4e0a\u306e\u30e1\u30cb\u30e5\u30fc\u30d0\u30fc\u306b\u63a5\u7d9a\u3092\u5236\u5fa1\u3059\u308b\u305f\u3081\u306eTunnelblick\u30a2\u30a4\u30b3\u30f3\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002\u30a2\u30a4\u30b3\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3057\u3001\u6b21\u306b\u30af\u30e9\u30a4\u30a2\u30f3\u30c81\u306e\u30e1\u30cb\u30e5\u30fc\u30a2\u30a4\u30c6\u30e0\u3092\u9078\u629e\u3057\u3066VPN\u63a5\u7d9a\u3092\u958b\u59cb\u3057\u307e\u3059\u3002<\/p>\n<h3>\u30ea\u30ca\u30c3\u30af\u30b9<\/h3>\n<h4>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b (Insut\u014dru suru)<\/h4>\n<p>\u3082\u3057\u3082Linux\u3092\u4f7f\u3063\u3066\u3044\u308b\u5834\u5408\u3001\u30c7\u30a3\u30b9\u30c8\u30ea\u30d3\u30e5\u30fc\u30b7\u30e7\u30f3\u306b\u5fdc\u3058\u3066\u3055\u307e\u3056\u307e\u306a\u30c4\u30fc\u30eb\u3092\u5229\u7528\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u307e\u305f\u3001\u30c7\u30b9\u30af\u30c8\u30c3\u30d7\u74b0\u5883\u3084\u30a6\u30a3\u30f3\u30c9\u30a6\u30de\u30cd\u30fc\u30b8\u30e3\u30fc\u306b\u3082\u63a5\u7d9a\u30e6\u30fc\u30c6\u30a3\u30ea\u30c6\u30a3\u304c\u542b\u307e\u308c\u308b\u3053\u3068\u3082\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u305f\u3060\u3057\u3001\u6700\u3082\u666e\u904d\u7684\u306a\u63a5\u7d9a\u65b9\u6cd5\u306fOpenVPN\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u3067\u3059\u3002<\/p>\n<p>Debian\u3067\u306f\u3001\u30b5\u30fc\u30d0\u30fc\u3068\u540c\u3058\u3088\u3046\u306b\u30bf\u30a4\u30d7\u3057\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"client$\"><span class=\"token function\">sudo<\/span> <span class=\"token function\">apt<\/span> update<\/li>\n<li data-prefix=\"client$\"><span class=\"token function\">sudo<\/span> <span class=\"token function\">apt<\/span> <span class=\"token function\">install<\/span> openvpn<\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>CentOS\u3067EPEL\u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u6709\u52b9\u5316\u3057\u3066\u304b\u3089\u3001\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5165\u529b\u3057\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"client$\"><span class=\"token function\">sudo<\/span> yum <span class=\"token function\">install<\/span> epel-release<\/li>\n<li data-prefix=\"client$\"><span class=\"token function\">sudo<\/span> yum <span class=\"token function\">install<\/span> openvpn<\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<h4>\u8a2d\u5b9a\u3059\u308b<\/h4>\n<p>\u3042\u306a\u305f\u306e\u30c7\u30a3\u30b9\u30c8\u30ea\u30d3\u30e5\u30fc\u30b7\u30e7\u30f3\u306b\/etc\/openvpn\/update-resolv-conf\u30b9\u30af\u30ea\u30d7\u30c8\u304c\u542b\u307e\u308c\u3066\u3044\u308b\u304b\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"client1$\"><span class=\"token function\">ls<\/span> \/etc\/openvpn<\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<div class=\"secondary-code-label\" title=\"Output\">Output<\/div>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>update-resolv-conf<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u6b21\u306b\u3001\u8ee2\u9001\u3057\u305fOpenVPN\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u7de8\u96c6\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"client$\"><span class=\"token function\">nano<\/span> <mark>client1<\/mark>.ovpn<\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u3082\u3057update-resolv-conf\u30d5\u30a1\u30a4\u30eb\u3092\u898b\u3064\u3051\u308b\u3053\u3068\u304c\u3067\u304d\u305f\u3089\u3001DNS\u8a2d\u5b9a\u3092\u8abf\u6574\u3059\u308b\u305f\u3081\u306b\u8ffd\u52a0\u3057\u305f3\u3064\u306e\u884c\u306b\u30b3\u30e1\u30f3\u30c8\u3092\u5916\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<div>\u30af\u30e9\u30a4\u30a2\u30f3\u30c81\u306e.ovpn\u30d5\u30a1\u30a4\u30eb<\/div>\n<pre class=\"post-pre\"><code>script-security 2\r\nup \/etc\/openvpn\/update-resolv-conf\r\ndown \/etc\/openvpn\/update-resolv-conf\r\n<\/code><\/pre>\n<p>CentOS\u3092\u4f7f\u7528\u3057\u3066\u3044\u308b\u5834\u5408\u306f\u3001\u30b0\u30eb\u30fc\u30d7\u30c7\u30a3\u30ec\u30af\u30c6\u30a3\u30d6\u3092nogroup\u304b\u3089nobody\u306b\u5909\u66f4\u3057\u3066\u3001\u914d\u5e03\u3055\u308c\u3066\u3044\u308b\u30b0\u30eb\u30fc\u30d7\u306b\u5408\u308f\u305b\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<div>\u30af\u30e9\u30a4\u30a2\u30f3\u30c81.ovpn<\/div>\n<pre class=\"post-pre\"><code>group <mark>nobody<\/mark>\r\n<\/code><\/pre>\n<p>\u30d5\u30a1\u30a4\u30eb\u3092\u4fdd\u5b58\u3057\u3066\u9589\u3058\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u4eca\u3067\u306f\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u306b\u30aa\u30fc\u30d7\u30f3VPN\u30b3\u30de\u30f3\u30c9\u3092\u6307\u5b9a\u3059\u308b\u3060\u3051\u3067\u3001VPN\u306b\u63a5\u7d9a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"client$\"><span class=\"token function\">sudo<\/span> openvpn <span class=\"token parameter variable\">&#8211;config<\/span> <mark>client1<\/mark>.ovpn<\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u3053\u308c\u3067VPN\u306b\u63a5\u7d9a\u3067\u304d\u307e\u3059\u3002 (Kore de VPN ni setsuzoku dekimasu.)<\/p>\n<h3>iOS &#8211; \u65e5\u672c\u8a9e\u3067\u306f\u300c\u30a2\u30a4\u30aa\u30fc\u30a8\u30b9\u300d\u3068\u547c\u3070\u308c\u3066\u3044\u307e\u3059\u3002<\/h3>\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b<\/p>\n<p>\u3042\u306a\u305f\u306eiPhone\u307e\u305f\u306fiPad\u306eApp Store\u304b\u3089\u3001\u516c\u5f0f\u306eiOS OpenVPN\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u3067\u3042\u308bOpenVPN Connect\u3092\u691c\u7d22\u3057\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002\u6b21\u306b\u3001Apple\u306e\u30b5\u30dd\u30fc\u30c8\u8a18\u4e8b\u306b\u5f93\u3063\u3066\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c81.ovpn\u30d5\u30a1\u30a4\u30eb\u3092\u30ed\u30fc\u30ab\u30eb\u30de\u30b7\u30f3\u304b\u3089iOS\u30c7\u30d0\u30a4\u30b9\u306b\u8ee2\u9001\u3057\u3001\u7279\u306bOpenVPN\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306b\u30b3\u30d4\u30fc\u3057\u307e\u3059\u3002<\/p>\n<p>\u4eca\u3001iOS\u30c7\u30d0\u30a4\u30b9\u3067OpenVPN\u30a2\u30d7\u30ea\u3092\u8d77\u52d5\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u65b0\u3057\u3044\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb\u3092\u30a4\u30f3\u30dd\u30fc\u30c8\u3059\u308b\u6e96\u5099\u304c\u3067\u304d\u3066\u3044\u308b\u3053\u3068\u3092\u8a8d\u8b58\u3057\u307e\u3059\u3002\u305d\u308c\u3092\u8ffd\u52a0\u3059\u308b\u305f\u3081\u306bADD\u3092\u30bf\u30c3\u30d7\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/65644e1edaa94e2bdf7afb90\/280-0.png\" alt=\"The OpenVPN iOS app showing new profile ready to import\" \/><\/div>\n<p>\u63a5\u7d9a<\/p>\n<p>\u65b0\u3057\u3044\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb\u3068\u5171\u306bOpenVPN\u304c\u4f7f\u3048\u308b\u6e96\u5099\u304c\u3067\u304d\u307e\u3057\u305f\u3002\u63a5\u7d9a\u3059\u308b\u306b\u306fCONNECT\u3092\u30bf\u30c3\u30d7\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u3059\u308b\u3068\u3001iOS\u306f\u30b7\u30b9\u30c6\u30e0\u306e\u8a2d\u5b9a\u3092\u901a\u3058\u3066VPN\u69cb\u6210\u3092\u8ffd\u52a0\u3059\u308b\u8a31\u53ef\u3092OpenVPN\u306b\u5bfe\u3057\u3066\u6c42\u3081\u307e\u3059\u3002Allow\u3092\u30bf\u30c3\u30d7\u3057\u3001FaceID\u307e\u305f\u306fTouchID\u3092\u4f7f\u7528\u3057\u3066\u5909\u66f4\u3092\u627f\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<div class=\"post-conf-note\">\n<p class=\"post-conf-desc\">Note<\/p>\n<div>\u6ce8\u610f\uff1a\u8a2d\u5b9a\uff1e\u4e00\u822c\uff1eVPN\uff06\u30c7\u30d0\u30a4\u30b9\u7ba1\u7406\uff1eVPN\u306e\u4e0b\u306b\u3042\u308bVPN\u30b9\u30a4\u30c3\u30c1\u306f\u3001\u63a5\u7d9a\u3068\u5207\u65ad\u3092\u6b63\u5e38\u306b\u5207\u308a\u66ff\u3048\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u304c\u3001OpenVPN Connect\u30a2\u30d7\u30ea\u5185\u306e\u30b9\u30a4\u30c3\u30c1\u3092\u4f7f\u7528\u3059\u308b\u65b9\u304c\u597d\u307e\u3057\u3044\u3067\u3059\u3002<\/div>\n<\/div>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/65644e1edaa94e2bdf7afb90\/284-0.png\" alt=\"The OpenVPN iOS app connected to the VPN\" \/><\/div>\n<h3>\u30a2\u30f3\u30c9\u30ed\u30a4\u30c9 (Andoroido)<\/h3>\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b<\/p>\n<p>Google Play\u30b9\u30c8\u30a2\u3092\u958b\u3044\u3066\u304f\u3060\u3055\u3044\u3002Android OpenVPN Connect\u3092\u691c\u7d22\u3057\u3001\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u304f\u3060\u3055\u3044\u3002Android OpenVPN\u306e\u516c\u5f0f\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3067\u3059\u3002<\/p>\n<p>Android \u30c7\u30d0\u30a4\u30b9\u3092USB\u3067\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u306b\u63a5\u7d9a\u3057\u3001.ovpn \u30d7\u30ed\u30d5\u30a1\u30a4\u30eb\u3092\u30b3\u30d4\u30fc\u3059\u308b\u3053\u3068\u3067\u3001\u8ee2\u9001\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u307e\u305f\u306f\u3001SD\u30ab\u30fc\u30c9\u30ea\u30fc\u30c0\u30fc\u304c\u3042\u308b\u5834\u5408\u306f\u3001\u30c7\u30d0\u30a4\u30b9\u306eSD\u30ab\u30fc\u30c9\u3092\u53d6\u308a\u5916\u3057\u3001\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb\u3092\u30b3\u30d4\u30fc\u3057\u3066\u304b\u3089\u3001\u30ab\u30fc\u30c9\u3092Android\u30c7\u30d0\u30a4\u30b9\u306b\u633f\u5165\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u3064\u306a\u3050<\/p>\n<p>OpenVPN\u30a2\u30d7\u30ea\u3092\u958b\u59cb\u3059\u308b\u3068\u3001\u30a4\u30f3\u30dd\u30fc\u30c8\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb\u753b\u9762\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002\u30d5\u30a1\u30a4\u30eb\u30bf\u30d6\u3092\u30bf\u30c3\u30d7\u3057\u3001\u6b21\u306b\u53c2\u7167\u3092\u30bf\u30c3\u30d7\u3057\u3066\u3001client1.ovpn\u30d5\u30a1\u30a4\u30eb\u3092\u898b\u3064\u3051\u3066\u9078\u629e\u3057\u307e\u3059\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/65644e1edaa94e2bdf7afb90\/291-0.jpg\" alt=\"The OpenVPN Android Import Profile screen\" \/><\/div>\n<p>\u30d5\u30a1\u30a4\u30eb\u3092\u9078\u629e\u3057\u305f\u5f8c\u3001\u30a2\u30d7\u30ea\u306f\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb\u306e\u30a4\u30f3\u30dd\u30fc\u30c8\u3092\u4fc3\u3057\u307e\u3059\u3002OK\u3092\u30bf\u30c3\u30d7\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u30a4\u30f3\u30dd\u30fc\u30c8\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb\u753b\u9762\u3067\u3001\u30a4\u30f3\u30dd\u30fc\u30c8\u5f8c\u306b\u63a5\u7d9a\u3059\u308b\u30c1\u30a7\u30c3\u30af\u30dc\u30c3\u30af\u30b9\u3092\u78ba\u8a8d\u3057\u3001\u53f3\u4e0a\u9685\u306e\u300c\u8ffd\u52a0\u300d\u3092\u30bf\u30c3\u30d7\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/65644e1edaa94e2bdf7afb90\/294-0.jpg\" alt=\"The OpenVPN Android app Imported Profile screenselecting VPN profile to import\" \/><\/div>\n<p>OpenVPN\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3078\u306e\u4fe1\u983c\u3092\u78ba\u8a8d\u3055\u308c\u307e\u3059\u3002\u63a5\u7d9a\u3092\u958b\u59cb\u3059\u308b\u305f\u3081\u306b\u306f\u300cOK\u300d\u3092\u9078\u629e\u3057\u3066\u304f\u3060\u3055\u3044\u3002VPN\u304b\u3089\u5207\u65ad\u3059\u308b\u306b\u306f\u3001\u30d7\u30ed\u30d5\u30a3\u30fc\u30eb\u30da\u30fc\u30b8\u306e\u30b9\u30a4\u30c3\u30c1\u3092\u5207\u308a\u66ff\u3048\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/65644e1edaa94e2bdf7afb90\/296-0.jpg\" alt=\"The OpenVPN Android app connected to the VPN\" \/><\/div>\n<h2>\u30b9\u30c6\u30c3\u30d710- VPN\u63a5\u7d9a\u306e\u30c6\u30b9\u30c8\uff08\u30aa\u30d7\u30b7\u30e7\u30f3\uff09<\/h2>\n<div class=\"post-conf-note\">\n<p class=\"post-conf-desc\">Note<\/p>\n<div>\u6ce8\u610f\uff1aStep 4 \u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u30bb\u30af\u30b7\u30e7\u30f3\u3067 VPN \u7d4c\u7531\u3067\u30c8\u30e9\u30d5\u30a3\u30c3\u30af\u3092\u3059\u3079\u3066\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u3059\u308b\u3053\u3068\u3092\u9078\u629e\u3057\u305f\u5834\u5408\u306b\u306e\u307f\u3001VPN \u63a5\u7d9a\u3092\u30c6\u30b9\u30c8\u3059\u308b\u305f\u3081\u306e\u3053\u306e\u65b9\u6cd5\u304c\u6a5f\u80fd\u3057\u307e\u3059\u3002<\/div>\n<\/div>\n<p>\u3059\u3079\u3066\u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u305f\u3089\u3001\u7c21\u5358\u306a\u30c1\u30a7\u30c3\u30af\u3067\u6b63\u5e38\u306b\u52d5\u4f5c\u3057\u3066\u3044\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002VPN\u63a5\u7d9a\u304c\u6709\u52b9\u306b\u306a\u3063\u3066\u3044\u306a\u3044\u72b6\u614b\u3067\u3001\u30d6\u30e9\u30a6\u30b6\u3092\u958b\u304dDNSLeakTest\u306b\u30a2\u30af\u30bb\u30b9\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u3053\u306e\u30b5\u30a4\u30c8\u3067\u306f\u3001\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u30b5\u30fc\u30d3\u30b9\u30d7\u30ed\u30d0\u30a4\u30c0\u30fc\u304b\u3089\u5272\u308a\u5f53\u3066\u3089\u308c\u305fIP\u30a2\u30c9\u30ec\u30b9\u3068\u3001\u4e16\u754c\u4e2d\u306e\u4ed6\u306e\u4eba\u306b\u3069\u306e\u3088\u3046\u306b\u8868\u793a\u3055\u308c\u308b\u304b\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002\u540c\u3058\u30a6\u30a7\u30d6\u30b5\u30a4\u30c8\u3067DNS\u8a2d\u5b9a\u3092\u78ba\u8a8d\u3059\u308b\u306b\u306f\u3001\u300c\u62e1\u5f35\u30c6\u30b9\u30c8\u300d\u3092\u30af\u30ea\u30c3\u30af\u3057\u3001\u4f7f\u7528\u3057\u3066\u3044\u308bDNS\u30b5\u30fc\u30d0\u30fc\u3092\u78ba\u8a8d\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u30aa\u30fc\u30d7\u30f3VPN\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u3092\u30aa\u30fc\u30d7\u30f3VPN\u30b5\u30fc\u30d0\u30fc\u306b\u63a5\u7d9a\u3057\u3001\u30d6\u30e9\u30a6\u30b6\u3092\u66f4\u65b0\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u5b8c\u5168\u306b\u7570\u306a\u308bIP\u30a2\u30c9\u30ec\u30b9\uff08VPN\u30b5\u30fc\u30d0\u30fc\u306e\u3082\u306e\uff09\u304c\u8868\u793a\u3055\u308c\u3001\u305d\u308c\u304c\u3042\u306a\u305f\u306e\u4e16\u754c\u3078\u306e\u59ff\u52e2\u3068\u306a\u308a\u307e\u3059\u3002\u3055\u3089\u306b\u3001DNSLeakTest\u306e\u62e1\u5f35\u30c6\u30b9\u30c8\u306b\u3088\u308a\u3001DNS\u8a2d\u5b9a\u304c\u78ba\u8a8d\u3055\u308c\u3001VPN\u306b\u30d7\u30c3\u30b7\u30e5\u3055\u308c\u305fDNS\u30ea\u30be\u30eb\u30d0\u304c\u4f7f\u7528\u3055\u308c\u3066\u3044\u308b\u3053\u3068\u3082\u78ba\u8a8d\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>\u4ee5\u4e0b\u306e\u3053\u3068\u3092\u899a\u3048\u3066\u304a\u3044\u3066\u304f\u3060\u3055\u3044\uff1aVPN\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306e\u30c8\u30e9\u30d5\u30a3\u30c3\u30af\u3092\u3059\u3079\u3066OpenVPN\u30b5\u30fc\u30d0\u30fc\u7d4c\u7531\u3067\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u3059\u308b\u8a2d\u5b9a\u3092\u9078\u3093\u3060\u5834\u5408\u3001Silicon Cloud\u306evServer\u4e0a\u3067\u52d5\u4f5c\u3057\u3066\u3044\u308bOpenVPN\u30b5\u30fc\u30d0\u30fc\u3092\u901a\u3058\u3066VPN\u63a5\u7d9a\u3055\u308c\u305f\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u304c\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u4e0a\u3067\u884c\u3046\u3059\u3079\u3066\u306e\u30a2\u30af\u30bb\u30b9\u306f\u3001Silicon Cloud\u306e\u5e2f\u57df\u5e45\u3092\u6d88\u8cbb\u3057\u307e\u3059\u3002\u30a2\u30af\u30c6\u30a3\u30d6\u306a\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u304c\u591a\u6570\u3044\u308b\u5834\u5408\u3001\u5e2f\u57df\u5e45\u306e\u8d85\u904e\u6599\u91d1\u304c\u767a\u751f\u3059\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<h2>\u30b9\u30c6\u30c3\u30d711 &#8211; \u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u8a3c\u660e\u66f8\u306e\u53d6\u308a\u6d88\u3057<\/h2>\n<p>\u30aa\u30fc\u30d7\u30f3VPN\u30b5\u30fc\u30d0\u3078\u306e\u30a2\u30af\u30bb\u30b9\u3092\u3055\u3089\u306b\u9632\u6b62\u3059\u308b\u305f\u3081\u306b\u3001\u6642\u6298\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u8a3c\u660e\u66f8\u3092\u53d6\u308a\u6d88\u3059\u5fc5\u8981\u304c\u3042\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u305d\u308c\u3092\u884c\u3046\u305f\u3081\u306b\u3001CA\u30de\u30b7\u30f3\u4e0a\u306e~\/easy-rsa\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u79fb\u52d5\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"$\"><span class=\"token builtin class-name\">cd<\/span> ~\/easy-rsa<\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u6b21\u306b\u3001easyrsa\u30b9\u30af\u30ea\u30d7\u30c8\u3092 revoke \u30aa\u30d7\u30b7\u30e7\u30f3\u3068\u3068\u3082\u306b\u5b9f\u884c\u3057\u3001\u53d6\u308a\u6d88\u3057\u305f\u3044\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306e\u540d\u524d\u3092\u6307\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"$\">.\/easyrsa revoke <mark>client2<\/mark><\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u3053\u308c\u306b\u3088\u3063\u3066\u3001\u306f\u3044\u3092\u5165\u529b\u3057\u3066\u3082\u3089\u3063\u3066\u53d6\u308a\u6d88\u3057\u3092\u78ba\u8a8d\u3059\u308b\u3088\u3046\u306b\u6c42\u3081\u3089\u308c\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<div class=\"secondary-code-label\" title=\"Output\">Output<\/div>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>Please confirm you wish to revoke the certificate with the following subject: subject= commonName = client2 Type the word &#8216;yes&#8217; to continue, or any other input to abort. Continue with revocation: <mark>yes<\/mark><\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u3082\u3057CA\u306e\u79d8\u5bc6\u9375\u306b\u30d1\u30b9\u30d5\u30ec\u30fc\u30ba\u304c\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u308b\u5834\u5408\u306f\u3001\u6307\u793a\u304c\u51fa\u305f\u3089\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u30a2\u30af\u30b7\u30e7\u30f3\u3092\u78ba\u8a8d\u3057\u305f\u5f8c\u3001CA\u306f\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306e\u8a3c\u660e\u66f8\u3092\u5b8c\u5168\u306b\u7121\u52b9\u306b\u3057\u307e\u3059\u3002\u305f\u3060\u3057\u3001OpenVPN\u30b5\u30fc\u30d0\u30fc\u306b\u306f\u73fe\u5728\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306e\u8a3c\u660e\u66f8\u304c\u7121\u52b9\u5316\u3055\u308c\u305f\u304b\u3069\u3046\u304b\u3092\u78ba\u8a8d\u3059\u308b\u624b\u6bb5\u304c\u3042\u308a\u307e\u305b\u3093\u3002\u305d\u306e\u305f\u3081\u3001CA\u30de\u30b7\u30f3\u4e0a\u306b\u8a3c\u660e\u66f8\u5931\u52b9\u30ea\u30b9\u30c8\uff08CRL\uff09\u3092\u4f5c\u6210\u3057\u3001\u5fc5\u8981\u306b\u5fdc\u3058\u3066CA\u306e\u30d1\u30b9\u30d5\u30ec\u30fc\u30ba\u3092\u518d\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"$\">.\/easyrsa gen-crl<\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u65e5\u672c\u8a9e\u306b\u81ea\u7136\u306b\u8a00\u3044\u63db\u3048\u307e\u3059\u3002\u4e00\u3064\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u306e\u307f\u63d0\u4f9b\u3044\u305f\u3057\u307e\u3059\uff1a<\/p>\n<p>\u3053\u306e\u64cd\u4f5c\u306b\u3088\u308a\u3001crl.pem\u3068\u3044\u3046\u30d5\u30a1\u30a4\u30eb\u304c\u751f\u6210\u3055\u308c\u307e\u3059\u3002\u5b89\u5168\u306b\u3053\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u3042\u306a\u305f\u306eOpenVPN\u30b5\u30fc\u30d0\u30fc\u306b\u8ee2\u9001\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"$\"><span class=\"token function\">scp<\/span> ~\/easy-rsa\/pki\/crl.pem <mark>sammy<\/mark>@<mark>your_server_ip<\/mark>:\/tmp<\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u3042\u306a\u305f\u306eOpenVPN\u30b5\u30fc\u30d0\u30fc\u306b\u3001\u3053\u306e\u30d5\u30a1\u30a4\u30eb\u3092\/etc\/openvpn\/\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u30b3\u30d4\u30fc\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"$\"><span class=\"token function\">sudo<\/span> <span class=\"token function\">cp<\/span> \/tmp\/crl.pem \/etc\/openvpn<\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u305d\u306e\u5f8c\u3001OpenVPN\u30b5\u30fc\u30d0\u30fc\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u958b\u3044\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"$\"><span class=\"token function\">sudo<\/span> <span class=\"token function\">nano<\/span> \/etc\/openvpn\/server.conf<\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u30d5\u30a1\u30a4\u30eb\u306e\u4e0b\u90e8\u306b\u3001\u63a5\u7d9a\u8a66\u884c\u6642\u306bOpenVPN\u30b5\u30fc\u30d0\u30fc\u304c\u4f5c\u6210\u3057\u305f\u8a3c\u660e\u66f8\u5931\u52b9\u30ea\u30b9\u30c8\u3092\u78ba\u8a8d\u3059\u308b\u3088\u3046\u306b\u6307\u793a\u3059\u308b\u300ccrl-verify\u300d\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u8ffd\u52a0\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<div>\/etc\/openvpn\/server.conf\u3092\u65e5\u672c\u8a9e\u3067\u8a00\u3044\u63db\u3048\u308b\u3068\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<br \/>\n\u300c\/etc\/openvpn\/server.conf\u300d<\/div>\n<pre class=\"post-pre\"><code>. . .\r\ncrl-verify crl.pem\r\n<\/code><\/pre>\n<p>\u30d5\u30a1\u30a4\u30eb\u3092\u4fdd\u5b58\u3057\u3066\u9589\u3058\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u6700\u5f8c\u306b\u3001\u8a3c\u660e\u66f8\u306e\u7121\u52b9\u5316\u3092\u5b9f\u88c5\u3059\u308b\u305f\u3081\u306bOpenVPN\u3092\u518d\u8d77\u52d5\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"$\"><span class=\"token function\">sudo<\/span> systemctl restart openvpn@server<\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u304a\u5ba2\u69d8\u306f\u3001\u53e4\u3044\u8a8d\u8a3c\u60c5\u5831\u3092\u4f7f\u7528\u3057\u3066\u3082\u30b5\u30fc\u30d0\u30fc\u3078\u306e\u63a5\u7d9a\u304c\u6210\u529f\u3057\u306a\u3044\u3088\u3046\u306b\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u8ffd\u52a0\u306e\u9867\u5ba2\u3092\u53d6\u308a\u6d88\u3059\u306b\u306f\u3001\u6b21\u306e\u624b\u7d9a\u304d\u306b\u5f93\u3063\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u7528\u3057\u3066\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u540d\u3092\u6307\u5b9a\u3057\u3066\u8a3c\u660e\u66f8\u3092\u53d6\u308a\u6d88\u3059<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>\u65b0\u3057\u3044CRL\u3092\u751f\u6210\u3059\u308b<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>\u751f\u6210\u3057\u305f\u65b0\u3057\u3044crl.pem\u30d5\u30a1\u30a4\u30eb\u3092OpenVPN\u30b5\u30fc\u30d0\u30fc\u306b\u8ee2\u9001\u3057\u3001\u53e4\u3044\u30ea\u30b9\u30c8\u3092\u4e0a\u66f8\u304d\u3059\u308b\u305f\u3081\u306b\/etc\/openvpn\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u30b3\u30d4\u30fc\u3059\u308b<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>OpenVPN\u30b5\u30fc\u30d3\u30b9\u3092\u518d\u8d77\u52d5\u3059\u308b<\/ol>\n<p>\u3042\u306a\u305f\u306f\u3001\u4ee5\u524d\u306b\u30b5\u30fc\u30d0\u30fc\u306b\u767a\u884c\u3057\u305f\u3059\u3079\u3066\u306e\u8a3c\u660e\u66f8\u3092\u53d6\u308a\u6d88\u3059\u305f\u3081\u306b\u3001\u3053\u306e\u30d7\u30ed\u30bb\u30b9\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<h2>\u7d50\u8ad6<\/h2>\n<p>\u65b0\u3057\u3044VPN\u306e\u5c0e\u5165\u306b\u3088\u308a\u3001\u30ea\u30e2\u30fc\u30c8\u30c1\u30fc\u30e0\u30e1\u30f3\u30d0\u30fc\u306f\u76f4\u63a5\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306b\u63a5\u7d9a\u3057\u3066\u3044\u308b\u304b\u306e\u3088\u3046\u306b\u3001\u5b89\u5168\u306b\u5185\u90e8\u30ea\u30bd\u30fc\u30b9\u306b\u63a5\u7d9a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u73fe\u5728\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u3067\u30a2\u30af\u30bb\u30b9\u53ef\u80fd\u306a\u4e00\u90e8\u306e\u30ea\u30bd\u30fc\u30b9\u306b\u3064\u3044\u3066\u306f\u3001\u65b0\u305f\u306b\u8a2d\u5b9a\u3057\u305f\u516c\u958b\u9375\u57fa\u76e4\u3088\u308a\u3082\u30ed\u30d0\u30b9\u30c8\u6027\u306e\u4f4e\u3044\u65b9\u6cd5\uff08\u4f8b\uff1aHTTP\u30d9\u30fc\u30b7\u30c3\u30af\u8a8d\u8a3c\uff09\u3067\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u3092\u78ba\u4fdd\u3057\u3066\u3044\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002VPN\u306e\u80cc\u5f8c\u306b\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306b\u79fb\u884c\u3057\u307e\u3057\u3087\u3046\u3002\u305f\u3063\u305f1\u53f0\u306e\u30b5\u30fc\u30d0\u30fc\u3068\u3044\u304f\u3064\u304b\u306e\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u3067\u3001\u91cd\u8981\u306a\u30c7\u30fc\u30bf\u3068\u30a4\u30f3\u30d5\u30e9\u3092\u4fdd\u8b77\u3059\u308b\u5927\u304d\u306a\u4e00\u6b69\u3092\u8e0f\u307f\u51fa\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>VPN\u306b\u4f3c\u305f\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u3068\u30d7\u30e9\u30a4\u30d0\u30b7\u30fc\u30c4\u30fc\u30eb\u306e\u3082\u3046\u4e00\u3064\u306e\u7a2e\u985e\u306f\u30a6\u30a7\u30d6\u30d7\u30ed\u30ad\u30b7\u3067\u3059\u3002VPN\u3068\u540c\u69d8\u306b\u3001\u30a6\u30a7\u30d6\u30d7\u30ed\u30ad\u30b7\u306f\u30a8\u30f3\u30c9\u30e6\u30fc\u30b6\u30fc\u3068\u5f7c\u3089\u304c\u30a2\u30af\u30bb\u30b9\u3057\u305f\u3044\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u30ea\u30bd\u30fc\u30b9\u306e\u9593\u306b\u4e2d\u9593\u4eba\u3068\u3057\u3066\u6a5f\u80fd\u3057\u3001\u30a8\u30f3\u30c9\u30e6\u30fc\u30b6\u30fc\u306b\u533f\u540d\u6027\u3092\u63d0\u4f9b\u3057\u307e\u3059\u3002\u30a6\u30a7\u30d6\u30d7\u30ed\u30ad\u30b7\u306f\u30a6\u30a7\u30d6\u30c8\u30e9\u30d5\u30a3\u30c3\u30af\u306e\u307f\u3092\u5bfe\u8c61\u3068\u3057\u3066\u304a\u308a\u3001\u6697\u53f7\u5316\u306f\u63d0\u4f9b\u3057\u306a\u3044\u3082\u306e\u306e\u3001VPN\u304c\u4e0d\u8981\u306a\u5834\u5408\u306b\u306f\u4fbf\u5229\u306a\u30c4\u30fc\u30eb\u3068\u306a\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002\u3082\u3057\u8208\u5473\u304c\u3042\u308c\u3070\u3001Ubuntu 22.04\u3067\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8\u63a5\u7d9a\u306e\u305f\u3081\u306bSquid Proxy\u3092\u8a2d\u5b9a\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4ee5\u4e0b\u306e\u6587\u7ae0\u3092\u65e5\u672c\u8a9e\u3067\u8a00\u3044\u63db\u3048\u3066\u304f\u3060\u3055\u3044\uff08\u9078\u629e\u80a2\u306f\u4e00\u3064\u3060\u3051\u3067\u7d50\u69cb\u3067\u3059\uff09\uff1a \u30a4\u30f3\u30c8\u30ed\u30c0\u30af\u30b7\u30e7\u30f3 \u30c1\u30fc\u30e0\u306f\u3001\u4fe1\u983c\u3067\u304d\u306a\u3044\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u3092\u4ecb\u3057\u3066\u30ea\u30e2\u30fc\u30c8\u5834\u6240\u304b\u3089\u5185\u90e8\u30ea\u30bd\u30fc\u30b9\u306b\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8\u304b\u3064\u5b89\u5168\u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u4eee\u60f3\u30d7 [&hellip;]<\/p>\n","protected":false},"author":10,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[26,18],"class_list":["post-451","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-26","tag-18"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.5 (Yoast SEO v21.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Debian 11\u3067OpenVPN\u30b5\u30fc\u30d0\u30fc\u3092\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u306e\u65b9\u6cd5 - Blog - Silicon Cloud<\/title>\n<meta name=\"description\" content=\"Debian 11\u3067OpenVPN\u30b5\u30fc\u30d0\u30fc\u3092\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u306e\u65b9\u6cd5\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3002\u5b9f\u8df5\u7684\u306a\u4f8b\u3068\u30b3\u30fc\u30c9\u3001\u6ce8\u610f\u70b9\u3092\u542b\u3081\u3066\u521d\u5fc3\u8005\u306b\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u8aac\u660e\u3057\u307e\u3059\u3002\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.silicloud.com\/ja\/blog\/debian-11\u3067openvpn\u30b5\u30fc\u30d0\u30fc\u3092\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u3059\u308b\u65b9\u6cd5\/\" \/>\n<meta property=\"og:locale\" content=\"ja_JP\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Debian 11\u3067OpenVPN\u30b5\u30fc\u30d0\u30fc\u3092\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u306e\u65b9\u6cd5\" \/>\n<meta property=\"og:description\" content=\"Debian 11\u3067OpenVPN\u30b5\u30fc\u30d0\u30fc\u3092\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u306e\u65b9\u6cd5\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3002\u5b9f\u8df5\u7684\u306a\u4f8b\u3068\u30b3\u30fc\u30c9\u3001\u6ce8\u610f\u70b9\u3092\u542b\u3081\u3066\u521d\u5fc3\u8005\u306b\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u8aac\u660e\u3057\u307e\u3059\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/ja\/blog\/debian-11\u3067openvpn\u30b5\u30fc\u30d0\u30fc\u3092\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u3059\u308b\u65b9\u6cd5\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2023-08-06T09:26:27+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-07-31T14:42:03+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/65644e1edaa94e2bdf7afb90\/280-0.png\" \/>\n<meta name=\"author\" content=\"\u82bd\u4f9d, \u96e8\u591c\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u57f7\u7b46\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u82bd\u4f9d, \u96e8\u591c\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593\" \/>\n\t<meta name=\"twitter:data2\" content=\"69\u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/debian-11%e3%81%a7openvpn%e3%82%b5%e3%83%bc%e3%83%90%e3%83%bc%e3%82%92%e3%82%bb%e3%83%83%e3%83%88%e3%82%a2%e3%83%83%e3%83%97%e3%81%99%e3%82%8b%e6%96%b9%e6%b3%95\/\",\"url\":\"https:\/\/www.silicloud.com\/ja\/blog\/debian-11%e3%81%a7openvpn%e3%82%b5%e3%83%bc%e3%83%90%e3%83%bc%e3%82%92%e3%82%bb%e3%83%83%e3%83%88%e3%82%a2%e3%83%83%e3%83%97%e3%81%99%e3%82%8b%e6%96%b9%e6%b3%95\/\",\"name\":\"Debian 11\u3067OpenVPN\u30b5\u30fc\u30d0\u30fc\u3092\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u306e\u65b9\u6cd5 - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#website\"},\"datePublished\":\"2023-08-06T09:26:27+00:00\",\"dateModified\":\"2025-07-31T14:42:03+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/aeb60a7861f2f002b54c66bd65bc6c27\"},\"description\":\"Debian 11\u3067OpenVPN\u30b5\u30fc\u30d0\u30fc\u3092\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u306e\u65b9\u6cd5\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3002\u5b9f\u8df5\u7684\u306a\u4f8b\u3068\u30b3\u30fc\u30c9\u3001\u6ce8\u610f\u70b9\u3092\u542b\u3081\u3066\u521d\u5fc3\u8005\u306b\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u8aac\u660e\u3057\u307e\u3059\u3002\",\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/debian-11%e3%81%a7openvpn%e3%82%b5%e3%83%bc%e3%83%90%e3%83%bc%e3%82%92%e3%82%bb%e3%83%83%e3%83%88%e3%82%a2%e3%83%83%e3%83%97%e3%81%99%e3%82%8b%e6%96%b9%e6%b3%95\/#breadcrumb\"},\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/ja\/blog\/debian-11%e3%81%a7openvpn%e3%82%b5%e3%83%bc%e3%83%90%e3%83%bc%e3%82%92%e3%82%bb%e3%83%83%e3%83%88%e3%82%a2%e3%83%83%e3%83%97%e3%81%99%e3%82%8b%e6%96%b9%e6%b3%95\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/debian-11%e3%81%a7openvpn%e3%82%b5%e3%83%bc%e3%83%90%e3%83%bc%e3%82%92%e3%82%bb%e3%83%83%e3%83%88%e3%82%a2%e3%83%83%e3%83%97%e3%81%99%e3%82%8b%e6%96%b9%e6%b3%95\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/ja\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Debian 11\u3067OpenVPN\u30b5\u30fc\u30d0\u30fc\u3092\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u306e\u65b9\u6cd5\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#website\",\"url\":\"https:\/\/www.silicloud.com\/ja\/blog\/\",\"name\":\"Blog - Silicon Cloud\",\"description\":\"\",\"inLanguage\":\"ja\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/aeb60a7861f2f002b54c66bd65bc6c27\",\"name\":\"\u82bd\u4f9d, \u96e8\u591c\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/6305fe5cabc2b854c1208975a47fbf3f8cef3f7cd775b94dceedbe59b74a8010?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/6305fe5cabc2b854c1208975a47fbf3f8cef3f7cd775b94dceedbe59b74a8010?s=96&d=mm&r=g\",\"caption\":\"\u82bd\u4f9d, \u96e8\u591c\"},\"url\":\"https:\/\/www.silicloud.com\/ja\/blog\/author\/meiamaya\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/debian-11%e3%81%a7openvpn%e3%82%b5%e3%83%bc%e3%83%90%e3%83%bc%e3%82%92%e3%82%bb%e3%83%83%e3%83%88%e3%82%a2%e3%83%83%e3%83%97%e3%81%99%e3%82%8b%e6%96%b9%e6%b3%95\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Debian 11\u3067OpenVPN\u30b5\u30fc\u30d0\u30fc\u3092\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u306e\u65b9\u6cd5 - Blog - Silicon Cloud","description":"Debian 11\u3067OpenVPN\u30b5\u30fc\u30d0\u30fc\u3092\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u306e\u65b9\u6cd5\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3002\u5b9f\u8df5\u7684\u306a\u4f8b\u3068\u30b3\u30fc\u30c9\u3001\u6ce8\u610f\u70b9\u3092\u542b\u3081\u3066\u521d\u5fc3\u8005\u306b\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u8aac\u660e\u3057\u307e\u3059\u3002","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.silicloud.com\/ja\/blog\/debian-11\u3067openvpn\u30b5\u30fc\u30d0\u30fc\u3092\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u3059\u308b\u65b9\u6cd5\/","og_locale":"ja_JP","og_type":"article","og_title":"Debian 11\u3067OpenVPN\u30b5\u30fc\u30d0\u30fc\u3092\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u306e\u65b9\u6cd5","og_description":"Debian 11\u3067OpenVPN\u30b5\u30fc\u30d0\u30fc\u3092\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u306e\u65b9\u6cd5\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3002\u5b9f\u8df5\u7684\u306a\u4f8b\u3068\u30b3\u30fc\u30c9\u3001\u6ce8\u610f\u70b9\u3092\u542b\u3081\u3066\u521d\u5fc3\u8005\u306b\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u8aac\u660e\u3057\u307e\u3059\u3002","og_url":"https:\/\/www.silicloud.com\/ja\/blog\/debian-11\u3067openvpn\u30b5\u30fc\u30d0\u30fc\u3092\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u3059\u308b\u65b9\u6cd5\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2023-08-06T09:26:27+00:00","article_modified_time":"2025-07-31T14:42:03+00:00","og_image":[{"url":"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/65644e1edaa94e2bdf7afb90\/280-0.png"}],"author":"\u82bd\u4f9d, \u96e8\u591c","twitter_card":"summary_large_image","twitter_misc":{"\u57f7\u7b46\u8005":"\u82bd\u4f9d, \u96e8\u591c","\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593":"69\u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/ja\/blog\/debian-11%e3%81%a7openvpn%e3%82%b5%e3%83%bc%e3%83%90%e3%83%bc%e3%82%92%e3%82%bb%e3%83%83%e3%83%88%e3%82%a2%e3%83%83%e3%83%97%e3%81%99%e3%82%8b%e6%96%b9%e6%b3%95\/","url":"https:\/\/www.silicloud.com\/ja\/blog\/debian-11%e3%81%a7openvpn%e3%82%b5%e3%83%bc%e3%83%90%e3%83%bc%e3%82%92%e3%82%bb%e3%83%83%e3%83%88%e3%82%a2%e3%83%83%e3%83%97%e3%81%99%e3%82%8b%e6%96%b9%e6%b3%95\/","name":"Debian 11\u3067OpenVPN\u30b5\u30fc\u30d0\u30fc\u3092\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u306e\u65b9\u6cd5 - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/ja\/blog\/#website"},"datePublished":"2023-08-06T09:26:27+00:00","dateModified":"2025-07-31T14:42:03+00:00","author":{"@id":"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/aeb60a7861f2f002b54c66bd65bc6c27"},"description":"Debian 11\u3067OpenVPN\u30b5\u30fc\u30d0\u30fc\u3092\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u306e\u65b9\u6cd5\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3002\u5b9f\u8df5\u7684\u306a\u4f8b\u3068\u30b3\u30fc\u30c9\u3001\u6ce8\u610f\u70b9\u3092\u542b\u3081\u3066\u521d\u5fc3\u8005\u306b\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u8aac\u660e\u3057\u307e\u3059\u3002","breadcrumb":{"@id":"https:\/\/www.silicloud.com\/ja\/blog\/debian-11%e3%81%a7openvpn%e3%82%b5%e3%83%bc%e3%83%90%e3%83%bc%e3%82%92%e3%82%bb%e3%83%83%e3%83%88%e3%82%a2%e3%83%83%e3%83%97%e3%81%99%e3%82%8b%e6%96%b9%e6%b3%95\/#breadcrumb"},"inLanguage":"ja","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/ja\/blog\/debian-11%e3%81%a7openvpn%e3%82%b5%e3%83%bc%e3%83%90%e3%83%bc%e3%82%92%e3%82%bb%e3%83%83%e3%83%88%e3%82%a2%e3%83%83%e3%83%97%e3%81%99%e3%82%8b%e6%96%b9%e6%b3%95\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/ja\/blog\/debian-11%e3%81%a7openvpn%e3%82%b5%e3%83%bc%e3%83%90%e3%83%bc%e3%82%92%e3%82%bb%e3%83%83%e3%83%88%e3%82%a2%e3%83%83%e3%83%97%e3%81%99%e3%82%8b%e6%96%b9%e6%b3%95\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/ja\/blog\/"},{"@type":"ListItem","position":2,"name":"Debian 11\u3067OpenVPN\u30b5\u30fc\u30d0\u30fc\u3092\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u306e\u65b9\u6cd5"}]},{"@type":"WebSite","@id":"https:\/\/www.silicloud.com\/ja\/blog\/#website","url":"https:\/\/www.silicloud.com\/ja\/blog\/","name":"Blog - Silicon Cloud","description":"","inLanguage":"ja"},{"@type":"Person","@id":"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/aeb60a7861f2f002b54c66bd65bc6c27","name":"\u82bd\u4f9d, \u96e8\u591c","image":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/6305fe5cabc2b854c1208975a47fbf3f8cef3f7cd775b94dceedbe59b74a8010?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/6305fe5cabc2b854c1208975a47fbf3f8cef3f7cd775b94dceedbe59b74a8010?s=96&d=mm&r=g","caption":"\u82bd\u4f9d, \u96e8\u591c"},"url":"https:\/\/www.silicloud.com\/ja\/blog\/author\/meiamaya\/"},{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.silicloud.com\/ja\/blog\/debian-11%e3%81%a7openvpn%e3%82%b5%e3%83%bc%e3%83%90%e3%83%bc%e3%82%92%e3%82%bb%e3%83%83%e3%83%88%e3%82%a2%e3%83%83%e3%83%97%e3%81%99%e3%82%8b%e6%96%b9%e6%b3%95\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts\/451","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/comments?post=451"}],"version-history":[{"count":2,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts\/451\/revisions"}],"predecessor-version":[{"id":325793,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts\/451\/revisions\/325793"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/media?parent=451"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/categories?post=451"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/tags?post=451"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}