{"id":195,"date":"2018-07-29T11:20:49","date_gmt":"2018-07-29T03:20:49","guid":{"rendered":"https:\/\/pfsense.freeddns.org\/wp\/?p=195"},"modified":"2020-08-24T22:11:55","modified_gmt":"2020-08-24T14:11:55","slug":"pfsense-book%e4%b9%8b-openvpn%e7%ab%99%e7%82%b9%e5%88%b0%e7%ab%99%e7%82%b9%e8%bf%9e%e6%8e%a5%e7%a4%ba%e4%be%8b%ef%bc%88ssl-tls%ef%bc%89","status":"publish","type":"post","link":"https:\/\/blog.pfchina.org\/?p=195","title":{"rendered":"pfSense book\u4e4b OpenVPN\u7ad9\u70b9\u5230\u7ad9\u70b9\u8fde\u63a5\u793a\u4f8b\uff08SSL\/TLS\uff09"},"content":{"rendered":"<h1 style=\"text-align: justify;\">\u7ad9\u70b9\u5230\u7ad9\u70b9\u8fde\u63a5\u793a\u4f8b\uff08SSL\/TLS\uff09<\/h1>\n<p style=\"text-align: justify;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1904\" src=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/diagrams-openvpn-site-to-site-ssl_tls.png\" alt=\"\" width=\"895\" height=\"405\" srcset=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/diagrams-openvpn-site-to-site-ssl_tls.png 895w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/diagrams-openvpn-site-to-site-ssl_tls-300x136.png 300w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/diagrams-openvpn-site-to-site-ssl_tls-768x348.png 768w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/diagrams-openvpn-site-to-site-ssl_tls-500x226.png 500w\" sizes=\"auto, (max-width: 895px) 100vw, 895px\" \/><\/p>\n<p class=\"caption\" style=\"text-align: justify;\"><em><span class=\"caption-text\">OpenVPN\u7ad9\u70b9\u5230\u7ad9\u70b9\u8fde\u63a5\u793a\u4f8b\uff08SSL\/TLS\uff09<\/span><\/em><\/p>\n<p style=\"text-align: justify;\">\u4f7f\u7528SSL \/ TLS\u914d\u7f6e\u7ad9\u70b9\u5230\u7ad9\u70b9\u8fde\u63a5\u7684\u8fc7\u7a0b\u6bd4\u5171\u4eab\u5bc6\u94a5\u66f4\u590d\u6742\u3002\u4f46\u662f\uff0c\u8fd9\u79cd\u65b9\u6cd5\u901a\u5e38\u66f4\u65b9\u4fbf\u5730\u7ba1\u7406\u5927\u91cf\u4ee5\u4e2d\u5fc3\u7ad9\u70b9\u65b9\u5f0f\u8fde\u63a5\u5230\u4e2d\u5fc3\u7ad9\u70b9\u7684\u8fdc\u7a0b\u7ad9\u70b9\u3002\u5b83\u53ef\u7528\u4e8e\u4e24\u4e2a\u8282\u70b9\u4e4b\u95f4\u7684\u7ad9\u70b9\u5230\u7ad9\u70b9\uff0c\u4f46\u7531\u4e8e\u914d\u7f6e\u590d\u6742\u6027\u589e\u52a0\uff0c\u5927\u591a\u6570\u4eba\u66f4\u559c\u6b22\u4f7f\u7528\u5171\u4eab\u5bc6\u94a5\u800c\u4e0d\u662fSSL \/ TLS\u3002<\/p>\n<p style=\"text-align: justify;\">\u5f53\u4f7f\u7528SSL \/ TLS\u914d\u7f6e\u7ad9\u70b9\u5230\u7ad9\u70b9Open<span class=\"caption-text\">VPN<\/span>\u8fde\u63a5\u65f6\uff0c\u4e00\u4e2a\u9632\u706b\u5899\u5c06\u6210\u4e3a\u670d\u52a1\u5668\uff0c\u5176\u4ed6\u9632\u706b\u5899\u5c06\u6210\u4e3a\u5ba2\u6237\u7aef\u3002\u901a\u5e38\u60c5\u51b5\u4e0b\uff0c\u4e3b\u8981\u4f4d\u7f6e\u662f\u670d\u52a1\u5668\u7aef\uff0c\u8fdc\u7a0b\u529e\u516c\u5ba4\u5c06\u5145\u5f53\u5ba2\u6237\u7aef\uff0c\u4f46\u662f\u5982\u679c\u4e00\u4e2a\u4f4d\u7f6e\u5177\u6709\u6bd4\u4e3b\u529e\u516c\u5ba4\u66f4\u591a\u7684\u9759\u6001IP\u5730\u5740\u548c\u66f4\u591a\u5e26\u5bbd\uff0c\u90a3\u4e48\u5e94\u8be5\u662f\u670d\u52a1\u5668\u66f4\u7406\u60f3\u7684\u4f4d\u7f6e\u3002\u9664\u4e86\u4e24\u7aef\u7684\u5b50\u7f51\u4e4b\u5916\uff0c\u8fd8\u6709\u4e00\u4e2a\u4e13\u7528\u5b50\u7f51\u7528\u4e8e\u7f51\u7edc\u4e4b\u95f4\u7684Open<span class=\"caption-text\">VPN<\/span>\u4e92\u8fde\u3002<\/p>\n<p style=\"text-align: justify;\">10.3.101.0\/24\u88ab\u7528\u4f5cIPv4 <span class=\"caption-text\">VPN<\/span>\u96a7\u9053\u7f51\u7edc\u3002 Open<span class=\"caption-text\">VPN<\/span>\u5206\u914dIP\u5730\u5740\u7684\u65b9\u5f0f\u4e0e\u8fdc\u7a0b\u8bbf\u95ee\u5ba2\u6237\u7aef\u7684\u65b9\u5f0f\u76f8\u540c\u3002 \u5f53\u4f7f\u7528\u5b50\u7f51\u7684\u62d3\u6251\u6837\u5f0f\u65f6\uff0c\u6bcf\u4e2a\u5ba2\u6237\u7aef\u5c06\u5728\u4e00\u4e2a\u516c\u5171\u5b50\u7f51\u4e2d\u83b7\u5f97\u4e00\u4e2aIP\u5730\u5740\u3002 \u5f53\u4f7f\u7528net30\u7684\u62d3\u6251\u6837\u5f0f\u65f6\uff0c\u6bcf\u4e2a\u8fde\u63a5\u7684\u5ba2\u6237\u7aef\u90fd\u5f97\u5230\u4e00\u4e2a\/ 30\u5b50\u7f51\uff0c\u4ee5\u4fbf\u4e0e\u670d\u52a1\u5668\u4e92\u8fde\u3002\u4ee5\u4e0b\u5404\u8282\u4ecb\u7ecd\u5982\u4f55\u914d\u7f6e\u8fde\u63a5\u7684\u670d\u52a1\u5668\u7aef\u548c\u5ba2\u6237\u7aef\u3002 \u53ea\u8981\u4e0d\u4e0e\u5f53\u524d\u7f51\u7edc\u4e2d\u6b63\u5728\u4f7f\u7528\u7684\u5176\u4ed6\u5b50\u7f51\u91cd\u53e0\uff0c\u5c31\u53ef\u4ee5\u4f7f\u7528\u4efb\u4f55\u5b50\u7f51\u3002<\/p>\n<p style=\"text-align: justify;\">\u4e3a\u4e86\u8ba9\u670d\u52a1\u5668\u5230\u8fbe\u6bcf\u4e2a\u8fde\u63a5\u540e\u9762\u7684\u5ba2\u6237\u7aef\u7f51\u7edc\uff0c\u9700\u8981\u4e24\u4e2a\u9879\u76ee\uff1a<\/p>\n<ul class=\" list-paddingleft-2\" style=\"text-align: justify;\">\n<li>\u544a\u8bc9\u64cd\u4f5c\u7cfb\u7edfOpen<span class=\"caption-text\">VPN<\/span>\u77e5\u9053\u8fdc\u7a0b\u7f51\u7edc\u7684\u8def\u7ebf<\/li>\n<li>\u4e00\u4e2a\u7279\u5b9a\u4e8e\u5ba2\u6237\u7aef\u7684\u8986\u76d6\u7684\u6d41\u884c\u8bed\uff0c\u544a\u8bc9Open<span class=\"caption-text\">VPN<\/span>\u5982\u4f55\u5c06\u8be5\u5b50\u7f51\u6620\u5c04\u5230\u7279\u5b9a\u7684\u8bc1\u4e66<\/li>\n<\/ul>\n<p style=\"text-align: justify;\">\u5728\u8fd9\u4e2a\u793a\u4f8b\u4e2d\u4f1a\u6709\u66f4\u591a\u7684\u7ec6\u8282\u3002<\/p>\n<h2 style=\"text-align: justify;\">\u914d\u7f6e SSL\/TLS\u00a0\u670d\u52a1\u5668\u7aef<\/h2>\n<p style=\"text-align: justify;\">\u5728\u914d\u7f6eVPN\u4e4b\u524d\uff0c\u9700\u8981\u6b64<span class=\"caption-text\">VPN<\/span>\u7684\u8bc1\u4e66\u7ed3\u6784\u3002 \u4e3a\u8fd9\u4e2a<span class=\"caption-text\">VPN<\/span>\u521b\u5efa\u4e00\u4e2a\u552f\u4e00\u7684CA\uff0c\u5e76\u4ece\u8be5CA\u521b\u5efa\u4e00\u4e2a\u670d\u52a1\u5668\u8bc1\u4e66\uff0c\u7136\u540e\u4e3a\u6bcf\u4e2a\u8fdc\u7a0b\u7ad9\u70b9\u521b\u5efa\u4e00\u4e2a\u7528\u6237\u8bc1\u4e66\u3002 \u5bf9\u4e8e\u5ba2\u6237\u7aef\u7f51\u7ad9\uff0c\u8bf7\u4f7f\u7528\u67d0\u79cd\u65b9\u5f0f\u552f\u4e00\u6807\u8bc6\u5176CN\uff0c\u4f8b\u5982\u5b8c\u5168\u9650\u5b9a\u7684\u57df\u540d\u6216\u7f29\u77ed\u7684\u7f51\u7ad9\u6216\u4e3b\u673a\u540d\u3002 \u5bf9\u4e8e\u8fd9\u4e2a\u793a\u4f8b\uff0cCA\u5c06\u88ab\u79f0\u4e3aS2SCA\uff0cServer CN\u5c06\u662fserverA\uff0c\u5ba2\u6237\u7aef\u5c06\u662fclientB\u548cclientC\u3002<\/p>\n<ul class=\" list-paddingleft-2\" style=\"text-align: justify;\">\n<li>\u5bfc\u822a\u5230<span class=\"caption-text\">VPN<\/span><strong>\u00a0&gt; Open<span class=\"caption-text\">VPN<\/span>\uff0c<\/strong>\u670d\u52a1\u5668\u9009\u9879\u5361<\/li>\n<li>\u5355\u51fb <img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1666\" src=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/fa-plus.png\" alt=\"\" width=\"25\" height=\"25\" \/>\u00a0\u6dfb\u52a0\u4e00\u4e2a\u65b0\u7684\u670d\u52a1\u5668<\/li>\n<li>\u586b\u5199\u5982\u4e0b\u6240\u8ff0\u7684\u5b57\u6bb5\uff0c\u5176\u4ed6\u8bbe\u7f6e\u4fdd\u7559\u9ed8\u8ba4\u503c\u3002<\/li>\n<\/ul>\n<ul class=\" list-paddingleft-2\" style=\"text-align: justify;\">\n<li><strong>\u670d\u52a1\u5668\u6a21\u5f0f:<\/strong>\u9009\u62e9\u70b9\u5bf9\u70b9 (SSL\/TLS)<\/li>\n<li><strong>\u534f\u8bae:<\/strong>\u9009\u62e9 UDP<\/li>\n<li><strong>\u8bbe\u5907\u6a21\u5f0f:<\/strong>\u9009\u62e9tun<\/li>\n<li><strong>\u63a5\u53e3:<\/strong>\u9009\u62e9WAN<\/li>\n<li><strong>\u672c\u5730\u7aef\u53e3:<\/strong>\u8f93\u51651194\uff0c\u9664\u975e\u6709\u53e6\u4e00\u4e2a\u6d3b\u52a8\u7684Open<span class=\"caption-text\">VPN<\/span>\u670d\u52a1\u5668<\/li>\n<li><strong>\u63cf\u8ff0:<\/strong>\u8f93\u5165\u4e00\u4e2a\u63cf\u8ff0<\/li>\n<li><strong>TLS \u914d\u7f6e:<\/strong>\u9009\u4e2d\u6b64\u6846\u4e5f\u53ef\u4ee5\u6267\u884cTLS\u8eab\u4efd\u9a8c\u8bc1\u4ee5\u53caSSL<\/li>\n<li><strong>\u5bf9\u7b49\u8bc1\u4e66\u9881\u53d1\u673a\u6784:<\/strong>\u9009\u62e9\u5728\u6b64\u8fc7\u7a0b\u5f00\u59cb\u65f6\u521b\u5efa\u7684CA<\/li>\n<li><strong>\u5bf9\u7b49\u8bc1\u4e66\u540a\u9500\u5217\u8868:<\/strong>\u5982\u679c\u521b\u5efa\u4e86CRL\uff0c\u8bf7\u5728\u6b64\u5904\u9009\u62e9\u5b83<\/li>\n<li><strong>\u670d\u52a1\u5668\u8bc1\u4e66:<\/strong>\u9009\u62e9\u5728\u6b64\u8fc7\u7a0b\u5f00\u59cb\u65f6\u521b\u5efa\u7684\u670d\u52a1\u5668\u8bc1\u4e66<\/li>\n<li><strong>IPv4 \u96a7\u9053\u7f51\u7edc:<\/strong>\u8f93\u5165\u9009\u62e9\u7684\u96a7\u9053\u7f51\u7edc\uff0c\u5728\u672c\u4f8b\u4e2d\u4e3a 10.3.101.0\/24<\/li>\n<li><strong>IPv4 \u672c\u5730\u7f51\u7edc:<\/strong>\u8f93\u5165\u5305\u62ec\u670d\u52a1\u5668\u5728\u5185\u7684\u6240\u6709\u7ad9\u70b9\u7684LAN\u7f51\u7edc\uff1a10.3.0.0\/24, 10.5.0.0\/24, 10.7.0.0\/24<\/li>\n<\/ul>\n<p class=\"first admonition-title\" style=\"text-align: justify;\">\u6ce8\u610f\uff1a\u5982\u679c\u5ba2\u6237\u7aef\u9700\u8981\u5230\u8fbe\u670d\u52a1\u5668\u7aef\u7684\u7f51\u7edc\u8f83\u591a\uff0c\u4f8b\u5982\u901a\u8fc7\u9759\u6001\u8def\u7531\u53ef\u8fbe\u7684\u7f51\u7edc\uff0c\u5176\u4ed6<span class=\"caption-text\">VPN<\/span>\u7b49\uff0c\u5219\u5c06\u5b83\u4eec\u6dfb\u52a0\u4e3aIPv4 Local Network\uff08IPv4\u672c\u5730\u7f51\u7edc\uff09\u6846\u4e2d\u7684\u9644\u52a0\u6761\u76ee\u3002<\/p>\n<ul>\n<li><strong>IPv4 \u8fdc\u7a0b\u7f51\u7edc:<\/strong>\u8f93\u5165\u5ba2\u6237\u7aefLAN \u7f51\u7edc: 10.5.0.0\/24, 10.7.0.0\/24<\/li>\n<li>\u5355\u51fb<strong>\u4fdd\u5b58<\/strong><\/li>\n<\/ul>\n<p style=\"text-align: justify;\">\u5728\u670d\u52a1\u5668\u5217\u8868\u53f3\u5219\u5355\u51fb <img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1668\" src=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/fa-pencil.png\" alt=\"\" width=\"25\" height=\"25\" \/>\u00a0\u7f16\u8f91\u8fd9\u4e2a\u670d\u52a1\u5668\u5b9e\u4f8b<\/p>\n<p style=\"text-align: justify;\">\u627e\u5230<strong>TLS\u8ba4\u8bc1<\/strong>\u6846<\/p>\n<p style=\"text-align: justify;\">\u9009\u62e9\u91cc\u9762\u7684\u6240\u6709\u6587\u5b57<\/p>\n<p style=\"text-align: justify;\">\u5c06\u6587\u672c\u590d\u5236\u5230\u526a\u8d34\u677f<\/p>\n<p style=\"text-align: justify;\">\u5c06\u5176\u4fdd\u5b58\u5230\u6587\u4ef6\u4e2d\uff0c\u6216\u8005\u6682\u65f6\u5c06\u5176\u7c98\u8d34\u5230\u6587\u672c\u7f16\u8f91\u5668\uff08\u5982\u8bb0\u4e8b\u672c\uff09\u4e2d<\/p>\n<p style=\"text-align: justify;\">\u63a5\u4e0b\u6765\uff0c\u5728WAN\u4e0a\u6dfb\u52a0\u9632\u706b\u5899\u89c4\u5219\uff0c\u5141\u8bb8\u8bbf\u95eeOpen<span class=\"caption-text\">VPN<\/span>\u670d\u52a1\u5668\u3002<\/p>\n<ul class=\" list-paddingleft-2\" style=\"text-align: justify;\">\n<li>\u5bfc\u822a\u5230<strong>\u9632\u706b\u5899\u00a0<\/strong><strong>&gt;\u89c4\u5219\u7b56\u7565<\/strong>,\u00a0<strong>WAN<\/strong>\u9009\u9879\u5361<\/li>\n<li>\u5355\u51fb <img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1693\" src=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/fa-level-up.png\" alt=\"\" width=\"25\" height=\"25\" \/>\u00a0 \u5728\u5217\u8868\u9876\u90e8\u6dfb\u52a0\u4e00\u6761\u89c4\u5219<\/li>\n<li>\u534f\u8bae\u9009\u00a0<em>UDP<\/em><\/li>\n<li>\u5c06\u6e90\u8bbe\u7f6e\u4e3aany\uff0c\u56e0\u4e3a\u591a\u4e2a\u7ad9\u70b9\u5c06\u9700\u8981\u8fde\u63a5\u3002 \u6216\u8005\uff0c\u5982\u679c\u5177\u6709\u9759\u6001\u5730\u5740\uff0c\u5219\u53ef\u4ee5\u6dfb\u52a0\u5305\u542b\u6bcf\u4e2a\u8fdc\u7a0b\u7ad9\u70b9\u7684IP\u5730\u5740\u7684\u522b\u540d\u3002<\/li>\n<li>\u8bbe\u7f6e<strong>\u76ee\u7684\u5730\u5740<\/strong>\u4e3a<em>WAN\u00a0\u5730\u5740<\/em><\/li>\n<li>\u8bbe\u7f6e<strong>\u76ee\u5730\u7aef\u53e3<\/strong><code class=\"docutils literal\"><span class=\"pre\">1194<\/span><\/code><\/li>\n<li>\u8f93\u5165\u63cf\u8ff0<strong>\uff0c\u4f8b\u5982<\/strong>\u00a0<code class=\"docutils literal\"><span class=\"pre\">Open<span class=\"caption-text\">VPN<\/span><\/span>\u00a0<span class=\"pre\">Multi-Site<\/span> <span class=\"caption-text\">VPN<\/span><\/code><\/li>\n<li>\u5355\u51fb<strong>\u4fdd\u5b58<\/strong><\/li>\n<li>\u5355\u51fb<strong>\u5e94\u7528\u66f4\u6539<\/strong><\/li>\n<\/ul>\n<p style=\"text-align: justify;\">\u8fd8\u5fc5\u987b\u5c06\u89c4\u5219\u6dfb\u52a0\u5230Open***\u63a5\u53e3\uff0c\u624d\u80fd\u5c06\u901a\u8fc7<span class=\"caption-text\">VPN<\/span>\u7684\u6d41\u91cf\u4ece\u5ba2\u6237\u7aefLAN\u4f20\u9012\u5230\u670d\u52a1\u5668\u7aefLAN\u3002 \u53ef\u4ee5\u4f7f\u7528\u201c\u5168\u90e8\u5141\u8bb8\u201d\u6837\u5f0f\u89c4\u5219\u6216\u4e00\u7ec4\u66f4\u4e25\u683c\u7684\u89c4\u5219\u3002<\/p>\n<ul class=\" list-paddingleft-2\" style=\"text-align: justify;\">\n<li>\u5bfc\u822a\u5230<strong>\u9632\u706b\u5899\u00a0<\/strong><strong>&gt;\u89c4\u5219\u7b56\u7565<\/strong>,\u00a0<strong>Open<span class=\"caption-text\">VPN<\/span><\/strong>\u9009\u9879\u5361<\/li>\n<li>\u5355\u51fb <img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1693\" src=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/fa-level-up.png\" alt=\"\" width=\"25\" height=\"25\" \/>\u00a0 \u5728\u5217\u8868\u9876\u90e8\u6dfb\u52a0\u4e00\u6761\u89c4\u5219<\/li>\n<li>\u8bbe\u7f6e<strong>\u534f\u8bae<\/strong>\u4e3a\u00a0<em>any<\/em><\/li>\n<li>\u8f93\u5165<strong>\u63cf\u8ff0<\/strong>\u00a0<strong>\uff0c<\/strong>\u4f8b\u5982\u00a0<code class=\"docutils literal\"><span class=\"pre\">Allow<\/span>\u00a0<span class=\"pre\">all<\/span>\u00a0<span class=\"pre\">on<\/span>\u00a0<span class=\"pre\">Open<span class=\"caption-text\">VPN<\/span><\/span><\/code><\/li>\n<li>\u5355\u51fb<strong>\u4fdd\u5b58<\/strong><\/li>\n<li>\u5355\u51fb<strong>\u5e94\u7528\u66f4\u6539<\/strong><\/li>\n<\/ul>\n<p style=\"text-align: justify;\">\u6700\u540e\u4e00\u4e2a\u96be\u9898\u662f\u4e3a\u6bcf\u4e2a\u5ba2\u6237\u7aef\u7f51\u7ad9\u6dfb\u52a0\u5ba2\u6237\u7aef\u7279\u5b9a\u8986\u76d6\u3002 \u8fd9\u9700\u8981\u5c06\u5ba2\u6237\u7aef\u5b50\u7f51\u7ed1\u5b9a\u5230\u7ad9\u70b9\u7684\u7279\u5b9a\u8bc1\u4e66\uff0c\u4ee5\u4fbf\u53ef\u4ee5\u6b63\u786e\u8def\u7531\u3002<\/p>\n<ul class=\" list-paddingleft-2\" style=\"text-align: justify;\">\n<li>\u5bfc\u822a\u5230<span class=\"caption-text\">VPN<\/span> &gt; Open<span class=\"caption-text\">VPN<\/span>,\u00a0\u5ba2\u6237\u7aef\u7279\u5b9a\u8986\u76d6\u9009\u9879\u5361<\/li>\n<li>\u5355\u51fb<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1666\" src=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/fa-plus.png\" alt=\"\" width=\"25\" height=\"25\" \/>\u00a0\u6dfb\u52a0\u4e00\u4e2a\u65b0\u7684\u8986\u76d6<\/li>\n<li>\u6309\u4e0b\u9762\u8981\u6c42\u586b\u5199\u4ee5\u4e0b\u5b57\u6bb5\uff1a<\/li>\n<li>\u901a\u7528\u540d\u79f0:\u8f93\u5165\u7b2c\u4e00\u4e2a\u5ba2\u6237\u7ad9\u70b9\u7684CN\u3002 \u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\uff0c \u5b83\u662f clientB<\/li>\n<li>IPv4\u8fdc\u7a0b\u7f51\u7edc:\u8fd9\u4e2a\u5b57\u6bb5\u8bbe\u7f6e\u8fdb\u5165clientB LAN\u5b50\u7f51\u6240\u9700\u7684\u8def\u7531\uff0c\u672c\u4f8b\u4e2d\u586b 10.5.0.0\/24<\/li>\n<li>\u5355\u51fb\u4fdd\u5b58<\/li>\n<\/ul>\n<p style=\"text-align: justify;\">\u4e3a\u7b2c\u4e8c\u4e2a\u7ad9\u70b9\u6dfb\u52a0\u8986\u76d6\uff0c\u6839\u636e\u9700\u8981\u8c03\u6574\u901a\u7528\u540d\u79f0\u548cIPv4\u8fdc\u7a0b\u7f51\u7edc\u3002 \u5728\u7ad9\u70b9C\u7684\u4f8b\u5b50\u4e2d\uff0c\u8fd9\u4e9b\u503c\u5206\u522b\u662fclientC\u548c10.7.0.0\/24\u3002<\/p>\n<p style=\"text-align: justify;\">\u4e0b\u4e00\u4e2a\u4efb\u52a1\u662f\u5bfc\u51fa\u5ba2\u6237\u7aef\u6240\u9700\u7684\u8bc1\u4e66\u548c\u5bc6\u94a5\u3002<\/p>\n<ul class=\" list-paddingleft-2\" style=\"text-align: justify;\">\n<li>\u5bfc\u822a\u5230\u7cfb\u7edf&gt;\u00a0\u8bc1\u4e66\u7ba1\u7406<\/li>\n<li>\u70b9\u51fb\u94fe\u63a5\u5bfc\u51fa\u4ee5\u4e0b\u9879\u76ee\uff1a\n<ul class=\" list-paddingleft-2\">\n<li>CA\u8bc1\u4e66<\/li>\n<li>\u6bcf\u4e2a\u5ba2\u6237\u7aef\u7ad9\u70b9\u8bc1\u4e66\uff08\u6269\u5c55\u540d\u4e3a.crt\u7684\u6587\u4ef6\uff09<\/li>\n<li>\u6bcf\u4e2a\u5ba2\u6237\u7aef\u7ad9\u70b9\u5bc6\u94a5\uff08\u6269\u5c55\u540d\u4e3a.key\u7684\u6587\u4ef6\uff09<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p class=\"first admonition-title\" style=\"text-align: justify;\">\u6ce8\u610f\uff1a\u4e0d\u8981\u5bfc\u51faCA\u5bc6\u94a5\uff0c\u670d\u52a1\u5668\u8bc1\u4e66\u6216\u670d\u52a1\u5668\u5bc6\u94a5\u3002 \u5b83\u4eec\u4e0d\u662f\u5ba2\u6237\u7aef\u6240\u9700\u8981\u7684\u3002<\/p>\n<p style=\"text-align: justify;\">\u5b8c\u6210\u4e86\u670d\u52a1\u5668\u8bbe\u7f6e\uff0c\u63a5\u4e0b\u6765\uff0c\u7ee7\u7eed\u914d\u7f6e\u5ba2\u6237\u7aef\u3002<\/p>\n<h2 style=\"text-align: justify;\">\u914d\u7f6e SSL\/TLS\u00a0\u5ba2\u6237\u7aef<\/h2>\n<p style=\"text-align: justify;\">\u5728\u5ba2\u6237\u7aef\u4e0a\uff0c\u5bfc\u5165CA\u8bc1\u4e66\u4ee5\u53ca\u8be5\u7ad9\u70b9\u7684\u5ba2\u6237\u7aef\u8bc1\u4e66\u548c\u5bc6\u94a5\u3002 \u8fd9\u662f\u5728\u670d\u52a1\u5668\u4e0a\u5236\u4f5c\u7684\u76f8\u540c\u7684CA\u548c\u5ba2\u6237\u7aef\u8bc1\u4e66\uff0c\uff0c\u53ef\u4ee5<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1666\" src=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/fa-plus.png\" alt=\"\" width=\"25\" height=\"25\" \/>\u5728\u7cfb\u7edf&gt;\u8bc1\u4e66\u7ba1\u7406\u4e0b\u5bfc\u51fa\u3002<\/p>\n<p style=\"text-align: justify;\">\u5bfc\u5165\u8bc1\u4e66\u540e\uff0c\u521b\u5efaOpen<span class=\"caption-text\">VPN<\/span>\u5ba2\u6237\u7aef\uff1a<\/p>\n<ul>\n<li>\u5bfc\u822a\u5230 <span class=\"caption-text\">VPN<\/span><strong>\u00a0&gt; Open<span class=\"caption-text\">VPN<\/span><\/strong><strong>,\u5ba2\u6237\u7aef<\/strong>\u9009\u9879\u5361<\/li>\n<li>\u5355\u51fb <img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1666\" src=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/fa-plus.png\" alt=\"\" width=\"25\" height=\"25\" \/>\u00a0\u6dfb\u52a0\u65b0\u7684\u5ba2\u6237\u7aef<\/li>\n<li>\u586b\u5199\u5982\u4e0b\u6240\u793a\u7684\u5b57\u6bb5\uff0c\u5176\u4ed6\u4fdd\u7559\u9ed8\u8ba4\u503c.<\/li>\n<li><strong>\u670d\u52a1\u5668\u6a21\u5f0f:\u00a0<\/strong>\u9009\u62e9\u70b9\u5bf9\u70b9(SSL\/TLS)<\/li>\n<li><strong>\u534f\u8bae:<\/strong>\u00a0\u9009\u62e9 UDP<\/li>\n<li><strong>\u8bbe\u5907\u6a21\u5f0f:<\/strong>\u00a0\u9009\u62e9tun<\/li>\n<li><strong>\u63a5\u53e3:<\/strong>\u00a0\u9009\u62e9WAN<\/li>\n<li><strong>\u670d\u52a1\u5668\u4e3b\u673a\u6216\u5730\u5740:<\/strong>\u5728\u8fd9\u91cc\u8f93\u5165Open<span class=\"caption-text\">VPN<\/span>\u670d\u52a1\u5668\u7684\u516c\u5171IP\u5730\u5740\u6216\u4e3b\u673a\u540d (\u4f8b\u5982\uff1a 198.51.100.3)<\/li>\n<li><strong>\u670d\u52a1\u5668\u7aef\u53e3:\u00a0<\/strong>\u8f93\u51651194\u6216\u670d\u52a1\u5668\u4e0a\u914d\u7f6e\u7684\u4efb\u4f55\u7aef\u53e3<\/li>\n<li><strong>\u63cf\u8ff0:\u00a0<\/strong>\u8f93\u5165\u63cf\u8ff0\u8bf4\u660e<\/li>\n<li><strong>TLS \u914d\u7f6e:<\/strong>\u9009\u4e2d\u542f\u7528TLS\u5bc6\u94a5\uff0c\u53d6\u6d88\u9009\u4e2d\u81ea\u52a8\u751f\u6210TLS\u5bc6\u94a5\u3002\u7136\u540e\u5c06\u5148\u524d\u521b\u5efa\u7684\u670d\u52a1\u5668\u5b9e\u4f8b\u590d\u5236\u7684\u5bc6\u94a5\u7c98\u8d34\u5230\u8fd9\u91cc\u3002<\/li>\n<li><strong>\u5bf9\u7b49\u8bc1\u4e66\u9881\u53d1\u673a\u6784:<\/strong>\u9009\u62e9\u5728\u6b64\u8fc7\u7a0b\u5f00\u59cb\u65f6\u5bfc\u5165\u7684CA<\/li>\n<li><strong>\u5ba2\u6237\u7aef\u8bc1\u4e66:<\/strong>\u9009\u62e9\u5728\u6b64\u8fc7\u7a0b\u5f00\u59cb\u65f6\u5bfc\u5165\u7684\u5ba2\u6237\u7aef\u8bc1\u4e66<\/li>\n<li>\u5355\u51fb\u4fdd\u5b58<\/li>\n<\/ul>\n<p style=\"text-align: justify;\">\u8fd8\u5fc5\u987b\u5c06\u89c4\u5219\u6dfb\u52a0\u5230Open<span class=\"caption-text\">VPN<\/span>\u63a5\u53e3\uff0c\u624d\u80fd\u5c06\u901a\u8fc7<span class=\"caption-text\">VPN<\/span>\u7684\u6d41\u91cf\u4ece\u5ba2\u6237\u7aefLAN\u4f20\u9012\u5230\u670d\u52a1\u5668\u7aefLAN\u3002 \u53ef\u4ee5\u4f7f\u7528\u201c\u5168\u90e8\u5141\u8bb8\u201d\u6837\u5f0f\u89c4\u5219\u6216\u4e00\u7ec4\u66f4\u4e25\u683c\u7684\u89c4\u5219\u3002<\/p>\n<ul class=\" list-paddingleft-2\" style=\"text-align: justify;\">\n<li>\u5bfc\u822a\u5230<strong>\u9632\u706b\u5899\u00a0<\/strong><strong>&gt;\u89c4\u5219\u7b56\u7565<\/strong>,\u00a0<strong>Open<span class=\"caption-text\">VPN<\/span><\/strong>\u9009\u9879\u5361<\/li>\n<li>\u5355\u51fb <img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1693\" src=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/fa-level-up.png\" alt=\"\" width=\"25\" height=\"25\" \/>\u00a0 \u5728\u5217\u8868\u9876\u90e8\u6dfb\u52a0\u4e00\u6761\u89c4\u5219<\/li>\n<li>\u8bbe\u7f6e<strong>\u534f\u8bae<\/strong>\u4e3a\u00a0<em>any<\/em><\/li>\n<li>\u8f93\u5165<strong>\u63cf\u8ff0<\/strong>\u00a0<strong>\uff0c<\/strong>\u4f8b\u5982\u00a0<code class=\"docutils literal\"><span class=\"pre\">Allow<\/span>\u00a0<span class=\"pre\">all<\/span>\u00a0<span class=\"pre\">on<\/span>\u00a0<span class=\"pre\">Open<span class=\"caption-text\">VPN<\/span><\/span><\/code><\/li>\n<li>\u5355\u51fb<strong>\u4fdd\u5b58<\/strong><\/li>\n<li>\u5355\u51fb<strong>\u5e94\u7528\u66f4\u6539<\/strong><\/li>\n<\/ul>\n<p style=\"text-align: justify;\">\u5ba2\u6237\u7aef\u7684\u914d\u7f6e\u5df2\u5b8c\u6210\u3002 \u5ba2\u6237\u7aefWAN\u4e0a\u4e0d\u9700\u8981\u9632\u706b\u5899\u89c4\u5219\uff0c\u56e0\u4e3a\u5ba2\u6237\u7aef\u53ea\u542f\u52a8\u51fa\u7ad9\u8fde\u63a5\u3002<\/p>\n<p class=\"first admonition-title\" style=\"text-align: justify;\">\u6ce8\u610f\uff1a\u901a\u8fc7\u8fdc\u7a0b\u8bbf\u95eePKI\u914d\u7f6e\uff0c\u901a\u5e38\u4e0d\u4f1a\u5728\u5ba2\u6237\u7aef\u914d\u7f6e\u4e2d\u5b9a\u4e49\u8def\u7531\u548c\u5176\u4ed6\u914d\u7f6e\u9009\u9879\uff0c\u800c\u662f\u5c06\u5176\u4ece\u670d\u52a1\u5668\u63a8\u9001\u5230\u5ba2\u6237\u7aef\u3002 \u5982\u679c\u5728\u670d\u52a1\u5668\u7aef\u6709\u66f4\u591a\u7684\u7f51\u7edc\u9700\u8981\u8bbf\u95ee\uff0c\u8bf7\u5728\u670d\u52a1\u5668\u4e0a\u914d\u7f6e\u5b83\u4eec\u4ee5\u8fdb\u884c\u63a8\u9001\u3002<\/p>\n<h2 style=\"text-align: justify;\">\u6d4b\u8bd5\u8fde\u63a5<\/h2>\n<p style=\"text-align: justify;\">\u8fde\u63a5\u5c06\u5728\u5ba2\u6237\u7aef\u4fdd\u5b58\u540e\u7acb\u5373\u751f\u6548\u3002 \u5c1d\u8bd5ping\u5230\u8fdc\u7aef\u9a8c\u8bc1\u8fde\u63a5\uff0c\u4ee5\u6d4b\u8bd5\u8fde\u63a5\u662f\u5426\u6b63\u5e38\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u7ad9\u70b9\u5230\u7ad9\u70b9\u8fde\u63a5\u793a\u4f8b\uff08SSL\/TLS\uff09 OpenVPN\u7ad9\u70b9\u5230\u7ad9\u70b9\u8fde\u63a5\u793a\u4f8b\uff08SSL\/ &hellip; <a href=\"https:\/\/blog.pfchina.org\/?p=195\">\u7ee7\u7eed\u9605\u8bfb <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[28],"tags":[114],"class_list":["post-195","post","type-post","status-publish","format-standard","hentry","category-pfsense","tag-openvpn"],"_links":{"self":[{"href":"https:\/\/blog.pfchina.org\/index.php?rest_route=\/wp\/v2\/posts\/195","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.pfchina.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.pfchina.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.pfchina.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.pfchina.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=195"}],"version-history":[{"count":0,"href":"https:\/\/blog.pfchina.org\/index.php?rest_route=\/wp\/v2\/posts\/195\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.pfchina.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=195"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.pfchina.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=195"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.pfchina.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=195"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}