{"id":538,"date":"2019-09-25T15:05:42","date_gmt":"2019-09-25T07:05:42","guid":{"rendered":"https:\/\/www.linuxdevops.cn\/?p=538"},"modified":"2020-11-23T15:55:17","modified_gmt":"2020-11-23T07:55:17","slug":"centos7-install-openvpn","status":"publish","type":"post","link":"https:\/\/www.linuxdevops.cn\/2019\/09\/centos7-install-openvpn\/","title":{"rendered":"Centos7 \u642d\u5efa OpenVPN(\u65e7\u7248)"},"content":{"rendered":"\n

\u539f\u6587\u6709\u66f4\u597d\u7684\u6392\u7248\u770b\u7740\u66f4\u8212\u670d\u4f46\u662f\u4e0d\u8ba9\u590d\u5236\uff0c\u5b89\u88c5\u7684\u65f6\u5019\u8fd8\u8981\u624b\u6572\u597d\u9ebb\u70e6\uff0c\u672c\u6587\u505a\u4e0b\u7b80\u5355\u4fee\u6539\u590d\u5236\u5206\u4eab\u4e0b\u3002
\u539f\u6587\u5730\u5740\uff1a\u94c1\u4e50\u4e0e\u732b\u68a6\u5883\u4e4b\u68ee<\/a> https:\/\/www.tielemao.com\/406.html<\/a> <\/p><\/blockquote>\n\n\n

<\/p>\n\n\n

\u7b2c\u4e00\u6b65\u3001\u5b89\u88c5openvpn\u53ca\u6240\u9700\u8f6f\u4ef6<\/h3>\n\n\n

\u5b89\u88c5EPEL\u4ed3\u5e93 <\/strong><\/p>\n\n\n

wget http:\/\/dl.fedoraproject.org\/pub\/epel\/6\/i386\/epel-release-6-8.noarch.rpm <\/code><\/p>\n\n\n

rpm -Uvh epel-release-6-8.noarch.rpm <\/p>\n\n\n

\u5b89\u88c5openvpn <\/strong><\/p>\n\n\n

yum install openvpn <\/p>\n\n\n

\"\"\/<\/figure>\n\n\n

\u4e0a\u56fe\u4e2d\u53ef\u4ee5\u770b\u51fa\u6709\u53ef\u80fd\u7b2c\u4e00\u6b21\u6211\u5c1d\u8bd5\u7f16\u8bd1\u5b89\u88c5\u65f6\u6ca1\u6709\u5c06\u4f9d\u8d56\u6240\u9700\u7684lz4\u5305\u88c5\u4e0a\u4f1a\u6709\u70b9\u95ee \u9898\u3002 \u53e6\u5916\u5b89\u88c5\u4e0aepel\u4ed3\u5e93\u540e\uff0c\u83b7\u53d6\u5230\u7684openvpn\u5305\u4e5f\u6bd4\u8f83\u65b0\u5450\u3002 <\/p><\/blockquote>\n\n\n

\u5b89\u88c5openvpn\u6700\u65b0\u7684easy-rsa <\/strong><\/p>\n\n\n

\u8be5\u5305\u7528\u6765\u5236\u4f5cca\u8bc1\u4e66\uff0c\u670d\u52a1\u7aef\u8bc1\u4e66\uff0c\u5ba2\u6237\u7aef\u8bc1\u4e66\u3002
\u6700\u65b0\u7684\u4e3aeasy-rsa3\u3002 <\/p><\/blockquote>\n\n\n

wget https:\/\/github.com\/OpenVPN\/easy-rsa\/archive\/master.zip\nunzip master.zip\n\u5c06\u89e3\u538b\u5f97\u5230\u7684\u6587\u4ef6\u5939easy-rsa-master\u91cd\u547d\u540d\u4e3aeasy-rsa\nmv easy-rsa-mater\/ easy-rsa\/\n\u7136\u540e\u5c06easy-ras\u6587\u4ef6\u5939\u590d\u5236\u5230\/etc\/openvpn\/\u76ee\u5f55\u4e0b\ncp -R easy-rsa\/ \/etc\/openvpn\/<\/code><\/pre>\n\n\n

\u7b2c\u4e8c\u6b65\u3001\u7f16\u8f91vars\u6587\u4ef6\uff0c\u6839\u636e\u81ea\u5df1\u73af\u5883\u914d\u7f6e<\/h3>\n\n\n
  • \u8fdb\u5165\/etc\/openvpn\/easy-rsa\/easyrsa3<\/code>\u76ee\u5f55
    cd \/etc\/openvpn\/easy-rsa\/easyrsa3\/<\/code><\/li>
  • \u590d\u5236vars.example<\/code>\u4e3avars
    cp vars.example vars<\/code><\/li><\/ul>\n\n\n
    • \u4fee\u6539\u4e0b\u9762\u5b57\u6bb5
      • \u547d\u4ee4\uff1avim vars\uff0c\u7136\u540e\u4fee\u6539\uff0c\u6700\u540ewq\u4fdd\u5b58<\/li><\/ul>\/\/\u4ee5\u4e0b\u5b57\u6bb5\u6839\u636e\u81ea\u5df1\u5b9e\u9645\u60c5\u51b5\u66f4\u6539\uff0c\u8fd9\u4e9b\u4fe1\u606f\u524d\u9762\u662f\u6709#\u6ce8\u91ca\u7684\uff0c\u53bb\u6389#\u53f7\n\nset_var EASYRSA_REQ_COUNTRY \u201cCN\u201d #\u56fd\u5bb6\nset_var EASYRSA_REQ_PROVINCE \u201cGuangDong\u201d #\u7701\u4efd\nset_var EASYRSA_REQ_CITY \u201cGuangZhou\u201d #\u57ce\u5e02\nset_var EASYRSA_REQ_ORG \u201ctielemao\u201d #\u975e\u76c8\u5229\u7ec4\u7ec7\uff0c\u6b64\u5904\u53ef\u586b\u516c\u53f8\u4e4b\u7c7b\nset_var EASYRSA_REQ_EMAIL \u201cwwz@tielemao.com\u201d #\u90ae\u7bb1\u5730\u5740\nset_var EASYRSA_REQ_OU \u201cMy OpenVPN\u201d #\u7ec4\u7ec7\u5355\u5143\n\n<\/code><\/li><\/ul>\n\n\n

        \u8fd9\u4e2avars\u6587\u4ef6\u4f3c\u4e4e\u4e5f\u4e0d\u662f\u5f88\u91cd\u8981\uff0c\u4e0d\u8fc7\u586b\u4e0a\u4e00\u4e9b\u4fe1\u606f\u4e5f\u65e0\u4e0d\u53ef\uff1f<\/p><\/blockquote>\n\n\n

        \u7b2c\u4e09\u6b65\u3001\u521b\u5efa\u670d\u52a1\u7aef\u8bc1\u4e66\u53cakey<\/h3>\n\n\n
        • \u8fdb\u5165\/etc\/openvpn\/easy-rsa\/easyrsa3\/<\/code>\u76ee\u5f55\u521d\u59cb\u5316.\/easyrsa init-pki<\/code><\/li>
        • [root@yunwei_OpenVPN easyrsa3]# .\/easyrsa init-pki<\/code><\/li>
        • <\/li><\/ul>\n\n\n
          • Note: using Easy-RSA configuration from: .\/vars\n\ninit-pki complete; you may now create a CA or requests.\nYour newly created PKI dir is: \/etc\/openvpn\/easy-rsa\/easyrsa3\/pki\n<\/code><\/li>
          • \u521b\u5efa\u6839\u8bc1\u4e66
            .\/easyrsa build-ca<\/code>
            \u5982\u4e0b\u56fe\uff1a<\/li><\/ul>\n\n\n
            \"\"\/<\/figure>\n\n\n

            \u6ce8\u610f\uff1a\u5728\u4e0a\u8ff0\u90e8\u5206\u9700\u8981\u8f93\u5165PEM\u5bc6\u7801 PEM pass phrase\uff0c\u8f93\u5165\u4e24\u6b21\uff0c\u6b64\u5bc6\u7801\u5fc5\u987b\u8bb0\u4f4f\uff0c\u4e0d\u7136\u4ee5\u540e\u4e0d\u80fd\u4e3a\u8bc1\u4e66\u7b7e\u540d\u3002
            \u8fd9\u91cc\u5bc6\u7801\u6d4b\u8bd5\u7684\u65f6\u5019\u6211\u8f93\u5165\u4e86\u6bd4\u8f83\u597d\u8bb0\u7684ABCabc123\u3002
            \u8fd8\u9700\u8981\u8f93\u5165common name \u901a\u7528\u540d\uff0c\u81ea\u5b9a\u4e49\u4e00\u4e2a\u597d\u8bb0\u7684\u3002
            \u751f\u6210\u7684\u6839\u8bc1\u4e66\u6587\u4ef6\u4e3a\uff1a\/etc\/openvpn\/easy-rsa\/easyrsa3\/pki\/ca.crt<\/code><\/p>\n\n\n

            \u521b\u5efa\u670d\u52a1\u5668\u7aef\u8bc1\u4e66
            .\/easyrsa gen-req server nopass<\/code>
            \u5982\u4e0b\u56fe\uff1a <\/p>\n\n\n

            \"\"\/<\/figure>\n\n\n

            \u540c\u6837\u8d77\u4e2a\u597d\u8bb0\u7684\u901a\u7528\u540d\u5b57\uff0c\u4e0d\u8fc7\u5c31\u4e0d\u80fd\u548c\u524d\u9762\u6839\u8bc1\u4e66\u7684\u4e00\u6837\u3002
            \u751f\u6210\u7684\u6587\u4ef6\u6709\u4e24\u4e2a\uff0c\u6ce8\u610f\u8fd9\u4e2a\u65f6\u5019\u8fd9\u4e24\u4e2a\u6587\u4ef6\u8fd8\u4e0d\u662f\u670d\u52a1\u7aef\u8bc1\u4e66\uff1a <\/p>\n\n\n

            req: \/etc\/openvpn\/easy-rsa\/easyrsa3\/pki\/reqs\/server.req\nkey: \/etc\/openvpn\/easy-rsa\/easyrsa3\/pki\/private\/server.key\n<\/code><\/pre>\n\n\n

            \n\n\u7b7e\u7ea6\u670d\u52a1\u7aef\u8bc1\u4e66\uff1a<\/p>\n\n\n

            • .\/easyrsa sign server server<\/code><\/li>
            • \u6ce8\uff0c\u8fd9\u91cc\u524d\u4e00\u4e2aserver\u662f\u547d\u4ee4\u8868\u793a\u6ce8\u518c\u7684\u662fserver\u7aef\uff0c\u540e\u4e00\u4e2aserver\u662f\u53ef\u4ee5\u81ea\u884c\u5b9a\u4e49\u7684\u540d\u5b57\uff0c
              \u4f46\u662f\u8981\u548c\u524d\u9762\u547d\u4ee4\u8d77\u7684\u540d\u5b57\u4e00\u81f4\uff0c\u6211\u8fd9\u91cc\u4e00\u81f4\u90fd\u662fserver\u3002
              \u5982\u4e0b\u56fe\uff1a<\/li><\/ul>\n\n\n
              \"\"\/<\/figure>\n\n\n

              \u8981\u8f93\u5165yes\u786e\u8ba4\u624d\u80fd\u7ee7\u7eed\u64cd\u4f5c\u4e0b\u53bb\uff0c
              \u8f93\u5165\u4e4b\u524d\u521b\u5efa\u6839\u8bc1\u4e66\u7684\u65f6\u5019\u8f93\u5165\u7684PEM\u5bc6\u7801\uff0c\u5982\u679c\u5fd8\u8bb0\u4e86\u5c31\u5f97\u4ece\u521b\u5efa\u6839\u8bc1\u4e66\u91cd\u65b0\u505a\u8d77\u4e86\u3002
              \u6700\u7ec8\u751f\u6210\u670d\u52a1\u7aef\u7684\u8bc1\u4e66\uff0ccrt\u683c\u5f0f\uff1a
              \/etc\/openvpn\/easy-rsa\/easyrsa3\/pki\/issued\/server.crt<\/code><\/p>\n\n\n

              \u521b\u5efaDiffie-Hellman\uff0c\u786e\u4fddkey\u7a7f\u8d8a\u4e0d\u5b89\u5168\u7f51\u7edc\u7684\u547d\u4ee4\uff1a
              .\/easyrsa gen-dh<\/code>
              \u5982\u4e0b\u56fe\uff1a <\/p>\n\n\n

              \"\"\/<\/figure>\n\n\n

              \u751f\u6210dh.pem\u6587\u4ef6\uff1a
              \/etc\/openvpn\/easy-rsa\/easyrsa3\/pki\/dh.pem<\/code><\/p>\n\n\n

              \u751f\u6210ta\u5bc6\u94a5\u6587\u4ef6 <\/strong><\/p>\n\n\n

              openvpn --genkey --secret \/etc\/openvpn\/easy-rsa\/ta.key <\/p>\n\n\n

                \u4e0d\u6267\u884c\u6b64\u547d\u4ee4\uff0c\u4f1a\u62a5\u9519\uff1a<\/p>\n\n\n

              Sat Apr 7 12:53:37 2018 WARNING: cannot stat file 'ta.key': No such file or directory (errno=2)
              Options error: --tls-auth fails with 'ta.key': No such file or directory (errno=2)
              Options error: Please correct these errors.
              Use --help for more information.<\/p><\/blockquote>\n\n\n

              \u7b2c\u56db\u6b65\u3001\u521b\u5efa\u5ba2\u6237\u7aef\u8bc1\u4e66<\/h3>\n\n\n
              • \u65b0\u5efaclient\u6587\u4ef6\u5939<\/li><\/ul>\n\n\n

                \u8fdb\u5165root\u76ee\u5f55\u65b0\u5efaclient\u6587\u4ef6\u5939\uff0c\u6587\u4ef6\u5939\u53ef\u968f\u610f\u547d\u540d\uff0c\u7136\u540e\u62f7\u8d1d\u524d\u9762\u89e3\u538b\u5f97\u5230\u7684easy-ras\u6587\u4ef6\u5939\u5230client\u6587\u4ef6\u5939,\u8fdb\u5165\u4e0b\u5217\u76ee\u5f55:<\/p>\n\n\n

                cd \/root\/\nmkdir client && cd client\ncp -R \/root\/easy-rsa\/ client\/\n<\/code><\/pre>\n\n\n

                \u6ce8<\/strong>\uff1a\u8fd9\u91cc\u6211\u662f\u5c06\u4e4b\u524d\u4e0b\u8f7d\u7684master.zip\u89e3\u538b\u548c\u547d\u4ee4\u4e86\u653e\u7f6e\u5728root\u4e0b\u4e86\uff0c\u6240\u4ee5\u8def\u5f84\u662f\/root\/easy-rsa<\/code>\u3002<\/p>\n\n\n

                \u5b9e\u9a8c\u7684\u65f6\u5019\u8981\u6839\u636e\u81ea\u5df1\u7684\u5b9e\u9645\u60c5\u51b5\u64cd\u4f5c\u3002<\/p>\n\n\n

                cd client\/easy-rsa\/easyrsa3\/<\/code><\/p>\n\n\n

                • \u521d\u59cb\u5316.\/easyrsa init-pki<\/code><\/li><\/ul>\n\n\n

                  \u6ce8\uff1a\u5176\u5b9e\u548c\u4e4b\u524d\u521b\u5efa\u670d\u52a1\u7aef\u8bc1\u4e66\u524d\u7684\u64cd\u4f5c\u65e0\u4e8c\uff0c\u4e0d\u540c\u7684\u662f\u8fd9\u6b21\u662f\u5c06easy-rsa\u7684\u76ee\u5f55\u653e\u7528\u6237\u5bb6\u76ee\u5f55\u4e0b\u3002<\/p>\n\n\n

                  \u5176\u5b9e\u7406\u89e3\u539f\u7406\u540e\uff0c\u8df3\u8fc7\u8fd9\u4e24\u6b65\uff0c\u4e5f\u53ef\u4ee5\u8003\u8651\u53cd\u590d\u53ea\u7528\/etc\/openvpn\/easy-rsa<\/code>\u8fd9\u4e2a\u76ee\u5f55\u53bb\u64cd\u4f5c\u3002<\/strong><\/p>\n\n\n

                  • \u521b\u5efa\u5ba2\u6237\u7aefkey\u53ca\u751f\u6210\u8bc1\u4e66\uff08\u8bb0\u4f4f\u548c\u4e4b\u524d\u7684\u64cd\u4f5c\u4e00\u6837\u751f\u6210\u65f6\u662f\u81ea\u5df1\u8f93\u5165\u7684\u5bc6\u7801\uff09
                    .\/easyrsa gen-req client-wwz \/\/\u540d\u5b57\u81ea\u5df1\u5b9a\u4e49<\/code><\/li><\/ul>\n\n\n
                    [root@yunwei_OpenVPN easyrsa3]# .\/easyrsa gen-req client-wwz\nGenerating a 2048 bit RSA private key\n...........................+++...............................................................................+++\nwriting new private key to '\/root\/client\/easy-rsa\/easyrsa3\/pki\/private\/client-wwz.key.fXcHCDk8k1'\nEnter PEM pass phrase:\n\n## Verifying - Enter PEM pass phrase:\n\nYou are about to be asked to enter information that will be incorporated\ninto your certificate request.\nWhat you are about to enter is what is called a Distinguished Name or a DN.\nThere are quite a few fields but you can leave some blank\nFor some fields there will be a default value,\n\n## If you enter '.', the field will be left blank.\n\nCommon Name (eg: your user, host, or server name) [client-wwz]:\n\nKeypair and certificate request completed. Your files are:\nreq: \/root\/client\/easy-rsa\/easyrsa3\/pki\/reqs\/client-wwz.req\nkey: \/root\/client\/easy-rsa\/easyrsa3\/pki\/private\/client-wwz.key\n<\/code><\/pre>\n\n\n

                    \u5c06\u751f\u6210\u7684client-wwz.req\u5bfc\u5165\u7136\u540e\u7b7e\u7ea6\u5ba2\u6237\u7aef\u8bc1\u4e66 <\/p>\n\n\n

                    • \u5c06\u751f\u6210\u7684client-wwz.req\u5bfc\u5165\u7136\u540e\u7b7e\u7ea6\u5ba2\u6237\u7aef\u8bc1\u4e66<\/li><\/ul>\n\n\n

                      \u8fd4\u56de\u5230\/etc\/openvpn\/easy-rsa\/easyrsa3\/<\/code>
                      cd \/etc\/openvpn\/easy-rsa\/easyrsa3\/<\/code>
                      \u5bfc\u5165req<\/p>\n\n\n

                      .\/root\/client\/easy-rsa\/easyrsa3\/pki\/reqs\/client-wwz.req client-wwz<\/code><\/p>\n\n\n

                      [root@yunwei_OpenVPN easyrsa3]# cd \/etc\/openvpn\/easy-rsa\/easyrsa3\/\n[root@yunwei_OpenVPN easyrsa3]# pwd<\/code> \n \/etc\/openvpn\/easy-rsa\/easyrsa3 <\/code>\n[root@yunwei_OpenVPN easyrsa3]# .\/easyrsa import-req \/root\/client\/easy-rsa\/easyrsa3\/pki\/reqs\/client-wwz.req client-wwz <\/code>\n Note: using Easy-RSA configuration from: .\/vars<\/code> \n The request has been successfully imported with a short name of: client-wwz <\/code>\n\n  ## You may now use this name to perform signing operations on this request. <\/code>\n\n <\/pre>\n\n\n

                      <\/strong>\u7b7e\u7ea6\u8bc1\u4e66<\/strong><\/code> <\/strong> <\/strong><\/code><\/p>\n\n\n

                      .\/easyrsa sign client client-wwz <\/code> <\/p>\n\n\n

                      \/\/\u8fd9\u91cc\u751f\u6210client\u6240\u4ee5\u5fc5\u987b\u4e3aclient\uff0cclient-wwz\u8981\u4e0e\u4e4b\u524d\u5bfc\u5165\u540d\u5b57\u4e00\u81f4 \u4e0a\u9762\u7b7e\u7ea6\u8bc1\u4e66\u8ddfserver\u7c7b\u4f3c\uff0c\u5c31\u4e0d\u622a\u56fe\u4e86\uff0c\u4f46\u662f\u671f\u95f4\u8fd8\u662f\u8981\u8f93\u5165CA\u7684\u5bc6\u7801 <\/code> <\/p>\n\n\n

                      # [root@yunwei_OpenVPN easyrsa3]# <\/code>  .\/easyrsa sign client client-wwz\n\nNote: using Easy-RSA configuration from: .\/vars\n\nYou are about to sign the following certificate.\nPlease check over the details shown below for accuracy. Note that this request\nhas not been cryptographically verified. Please be sure it came from a trusted\nsource or that you have verified the request checksum with the sender.\n\nRequest subject, to be signed as a client certificate for 3650 days:\n<\/pre>\n\n\n
                      subject=\ncommonName = client-wwz\n\nType the word 'yes' to continue, or any other input to abort.\nConfirm request details: yes\nUsing configuration from .\/openssl-easyrsa.cnf\nEnter pass phrase for \/etc\/openvpn\/easy-rsa\/easyrsa3\/pki\/private\/ca.key:\nCheck that the request matches the signature\nSignature ok\nThe Subject's Distinguished Name is as follows\ncommonName :ASN.1 12:'client-wwz'\nCertificate is to be certified until Nov 9 07:10:14 2027 GMT (3650 days)\n\nWrite out database with 1 new entries\nData Base Updated\n\n## Certificate created at: \/etc\/openvpn\/easy-rsa\/easyrsa3\/pki\/issued\/client-wwz.crt<\/code><\/pre>\n\n\n

                      \u5ba2\u6237\u7aef\u7684\u8bc1\u4e66client-wwz.crt\u8def\u5f84\u5728\/etc\/openvpn\/easy-rsa\/easyrsa3\/pki\/issued\/client-wwz.crt<\/code><\/p>\n\n\n

                      \n\n\u73b0\u5728\u68b3\u7406\u4e00\u4e0b\u4e0a\u9762\u90fd\u751f\u6210\u4e86\u4e9b\u4ec0\u4e48\u4e1c\u897f\uff1a<\/p>\n\n\n

                      • \u670d\u52a1\u7aef\uff1aetc\/openvpn\/easy-rsa\/<\/code>\u6587\u4ef6\u5939<\/li><\/ul>\n\n\n
                        \/etc\/openvpn\/easy-rsa\/easyrsa3\/pki\/ca.crt\n\/etc\/openvpn\/easy-rsa\/easyrsa3\/pki\/reqs\/server.req\n\/etc\/openvpn\/easy-rsa\/easyrsa3\/pki\/reqs\/client.req\n\/etc\/openvpn\/easy-rsa\/easyrsa3\/pki\/private\/ca.key\n\/etc\/openvpn\/easy-rsa\/easyrsa3\/pki\/private\/server.key\n\/etc\/openvpn\/easy-rsa\/easyrsa3\/pki\/issued\/server.crt\n\/etc\/openvpn\/easy-rsa\/easyrsa3\/pki\/issued\/client-ww.crt\n\/etc\/openvpn\/easy-rsa\/easyrsa3\/pki\/dh.pem<\/code><\/pre>\n\n\n

                        \u91cd\u8981\u7684\u662fpki\/issued<\/code>\u76ee\u5f55\u4e0b\u7684\u670d\u52a1\u7aef\u548c\u5ba2\u6237\u7aef\u8fd9\u4e24\u4e2a\u8bc1\u4e66<\/p>\n\n\n

                        • \u5ba2\u6237\u7aef\uff1aroot\/client\/easy-rsa<\/code>\u6587\u4ef6\u5939<\/li><\/ul>\n\n\n
                          \/root\/client\/easy-rsa\/easyrsa3\/pki\/private\/clinet-wwz.key\n\/root\/client\/easy-rsa\/easyrsa3\/pki\/reqs\/client.req\n\/\/\u8fd9\u4e2a\u6587\u4ef6\u88ab\u6211\u4eec\u5bfc\u5165\u5230\u4e86\u670d\u52a1\u7aef\u6587\u4ef6\u6240\u4ee5\u90a3\u91cc\u4e5f\u6709\n<\/code><\/pre>\n\n\n

                          \u611f\u89c9\u8fd9\u91cc\u90fd\u4e0d\u592a\u91cd\u8981\u4e86\uff0c\u5176\u5b9e\u662f\u6ca1\u5fc5\u8981\u7279\u610f\u5728root\u5bb6\u76ee\u5f55\u4e0b\u518d\u5f04\u8fd9\u4e00\u51fa\u3002
                          \u4e0b\u6b21\u7edf\u4e00\u7528\/etc\/openvpn\/easy-rsa\/easyrsa3<\/code>\u4e0b\u64cd\u4f5c\u521b\u5efa\u5ba2\u6237\u7aef\u8bc1\u4e66\u7b49\u4e5f\u53ef\u3002<\/p>\n\n\n

                          \u7b2c\u4e94\u6b65\u3001\u62f7\u8d1d\u751f\u6210\u7684\u8bc1\u4e66\u653e\u7f6e\u56deopenvpn\u76ee\u5f55<\/h3>\n\n\n
                          • \u62f7\u8d1d\u8bc1\u4e66\u7b49\u6587\u4ef6\u653e\u5165\u5230\u76f8\u5e94\u4f4d\u7f6e\u3002<\/li><\/ul>\n\n\n

                            \u5c06\u4e0b\u5217\u6587\u4ef6\u653e\u5230\/etc\/openvpn\/<\/code> \u76ee\u5f55\uff1a<\/p>\n\n\n

                            cp \/etc\/openvpn\/easy-rsa\/easyrsa3\/pki\/ca.crt \/etc\/openvpn\ncp \/etc\/openvpn\/easy-rsa\/easyrsa3\/pki\/private\/server.key \/etc\/openvpn\ncp \/etc\/openvpn\/easy-rsa\/easyrsa3\/pki\/issued\/server.crt \/etc\/openvpn\ncp \/etc\/openvpn\/easy-rsa\/easyrsa3\/pki\/dh.pem \/etc\/openvpn\n<\/code><\/pre>\n\n\n

                            \u8fd9\u6837\u5c31\u5c06\u4e0a\u8ff0\u56db\u4e2a\u6587\u4ef6\u653e\u5165\u5230\u4e86\/etc\/openvpn\u76ee\u5f55\u4e0b<\/p>\n\n\n

                            \u5c06\u4e0b\u5217\u6587\u4ef6\u653e\u5230\/root\/client \u76ee\u5f55\u4e0b\uff1a<\/p>\n\n\n

                            cp \/etc\/openvpn\/easy-rsa\/easyrsa3\/pki\/ca.crt \/root\/client\ncp \/etc\/openvpn\/easy-rsa\/easyrsa3\/pki\/issued\/client-wwz.crt \/root\/client\ncp \/root\/client\/easy-rsa\/easyrsa3\/pki\/private\/client-wwz.key \/root\/client\n<\/code><\/pre>\n\n\n

                            \u5c06\u4e0a\u8ff0\u4e09\u4e2a\u6587\u4ef6\u590d\u5236\u5230\/root\/client\u76ee\u5f55\u3002<\/p>\n\n\n

                            • \u68c0\u9a8c\uff1a<\/li><\/ul>\n\n\n
                              [root@yunwei_OpenVPN easyrsa3]# ls \/etc\/openvpn\/\nca.crt dh.pem easy-rsa master.zip server.crt server.key<\/code><\/pre>\n\n\n

                              [root@yunwei_OpenVPN easyrsa3]# ls \/root\/client\/<\/code>client-wwz.crt client-wwz.key easy-rsa <\/p>\n\n\n

                              [root@yunwei_OpenVPN easyrsa3]# ls \/root\/client\/\nca.crt client-wwz.crt client-wwz.key easy-rsa<\/code><\/pre>\n\n\n
                              \"\"\/<\/figure>\n\n\n

                              \u7b2c\u516d\u6b65\u3001\u7f16\u5199\u670d\u52a1\u7aef\u914d\u7f6e\u6587\u4ef6<\/h3>\n\n\n

                              \u6587\u4ef6\u90fd\u51c6\u5907\u597d\u540e\uff0c\u5c31\u53ef\u4ee5\u8fdb\u884c\u7f16\u5199\u670d\u52a1\u7aef\u914d\u7f6e\u6587\u4ef6\u4e86\u3002\u8fd9\u5c31\u662f\u78e8\u5200\u4e0d\u8bef\u780d\u67f4\u5de5\uff0c\u4e07\u4e8b\u4ff1\u5907\uff0c\u53ea\u6b20\u4e1c\u98ce\uff01<\/p>\n\n\n

                              \u7531\u4e8e\u6211\u4eec\u662fyum\u5b89\u88c5\u7684openvpn\u3002
                              \u6240\u4ee5\u76f8\u5e94\u5728\/usr\/share\/doc\/<\/code>\u4e0b\u4f1a\u6709\u5bf9\u5e94openvpn\u7248\u672c\/sample\/sample-config-files<\/code>\u76ee\u5f55\u4e0b\u4f1a\u6709\u4e00\u4e2aserver.conf<\/code>\u6587\u4ef6\uff0c
                              \u5c06\u8fd9\u4e2a\u6587\u4ef6\u590d\u5236\u5230\/etc\/openvpn<\/code>\uff1a
                              cp \/usr\/share\/doc\/openvpn-2.4.4\/sample\/sample-config-files\/server.conf \/etc\/openvpn\/<\/code><\/p>\n\n\n

                              \u7136\u540e\u4fee\u6539\u914d\u7f6evi server.conf<\/code>\u5982\u4e0b\uff1a<\/p>\n\n\n

                              local 172.16.1.128            # \u586b\u81ea\u5df1openvpn\u670d\u52a1\u5668\u7684 IP\uff0c\u9ed8\u8ba4\u4fa6\u542c\u670d\u52a1\u5668\u4e0a\u7684\u6240\u6709ip\nport 1194                     # \u4fa6\u542c\u7aef\u53e3\uff0c\u9ed8\u8ba41194\nproto udp                     # \u7aef\u53e3\u534f\u8bae\uff0c\u9ed8\u8ba4udp\uff0c\u4e5f\u53ef\u4ee5\u5f00\u542ftcp\u65b9\u4fbf\u6620\u5c04\u8f6c\u53d1\u3002\ndev tun                       # \u9ed8\u8ba4\u521b\u5efa\u4e00\u4e2a\u8def\u7531IP\u96a7\u9053\nca \/etc\/openvpn\/ca.crt        # \u6839\u8bc1\u4e66\ncert \/etc\/openvpn\/server.crt  # \u8bc1\u4e66\nkey \/etc\/openvpn\/server.key   # \u79c1\u94a5\u6587\u4ef6\/\u91cd\u8981\u4fdd\u5bc6\ndh \/etc\/openvpn\/dh.pem<\/code><\/pre>\n\n\n
                              \nserver 10.66.72.0 255.255.255.0 \n# \u8bbe\u7f6e\u670d\u52a1\u5668\u7aef\u6a21\u5f0f\uff0c\u5e76\u63d0\u4f9b\u4e00\u4e2aVPN\u5b50\u7f51\uff0c\u4ee5\u4fbf\u4e8e\u4ece\u4e2d\u4e3a\u5ba2\u6237\u7aef\u5206\u914dIP\u5730\u5740\u3002\n# \u670d\u52a1\u5668\u81ea\u8eab\u4f1a\u4f7f\u752810.66.72.1\u8fd9\u4e2aip\u3002\n\nifconfig-pool-persist ipp.txt \n# \u6307\u5b9a\u7528\u4e8e\u8bb0\u5f55\u5ba2\u6237\u7aef\u548c\u865a\u62dfIP\u5730\u5740\u7684\u5173\u8054\u5173\u7cfb\u7684\u6587\u4ef6\u3002\n# \u5f53\u91cd\u542fOpenVPN\u65f6\uff0c\u518d\u6b21\u8fde\u63a5\u7684\u5ba2\u6237\u7aef\u5c06\u5206\u914d\u5230\u4e0e\u4e0a\u4e00\u6b21\u5206\u914d\u76f8\u540c\u7684\u865a\u62dfIP\u5730\u5740\n\npush \u201croute 192.168.0.0 255.255.0.0\u201d \n# \u63a8\u9001\u8def\u7531\u4fe1\u606f\u5230\u5ba2\u6237\u7aef\uff0c\u4ee5\u5141\u8bb8\u5ba2\u6237\u7aef\u80fd\u591f\u8fde\u63a5\u5230\u670d\u52a1\u5668\u80cc\u540e\u7684\u5176\u4ed6\u79c1\u6709\u5b50\u7f51\u3002\n# (\u7b80\u800c\u8a00\u4e4b\uff0c\u5c31\u662f\u5141\u8bb8\u5ba2\u6237\u7aef\u8bbf\u95eeVPN\u670d\u52a1\u5668\u81ea\u8eab\u6240\u5728\u7684\u5176\u4ed6\u5c40\u57df\u7f51)\n# \u8bb0\u4f4f\uff0c\u8fd9\u4e9b\u79c1\u6709\u5b50\u7f51\u4e5f\u8981\u5c06OpenVPN\u5ba2\u6237\u7aef\u7684\u5730\u5740\u6c60(10.66.72.0\/255.255.255.0)\u53cd\u9988\u56deOpenVPN\u670d\u52a1\u5668\u3002\n\npush \"redirect-gateway def1 bypass-dhcp\" \n# \u542f\u7528\u8be5\u6307\u4ee4\uff0c\u6240\u6709\u5ba2\u6237\u7aef\u7684\u9ed8\u8ba4\u7f51\u5173\u90fd\u5c06\u91cd\u5b9a\u5411\u5230VPN\uff0c\u8fd9\u5c06\u5bfc\u81f4\u8bf8\u5982web\u6d4f\u89c8\u5668\u3001DNS\u67e5\u8be2\u7b49\u6240\u6709\u5ba2\u6237\u7aef\u6d41\u91cf\u90fd\u7ecf\u8fc7VPN\u3002\n# (\u4e3a\u786e\u4fdd\u80fd\u6b63\u5e38\u5de5\u4f5c\uff0cOpenVPN\u670d\u52a1\u5668\u6240\u5728\u8ba1\u7b97\u673a\u53ef\u80fd\u9700\u8981\u5728TUN\/TAP\u63a5\u53e3\u4e0e\u4ee5\u592a\u7f51\u4e4b\u95f4\u4f7f\u7528NAT\u6216\u6865\u63a5\u6280\u672f\u8fdb\u884c\u8fde\u63a5)\n# \u8fd9\u4e2a\u6307\u4ee4\u5176\u5b9e\u633a\u5f71\u54cd\u5ba2\u6237\u7aef\u5904\u7684\u7f51\u7edc\u7684\uff0c\u6bd4\u5982\u6211\u5c31\u5728vpn\u4e0a\u963f\u91cc\u4e91\u7684\u670d\u52a1\u5668\u540e\uff0c\u672c\u5730\u6d4f\u89c8\u7f51\u7edc\u4f1a\u51fa\u6ca1\u6cd5\u8bbf\u95ee\u5916\u7f51\uff0c\u6709\u5fc5\u8981\u5230\u963f\u91cc\u4e91vpn\u670d\u52a1\u5668\u4e0a\u6ce8\u91ca\u6389\u6b64\u6307\u4ee4\uff0c\u800c\u4e14\u8fd9\u6837\u4e5f\u4f1a\u5bfc\u81f4\u4e91\u670d\u52a1\u5668\u6d41\u91cf\u6fc0\u589e\uff0c\u5e76\u4e0d\u5229\u3002\n\npush \u201cdhcp-option DNS 119.29.29.29\u2033 \n# \u67d0\u4e9b\u5177\u4f53\u7684Windows\u7f51\u7edc\u8bbe\u7f6e\u53ef\u4ee5\u88ab\u63a8\u9001\u5230\u5ba2\u6237\u7aef\uff0c\u4f8b\u5982DNS\u6216WINS\u670d\u52a1\u5668\u5730\u5740\u3002\n# \u5b9e\u9645\u4e0a\u53ef\u7528\u4e8e\u63a8\u9001\u5185\u7f51dns\u6216\u963f\u91cc\u5185\u7f51dns\u7b49\u3002\n\nkeepalive 10 120 \n# keepalive\u6307\u4ee4\u5c06\u5bfc\u81f4\u7c7b\u4f3c\u4e8eping\u547d\u4ee4\u7684\u6d88\u606f\u88ab\u6765\u56de\u53d1\u9001\uff0c\u4ee5\u4fbf\u4e8e\u670d\u52a1\u5668\u7aef\u548c\u5ba2\u6237\u7aef\u77e5\u9053\u5bf9\u65b9\u4f55\u65f6\u88ab\u5173\u95ed\u3002\n# \u9ed8\u8ba4\u6bcf10\u79d2\u949fping\u4e00\u6b21\uff0c\u5982\u679c120\u79d2\u5185\u90fd\u6ca1\u6709\u6536\u5230\u5bf9\u65b9\u7684\u56de\u590d\uff0c\u5219\u8868\u793a\u8fdc\u7a0b\u8fde\u63a5\u5df2\u7ecf\u5173\u95ed\u3002\u6bd4\u8f83\u9891\u7e41\uff0c\u5efa\u8bae\u6539\u621030 240\uff1f\n\ncomp-lzo \n# \u5728VPN\u8fde\u63a5\u4e0a\u542f\u7528\u538b\u7f29\u3002\u5982\u679c\u4f60\u5728\u6b64\u5904\u542f\u7528\u4e86\u8be5\u6307\u4ee4\uff0c\u90a3\u4e48\u4e5f\u5e94\u8be5\u5728\u6bcf\u4e2a\u5ba2\u6237\u7aef\u914d\u7f6e\u6587\u4ef6\u4e2d\u542f\u7528\u5b83\u3002\n\nmax-clients 100 #\u9ed8\u8ba4\u6700\u5927\u5ba2\u6237\u7aef\u8fde\u63a5100\uff0c\u4e3a\u5b89\u5168\u53ef\u9650\u52301\u62162\u3002\n# \u6301\u4e45\u5316\u9009\u9879\u53ef\u4ee5\u5c3d\u91cf\u907f\u514d\u8bbf\u95ee\u90a3\u4e9b\u5728\u91cd\u542f\u4e4b\u540e\u7531\u4e8e\u7528\u6237\u6743\u9650\u964d\u4f4e\u800c\u65e0\u6cd5\u8bbf\u95ee\u7684\u67d0\u4e9b\u8d44\u6e90\u3002\n\npersist-key\npersist-tun\n\nstatus openvpn-status.log # \u72b6\u6001\u65e5\u5fd7\n# \u4e3a\u65e5\u5fd7\u6587\u4ef6\u8bbe\u7f6e\u9002\u5f53\u7684\u5197\u4f59\u7ea7\u522b(0~9)\u3002\u5197\u4f59\u7ea7\u522b\u8d8a\u9ad8\uff0c\u8f93\u51fa\u7684\u4fe1\u606f\u8d8a\u8be6\u7ec6\u3002\n# 0 \u8868\u793a\u9759\u9ed8\u8fd0\u884c\uff0c\u53ea\u8bb0\u5f55\u81f4\u547d\u9519\u8bef\u3002\n# 4 \u8868\u793a\u5408\u7406\u7684\u5e38\u89c4\u7528\u6cd5\u3002\n# 5 \u548c 6 \u53ef\u4ee5\u5e2e\u52a9\u8c03\u8bd5\u8fde\u63a5\u9519\u8bef\u3002\n# 9 \u8868\u793a\u6781\u5ea6\u5197\u4f59\uff0c\u8f93\u51fa\u975e\u5e38\u8be6\u7ec6\u7684\u65e5\u5fd7\u4fe1\u606f\u3002\n## verb 3<\/code><\/pre>\n\n\n

                              \u8fd8\u6709\u8bb8\u591a\u8be6\u7ec6\u914d\u7f6e\uff0c\u53ef\u67e5\u770b\u5b98\u7f51\u8bf4\u660e\u3002 <\/p>\n\n\n

                              \u7b2c\u4e03\u6b65\u3001\u542f\u52a8openvpn\u670d\u52a1<\/h3>\n\n\n

                              VMware\u865a\u62df\u673a\u53ef\u80fd\u8fd8\u9700\u52a0\u8f7dtun\u5185\u6838\u6a21\u5757\u5e76\u542f\u7528\u8f6c\u53d1\u3002<\/p>\n\n\n

                              • \u52a0\u8f7dtun\u5185\u6838\u6a21\u5757\u5e76\u542f\u7528\u8f6c\u53d1\u3002
                                \u52a0\u8f7dtun\u5185\u6838\u6a21\u5757\u4ee5\u4fbf\u4e8eopenvpn\u751f\u6210\u865a\u62df\u7f51\u5361\u3002<\/li><\/ul>\n\n\n
                                 [root@yunwei_OpenVPN openvpn]# modprobe tun\n\u68c0\u9a8c\u52a0\u8f7d\u6210\u529f\u6ca1\u6709\n[root@yunwei_OpenVPN openvpn]# lsmod | grep tun\ntun 31621 0\n\u542f\u7528\u8f6c\u53d1\n[root@yunwei_OpenVPN openvpn]# echo 1 > \/proc\/sys\/net\/ipv4\/ip_forward\n\u6216\u76f4\u63a5vim \/proc\/sys\/net\/ipv4\/ip_forward \u4fee\u6539\u503c\u4e3a1\n\u68c0\u9a8c\n[root@yunwei_OpenVPN openvpn]# cat \/proc\/sys\/net\/ipv4\/ip_forward\n1\n[root@yunwei_OpenVPN openvpn]# locate tun.ko\n\/usr\/lib\/modules\/3.10.0-514.el7.x86_64\/kernel\/drivers\/net\/tun.ko\n\/usr\/lib\/modules\/3.10.0-693.5.2.el7.x86_64\/kernel\/drivers\/net\/tun.ko.xz\n\n[root@yunwei_OpenVPN openvpn]# openvpn --config \/etc\/openvpn\/server.conf\n\uff08\u6ce8\uff1a\u8fd9\u79cd\u547d\u4ee4\u8fd8\u4e0d\u662f\u5728\u540e\u53f0\u6a21\u5f0f\u8fd0\u884c\u7684\uff09\nThu Nov 16 17:19:39 2017 OpenVPN 2.4.4 x86_64-redhat-linux-gnu [Fedora EPEL patched][SSL (OpenSSL)] [LZO][LZ4] [EPOLL][PKCS11] [MH\/PKTINFO][AEAD] built on Sep 26 2017\nThu Nov 16 17:19:39 2017 library versions: OpenSSL 1.0.1e-fips 11 Feb 2013, LZO 2.06\nThu Nov 16 17:19:39 2017 Diffie-Hellman initialized with 2048 bit key\nThu Nov 16 17:19:39 2017 Failed to extract curve from certificate (UNDEF), using secp384r1 instead.\nThu Nov 16 17:19:39 2017 ECDH curve secp384r1 added\nThu Nov 16 17:19:39 2017 ROUTE_GATEWAY 172.16.1.2\/255.255.255.0 IFACE=ens33 HWADDR=00:0c:29:96:0a:fe\nThu Nov 16 17:19:39 2017 TUN\/TAP device tun0 opened\nThu Nov 16 17:19:39 2017 TUN\/TAP TX queue length set to 100\nThu Nov 16 17:19:39 2017 do_ifconfig, tt->did_ifconfig_ipv6_setup=0\nThu Nov 16 17:19:39 2017 \/sbin\/ip link set dev tun0 up mtu 1500\nThu Nov 16 17:19:39 2017 \/sbin\/ip addr add dev tun0 local 10.66.72.1 peer 10.66.72.2\nThu Nov 16 17:19:39 2017 \/sbin\/ip route add 10.66.72.0\/24 via 10.66.72.2\nThu Nov 16 17:19:39 2017 Could not determine IPv4\/IPv6 protocol. Using AF_INET\nThu Nov 16 17:19:39 2017 Socket Buffers: R=[212992->212992] S=[212992->212992]\nThu Nov 16 17:19:39 2017 UDPv4 link local (bound): [AF_INET][undef]:1194\nThu Nov 16 17:19:39 2017 UDPv4 link remote: [AF_UNSPEC]\nThu Nov 16 17:19:39 2017 MULTI: multi_init called, r=256 v=256\nThu Nov 16 17:19:39 2017 IFCONFIG POOL: base=10.66.72.4 size=62, ipv6=0\nThu Nov 16 17:19:39 2017 IFCONFIG POOL LIST\nThu Nov 16 17:19:39 2017 Initialization Sequence Completed<\/code><\/pre>\n\n\n

                                \u6572 openvpn --daemon --config \/etc\/openvpn\/server.conf<\/code>\u8fd0\u884c\u5219\u662f\u5728\u540e\u53f0\u6a21\u5f0f\u3002
                                \u6700\u540e\u6211\u8fd8\u662f\u4ee5systemctl start openvpn<\/code> \u8fd0\u884c\u7684\u3002
                                \u56e0\u4e3a\u6211\u662fyum\u5b89\u88c5\u7684\uff0c\u4f7f\u7528systemctl\u6765\u542f\u52a8\u548c\u505c\u6b62openvpn\u633a\u65b9\u4fbf\u7684\u3002 <\/p>\n\n\n

                                \u7b2c\u516b\u6b65\u3001\u4e0b\u8f7dwindows openvpn\u5ba2\u6237\u7aef\uff0c\u5e76\u8fdb\u884c\u914d\u7f6e\u3002<\/h3>\n\n\n
                                • \u7528sftp\u4e4b\u7c7b\u5c06\u5728openvpn\u670d\u52a1\u5668\u751f\u6210\u7684\u5ba2\u6237\u7aef\u8bc1\u4e66\u548ckey\u4e0b\u8f7d\u5230\u5ba2\u6237\u7aef\u7535\u8111\u3002
                                  ca.crt client-wwz.crt client-wwz.key \/\/\u8fd9\u4e09\u4e2a\u6587\u4ef6<\/code><\/li>
                                • \u53bb\u5b98\u7f51\u4e0b\u8f7dopenvpn\u5ba2\u6237\u7aef\u8fdb\u884c\u5b89\u88c5\uff0c\u7136\u540e\u5b89\u88c5\u76ee\u5f55\u627e\u5230simple-config<\/code>
                                  D:\\Program Files\\OpenVPN\\sample-config\\client.ovpn<\/code><\/li><\/ul>\n\n\n

                                  \u5c06client.ovpn \u590d\u5236\u5230D:\\Program Files\\OpenVPN\\ToVMware<\/code>\uff08\u6587\u4ef6\u5939\u53ef\u4ee5\u81ea\u5df1\u65b0\u5efa\u5b9a\u4e49\uff09\u4e0b\uff0c\u6839\u636e\u81ea\u5df1\u5b9e\u9645\u5b89\u88c5\u60c5\u51b5\u9009\u62e9.
                                  \u5c06\u4e0b\u8f7d\u5230\u7684\u4e09\u4e2a\u6587\u4ef6\u653e\u5165D:\\Program Files\\OpenVPN\\ToVMware<\/code>\u4e0b\u7136\u540e\u7f16\u8f91client.ovpn<\/code>\u914d\u7f6e\u6587\u4ef6\uff1a<\/p>\n\n\n

                                  \n\n\u7f16\u8f91\u914d\u7f6e\u6587\u4ef6\uff1a<\/p>\n\n\n

                                  client\ndev tun\nproto udp\nremote 172.16.1.128 1194 \/\/\u4e3b\u8981\u8fd9\u91cc\u4fee\u6539\u6210openvpn\u670d\u52a1\u5668\u7684ip\nresolv-retry infinite\nnobind\npersist-key\npersist-tun\nca ca.crt \n\/\/ \u8fd9\u91cc\u9700\u8981\u8bc1\u4e66\uff0c\u4e4b\u524d\u548c\u914d\u7f6e\u6587\u4ef6\u653e\u540c\u4e00\u6587\u4ef6\u5939\u4e0b\u4e86\uff0c\u7406\u8bba\u4e0a\u4e0d\u9700\u8981\u6572\u7edd\u5bf9\u8def\u5f84\u4e5f\u80fd\u627e\u5230\uff0c\n\/\/ \u7136\u800c\u540e\u9762\u53d1\u73b0\u5ba2\u6237\u7aef\u5bfc\u5165\u914d\u7f6e\u6587\u4ef6\u540e\u76ee\u5f55\u53c8\u662f\u5728\u53e6\u5916\u8def\u5f84\u4e0b\uff0c\u4ee5\u81f4\u8fd8\u662f\u8981\u6572\u7edd\u5bf9\u8def\u5f84\u3002\ncert client-wwz.crt\nkey client-wwz.key\ncomp-lzo\nverb 3\n<\/code><\/pre>\n\n\n

                                  \u7b80\u5355\u5e94\u7528\u7684\u8bdd\u6211\u4eec\u53ea\u9700\u8981\u4ee5\u4e0a\u9879\u76ee\u6bcf\u884c\u4e00\u4e2a\uff0c\u590d\u6742\u4e9b\u5e94\u7528\u7684\u8bdd\u53ef\u4ee5\u53c2\u7167\u5b98\u65b9\u5177\u4f53\u914d\u7f6e\u6587\u6863\u3002<\/p>\n\n\n

                                  • \u8865\u5145\uff1a<\/li>
                                  • <\/li><\/ul>\n\n\n
                                    • \u6b63\u786e\u7684\u914d\u7f6e\u8bc1\u4e66\u8def\u5f84\u4e3a\uff1aca D:\\\\Programs\\\\OpenVPN\\\\ToVMware\\\\ca.crt cert D:\\\\Programs\\\\OpenVPN\\\\ToVMware\\\\client-wwz.crt key D:\\\\Programs\\\\OpenVPN\\\\ToVMware\\\\client-wwz.key <\/code><\/li>
                                    • \u6253\u5f00openvpn\u5ba2\u6237\u7aef\uff0c\u53f3\u952e\u5f39\u51fa\u83dc\u5355\uff0c\u9009\u62e9\u5bfc\u5165\u914d\u7f6e\u6587\u4ef6<\/li>
                                    • <\/li><\/ul>\n\n\n
                                      \"\"\/

                                      <\/figcaption><\/figure>\n\n\n

                                      \u9009\u4e2d\u4e4b\u524d\u7f16\u8f91\u597d\u7684\u914d\u7f6e\u6587\u4ef6\uff0c\u70b9\u51fb\u8fde\u63a5 <\/p>\n\n\n

                                      \"\"\/<\/figure>\n\n\n
                                      Options error: --ca fails with 'ca.crt': No such file or directory\nOptions error: --cert fails with 'client.crt': No such file or directory\nThu Dec 07 16:06:09 2017 WARNING: cannot stat file 'client.key': \u7cfb\u7edf\u627e\u4e0d\u5230\u6307\u5b9a\u7684\u6587\u4ef6\u3002 (errno=2)\nOptions error: --key fails with 'client.key': No such file or directory\nOptions error: Please correct these errors.\nUse --help for more information.<\/code><\/pre>\n\n\n

                                      \u539f\u6765\u8fd9\u4e9b\u8ba4\u8bc1\u6587\u4ef6\u8fd8\u662f\u5f97\u6307\u660e\u7edd\u5bf9\u8def\u5f84\u963f\u2026\u2026
                                      \u4fee\u6539\u914d\u7f6e\u6587\u4ef6\uff08\u6ce8\u610f\uff0c\u8fd0\u884c\u65f6\u4fee\u6539\u8981\u76f4\u63a5\u5728\u5ba2\u6237\u7aef\u4e2d\u9009\u62e9Edit Config\uff09
                                      \uff08\u56e0\u4e3a\u5bfc\u5165\u4e4b\u540e\uff0c\u5b83\u5b9e\u9645\u7684\u8def\u5f84\u662fC:\\Users\\Administrator\\OpenVPN\\confing\\client\\client.ovpn<\/code>\uff09<\/p>\n\n\n

                                      ca D:\\Programs\\OpenVPN\\ToVMware\\ca.crt\ncert D:\\Programs\\OpenVPN\\ToVMware\\client-wwz.crt\nkey D:\\Programs\\OpenVPN\\ToVMware\\client-wwz.key\n<\/code><\/pre>\n\n\n

                                      \u7ee7\u7eed\u62a5\u9519\uff0c\u8fd8\u597d\u8fd9\u6b21\u662f\u62a5\u6211\u8def\u5f84\u5199\u9519\u4e86<\/p>\n\n\n

                                      Options warning: Bad backslash ('\\') usage in client.ovpn:89: remember that backslashes are treated as shell-escapes and if you need to pass backslash characters as part of a Windows filename, you should use double backslashes such as \"c:\\\\openvpn\\\\static.key\"\nUse --help for more information.\n<\/code><\/pre>\n\n\n

                                      \u770b\u6765\u6211\u8981\u5199\u6210<\/p>\n\n\n

                                      ca D:\\\\Programs\\\\OpenVPN\\\\ToVMware\\\\ca.crt\ncert D:\\\\Programs\\\\OpenVPN\\\\ToVMware\\\\client-wwz.crt\nkey D:\\\\Programs\\\\OpenVPN\\\\ToVMware\\\\client-wwz.key\n<\/code><\/pre>\n\n\n

                                      \u8fd9\u6b21\u603b\u7b97\u662f\u5bf9\u4e86\u3002\u867d\u7136\u4e5f\u6709\u4e0d\u6307\u660e\u8def\u5f84\u800c\u662f\u5c06\u8bc1\u4e66\u5185\u5bb9\u4e00\u5e76\u5408\u5e76\u5230\u914d\u7f6e\u6587\u4ef6\u4e0a\u7684\u505a\u6cd5\uff0c\u4f46\u8fd9\u6837\u4e00\u6765\u5c31\u4e0d\u7b97\u5b89\u5168\u4e86\u3002<\/p>\n\n\n

                                      \"\"\/<\/figure>\n\n\n

                                      \u8fd9\u91cc\u8fd8\u597d\u6211\u8fd8\u8bb0\u5f97\u662f\u8f93\u4e86\u5565\u5bc6\u7801\u7684\uff0c\u679c\u7136\u8fd9\u4e2a\u5bc6\u7801\u662f\u8981\u8bb0\u4f4f\u7684\u5462\uff01\uff01
                                      \u6b64\u5bc6\u7801\u4e5f\u53ef\u4ee5\u70b9\u9009save password\uff0c\u8fd9\u6837\u5728\u5e38\u7528\u7684\u7535\u8111\u4e0a\u4e0d\u7528\u6bcf\u6b21\u90fd\u8f93\u5bc6\u7801\uff0c\u4e0d\u8fc7\u4e0d\u8bb0\u4f4f\u4e5f\u66f4\u5b89\u5168\u3002
                                      \u8f93\u5b8c\u4e4b\u540e\u8fde\u63a5\u6210\u529f\uff08\u597d\u5427\uff0c\u5176\u5b9e\u6211\u8fd8\u591a\u4e86\u6b65\u64cd\u4f5c\uff0c\u5f00\u653eopenvpn\u670d\u52a1\u5668\u4e2d\u7684\u9632\u706b\u5899\uff01systemctl stop firewalld<\/code>\uff0c \u5f53\u7136\u751f\u4ea7\u73af\u5883\u4e0d\u662f\u5173\u95ed\u9632\u706b\u5899\uff0c\u800c\u662f\u8bbe\u7f6e\u5f00\u653e\u5bf9openvpn\u7aef\u53e3\u7684\u89c4\u5219\uff09 <\/p>\n\n\n

                                      \"\"\/<\/figure>\n\n\n

                                      windows\u7248\u672c\u7684\u5ba2\u6237\u7aef\u8fde\u63a5Linux\u7684openvpn\u670d\u52a1\u7aef\u662f\u641e\u61c2\u4e86\uff0c\u518d\u8fdb\u884c\u6d4b\u8bd5linux\u5ba2\u6237\u7aef\u3002
                                      <\/p>\n\n\n

                                      \u7b2c\u4e5d\u6b65 Linux openvpn\u5ba2\u6237\u7aef\u8fde\u63a5\u670d\u52a1\u7aef\u6d4b\u8bd5<\/h3>\n\n\n

                                      \u505a\u4e3a\u6d4b\u8bd5\uff0c\u8fd9\u6b21\u6211\u5728centos6.9\u4e0a\u5b89\u88c5openvpn\u5ba2\u6237\u7aef\u8fde\u63a5centos7.3\u7684openvpn\u670d\u52a1\u7aef\u3002
                                      \u540c\u6837\u4f7f\u7528yum install openvpn<\/code>\u7701\u4e8b\uff0c\u540e\u9762\u4e3b\u8981\u662f\u4fee\u6539\u8fd0\u884c\u914d\u7f6e\u6587\u4ef6\u6307\u5b9a\u4e3aclient\u7aef\u3002<\/p>\n\n\n

                                      • \u5728\u5ba2\u6237\u7aefopenvpn\u4e3b\u76ee\u5f55\/etc\/openvpn<\/code>\u4e0b\u65b0\u5efaconfig\u76ee\u5f55\uff0c
                                        \u540c\u6837\u5c06\u670d\u52a1\u7aef\u7684ca.crt<\/code>\u3001client-wwz.crt<\/code>\u548cclient-wwz.key<\/code>\u653e\u7f6e\u8fdb\u53bb\u3002<\/li><\/ul>\n\n\n

                                        \u590d\u5236\u4e00\u4efd\u5ba2\u6237\u7aef\u914d\u7f6e\u8303\u4f8b\u8fdbconfig\u76ee\u5f55\uff0c\u8fd9\u91cc\u8981\u6ce8\u610f\u7684\u662f\uff0c\u4e4b\u524dwindows\u7528\u7684\u914d\u7f6e\u6587\u4ef6\u540e\u7f00\u540d\u4e3a.ovpn<\/code>,\u5230\u4e86linux\u7528\u7684\u5c31\u662f.conf<\/code>\u4e86\uff01<\/p>\n\n\n

                                        cp \/usr\/share\/doc\/openvpn-2.4.4\/sample\/sample-config-files\/client.conf \/etc\/openvpn\/config\/client.conf\n\n<\/code><\/pre>\n\n\n
                                        • \u7f16\u8f91\u914d\u7f6e\u6587\u4ef6\uff1a<\/li><\/ul>\n\n\n
                                          client         # \u6307\u5b9a\u5f53\u524dVPN\u662f\u5ba2\u6237\u7aef\ndev tun        # \u5fc5\u987b\u4e0e\u670d\u52a1\u5668\u7aef\u7684\u4fdd\u6301\u4e00\u81f4\nproto udp      # \u5fc5\u987b\u4e0e\u670d\u52a1\u5668\u7aef\u7684\u4fdd\u6301\u4e00\u81f4\nremote 172.16.1.128 1194   # \u6307\u5b9a\u8fde\u63a5\u7684\u8fdc\u7a0b\u670d\u52a1\u5668\u7684\u5b9e\u9645IP\u5730\u5740\u548c\u7aef\u53e3\u53f7\n\nresolv-retry infinite    \n# \u65ad\u7ebf\u81ea\u52a8\u91cd\u65b0\u8fde\u63a5\uff0c\u5728\u7f51\u7edc\u4e0d\u7a33\u5b9a\u7684\u60c5\u51b5\u4e0b(\u4f8b\u5982\uff1a\u7b14\u8bb0\u672c\u7535\u8111\u65e0\u7ebf\u7f51\u7edc)\u975e\u5e38\u6709\u7528\u3002\n\nnobind         # \u4e0d\u7ed1\u5b9a\u7279\u5b9a\u7684\u672c\u5730\u7aef\u53e3\u53f7\npersist-key\npersist-tun\n\nca \/etc\/openvpn\/config\/ca.crt                 # \u6307\u5b9aCA\u8bc1\u4e66\u7684\u6587\u4ef6\u8def\u5f84\ncert \/etc\/openvpn\/config\/client-wwz.crt       # \u6307\u5b9a\u5f53\u524d\u5ba2\u6237\u7aef\u7684\u8bc1\u4e66\u6587\u4ef6\u8def\u5f84\nkey \/etc\/openvpn\/config\/client-wwz.key        # \u6307\u5b9a\u5f53\u524d\u5ba2\u6237\u7aef\u7684\u79c1\u94a5\u6587\u4ef6\u8def\u5f84\n\nns-cert-type server      # \u6307\u5b9a\u91c7\u7528\u670d\u52a1\u5668\u6821\u9a8c\u65b9\u5f0f\n\n# tls-auth ta.key 1     \n#\u5982\u679c\u670d\u52a1\u5668\u8bbe\u7f6e\u4e86\u9632\u5fa1DoS\u7b49\u653b\u51fb\u7684ta.key\uff0c\u5219\u5fc5\u987b\u6bcf\u4e2a\u5ba2\u6237\u7aef\u5f00\u542f\uff1b\u5982\u679c\u672a\u8bbe\u7f6e\uff0c\u5219\u6ce8\u91ca\u6389\u8fd9\u4e00\u884c\uff1b\n\ncomp-lzo              #\u4e0e\u670d\u52a1\u5668\u4fdd\u6301\u4e00\u81f4\nverb 3                #\u6307\u5b9a\u65e5\u5fd7\u6587\u4ef6\u7684\u8bb0\u5f55\u8be6\u7ec6\u7ea7\u522b\uff0c\u53ef\u90090-9\uff0c\u7b49\u7ea7\u8d8a\u9ad8\u65e5\u5fd7\u5185\u5bb9\u8d8a\u8be6\u7ec6\n<\/code><\/pre>\n\n\n
                                          • \u6ce8\u610f\uff1a
                                            • \u914d\u7f6e\u6587\u4ef6\u4e2d\u7684\u6587\u4ef6\u8def\u5f84\u6d89\u53ca\u5230\u76f8\u5bf9\u8def\u5f84\u7684\uff0c\u5747\u4ee5\u542f\u52a8OpenVPN\u65f6\u7684\u6240\u5728\u76ee\u5f55\u4e3a\u51c6\u3002
                                              \u7531\u4e8e\u5728\u914d\u7f6e\u6587\u4ef6\u4e2d\u8bbe\u7f6e\u7684\u6587\u4ef6\u8def\u5f84\u90fd\u662f\u76f8\u5bf9config\u76ee\u5f55\u7684\u8def\u5f84\uff0c\u56e0\u6b64\u4e5f\u53ea\u80fd\u5728config\u76ee\u5f55\u4e0b\u624d\u80fd\u6b63\u5e38\u542f\u52a8OpenVPN\u3002\u5982\u679c\u60f3\u5728\u4efb\u4f55\u5730\u65b9\u90fd\u80fd\u4f7f\u7528\u4e0a\u8ff0\u547d\u4ee4\u542f\u52a8OpenVPN\uff0c\u5efa\u8bae\u5c06\u914d\u7f6e\u6587\u4ef6\u4e0e\u6587\u4ef6\u8def\u5f84\u76f8\u5173\u7684\u90e8\u5206\u5168\u90e8\u6539\u4e3a\u7edd\u5bf9\u8def\u5f84\u3002<\/li>
                                            • OpenVPN\u670d\u52a1\u5668\u6240\u5728\u8ba1\u7b97\u673a\u5fc5\u987b\u5141\u8bb8OpenVPN\u901a\u8fc7\u9632\u706b\u5899\uff0c\u4f60\u53ef\u4ee5\u7981\u7528\u6389\u9632\u706b\u5899\uff0c\u6216\u8005\u5c06OpenVPN\u8bbe\u4e3a\u53ef\u4fe1\u7a0b\u5e8f\uff0c\u6216\u8005\u5f00\u653e1194\u7aef\u53e3\u3002
                                              -A INPUT -p udp --dport 1194 -j ACCEPT<\/code><\/li>
                                            • \u542f\u52a8\u670d\u52a1\u5668\u548c\u5ba2\u6237\u7aef\u90fd\u9700\u8981\u4e00\u5b9a\u7684\u6743\u9650\uff0c\u5efa\u8bae\u6d4b\u8bd5\u5b66\u4e60\u65f6\u7528root\u8d26\u6237\u6216sudo\u547d\u4ee4\u8fdb\u884c\u542f\u52a8\u3002<\/li><\/ul><\/li>
                                            • \u8fd0\u884copenvpn\u5ba2\u6237\u7aef\uff1a<\/li><\/ul>\n\n\n
                                              openvpn --daemon --cd \u914d\u7f6e\u6587\u4ef6\u8def\u5f84 --config client.ovpn(\u914d\u7f6e\u6587\u4ef6\u540d\u79f0) --log-append \/var\/log\/openvpn\/openvpn.log(\u65e5\u5fd7\u8def\u5f84)\n<\/code><\/pre>\n\n\n

                                              \u67e5\u770b\u65e5\u5fd7\u6210\u529f\u8fde\u63a5\u6ca1\u6709\uff1a
                                              tail -f \/var\/log\/openvpn\/openvpn.log<\/code>
                                              \u5230\u6b64\u5df2\u7ecf\u6210\u529f\u4e86\u3002<\/p>\n\n\n

                                              • \u8bbe\u7f6e\u5f00\u673a\u81ea\u52a8\u8fde\u63a5
                                                vim \/etc\/rc.local<\/code><\/li><\/ul>\n\n\n
                                                openvpn --daemon --cd \u914d\u7f6e\u6587\u4ef6\u8def\u5f84 --config client.ovpn(\u914d\u7f6e\u6587\u4ef6\u540d\u79f0) --log-append \/var\/log\/openvpn.log(\u65e5\u5fd7\u8def\u5f84)\n<\/code><\/pre>\n\n\n
                                                • \u52a0\u5165\u5230\/etc\/rc.local<\/code>\u914d\u7f6e\u6587\u4ef6\u91cc\u3002<\/li><\/ul>\n\n\n

                                                  openvpn\u7684\u642d\u5efa\u548c\u7b80\u5355\u4f7f\u7528\u672c\u6b21\u5c31\u4ecb\u7ecd\u5230\u8fd9\u91cc\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

                                                  \u539f\u6587\u6709\u66f4\u597d\u7684\u6392\u7248\u770b\u7740\u66f4\u8212\u670d\u4f46\u662f\u4e0d\u8ba9\u590d\u5236\uff0c\u5b89\u88c5\u7684\u65f6\u5019\u8fd8\u8981\u624b\u6572\u597d\u9ebb\u70e6\uff0c\u672c\u6587\u505a\u4e0b\u7b80\u5355\u4fee\u6539\u590d\u5236\u5206\u4eab\u4e0b\u3002\u539f\u6587\u5730\u5740\uff1a\u94c1\u4e50\u4e0e<\/p>\n","protected":false},"author":1,"featured_media":540,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[18],"tags":[],"yoast_head":"\nCentos7 \u642d\u5efa OpenVPN(\u65e7\u7248) - Linux\u81ea\u52a8\u5316\u8fd0\u7ef4<\/title>\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.linuxdevops.cn\/2019\/09\/centos7-install-openvpn\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Centos7 \u642d\u5efa OpenVPN(\u65e7\u7248) - Linux\u81ea\u52a8\u5316\u8fd0\u7ef4\" \/>\n<meta property=\"og:description\" content=\"\u539f\u6587\u6709\u66f4\u597d\u7684\u6392\u7248\u770b\u7740\u66f4\u8212\u670d\u4f46\u662f\u4e0d\u8ba9\u590d\u5236\uff0c\u5b89\u88c5\u7684\u65f6\u5019\u8fd8\u8981\u624b\u6572\u597d\u9ebb\u70e6\uff0c\u672c\u6587\u505a\u4e0b\u7b80\u5355\u4fee\u6539\u590d\u5236\u5206\u4eab\u4e0b\u3002\u539f\u6587\u5730\u5740\uff1a\u94c1\u4e50\u4e0e\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.linuxdevops.cn\/2019\/09\/centos7-install-openvpn\/\" \/>\n<meta property=\"og:site_name\" content=\"Linux\u81ea\u52a8\u5316\u8fd0\u7ef4\" \/>\n<meta property=\"article:published_time\" content=\"2019-09-25T07:05:42+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-11-23T07:55:17+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.linuxdevops.cn\/wp-content\/uploads\/2019\/09\/u6331975822863448906fm26gp0.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"380\" \/>\n\t<meta property=\"og:image:height\" content=\"265\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"\u7ba1\u7406\u5458\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.linuxdevops.cn\/2019\/09\/centos7-install-openvpn\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.linuxdevops.cn\/2019\/09\/centos7-install-openvpn\/\"},\"author\":{\"name\":\"\u7ba1\u7406\u5458\",\"@id\":\"https:\/\/www.linuxdevops.cn\/#\/schema\/person\/3e206335d5796fdd8679e449df72a0d1\"},\"headline\":\"Centos7 \u642d\u5efa OpenVPN(\u65e7\u7248)\",\"datePublished\":\"2019-09-25T07:05:42+00:00\",\"dateModified\":\"2020-11-23T07:55:17+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.linuxdevops.cn\/2019\/09\/centos7-install-openvpn\/\"},\"wordCount\":187,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.linuxdevops.cn\/#\/schema\/person\/3e206335d5796fdd8679e449df72a0d1\"},\"articleSection\":[\"Linux\u670d\u52a1\"],\"inLanguage\":\"zh-CN\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.linuxdevops.cn\/2019\/09\/centos7-install-openvpn\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.linuxdevops.cn\/2019\/09\/centos7-install-openvpn\/\",\"url\":\"https:\/\/www.linuxdevops.cn\/2019\/09\/centos7-install-openvpn\/\",\"name\":\"Centos7 \u642d\u5efa OpenVPN(\u65e7\u7248) - Linux\u81ea\u52a8\u5316\u8fd0\u7ef4\",\"isPartOf\":{\"@id\":\"https:\/\/www.linuxdevops.cn\/#website\"},\"datePublished\":\"2019-09-25T07:05:42+00:00\",\"dateModified\":\"2020-11-23T07:55:17+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.linuxdevops.cn\/2019\/09\/centos7-install-openvpn\/#breadcrumb\"},\"inLanguage\":\"zh-CN\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.linuxdevops.cn\/2019\/09\/centos7-install-openvpn\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.linuxdevops.cn\/2019\/09\/centos7-install-openvpn\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.linuxdevops.cn\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Linux\u670d\u52a1\",\"item\":\"https:\/\/www.linuxdevops.cn\/linuxservice\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Centos7 \u642d\u5efa OpenVPN(\u65e7\u7248)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.linuxdevops.cn\/#website\",\"url\":\"https:\/\/www.linuxdevops.cn\/\",\"name\":\"Linux\u81ea\u52a8\u5316\u8fd0\u7ef4\",\"description\":\"Linux\u81ea\u52a8\u5316\u8fd0\u7ef4\u7b14\u8bb0\",\"publisher\":{\"@id\":\"https:\/\/www.linuxdevops.cn\/#\/schema\/person\/3e206335d5796fdd8679e449df72a0d1\"},\"alternateName\":\"linuxdevops\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.linuxdevops.cn\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-CN\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/www.linuxdevops.cn\/#\/schema\/person\/3e206335d5796fdd8679e449df72a0d1\",\"name\":\"\u7ba1\u7406\u5458\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-CN\",\"@id\":\"https:\/\/www.linuxdevops.cn\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/www.linuxdevops.cn\/wp-content\/uploads\/2019\/07\/cropped-index.jpg\",\"contentUrl\":\"https:\/\/www.linuxdevops.cn\/wp-content\/uploads\/2019\/07\/cropped-index.jpg\",\"width\":512,\"height\":512,\"caption\":\"\u7ba1\u7406\u5458\"},\"logo\":{\"@id\":\"https:\/\/www.linuxdevops.cn\/#\/schema\/person\/image\/\"},\"description\":\"\u7ba1\u7406\u5458\",\"url\":\"https:\/\/www.linuxdevops.cn\/author\/root\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Centos7 \u642d\u5efa OpenVPN(\u65e7\u7248) - Linux\u81ea\u52a8\u5316\u8fd0\u7ef4","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.linuxdevops.cn\/2019\/09\/centos7-install-openvpn\/","og_locale":"zh_CN","og_type":"article","og_title":"Centos7 \u642d\u5efa OpenVPN(\u65e7\u7248) - Linux\u81ea\u52a8\u5316\u8fd0\u7ef4","og_description":"\u539f\u6587\u6709\u66f4\u597d\u7684\u6392\u7248\u770b\u7740\u66f4\u8212\u670d\u4f46\u662f\u4e0d\u8ba9\u590d\u5236\uff0c\u5b89\u88c5\u7684\u65f6\u5019\u8fd8\u8981\u624b\u6572\u597d\u9ebb\u70e6\uff0c\u672c\u6587\u505a\u4e0b\u7b80\u5355\u4fee\u6539\u590d\u5236\u5206\u4eab\u4e0b\u3002\u539f\u6587\u5730\u5740\uff1a\u94c1\u4e50\u4e0e","og_url":"https:\/\/www.linuxdevops.cn\/2019\/09\/centos7-install-openvpn\/","og_site_name":"Linux\u81ea\u52a8\u5316\u8fd0\u7ef4","article_published_time":"2019-09-25T07:05:42+00:00","article_modified_time":"2020-11-23T07:55:17+00:00","og_image":[{"width":380,"height":265,"url":"https:\/\/www.linuxdevops.cn\/wp-content\/uploads\/2019\/09\/u6331975822863448906fm26gp0.jpg","type":"image\/jpeg"}],"author":"\u7ba1\u7406\u5458","twitter_card":"summary_large_image","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.linuxdevops.cn\/2019\/09\/centos7-install-openvpn\/#article","isPartOf":{"@id":"https:\/\/www.linuxdevops.cn\/2019\/09\/centos7-install-openvpn\/"},"author":{"name":"\u7ba1\u7406\u5458","@id":"https:\/\/www.linuxdevops.cn\/#\/schema\/person\/3e206335d5796fdd8679e449df72a0d1"},"headline":"Centos7 \u642d\u5efa OpenVPN(\u65e7\u7248)","datePublished":"2019-09-25T07:05:42+00:00","dateModified":"2020-11-23T07:55:17+00:00","mainEntityOfPage":{"@id":"https:\/\/www.linuxdevops.cn\/2019\/09\/centos7-install-openvpn\/"},"wordCount":187,"commentCount":0,"publisher":{"@id":"https:\/\/www.linuxdevops.cn\/#\/schema\/person\/3e206335d5796fdd8679e449df72a0d1"},"articleSection":["Linux\u670d\u52a1"],"inLanguage":"zh-CN","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.linuxdevops.cn\/2019\/09\/centos7-install-openvpn\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.linuxdevops.cn\/2019\/09\/centos7-install-openvpn\/","url":"https:\/\/www.linuxdevops.cn\/2019\/09\/centos7-install-openvpn\/","name":"Centos7 \u642d\u5efa OpenVPN(\u65e7\u7248) - Linux\u81ea\u52a8\u5316\u8fd0\u7ef4","isPartOf":{"@id":"https:\/\/www.linuxdevops.cn\/#website"},"datePublished":"2019-09-25T07:05:42+00:00","dateModified":"2020-11-23T07:55:17+00:00","breadcrumb":{"@id":"https:\/\/www.linuxdevops.cn\/2019\/09\/centos7-install-openvpn\/#breadcrumb"},"inLanguage":"zh-CN","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.linuxdevops.cn\/2019\/09\/centos7-install-openvpn\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.linuxdevops.cn\/2019\/09\/centos7-install-openvpn\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.linuxdevops.cn\/"},{"@type":"ListItem","position":2,"name":"Linux\u670d\u52a1","item":"https:\/\/www.linuxdevops.cn\/linuxservice\/"},{"@type":"ListItem","position":3,"name":"Centos7 \u642d\u5efa OpenVPN(\u65e7\u7248)"}]},{"@type":"WebSite","@id":"https:\/\/www.linuxdevops.cn\/#website","url":"https:\/\/www.linuxdevops.cn\/","name":"Linux\u81ea\u52a8\u5316\u8fd0\u7ef4","description":"Linux\u81ea\u52a8\u5316\u8fd0\u7ef4\u7b14\u8bb0","publisher":{"@id":"https:\/\/www.linuxdevops.cn\/#\/schema\/person\/3e206335d5796fdd8679e449df72a0d1"},"alternateName":"linuxdevops","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.linuxdevops.cn\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-CN"},{"@type":["Person","Organization"],"@id":"https:\/\/www.linuxdevops.cn\/#\/schema\/person\/3e206335d5796fdd8679e449df72a0d1","name":"\u7ba1\u7406\u5458","image":{"@type":"ImageObject","inLanguage":"zh-CN","@id":"https:\/\/www.linuxdevops.cn\/#\/schema\/person\/image\/","url":"https:\/\/www.linuxdevops.cn\/wp-content\/uploads\/2019\/07\/cropped-index.jpg","contentUrl":"https:\/\/www.linuxdevops.cn\/wp-content\/uploads\/2019\/07\/cropped-index.jpg","width":512,"height":512,"caption":"\u7ba1\u7406\u5458"},"logo":{"@id":"https:\/\/www.linuxdevops.cn\/#\/schema\/person\/image\/"},"description":"\u7ba1\u7406\u5458","url":"https:\/\/www.linuxdevops.cn\/author\/root\/"}]}},"_links":{"self":[{"href":"https:\/\/www.linuxdevops.cn\/wp-json\/wp\/v2\/posts\/538"}],"collection":[{"href":"https:\/\/www.linuxdevops.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.linuxdevops.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.linuxdevops.cn\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.linuxdevops.cn\/wp-json\/wp\/v2\/comments?post=538"}],"version-history":[{"count":11,"href":"https:\/\/www.linuxdevops.cn\/wp-json\/wp\/v2\/posts\/538\/revisions"}],"predecessor-version":[{"id":875,"href":"https:\/\/www.linuxdevops.cn\/wp-json\/wp\/v2\/posts\/538\/revisions\/875"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.linuxdevops.cn\/wp-json\/wp\/v2\/media\/540"}],"wp:attachment":[{"href":"https:\/\/www.linuxdevops.cn\/wp-json\/wp\/v2\/media?parent=538"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxdevops.cn\/wp-json\/wp\/v2\/categories?post=538"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxdevops.cn\/wp-json\/wp\/v2\/tags?post=538"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}