{"id":4762,"date":"2021-06-27T16:05:24","date_gmt":"2021-06-27T07:05:24","guid":{"rendered":"https:\/\/lab4ict.com\/system\/?p=4762"},"modified":"2023-06-25T10:04:17","modified_gmt":"2023-06-25T01:04:17","slug":"ubuntu%ef%bc%8820-04%ef%bc%89%e3%82%88%e3%82%8aopenvpn%e3%82%b5%e3%83%bc%e3%83%90%e3%81%ab%e6%8e%a5%e7%b6%9a%e3%81%99%e3%82%8b%ef%bc%81","status":"publish","type":"post","link":"https:\/\/lab4ict.com\/system\/archives\/4762","title":{"rendered":"OpenVPN\u30b5\u30fc\u30d0\u306b\u63a5\u7d9a\u3059\u308b\uff01Ubuntu\uff0820.04\uff09"},"content":{"rendered":"<p>Ubuntu\u3088\u308a\u3001OpenVPN\u30b5\u30fc\u30d0\u306b\u63a5\u7d9a\u3057\u307e\u3059\u3002<\/p>\n<h2>OpenVPN\u3068ease-rsa\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\uff01<\/h2>\n<p>OpenVPN\u3068ease-rsa\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\n$ sudo apt install openvpn easy-rsa\r\n<\/pre>\n<h2>OpenVPN\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u3068\u3057\u3066\u63a5\u7d9a\u3059\u308b\u305f\u3081\u306e\u96fb\u5b50\u8a3c\u660e\u66f8\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3059\u308b\uff01<\/h2>\n<p>OpenVPN\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u3068\u3057\u3066\u63a5\u7d9a\u3059\u308b\u305f\u3081\u306e\u96fb\u5b50\u8a3c\u660e\u66f8\u300cca.crt\u300d\u3001\u300cclient.crt\u300d\u3001\u300cclient1.key\u300d\u3092scp\u30b3\u30de\u30f3\u30c9\u7b49\u3067\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u3001\u300c\/etc\/openvpn\/client\u300d\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u683c\u7d0d\u3057\u307e\u3059\u3002<\/p>\n<h2>OpenVPN\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306e\u8a2d\u5b9a\u3092\u884c\u3046\uff01<\/h2>\n<p>OpenVPN\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306e\u8a2d\u5b9a\u3092\u884c\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\n$ sudo cp \/usr\/share\/doc\/openvpn\/examples\/sample-config-files\/client.conf \/etc\/openvpn\/client\r\n<\/pre>\n<p>\u300cclient.conf\u300d\u3092\u4ee5\u4e0b\u3001\u4fee\u6b63\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\nsudo vi \/etc\/openvpn\/client\/client.conf\r\n...\r\nremote ubusvr01 1194\r\n...\r\ncert client1.crt\r\nkey client1.key\r\n...\r\n;tls-auth ta.key 1\r\n...\r\n<\/pre>\n<h2>OpenVPN\u306b\u3088\u308bVPN\u63a5\u7d9a\u3092\u884c\u3046\uff01<\/h2>\n<p>OpenVPN\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u3092\u4f7f\u7528\u3057\u3066\u3001OpenVPN\u30b5\u30fc\u30d0\u306bVPN\u63a5\u7d9a\u3092\u884c\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\n$ sudo openvpn \/etc\/openvpn\/client\/client.conf\r\n<\/pre>\n<h2>VPN\u3067\u63a5\u7d9a\u3092\u884c\u3046\uff01<\/h2>\n<p>VPN\u3067\u63a5\u7d9a\u3067\u304d\u308b\u304b\u3001VPN\u63a5\u7d9a\u306eIP\u30a2\u30c9\u30ec\u30b9\u3092\u4f7f\u7528\u3057\u3066\u63a5\u7d9a\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\n$ openssh 10.8.0.1\r\n<\/pre>\n<h2>Sytemd\u3092\u4f7f\u7528\u3057\u3066\u3001OpenVPN\u306b\u3088\u308bVPN\u63a5\u7d9a\u3092\u884c\u3046\uff01<\/h2>\n<p>OpenVPN\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u3092\u4f7f\u7528\u3057\u3066\u3001OpenVPN\u30b5\u30fc\u30d0\u306bVPN\u63a5\u7d9a\u3092\u884c\u3044\u307e\u3059\u3002@\u6307\u5b9a\u306e\u5f8c\u308d\u306b\u306f\u3001client.conf\u306e.conf\u306e\u524d\u306e\u6587\u5b57\u5217\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\n$ sudo systemd start openvpn-client@client\r\n<\/pre>\n<p>\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u30de\u30b7\u30f3\u8d77\u52d5\u6642\u306b\u81ea\u52d5\u63a5\u7d9a\u3055\u305b\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\n$ sudo systemctl enable openvpn-client@client\r\n<\/pre>\n<h2>\u304a\u308f\u308a\u306b<\/h2>\n<p>OpenVPN\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306b\u3088\u308bOpenVPN\u63a5\u7d9a\u3092\u884c\u3044\u3001ssh\u30b3\u30de\u30f3\u30c9\u3067\u63a5\u7d9a\u3092\u78ba\u8a8d\u3057\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n<h2>\u95a2\u9023\u8a18\u4e8b<\/h2>\n<div class=\"sc_getpost\"><a class=\"clearfix\" href=\"https:\/\/lab4ict.com\/system\/archives\/6816\" ><div class=\"sc_getpost_thumb post-box-thumbnail__wrap\"><img decoding=\"async\" src=\"data:image\/gif;base64,R0lGODdhAQABAPAAAN3d3QAAACwAAAAAAQABAAACAkQBADs=\" width=\"150\" height=\"150\" alt=\"\u3010\u8a18\u4e8b\u4e00\u89a7\u3011OpenVPN\u3067VPN\u74b0\u5883\u3092\u69cb\u7bc9\u3059\u308b\uff01\" loading=\"lazy\" data-src=\"https:\/\/lab4ict.com\/system\/wp-content\/uploads\/2018\/06\/fia0000001-150x150.gif\" class=\"lazyload\"><\/div><div class=\"title\">\u3010\u8a18\u4e8b\u4e00\u89a7\u3011OpenVPN\u3067VPN\u74b0\u5883\u3092\u69cb\u7bc9\u3059\u308b\uff01<\/div><div class=\"substr\">OpenVPN\u3067VPN\u74b0\u5883\u3092\u69cb\u7bc9\u3059\u308b\u8a18\u4e8b\u306e\u4e00\u89a7\u3067\u3059\u3002 OpenVPN\u66f8\u7c4d\uff08Amazon\uff09 ...<\/div><\/a><\/div>\n<h2>OpenVPN\u66f8\u7c4d\uff08Amazon\uff09<\/h2>\n<p><iframe sandbox=\"allow-popups allow-scripts allow-modals allow-forms allow-same-origin\" style=\"width:120px;height:240px;\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\" frameborder=\"0\" src=\"\/\/rcm-fe.amazon-adsystem.com\/e\/cm?lt1=_blank&bc1=000000&IS2=1&bg1=FFFFFF&fc1=000000&lc1=0000FF&t=infotecr-22&language=ja_JP&o=9&p=8&l=as4&m=amazon&f=ifr&ref=as_ss_li_til&asins=4899771673&linkId=81f9358628f49b3a4b9cb064ea4bc5fe\"><\/iframe><\/p>\n<hr \/>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Ubuntu\u3088\u308a\u3001OpenVPN\u30b5\u30fc\u30d0\u306b\u63a5\u7d9a\u3057\u307e\u3059\u3002 OpenVPN\u3068ease-rsa\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\uff01 OpenVPN\u3068ease-rsa\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002 $ sudo apt install openvpn easy-rsa Op\u2026<\/p>\n","protected":false},"author":1,"featured_media":642,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[138],"tags":[609,51,610],"class_list":["post-4762","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-openvpn","tag-openvpn","tag-ubuntu","tag-vpn"],"_links":{"self":[{"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/posts\/4762","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/comments?post=4762"}],"version-history":[{"count":1,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/posts\/4762\/revisions"}],"predecessor-version":[{"id":12596,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/posts\/4762\/revisions\/12596"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/media\/642"}],"wp:attachment":[{"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/media?parent=4762"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/categories?post=4762"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/tags?post=4762"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}