{"id":433,"date":"2018-08-09T15:43:51","date_gmt":"2018-08-09T07:43:51","guid":{"rendered":"https:\/\/pfsensechina.com\/wp\/?p=433"},"modified":"2021-08-14T08:50:39","modified_gmt":"2021-08-14T00:50:39","slug":"%e5%9c%a8aws%e4%b8%8a%e9%80%9a%e8%bf%87pfsense%e6%90%ad%e5%bb%bavpn","status":"publish","type":"post","link":"https:\/\/blog.pfchina.org\/?p=433","title":{"rendered":"\u5728AWS\u4e0a\u901a\u8fc7pfSense\u642d\u5efaVPN"},"content":{"rendered":"<p style=\"text-align: justify;\">Netgate pfSense\u662f\u4e9a\u9a6c\u900a\u8ba4\u8bc1\u7684\u7684EC2\u9632\u706b\u5899\u548cVPN\u8bbe\u5907\u4e4b\u4e00\u3002\u00a0\u4e00\u4e9b\u4eba\u4f1a\u9075\u5faa\u4e92\u8054\u7f51\u4e0a\u7684\u51e0\u4e2a\u6d41\u884c\u6307\u5357\u6765\u914d\u7f6e\u786c\u4ef6pfSense\u8bbe\u5907\uff0c\u4ee5\u4fbf\u76f4\u63a5\u4e0eAWS VPC\uff08\u865a\u62df\u79c1\u6709\u4e91\uff09\u5efa\u7acbvpn\u8fde\u63a5\u3002<\/p>\n<p style=\"text-align: justify;\">\u672c\u6307\u5357\u5c06\u4ecb\u7ecd\u5982\u4f55\u542f\u52a8\uff0c\u7ba1\u7406\u548c\u4f7f\u7528\u8bbe\u5907\u5b9e\u4f8b\u3002\u5bf9\u4e8e\u53ea\u5e0c\u671b\u4f7f\u7528\u9ed8\u8ba4\u914d\u7f6e\u7684OpenVPN\u6216IPsec VPN\u7684\u7528\u6237\uff0c\u5728\u521d\u59cb\u8bbe\u7f6e\u4e4b\u540e\uff0c\u5bf9\u5b9e\u4f8b\u7684\u4fee\u6539\u548c\u7ba1\u7406\u5de5\u4f5c\u91cf\u4f1a\u5f88\u5c11\u3002<\/p>\n<ul>\n<li>\u542f\u52a8\u4e00\u4e2a\u5b9e\u4f8b<\/li>\n<li>\u5b9e\u4f8b\u914d\u7f6e<\/li>\n<li>\u4f7f\u7528\u8fdc\u7a0b\u8bbf\u95eeIPsecVPN<\/li>\n<li>\u4f7f\u7528\u8fdc\u7a0b\u8bbf\u95eeOpenVPN VPN<\/li>\n<li>\u5e38\u7528\u5e73\u53f0\/OpenVPN\u5ba2\u6237\u7aef\u4e0a\u914d\u7f6e\u8bf4\u660e<\/li>\n<li>\u9ad8\u7ea7\u7528\u6cd5<\/li>\n<li>\u4fdd\u62a4VPC\u4e2d\u7684\u4e13\u7528\u7f51\u7edc<\/li>\n<li>IPv6<\/li>\n<li>\u5c06\u672c\u5730pfSense\u8bbe\u5907\u8fde\u63a5\u81f3Netgate pfSense\u8ba4\u8bc1\u7684\u9632\u706b\u5899\u548cVPN\u8bbe\u5907<\/li>\n<\/ul>\n<h1 style=\"text-align: justify;\">\u542f\u52a8\u5b9e\u4f8b<\/h1>\n<p style=\"text-align: justify;\">\u5728Amazon EC2\u7ba1\u7406\u63a7\u5236\u53f0\u4e2d\uff0c\u542f\u52a8Netgate pfSense\u8ba4\u8bc1\u9632\u706b\u5899\u548cVPN\u8bbe\u5907\u3002<\/p>\n<p class=\"first\">1.\u4f7f\u7528\u9875\u9762\u53f3\u4e0a\u89d2\u7684\u9009\u9879\u5361\u9009\u62e9\u5e0c\u671b\u5b9e\u4f8b\u8fd0\u884c\u7684\u533a\u57df\u3002<\/p>\n<p><a href=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2019\/11\/1528255858251643.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-2905 alignnone\" title=\"1528255858251643.jpg\" src=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2019\/11\/1528255858251643.jpg\" alt=\"aws-***-appliance-1.jpg\" width=\"397\" height=\"339\" srcset=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2019\/11\/1528255858251643.jpg 397w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2019\/11\/1528255858251643-300x256.jpg 300w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2019\/11\/1528255858251643-351x300.jpg 351w\" sizes=\"auto, (max-width: 397px) 100vw, 397px\" \/><\/a><\/p>\n<p class=\"first\">2.\u901a\u8fc7\u5355\u51fbEC2\u4eea\u8868\u677f<code class=\"docutils literal notranslate\"><span class=\"pre\">Create<\/span>\u00a0<span class=\"pre\">Instance<\/span><\/code>\u00a0\u90e8\u5206\u4e0b\u7684<code class=\"docutils literal notranslate\"><span class=\"pre\">Launch<\/span>\u00a0<span class=\"pre\">Instance<\/span><\/code>\u00a0\u6309\u94ae\u542f\u52a8\u4e00\u4e2a\u65b0\u5b9e\u4f8b\u3002<\/p>\n<p><a href=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2019\/11\/1528255866710497.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-2906 alignnone\" title=\"1528255866710497.jpg\" src=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2019\/11\/1528255866710497.jpg\" alt=\"aws-***-appliance-2.jpg\" width=\"535\" height=\"254\" srcset=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2019\/11\/1528255866710497.jpg 535w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2019\/11\/1528255866710497-300x142.jpg 300w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2019\/11\/1528255866710497-500x237.jpg 500w\" sizes=\"auto, (max-width: 535px) 100vw, 535px\" \/><\/a><\/p>\n<p class=\"first\">3.\u5728\u521b\u5efa\u65b0\u5b9e\u4f8b\u83dc\u5355\u4e0a\u9009\u62e9 <code class=\"docutils literal notranslate\"><span class=\"pre\">AWS<\/span>\u00a0<span class=\"pre\">Marketplace<\/span><\/code>\u00a0\u3002\u5728\u641c\u7d22\u6846\u4e2d\u952e\u5165\u00a0<code class=\"docutils literal notranslate\"><span class=\"pre\">Netgate<\/span>\u00a0<span class=\"pre\">pfSense<\/span>\u00a0<span class=\"pre\">certified<\/span><\/code>\uff0c\u7136\u540e\u6309\u56de\u8f66\u952e\u3002<\/p>\n<p><a href=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2019\/11\/1528255876991918.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2907\" title=\"1528255876991918.jpg\" src=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2019\/11\/1528255876991918.jpg\" alt=\"aws-***-appliance-3.jpg\" width=\"1280\" height=\"366\" srcset=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2019\/11\/1528255876991918.jpg 1280w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2019\/11\/1528255876991918-1024x293.jpg 1024w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2019\/11\/1528255876991918-300x86.jpg 300w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2019\/11\/1528255876991918-768x220.jpg 768w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2019\/11\/1528255876991918-500x143.jpg 500w\" sizes=\"auto, (max-width: 1280px) 100vw, 1280px\" \/><\/a><\/p>\n<p class=\"first\">\u5728\u641c\u7d22\u7ed3\u679c\u4e2d\u7684Netgate pfSense\u5217\u8868\u65c1\u8fb9\u5355\u51fb\u00a0<code class=\"docutils literal notranslate\"><span class=\"pre\">Select<\/span><\/code>\u6309\u94ae\u3002<\/p>\n<p><a href=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2019\/11\/1528255883173591.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2908\" title=\"1528255883173591.jpg\" src=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2019\/11\/1528255883173591.jpg\" alt=\"aws-***-appliance-4.jpg\" width=\"1280\" height=\"447\" srcset=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2019\/11\/1528255883173591.jpg 1280w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2019\/11\/1528255883173591-1024x358.jpg 1024w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2019\/11\/1528255883173591-300x105.jpg 300w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2019\/11\/1528255883173591-768x268.jpg 768w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2019\/11\/1528255883173591-500x175.jpg 500w\" sizes=\"auto, (max-width: 1280px) 100vw, 1280px\" \/><\/a>4.\u901a\u8fc7\u5355\u51fb\u6240\u9700\u7c7b\u578b\u65c1\u8fb9\u7684\u590d\u9009\u6846\u6765\u9009\u62e9\u8981\u8fd0\u884c\u7684\u5b9e\u4f8b\u7c7b\u578b\u3002 \u5355\u51fb<code class=\"docutils literal notranslate\"><span class=\"pre\">Next:<\/span>\u00a0<span class=\"pre\">Configure<\/span>\u00a0<span class=\"pre\">Instance<\/span>\u00a0<span class=\"pre\">Details<\/span><\/code><\/p>\n<p><a href=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2019\/11\/1528255891471683.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2909\" title=\"1528255891471683.jpg\" src=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2019\/11\/1528255891471683.jpg\" alt=\"aws-***-appliance-10.jpg\" width=\"1280\" height=\"548\" srcset=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2019\/11\/1528255891471683.jpg 1280w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2019\/11\/1528255891471683-1024x438.jpg 1024w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2019\/11\/1528255891471683-300x128.jpg 300w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2019\/11\/1528255891471683-768x329.jpg 768w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2019\/11\/1528255891471683-500x214.jpg 500w\" sizes=\"auto, (max-width: 1280px) 100vw, 1280px\" \/><\/a><\/p>\n<p class=\"first\">\u8fdb\u5165<code class=\"docutils literal notranslate\"><span class=\"pre\">Configure<\/span>\u00a0<span class=\"pre\">Instance<\/span>\u00a0<span class=\"pre\">Details<\/span><\/code>\u00a0\u9875\u9762\uff0c\u9009\u62e9\u7f51\u7edc\u548c\u5b50\u7f51\u3002\u00a0\u4f60\u53ef\u4ee5\u9009\u62e9\u5c55\u5f00\u00a0<code class=\"docutils literal notranslate\"><span class=\"pre\">Advanced<\/span>\u00a0<span class=\"pre\">Details<\/span><\/code>\u00a0\u90e8\u5206\uff0c\u5e76\u5728\u00a0<code class=\"docutils literal notranslate\"><span class=\"pre\">User<\/span>\u00a0<span class=\"pre\">Data<\/span><\/code>\u00a0\u5b57\u6bb5\u4e2d\u5c06\u53c2\u6570\u8bbe\u7f6e\u4e3a\u6587\u672c\u3002\u53ef\u7528\u7684\u9009\u9879\u662f:<\/p>\n<p>\u5bc6\u7801 &#8211; \u901a\u8fc7\u50cfpassword = abcdefg\u8fd9\u6837\u7684\u6307\u4ee4\u8bbe\u7f6e\u4e00\u4e2a\u503c\uff0c\u5c06\u7ba1\u7406\u5e10\u6237\u7684\u5bc6\u7801\u8bbe\u7f6e\u4e3a\u60a8\u5728\u672c\u4f8b\u4e2d\u6307\u5b9a\u7684\u503c &#8211; abcdefg\u3002 \u5982\u679c\u6b64\u5904\u672a\u8bbe\u7f6e\u4efb\u4f55\u503c\uff0c\u5219\u4f1a\u5206\u914d\u4e00\u4e2a\u968f\u673a\u5bc6\u7801\uff0c\u4ee5\u4f7f\u7ba1\u7406\u8bbf\u95ee\u6743\u9650\u4ee5\u907f\u514d\u4f7f\u9ed8\u8ba4\u5bc6\u7801\u66b4\u9732\u4e8e\u4e92\u8054\u7f51\u3002<\/p>\n<p>mgmtnet &#8211; \u901a\u8fc7\u50cfmgmtnet = 10.0.1.0 \/ 24\u8fd9\u6837\u7684\u6307\u4ee4\u8bbe\u7f6e\u4e00\u4e2a\u503c\uff0c\u9650\u5236\u7ba1\u7406\u8bbf\u95ee\uff08http\uff0chttps\uff0cssh\uff09\u3002 \u8fd9\u5c06\u5bfc\u81f4\u5b9e\u4f8b\u4e0a\u7684\u9632\u706b\u5899\u89c4\u5219\uff08\u4e0d\u662f\u5728\u4e9a\u9a6c\u900a\u8bbf\u95ee\u5217\u8868\u4e0a\uff0c\u800c\u662f\u5728Netgate\u8bbe\u5907\u81ea\u5df1\u7684\u9632\u706b\u5899\u4e0a\uff09\u5c06\u5b9e\u4f8b\u7684\u7ba1\u7406\u6d41\u91cf\u9650\u5236\u5230\u6307\u5b9a\u7684\u6e90\u7f51\u7edc\u3002 \u9ed8\u8ba4\u884c\u4e3a\u662f\u5141\u8bb8\u6765\u81ea\u4efb\u4f55\u4e3b\u673a\u7684\u7ba1\u7406\u3002<\/p>\n<p style=\"text-align: justify;\">\u8fd9\u4e9b\u6307\u4ee4\u53ef\u4ee5\u901a\u8fc7\u5c06\u5b83\u4eec\u653e\u5728\u7528\u6237\u6570\u636e\u5b57\u6bb5\u4e2d\u7684\u4e00\u884c\u4e2d\u5e76\u4f7f\u7528\u5192\u53f7\u5206\u5f00\u6765\u8bbe\u7f6e\u3002 \u5982\u679c\u4f60\u60f3\u6307\u5b9a\u4e24\u4e2a\u53c2\u6570\uff0c\u4f60\u53ef\u4ee5\u901a\u8fc7\u952e\u5165\u4e00\u4e2a\u7c7b\u4f3c\u4e8e\u4e0b\u9762\u7684\u8bed\u53e5\u6765\u505a\u5230\u8fd9\u4e00\u70b9\uff1a<\/p>\n<pre>password=abcdefg:mgmtnet=10.0.1.0\/24<\/pre>\n<p style=\"text-align: justify;\">\u5728\u8bbe\u7f6e\u5b8c\u8fd9\u4e9b\u53c2\u6570\u540e\uff0c\u5355\u51fb\u00a0<code class=\"docutils literal notranslate\"><span class=\"pre\">Next:<\/span>\u00a0<span class=\"pre\">Add<\/span>\u00a0<span class=\"pre\">Storage<\/span><\/code>\u00a0\u3002<\/p>\n<p class=\"first admonition-title\" style=\"text-align: justify;\">\u6ce8\u610f:\u5982\u679c\u4f7f\u7528\u4e0a\u9762\u5217\u51fa\u7684\u5bc6\u7801\u53c2\u6570\u8bbe\u7f6e\u5bc6\u7801\uff0c\u5219\u5f53\u7cfb\u7edf\u7b2c\u4e00\u6b21\u5f15\u5bfc\u65f6\u914d\u7f6e\u7cfb\u7edf\u65f6\uff0c\u5bc6\u7801\u5c06\u901a\u8fc7\u672a\u52a0\u5bc6\u7684HTTP\u8bf7\u6c42\u7531\u5b9e\u4f8b\u68c0\u7d22\u3002 \u8bf7\u6c42\u7531\u672c\u5730\u5c40\u57df\u7f51\u4e0a\u7684\u4e9a\u9a6c\u900a\u7f51\u7edc\u670d\u52a1\u8fd0\u884c\u7684\u670d\u52a1\u5668\u5b8c\u6210\uff0c\u8be5\u670d\u52a1\u5668\u5b58\u50a8\u6709\u5173\u6bcf\u4e2a\u6b63\u5728\u8fd0\u884c\u7684\u5b9e\u4f8b\u7684\u5143\u6570\u636e\u3002 \u5b9e\u4f8b\u7684\u6570\u636e\u4ec5\u4f9b\u8be5\u5b9e\u4f8b\u4f7f\u7528\uff0c\u4f46\u53ef\u7528\u4e8e\u4ece\u5b9e\u4f8b\u67e5\u8be2\u800c\u4e0d\u63d0\u4f9b\u4efb\u4f55\u8eab\u4efd\u9a8c\u8bc1\u51ed\u8bc1\u3002 \u5efa\u8bae\u60a8\u5728\u5b9e\u4f8b\u51fa\u73b0\u540e\u901a\u8fc7pfSense Web GUI\u66f4\u6539\u7ba1\u7406\u5458\u5bc6\u7801\uff0c\u5982\u679c\u60a8\u8ba4\u4e3a\u8fd9\u662f\u4e0d\u53ef\u63a5\u53d7\u7684\u5b89\u5168\u98ce\u9669\u3002 \u6216\u8005\u60a8\u53ef\u4ee5\u9009\u62e9\u4e0d\u8bbe\u7f6e\u5bc6\u7801\uff0c\u5e76\u8bbe\u7f6e\u968f\u673a\u5bc6\u7801\u3002<\/p>\n<p style=\"text-align: justify;\"><a href=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2019\/11\/1528255900251141.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2910\" title=\"1528255900251141.jpg\" src=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2019\/11\/1528255900251141.jpg\" alt=\"aws-***-appliance-11.jpg\" width=\"640\" height=\"397\" srcset=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2019\/11\/1528255900251141.jpg 640w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2019\/11\/1528255900251141-300x186.jpg 300w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2019\/11\/1528255900251141-484x300.jpg 484w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><\/p>\n<p class=\"first\">1.\u5b58\u50a8\u8bbe\u5907\u914d\u7f6e\u5b8c\u6210\u540e\uff0c\u5355\u51fb <code class=\"docutils literal notranslate\"><span class=\"pre\">Next:<\/span>\u00a0<span class=\"pre\">Tag<\/span>\u00a0<span class=\"pre\">Instance<\/span><\/code>\u00a0\u3002<\/p>\n<p><a href=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2019\/11\/1528255906223089.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2911\" title=\"1528255906223089.jpg\" src=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2019\/11\/1528255906223089.jpg\" alt=\"aws-***-appliance-12.jpg\" width=\"640\" height=\"400\" srcset=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2019\/11\/1528255906223089.jpg 640w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2019\/11\/1528255906223089-300x188.jpg 300w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2019\/11\/1528255906223089-480x300.jpg 480w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><\/p>\n<p class=\"first\">2.\u53ef\u4ee5\u5728\u5b9e\u4f8b\u4e0a\u8bbe\u7f6e\u4e00\u4e2a\u6807\u8bb0\uff0c\u4ee5\u4fbf\u901a\u8fc7\u4e3a <code class=\"docutils literal notranslate\"><span class=\"pre\">Name<\/span><\/code>\u00a0\u6807\u8bb0\u8f93\u5165\u4e00\u4e2a\u503c\u6765\u533a\u5206\u6b64\u5b9e\u4f8b\u4e0e\u60a8\u5df2\u542f\u52a8\u7684\u5176\u4ed6VM\u3002\u8bbe\u7f6e\u4efb\u4f55\u6240\u9700\u7684\u6807\u7b7e\u540e\uff0c\u5355\u51fb\u00a0<code class=\"docutils literal notranslate\"><span class=\"pre\">Next:<\/span>\u00a0<span class=\"pre\">Configure<\/span>\u00a0<span class=\"pre\">Security<\/span>\u00a0<span class=\"pre\">Group<\/span><\/code>\u00a0\u3002<\/p>\n<p><a href=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2019\/11\/1528255912968826.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2912\" title=\"1528255912968826.jpg\" src=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2019\/11\/1528255912968826.jpg\" alt=\"aws-***-appliance-13.jpg\" width=\"640\" height=\"417\" srcset=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2019\/11\/1528255912968826.jpg 640w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2019\/11\/1528255912968826-300x195.jpg 300w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2019\/11\/1528255912968826-460x300.jpg 460w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><\/p>\n<p class=\"first\">3.\u9009\u62e9\u4e00\u4e2a\u5b89\u5168\u7ec4\u4ee5\u542f\u52a8\u5b9e\u4f8b\u3002\u63a8\u8350\u7684\u5b89\u5168\u7ec4\u8bbe\u7f6e\u5e94\u81f3\u5c11\u5141\u8bb8\u4ee5\u4e0b\u6d41\u91cf\uff1a<\/p>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li style=\"list-style-type: none;\">\n<ul class=\" list-paddingleft-2\">\n<li>TCP port 443 from 0.0.0.0\/0 &#8211; HTTPS &#8211; \u8fd9\u662f\u7ba1\u7406Web GUI\u4fa6\u542c\u7684\u7aef\u53e3\u3002<\/li>\n<li>TCP port 22 from 0.0.0.0\/0 &#8211; SSH &#8211; \u6b64\u7aef\u53e3\u53ef\u7528\u4e8e\u901a\u8fc7ssh\u5ba2\u6237\u7aef\u8fde\u63a5\u5230\u547d\u4ee4\u63d0\u793a\u7b26\u3002<\/li>\n<li>UDP port 1194 from 0.0.0.0\/0 &#8211; OpenVPN &#8211; \u9ed8\u8ba4\u914d\u7f6e\u7684OpenVPN\u670d\u52a1\u5668\u7ed1\u5b9a\u5230\u6b64\u7aef\u53e3\u3002<\/li>\n<li>UDP port 500 from 0.0.0.0\/0 &#8211; IPSec VPN\u7684IKE<\/li>\n<li>UDP port 4500 from 0.0.0.0\/0 &#8211; \u7528\u4e8eIPsec VPN\u7684IPsec \/ NAT-T\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p style=\"text-align: justify;\"><a href=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2019\/11\/1528255921317568.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2913\" title=\"1528255921317568.jpg\" src=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2019\/11\/1528255921317568.jpg\" alt=\"aws-***-appliance-14.jpg\" width=\"640\" height=\"396\" srcset=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2019\/11\/1528255921317568.jpg 640w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2019\/11\/1528255921317568-300x186.jpg 300w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2019\/11\/1528255921317568-485x300.jpg 485w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><\/p>\n<p style=\"text-align: justify;\">\u5982\u679c\u60a8\u6709\u4e00\u4e2a\u5305\u542b\u6b64\u8bbf\u95ee\u6743\u9650\u7684\u73b0\u6709\u5b89\u5168\u7ec4\uff0c \u9009\u62e9Select\u00a0an\u00a0existing\u00a0security\u00a0group, \u7136\u540e\u9009\u62e9\u8981\u4f7f\u7528\u7684\u7ec4\u5e76\u5355\u51fb\u00a0Continue\uff08\u7ee7\u7eed\uff09\u3002 \u5426\u5219\uff0c\u8bf7\u9009\u62e9Create\u00a0a\u00a0new\u00a0security\u00a0group, \u5e76\u4e3a\u6b64\u8bbf\u95ee\u6dfb\u52a0\u89c4\u5219\uff0c\u65b9\u6cd5\u662f\u586b\u5199\u6bcf\u4e2a\u89c4\u5219\u7684\u8868\u5355\u5e76\u5355\u51fbAdd\u00a0Rule\u00a0\u6309\u94ae\u3002\u5f53\u6240\u6709\u89c4\u5219\u90fd\u88ab\u6dfb\u52a0\u540e, \u5355\u51fbReview\u00a0and\u00a0Launch\u3002<\/p>\n<p class=\"first\">1.\u9a8c\u8bc1\u5b9e\u4f8b\u7684\u8be6\u7ec6\u4fe1\u606f\u5e76\u5355\u51fb<code class=\"docutils literal notranslate\"><span class=\"pre\">Launch<\/span><\/code>\u3002<\/p>\n<p><a href=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2019\/11\/1528255929578923.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2914\" title=\"1528255929578923.jpg\" src=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2019\/11\/1528255929578923.jpg\" alt=\"aws-***-appliance-15.jpg\" width=\"640\" height=\"395\" srcset=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2019\/11\/1528255929578923.jpg 640w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2019\/11\/1528255929578923-300x185.jpg 300w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2019\/11\/1528255929578923-486x300.jpg 486w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><\/p>\n<p class=\"first\">2.\u9009\u62e9\u4e00\u4e2a\u73b0\u6709\u7684\u5bc6\u94a5\u5bf9\u6216\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u5bc6\u94a5\u5bf9\u4ee5\u8fde\u63a5\u5230\u5b9e\u4f8b\u3002\u4e0d\u8981\u9009\u62e9<code class=\"docutils literal notranslate\"><span class=\"pre\">Proceed<\/span>\u00a0<span class=\"pre\">Without<\/span>\u00a0<span class=\"pre\">a<\/span>\u00a0<span class=\"pre\">Key<\/span>\u00a0<span class=\"pre\">Pair<\/span><\/code>\u3002 \u70b9\u51fb\u590d\u9009\u6846\uff0c\u8868\u793a\u60a8\u786e\u8ba4\u60a8\u6709\u6743\u8bbf\u95ee\u6240\u9009\u79c1\u94a5\u6587\u4ef6\uff0c\u7136\u540e\u5355\u51fb<code class=\"docutils literal notranslate\"><span class=\"pre\">Launch<\/span>\u00a0<span class=\"pre\">Instance<\/span><\/code>\u3002<\/p>\n<p><a href=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2019\/11\/1528255935978938.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2915\" title=\"1528255935978938.jpg\" src=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2019\/11\/1528255935978938.jpg\" alt=\"aws-***-appliance-16.jpg\" width=\"640\" height=\"362\" srcset=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2019\/11\/1528255935978938.jpg 640w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2019\/11\/1528255935978938-300x170.jpg 300w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2019\/11\/1528255935978938-500x283.jpg 500w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><\/p>\n<h1 style=\"text-align: justify;\"><\/h1>\n<h1 style=\"text-align: justify;\">\u5b9e\u4f8b\u914d\u7f6e<\/h1>\n<p style=\"text-align: justify;\">\u5b9e\u4f8b\u542f\u52a8\u540e\uff0c\u60a8\u53ef\u4ee5\u5728EC2\u7ba1\u7406\u63a7\u5236\u53f0\u7684Instances\u9875\u9762\u4e0a\u76d1\u89c6\u5176\u72b6\u6001\u3002 EC2\u7ba1\u7406\u63a7\u5236\u53f0\u5c06\u663e\u793a\u5b9e\u4f8b\u662f\u5426\u5df2\u542f\u52a8\u5e76\u4e14\u53ef\u4ee5\u8bbf\u95ee\uff0c\u5e76\u4e14\u8fd8\u5c06\u663e\u793a\u5176\u5f53\u524d\u516c\u5171IP\u5730\u5740\u548c\u89e3\u6790\u4e3a\u516c\u5171IP\u5730\u5740\u7684\u4e3b\u673a\u540d\u3002 \u60a8\u53ef\u4ee5\u5728EC2\u63a7\u5236\u53f0\u4e2d\u627e\u5230\u4e3b\u673a\u540d\u548c\u516c\u5171IP\u5730\u5740\uff0c\u65b9\u6cd5\u662f\u5355\u51fb\u5de6\u4fa7\u7684Instances\u6807\u9898\uff0c\u67e5\u627e\u5b9e\u4f8b\u5e76\u68c0\u67e5\u5176\u65c1\u8fb9\u7684\u590d\u9009\u6846\uff0c\u7136\u540e\u67e5\u770b\u9875\u9762\u5e95\u90e8\u7684\u8be6\u7ec6\u4fe1\u606f\u3002<\/p>\n<p style=\"text-align: justify;\"><a href=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2019\/11\/1528255943873859.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2916\" title=\"1528255943873859.jpg\" src=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2019\/11\/1528255943873859.jpg\" alt=\"aws-***-appliance-17.jpg\" width=\"640\" height=\"260\" srcset=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2019\/11\/1528255943873859.jpg 640w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2019\/11\/1528255943873859-300x122.jpg 300w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2019\/11\/1528255943873859-500x203.jpg 500w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><\/p>\n<p style=\"text-align: justify;\">\u5728\u4e0a\u9762\u7684\u4f8b\u5b50\u4e2d\uff0c\u5b9e\u4f8b\u7684\u4e3b\u673a\u540d\u662f\u00a0<code class=\"docutils literal notranslate\"><span class=\"pre\">ec2-23-20-204-54.compute-1.amazonaws.com<\/span><\/code>\u3002\u4e3b\u673a\u540d\u4e2d\u5305\u542b\u76844\u4e2a\u53f7\u7801\u662f\u516c\u5171IP\u5730\u5740 &#8211;\u00a0<code class=\"docutils literal notranslate\"><span class=\"pre\">23.20.204.54<\/span><\/code>\u3002 \u60a8\u8fd8\u53ef\u4ee5\u4f7f\u7528\u6d41\u884c\u7684DNS\u67e5\u627e\u5de5\u5177\uff08\u4f8b\u5982host\uff0cdig\u6216nslookup\uff09\u5c06\u4e3b\u673a\u540d\u89e3\u6790\u4e3a\u5176IP\u5730\u5740\u6765\u83b7\u53d6IP\u5730\u5740\u3002<\/p>\n<p class=\"first admonition-title\" style=\"text-align: justify;\">\u6ce8\u610f<\/p>\n<p class=\"last\" style=\"text-align: justify;\">\u672c\u6307\u5357\u4f8b\u5b50\u548c\u5176\u4ed6\u4f8b\u5b50\u4e2d\u4f7f\u7528\u7684\u4e3b\u673a\u540d\u548cIP\u5730\u5740\u5728\u7f16\u5199\u65f6\u4e0e\u4e00\u4e2a\u6d4b\u8bd5\u5b9e\u4f8b\u76f8\u5173\u8054\u3002 \u8fd9\u4e2a\u5730\u5740\/\u4e3b\u673a\u540d\u5c06\u4e0d\u4f1a\u4e0e\u4f60\u7528\u4e8e\u8bbf\u95ee\u5b9e\u4f8b\u7684\u503c\u76f8\u540c\uff0c\u5e76\u4e14\u5728\u672c\u6307\u5357\u5411\u516c\u4f17\u516c\u5f00\u65f6\u751a\u81f3\u4e0d\u4f1a\u4e0e\u540c\u4e00\u6d4b\u8bd5\u5b9e\u4f8b\u5173\u8054\u3002<\/p>\n<p style=\"text-align: justify;\">\u4e3a\u4e86\u7ba1\u7406\u5b9e\u4f8b\u7684\u914d\u7f6e\uff0c\u4f60\u4e5f\u53ef\u4ee5\u901a\u8fc7https\u6216ssh\u8fdb\u884c\u8fde\u63a5\u3002 \u8981\u901a\u8fc7ssh\u8fde\u63a5\uff0c\u53ef\u4ee5\u4f7f\u7528\u4f60\u5728\u521b\u5efa\u5b9e\u4f8b\u65f6\u9009\u62e9\u7684\u5bc6\u94a5\u5bf9\u6765\u8fde\u63a5\u5230\u7ba1\u7406\u5458\u5e10\u6237\u3002 \u4eceUnix \/ Linux\u4e3b\u673a\u4e0a\u7684\u547d\u4ee4\u884c\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528\u7c7b\u4f3c\u7684\u547d\u4ee4\uff1a<code class=\"docutils literal notranslate\"><span class=\"pre\">ssh<\/span>\u00a0<span class=\"pre\">-i<\/span>\u00a0<span class=\"pre\">my_key_file<\/span>\u00a0<span class=\"pre\">admin@public_IP<\/span><\/code>,\u00a0\u66ff\u6362\u79c1\u94a5\u6587\u4ef6\u548c\u516c\u5171IP\u6216\u4e3b\u673a\u540d\u5c31\u53ef\u4ee5\u3002 \u5728\u4e0b\u9762\u7684\u793a\u4f8b\u4e2d\uff0c\u5bc6\u94a5\u6587\u4ef6my_ec2_key\u7528\u4e8e\u8fde\u63a5\u5230IP\u5730\u574023.20.204.54\u3002 \u8bf7\u6ce8\u610f\uff0c\u5f53\u7b2c\u4e00\u6b21\u767b\u5f55\u4f60\u7684\u5b9e\u4f8b\u65f6\uff0c\u5b9e\u4f8b\u7684ssh\u5bc6\u94a5\u5c06\u4e0d\u4f1a\u7f13\u5b58\u5728\u672c\u5730\u8ba1\u7b97\u673a\u4e0a\uff0c\u5e76\u4e14\u5728\u8be2\u95ee\u4f60\u662f\u5426\u8981\u7ee7\u7eed\u8fde\u63a5\u65f6\u9700\u8981\u8f93\u5165yes\uff0c \u540e\u7eed\u8fde\u63a5\u5c31\u4e0d\u4f1a\u518d\u8be2\u95ee\u4e86\u3002<\/p>\n<p style=\"text-align: justify;\"><a href=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2019\/11\/1528255950790550.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2917\" title=\"1528255950790550.jpg\" src=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2019\/11\/1528255950790550.jpg\" alt=\"aws-***-appliance-18.jpg\" width=\"684\" height=\"480\" srcset=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2019\/11\/1528255950790550.jpg 684w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2019\/11\/1528255950790550-300x211.jpg 300w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2019\/11\/1528255950790550-428x300.jpg 428w\" sizes=\"auto, (max-width: 684px) 100vw, 684px\" \/><\/a><\/p>\n<p style=\"text-align: justify;\">\u901a\u8fc7ssh\u63a5\u53e3\u53ef\u4ee5\u5b9e\u73b0\u4e00\u7ec4\u6709\u9650\u7684\u914d\u7f6e\u3002 \u7ba1\u7406\u5927\u90e8\u5206\u914d\u7f6e\u6216\u67e5\u770bNetgate pfSense\u5b9e\u4f8b\u72b6\u6001\u6570\u636e\u7684\u9996\u9009\u65b9\u6cd5\u662f\u901a\u8fc7https web GUI\u3002 \u8981\u901a\u8fc7https\u8fde\u63a5\uff0c\u60a8\u9700\u8981\u5728Web\u6d4f\u89c8\u5668\u4e2d\u8f93\u5165https\uff1a\/\/\u5305\u542b\u60a8\u7684\u5b9e\u4f8b\u7684\u516c\u6709IP\u5730\u5740\u6216\u4e3b\u673a\u540d\u7684URL\u3002 \u4f8b\u5982\uff0c<a href=\"https:\/\/23.20.204.54\/\">https:\/\/23.20.204.54\u3002<\/a>\u00a0\u5f88\u53ef\u80fd\u4f1a\u6536\u5230\u6d4f\u89c8\u5668\u8b66\u544a\uff0c\u6307\u51fa\u8be5\u7f51\u7ad9\u7684\u5b89\u5168\u8bc1\u4e66\u4e0d\u53ef\u4fe1\u3002 \u8fd9\u662f\u56e0\u4e3a\u5b9e\u4f8b\u4e3ahttps\u901a\u4fe1\u4f7f\u7528\u81ea\u7b7e\u540d\u8bc1\u4e66\uff0c\u70b9\u51fb\u8be5\u9009\u9879\u7ee7\u7eed\u8fdb\u5165\u8be5\u7f51\u7ad9\u3002 \u5e94\u51fa\u73b0\u5e26\u6709Netgate\u5fbd\u6807\u7684\u767b\u5f55\u5c4f\u5e55\u3002<\/p>\n<p style=\"text-align: justify;\"><a href=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2019\/11\/1528255963347087.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2918\" title=\"1528255963347087.jpg\" src=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2019\/11\/1528255963347087.jpg\" alt=\"aws-***-appliance-19.jpg\" width=\"640\" height=\"533\" srcset=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2019\/11\/1528255963347087.jpg 640w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2019\/11\/1528255963347087-300x250.jpg 300w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2019\/11\/1528255963347087-360x300.jpg 360w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><\/p>\n<p style=\"text-align: justify;\">\u7528\u4e8e\u767b\u5f55\u7684\u7528\u6237\u540d\u662fadmin\u3002 \u8981\u4f7f\u7528\u7684\u5bc6\u7801\u662f\u5728\u521b\u5efa\u5b9e\u4f8b\u671f\u95f4\u5728\u7528\u6237\u6570\u636e\u4e2d\u8bbe\u7f6e\u7684\u503c\u6216\u968f\u673a\u5bc6\u7801\u3002 \u5982\u679c\u4f60\u6ca1\u6709\u8bbe\u7f6e\u7279\u5b9a\u7684\u5bc6\u7801\uff0c\u4f60\u53ef\u4ee5\u901a\u8fc7\u4e24\u79cd\u4e0d\u540c\u7684\u65b9\u5f0f\u627e\u51fa\u968f\u673a\u5bc6\u7801\u8bbe\u7f6e\u7684\u503c\u3002 \u9996\u5148\u662f\u4f7f\u7528\u60a8\u5728\u521b\u5efa\u5b9e\u4f8b\u65f6\u9009\u62e9\u7684\u5bc6\u94a5\u5bf9\u901a\u8fc7ssh\u767b\u5f55\uff0c\u5e76\u68c0\u67e5\u4f4d\u4e8e\/etc\/motd\u7684\u6587\u4ef6\u7684\u5185\u5bb9\u3002 \u60a8\u53ef\u4ee5\u901a\u8fc7\u4ece\u63a7\u5236\u53f0\u83dc\u5355\u4e2d\u9009\u62e9\u9009\u98798\uff08Shell\uff09\u6765\u6267\u884c\u6b64\u64cd\u4f5c\uff0c\u8be5\u9009\u9879\u5728\u60a8\u767b\u5f55\u5e76\u4eceshell\u6267\u884c<span class=\"pre\">cat<\/span>\u00a0<span class=\"pre\">\/etc\/motd<\/span>\u65f6\u663e\u793a\u3002 \u6216\u8005\uff0c\u60a8\u53ef\u4ee5\u5728EC2\u7ba1\u7406\u63a7\u5236\u53f0\u4e2d\u67e5\u770b\u5b9e\u4f8b\u7684\u7cfb\u7edf\u65e5\u5fd7\u3002 \u5728\u663e\u793a\u5f15\u5bfc\u8fc7\u7a0b\u72b6\u6001\u7684\u6d88\u606f\u4e4b\u540e\uff0c\u5e94\u8be5\u4f1a\u663e\u793a\u4e00\u6761\u6d88\u606f\uff0c\u6307\u51fa\u7ba1\u7406\u5bc6\u7801\u5df2\u66f4\u6539\u4e3a\u4ec0\u4e48\u3002<\/p>\n<p style=\"text-align: justify;\">\u4f7f\u7528\u4e0a\u9762\u63d0\u5230\u7684\u4efb\u4f55\u4e00\u79cd\u65b9\u6cd5\u5bfb\u627e\u7684\u4fe1\u606f\u5982\u4e0b\u6240\u793a\uff1a<\/p>\n<pre>***\r\n***\r\n***\u00a0Admin\u00a0password\u00a0changed\u00a0to:\u00a0abcdefg\r\n***\r\n***<\/pre>\n<p style=\"text-align: justify;\">\u5728\u6b64\u793a\u4f8b\u4e2d\uff0c\u5bc6\u7801\u5df2\u66f4\u6539\u4e3aabcdefg\u3002<\/p>\n<p style=\"text-align: justify;\">\u8bf7\u6ce8\u610f\uff0cEC2\u7ba1\u7406\u63a7\u5236\u53f0\u4e2d\u7684\u7cfb\u7edf\u65e5\u5fd7\u8f93\u51fa\u6ca1\u6709\u5b9e\u65f6\u66f4\u65b0\uff0c\u53ef\u80fd\u9700\u8981\u51e0\u5206\u949f\u624d\u80fd\u663e\u793a\u3002 \u6700\u597d\u901a\u8fc7\u5728\u7528\u6237\u6570\u636e\u5b57\u6bb5\u4e2d\u4f20\u5165\u503c\u6765\u663e\u793a\u8bbe\u7f6e\u5bc6\u7801\uff0c\u4ee5\u4fbf\u4e8b\u5148\u77e5\u9053\u5bc6\u7801\u3002 \u5982\u679c\u4f60\u60f3\u5141\u8bb8\u8bbe\u7f6e\u4e00\u4e2a\u968f\u673a\u5bc6\u7801\uff0c\u4f60\u5e94\u8be5\u901a\u8fc7ssh\u8fdb\u884c\u8fde\u63a5\uff0c\u5e76\u5728\u5b9e\u4f8b\u542f\u52a8\u540e\u627e\u51fa\u5bc6\u7801\u66f4\u6539\u7684\u5185\u5bb9\uff0c\u800c\u4e0d\u4f1a\u6709\u4efb\u4f55\u5ef6\u8fdf\u3002<\/p>\n<p style=\"text-align: justify;\">\u786e\u5b9a\u5bc6\u7801\u5e76\u5c06\u5176\u8f93\u5165\u767b\u5f55\u8868\u5355\u540e\uff0c\u5c31\u8fdb\u5165\u4e86pfSense Web GUI\u83dc\u5355\u3002<\/p>\n<h1 style=\"text-align: justify;\">\u4f7f\u7528\u8fdc\u7a0b\u8bbf\u95eeIPsec VPN<\/h1>\n<p style=\"text-align: justify;\">\u5f53\u5b9e\u4f8b\u8fd0\u884c\u65f6\uff0c\u5c06\u4e3a\u8fdc\u7a0b\u7528\u6237\u9884\u5148\u914d\u7f6e\u4e00\u4e2aIPsec VPN\u3002 \u4e3a\u4e86\u4f7f\u7528\u5b83\uff0c\u4f60\u5c06\u9700\u8981\u5728\u4f60\u7684\u8bbe\u5907\u4e0a\u914d\u7f6eIPsec VPN\u5ba2\u6237\u7aef\u3002 \u624b\u52a8\u914d\u7f6eAndroid\u6216iOS\uff08iPhone \/ iPod \/ iPad\uff09\u79fb\u52a8\u5ba2\u6237\u7aef\u4ee5\u5efa\u7acbIPsec VPN\u3002<\/p>\n<p style=\"text-align: justify;\"><a href=\"https:\/\/doc.pfsense.org\/index.php\/Mobile_IPsec_on_2.0\">https:\/\/doc.pfsense.org\/index.php\/Mobile_IPsec_on_2.0<\/a><\/p>\n<p style=\"text-align: justify;\">\u5bf9\u4e8eiOS\u5ba2\u6237\u7aef\uff0c\u53ef\u4e0b\u8f7d\u5e76\u5b89\u88c5\u4e00\u4e2a\u914d\u7f6e\u6587\u4ef6\uff0c\u8be5\u914d\u7f6e\u6587\u4ef6\u5c06\u81ea\u52a8\u4e3a\u8be5\u5b9e\u4f8b\u914d\u7f6e\u4e00\u4e2aIPsec VPN\u3002 \u53ef\u4ee5\u901a\u8fc7\u8bbf\u95ee\u5b9e\u4f8b\u4e0a\u7684\/iphone_ipsec_profile.php\u9875\u9762\u6765\u4e0b\u8f7d\u914d\u7f6e\u6587\u4ef6\u3002 \u5982\u679c\u5b9e\u4f8bIP\u5730\u5740\u4e3a23.20.204.54\uff0c\u5219\u8bbf\u95ee\u7684\u6b63\u786eURL\u5c06\u4e3a<a href=\"https:\/\/23.20.204.54\/iphone_ipsec_profile.php\">https:\/\/23.20.204.54\/iphone_ipsec_profile.php<\/a>.\u3002 \u5728\u80fd\u591f\u4e0b\u8f7d\u914d\u7f6e\u6587\u4ef6\u4e4b\u524d\uff0c\u60a8\u9700\u8981\u8f93\u5165\u7528\u6237\u540d\uff08admin\uff09\u548c\u5bc6\u7801\uff0c\u624d\u80fd\u901a\u8fc7Web\u754c\u9762\u8fdb\u884c\u8eab\u4efd\u9a8c\u8bc1\u3002<\/p>\n<p style=\"text-align: justify;\">\u5e94\u5728\u6253\u5f00\u9875\u9762\u65f6\u81ea\u52a8\u4e0b\u8f7d\u5e76\u4fdd\u5b58\u914d\u7f6e\u6587\u4ef6\u3002 \u5982\u679c\u5728iOS\u8bbe\u5907\u4e0a\u7684\u7f51\u7edc\u6d4f\u89c8\u5668\u4e2d\u8bbf\u95ee\u8be5\u9875\u9762\uff0c\u8bbe\u5907\u5e94\u81ea\u52a8\u542f\u52a8\u8bbe\u7f6e\u5e94\u7528\u7a0b\u5e8f\u5e76\u5c1d\u8bd5\u5b89\u88c5\u65b0\u7684\u914d\u7f6e\u6587\u4ef6\u3002 \u5982\u679c\u914d\u7f6e\u6587\u4ef6\u88ab\u4e0b\u8f7d\u5230\u53e6\u4e00\u4e2a\u975eiOS\u8bbe\u5907\uff0c\u5b83\u53ef\u4ee5\u901a\u8fc7\u7535\u5b50\u90ae\u4ef6\u4f5c\u4e3a\u9644\u4ef6\u53d1\u9001\u3002 \u5982\u679c\u5728iOS\u7535\u5b50\u90ae\u4ef6\u5ba2\u6237\u7aef\u4e2d\u6253\u5f00\u9644\u4ef6\uff0c\u5219\u4e5f\u4f1a\u6253\u5f00\u8bbe\u7f6e\u5e94\u7528\u7a0b\u5e8f\u65b0\u914d\u7f6e\u6587\u4ef6\u5b89\u88c5\u3002<\/p>\n<p style=\"text-align: justify;\"><a href=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2019\/11\/1528255974236278.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-2919 alignnone\" title=\"1528255974236278.jpg\" src=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2019\/11\/1528255974236278.jpg\" alt=\"aws-***-appliance-20.jpg\" width=\"213\" height=\"320\" srcset=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2019\/11\/1528255974236278.jpg 213w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2019\/11\/1528255974236278-200x300.jpg 200w\" sizes=\"auto, (max-width: 213px) 100vw, 213px\" \/><\/a><\/p>\n<p style=\"text-align: justify;\">\u5c06\u663e\u793a\u6b63\u5728\u5b89\u88c5\u7684\u914d\u7f6e\u6587\u4ef6\u7684\u540d\u79f0\u548c\u8bf4\u660e\u3002\u70b9\u51fb\u5b89\u88c5\u6309\u94ae\u3002\u5c06\u663e\u793a\u8b66\u544a\u6d88\u606f\uff0c\u6307\u793a\u914d\u7f6e\u6587\u4ef6\u672a\u7b7e\u540d\u3002\u70b9\u51fb\u7acb\u5373\u5b89\u88c5\u4ee5\u7ee7\u7eed\u3002<\/p>\n<p style=\"text-align: justify;\"><a href=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2019\/11\/1528255980948233.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-2920 alignnone\" title=\"1528255980948233.jpg\" src=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2019\/11\/1528255980948233.jpg\" alt=\"aws-***-appliance-21.jpg\" width=\"213\" height=\"320\" srcset=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2019\/11\/1528255980948233.jpg 213w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2019\/11\/1528255980948233-200x300.jpg 200w\" sizes=\"auto, (max-width: 213px) 100vw, 213px\" \/><\/a><\/p>\n<p style=\"text-align: justify;\">\u8f93\u5165\u60a8\u7684iOS\u8bbe\u5907\u5bc6\u7801\uff08\u5f53\u4f60\u5c06\u8bbe\u5907\u4ece\u7761\u7720\u4e2d\u5524\u9192\u65f6\u8f93\u5165\u7684\u5bc6\u7801\uff09\u548c\u8bbf\u95eeIPsec VPN\u5bc6\u7801\uff08\u60a8\u4e3a\u8bbf\u95eeWeb GUI\u800c\u8f93\u5165\u7684\u5bc6\u7801\uff09\uff0c\u5e76\u63d0\u793a\u5b89\u88c5\u914d\u7f6e\u6587\u4ef6\u3002 \u5f53\u5c4f\u5e55\u663e\u793a\u914d\u7f6e\u6587\u4ef6\u5df2\u5b89\u88c5\u65f6\uff0c\u70b9\u51fb\u5b8c\u6210\u3002<\/p>\n<p style=\"text-align: justify;\"><a href=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2019\/11\/1528255987145500.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-2921 alignnone\" title=\"1528255987145500.jpg\" src=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2019\/11\/1528255987145500.jpg\" alt=\"aws-***-appliance-22.jpg\" width=\"213\" height=\"320\" srcset=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2019\/11\/1528255987145500.jpg 213w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2019\/11\/1528255987145500-200x300.jpg 200w\" sizes=\"auto, (max-width: 213px) 100vw, 213px\" \/><\/a><\/p>\n<p style=\"text-align: justify;\">\u5b89\u88c5\u914d\u7f6e\u6587\u4ef6\u540e\uff0c\u53ef\u4ee5\u5728\u201c\u8bbe\u7f6e\u201d\u5e94\u7528\u7a0b\u5e8f\u4e2d\u542f\u7528VPN\u3002 \u4e3b\u8bbe\u7f6e\u9875\u9762\u4e0b\u4f1a\u6709\u4e00\u4e2a\u540d\u4e3aVPN\u7684\u6807\u9898\u3002 \u5982\u679c\u8bbe\u5907\u4e0a\u914d\u7f6e\u4e86\u591a\u4e2aVPN\uff0c\u8bf7\u70b9\u51fbVPN\u6807\u9898\uff0c\u9009\u62e9\u65b0\u5b89\u88c5\u7684\u914d\u7f6e\u6587\u4ef6\u3002 \u5b83\u65c1\u8fb9\u4f1a\u6709\u4e00\u4e2a\u590d\u9009\u6807\u8bb0\u3002 \u5728\u9875\u9762\u9876\u90e8\u4f1a\u6709\u4e00\u4e2a\u5f00\/\u5173\u5f00\u5173\u6765\u542f\u7528VPN\u3002 \u5982\u679c\u8fd9\u662f\u552f\u4e00\u914d\u7f6e\u7684VPN\uff0c\u5219\u542f\u7528VPN\u7684\u5f00\u5173\u5c06\u4f4d\u4e8e\u4e3b\u8bbe\u7f6e\u9875\u9762\u4e0a\u7684VPN\u6807\u9898\u65c1\u8fb9\u3002 \u70b9\u51fb\u5f00\u5173\u542f\u7528VPN\u3002 \u5e94\u8be5\u63d0\u793a\u60a8\u8f93\u5165\u7528\u6237\u540d\u548c\u5bc6\u7801\u3002 \u7528\u6237\u540d\uff08admin\uff09\u5e94\u8be5\u5df2\u7ecf\u586b\u5165\u3002\u8f93\u5165\u5bc6\u7801\u5e76\u70b9\u51fb\u786e\u5b9a\u3002 \u663e\u793a\u6b22\u8fce\u6d88\u606f\u3002 \u70b9\u51fb\u786e\u5b9a\uff0c\u4f60\u5c31\u53ef\u4ee5\u4f7f\u7528VPN\u4e86\u3002<\/p>\n<h1 style=\"text-align: justify;\">\u4f7f\u7528\u8fdc\u7a0b\u8bbf\u95eeOpenVPN\u00a0VPN<\/h1>\n<p style=\"text-align: justify;\">\u9996\u6b21\u542f\u52a8\u5b9e\u4f8b\u65f6\uff0c\u5c06\u81ea\u52a8\u914d\u7f6e\u7528\u4e8e\u8fdc\u7a0b\u7528\u6237\u7684OpenVPN VPN\u3002 \u4e3a\u4e86\u4f7f\u7528\u5b83\uff0c\u60a8\u9700\u8981\u5728\u8bbe\u5907\u4e0a\u5b89\u88c5OpenVPN\u5ba2\u6237\u7aef\u5e94\u7528\u7a0b\u5e8f\uff0c\u5e76\u4e14\u60a8\u9700\u8981\u5bfc\u5165\u6307\u5b9a\u5982\u4f55\u8fde\u63a5\u5230\u5b9e\u4f8b\u7684\u914d\u7f6e\u3002<\/p>\n<p style=\"text-align: justify;\">OpenVPN\u914d\u7f6e\u53ef\u4ee5\u901a\u8fc7\u8bbf\u95ee\u5b9e\u4f8b\u4e0a\u7684\/openVPN_connect_profile.php\u9875\u9762\u6765\u4e0b\u8f7d\u3002 \u5982\u679c\u5b9e\u4f8bIP\u5730\u5740\u4e3a23.30.204.54\uff0c\u5219\u8bbf\u95ee\u7684\u6b63\u786eURL\u5c06\u4e3a<a class=\"reference external\" href=\"https:\/\/23.20.204.54\/iphone_ipsec_profile.php\">https:\/\/23.20.204.54\/iphone_ipsec_profile.php<\/a>.\u3002 \u5728\u88ab\u5141\u8bb8\u4e0b\u8f7d\u914d\u7f6e\u4e4b\u524d\uff0c\u60a8\u9700\u8981\u8f93\u5165\u7528\u6237\u540d\uff08admin\uff09\u548c\u5bc6\u7801\u6765\u9a8c\u8bc1Web\u754c\u9762\u3002<\/p>\n<p style=\"text-align: justify;\">\u5e94\u5728\u6253\u5f00\u9875\u9762\u65f6\u81ea\u52a8\u4e0b\u8f7d\u5e76\u4fdd\u5b58\u914d\u7f6e\u6587\u4ef6\u3002\u5b83\u4fdd\u5b58\u7684\u6587\u4ef6\u5e94\u8be5\u88ab\u5bfc\u5165\u5230\u4f60\u5e0c\u671b\u8fde\u63a5\u7684\u8bbe\u5907\u4e0a\u7684OpenVPN\u5ba2\u6237\u7aef\u3002<\/p>\n<h2 style=\"text-align: justify;\">\u5728\u4e00\u4e9b\u5e38\u7528\u5e73\u53f0\/\u5ba2\u6237\u7aef\u4e0a\u914d\u7f6eOpenVPN\u7684\u63d0\u793a<\/h2>\n<h3 style=\"text-align: justify;\">iOS\u4e0a\u7684OpenVPN \u8fde\u63a5 App\uff08iPhone \/ iPad \/ iPod\uff09<\/h3>\n<p style=\"text-align: justify;\">iOS\u7248\u672c\u7684OpenVPN \u8fde\u63a5\u00a0App\u5141\u8bb8\u60a8\u901a\u8fc7\u6253\u5f00\u7535\u5b50\u90ae\u4ef6\u9644\u4ef6\u6765\u5bfc\u5165OpenVPN\u914d\u7f6e\u6587\u4ef6\u3002 \u5c06\u8be5\u914d\u7f6e\u4fdd\u5b58\u5230\u540d\u4e3aremote-access-VPN.ovpn\u7684\u6587\u4ef6\u4e2d\uff0c\u5e76\u5c06\u5176\u53d1\u9001\u5230iOS\u8bbe\u5907\u914d\u7f6e\u4e3a\u68c0\u7d22\u90ae\u4ef6\u7684\u7535\u5b50\u90ae\u4ef6\u5e10\u6237\u3002 \u6253\u5f00\u7535\u5b50\u90ae\u4ef6\u5e76\u89e6\u6478\u9644\u4ef6\u6253\u5f00\u5b83\u3002 \u4f5c\u4e3a\u53ef\u7528\u9009\u9879\u4e4b\u4e00\uff0c\u60a8\u5c06\u5728OpenVPN\u4e2d\u83b7\u5f97Open\u3002 \u89e6\u6478OpenVPN\u56fe\u6807\u4ee5\u9009\u62e9\u8be5\u9009\u9879\u3002 \u7136\u540e\uff0cOpenVPN \u8fde\u63a5\u5e94\u7528\u7a0b\u5e8f\u5e94\u8be5\u6253\u5f00\u5e76\u5217\u51fa\u4e00\u4e2a\u6807\u9898\u4e0b\u7684\u65b0\u914d\u7f6e\u6587\u4ef6\u53ef\u7528&#8230;.\u5355\u51fb\u5e26\u6709+\u53f7\u7684\u7eff\u8272\u7403\u6765\u5bfc\u5165\u914d\u7f6e\u6587\u4ef6\u3002 \u8f93\u5165\u7528\u6237\u540d\uff08admin\uff09\u548c\u5bc6\u7801\uff0c\u5e76\u5c06On \/ Off\u5f00\u5173\u6539\u4e3aOn\u3002<\/p>\n<h3 style=\"text-align: justify;\">Android\u4e0a\u7684OpenVPN \u8fde\u63a5 App<\/h3>\n<p style=\"text-align: justify;\">Android\u7248\u672c\u7684OpenVPN \u8fde\u63a5\u00a0App\u5141\u8bb8\u60a8\u4eceSD\u5361\u5bfc\u5165OpenVPN\u914d\u7f6e\u6587\u4ef6\u3002 \u5c06\u914d\u7f6e\u6587\u4ef6\u4fdd\u5b58\u5230SD\u5361\u3002 \u542f\u52a8OpenVPN \u8fde\u63a5\u5e94\u7528\u7a0b\u5e8f\u3002 \u4ece\u83dc\u5355\u4e2d\u9009\u62e9\u5bfc\u5165\uff0c\u7136\u540e\u4eceSD\u5361\u5bfc\u5165\u914d\u7f6e\u6587\u4ef6\u3002 \u6d4f\u89c8\u5230\u914d\u7f6e\u6587\u4ef6\u7684\u4f4d\u7f6e\u5e76\u9009\u62e9\u5b83\u3002 \u8f93\u5165\u7528\u6237\u540d\uff08admin\uff09\u548c\u5bc6\u7801\u4ee5\u8fde\u63a5\u5230VPN\u3002<\/p>\n<h3 style=\"text-align: justify;\">Windows \u4e0a\u7684OpenVPN \u8fde\u63a5\u5ba2\u6237\u7aef<\/h3>\n<p style=\"text-align: justify;\">Windows\u4e0a\u7684OpenVPN \u8fde\u63a5\u5ba2\u6237\u7aef\u5141\u8bb8\u60a8\u4ece\u672c\u5730\u78c1\u76d8\u5bfc\u5165OpenVPN\u914d\u7f6e\u6587\u4ef6\u3002 \u5c06\u6587\u4ef6\u4fdd\u5b58\u5728\u60a8\u7684\u7cfb\u7edf\u4e0a\u3002 \u5355\u51fb\u8fde\u63a5\u914d\u7f6e\u6587\u4ef6\u53f3\u4fa7\u7684+\u7b26\u53f7\u3002 \u9009\u62e9\u672c\u5730\u6587\u4ef6\uff0c\u7136\u540e\u5355\u51fb\u5bfc\u5165\u6309\u94ae\u3002 \u5728\u6587\u4ef6\u6d4f\u89c8\u5668\u7a97\u53e3\u4e2d\u627e\u5230\u8981\u5bfc\u5165\u7684\u914d\u7f6e\u6587\u4ef6\uff0c\u7136\u540e\u5355\u51fb\u6253\u5f00\u3002 \u5177\u6709\u65b0\u914d\u7f6e\u6587\u4ef6\u540d\u79f0\u7684\u6846\u73b0\u5728\u5e94\u8be5\u51fa\u73b0\u5728\u201c\u8fde\u63a5\u914d\u7f6e\u6587\u4ef6\u201d\u4e0b\u3002 \u70b9\u51fb\u8be5\u6846\u5e76\u8f93\u5165\u7528\u6237\u540d\uff08admin\uff09\u548c\u5bc6\u7801\u4ee5\u8fde\u63a5\u5230VPN\u3002<\/p>\n<h1 style=\"text-align: justify;\">\u9ad8\u7ea7\u7528\u6cd5<\/h1>\n<h2 style=\"text-align: justify;\">\u4fdd\u62a4VPC\u4e2d\u7684\u4e13\u7528\u7f51\u7edc<\/h2>\n<p style=\"text-align: justify;\">Netgate\u8bbe\u5907\u53ef\u4ee5\u7528\u4f5cVPC\u5b50\u7f51\u7684\u9632\u706b\u5899\u3002\u00a0\u4f46\u8fd9\u9700\u8981\u6bd4\u4f7f\u7528\u5b9e\u4f8b\u6765\u6258\u7ba1\u8fdc\u7a0b\u8bbf\u95ee***\u66f4\u591a\u7684\u624b\u52a8\u914d\u7f6e\u3002<\/p>\n<h2 style=\"text-align: justify;\">IPv6<\/h2>\n<p style=\"text-align: justify;\">Amazon EC2\u4e0d\u652f\u6301\u672c\u5730IPv6\u8fde\u63a5\u3002 \u56e0\u6b64\uff0c\u5982\u679c\u4e0d\u8fdb\u884c\u989d\u5916\u7684\u624b\u52a8\u914d\u7f6e\uff0c\u5c31\u65e0\u6cd5\u901a\u8fc7\u4f7f\u7528Netgate pfSense\u8ba4\u8bc1\u7684\u9632\u706b\u5899\u548cVPN\u8bbe\u5907\u5b9e\u4f8b\u5efa\u7acb\u7684VPN\u96a7\u9053\u4ece\u5ba2\u6237\u7aef\u8bbe\u5907\u5411IPv6 Internet\u53d1\u9001\u6d41\u91cf\u3002 \u5e94\u8be5\u53ef\u4ee5\u624b\u52a8\u5728\u5b9e\u4f8b\u548cIPv6\u96a7\u9053\u4ee3\u7406\uff08Hurricane Electric\uff0cSixxs\u7b49\uff09\u4e4b\u95f4\u914d\u7f6e\u96a7\u9053\u3002 \u6b64\u914d\u7f6e\u5c1a\u672a\u7ecf\u8fc7\u6d4b\u8bd5\uff0c\u5e76\u4e14\u6ca1\u6709\u6280\u672f\u652f\u6301\u3002 \u672a\u6765\u7248\u672c\u4e2d\u53ef\u80fd\u63d0\u4f9b\u53d7\u652f\u6301\u7684\u81ea\u52a8IPv6\u96a7\u9053\u914d\u7f6e\u3002<\/p>\n<p class=\"first admonition-title\" style=\"text-align: justify;\">\u6ce8\u610f\uff1a\u5173\u4e8eVPN\u5ba2\u6237\u7aef\u548cIPv6\u7684\u91cd\u8981\u8bf4\u660e<\/p>\n<p style=\"text-align: justify;\">\u5982\u679c\u60a8\u4f7f\u7528VPN\u7684\u4e3b\u8981\u539f\u56e0\u662f\u5728\u65e0\u7ebf\u548c\u4e0d\u53ef\u4fe1\u7f51\u7edc\u4e0a\u52a0\u5bc6\u6d41\u91cf\uff0c\u5219\u5728\u8fde\u63a5\u5230\u652f\u6301IPv6\u8def\u7531\u7684\u5c40\u57df\u7f51\u65f6\u5e94\u8be5\u683c\u5916\u5c0f\u5fc3\u3002\u8fd9\u91cc\u6709\u4e00\u4e9b\u66f4\u8be6\u7ec6\u7684\u539f\u56e0&#8230;<\/p>\n<ul class=\" list-paddingleft-2\" style=\"text-align: justify;\">\n<li>\u5728\u4f7f\u7528Netgate pfSense\u8ba4\u8bc1\u7684\u9632\u706b\u5899\u548cVPN\u8bbe\u5907\u6d4b\u8bd5\u4e0d\u540c\u7684VPN\u914d\u7f6e\u671f\u95f4\uff0c\u6709\u4eba\u6ce8\u610f\u5230\uff0c\u5f53\u5ba2\u6237\u7aef\u8fde\u63a5\u5230\u63d0\u4f9b\u672c\u673a\u7684\u7f51\u7edc\u65f6\uff0c\u6d4b\u8bd5\u7684\u4e00\u4e9bVPN\u5ba2\u6237\u7aef\u76f4\u63a5\u5411VPN\u96a7\u9053\u5916\u7684Internet\u53d1\u9001IPv6\u6d41\u91cfIPv6\u8fde\u63a5\u3002\u6bcf\u4e2a\u7ecf\u8fc7\u6d4b\u8bd5\u7684IPsec\u5ba2\u6237\u7aef\u548c\u67d0\u4e9b\u7248\u672c\u7684OpenVPN\u5ba2\u6237\u7aef\u90fd\u4f1a\u89c2\u5bdf\u5230\u8fd9\u79cd\u60c5\u51b5\u3002\u4f7f\u7528IPsec\u5ba2\u6237\u7aef\u7684\u8fd9\u79cd\u884c\u4e3a\u7684\u539f\u56e0\u5f88\u53ef\u80fd\u662fIPsec\u5ba2\u6237\u7aef\u4f3c\u4e4e\u4e0d\u652f\u6301\u901a\u8fc7\u5355\u4e2a\u96a7\u9053\u53d1\u9001\u6df7\u5408\u7684IPv4\u548cIPv6\u6d41\u91cf\u3002\u56e0\u6b64\uff0c\u5982\u679c\u901a\u8fc7IPv4\u5efa\u7acb\u5230\u8fdc\u7a0b\u7aef\u70b9\u7684IPsec\u96a7\u9053\uff0c\u5219IPv4\u901a\u4fe1\u5c06\u901a\u8fc7\u96a7\u9053\u53d1\u9001\uff0c\u800cIPv6\u4e0d\u4f1a\u3002\u5982\u679c\u96a7\u9053\u662f\u901a\u8fc7IPv6\u5efa\u7acb\u7684\uff0c\u5219\u4f1a\u53d1\u751f\u76f8\u53cd\u7684\u884c\u4e3a\u3002\u5bf9\u4e8eOpenVPN\u96a7\u9053\u6765\u8bf4\uff0c\u4e00\u4e9b\u5ba2\u6237\u7aef\u652f\u6301\u53d1\u9001\u6df7\u5408\u6d41\u91cf\uff0c\u4f46\u4e0d\u662f\u5168\u90e8\u3002\u8fd9\u662f\u5426\u4e0e\u7ed9\u5b9a\u7684\u5ba2\u6237\u7aef\u4e00\u8d77\u5de5\u4f5c\u5c06\u53d6\u51b3\u4e8e\u5ba2\u6237\u7aef\u7684\u7279\u5b9a\u5b9e\u73b0\uff0c\u5e73\u53f0\u548c\u7248\u672c\u3002<\/li>\n<li>\u8bb8\u591a\u5ba2\u6237\u7aef\u5e94\u7528\u7a0b\u5e8f\uff08\u4f8b\u5982Web\u6d4f\u89c8\u5668\uff09\u4f7f\u7528DNS\u6765\u68c0\u67e5\u4e3b\u673a\u540d\u662f\u5426\u5177\u6709IPv4\u6216IPv6\u5730\u5740\uff08\u6216\u4e0e\u4e4b\u76f8\u5173\u8054\uff09\u3002 \u4e00\u65e6\u786e\u5b9a\u5b58\u5728\u54ea\u4e9bIP\u5730\u5740\u7c7b\u578b\uff0c\u5e94\u7528\u53ef\u4ee5\u51b3\u5b9a\u5c1d\u8bd5\u8fde\u63a5\u5230\u54ea\u4e2a\u5730\u5740\u7c7b\u578b\u3002 \u4f8b\u5982\uff0c\u5b83\u53ef\u80fd\u4f1a\u5c1d\u8bd5\u540c\u65f6\u8fde\u63a5\u5230\u8fd9\u4e24\u4e2a\u8bbe\u5907\uff0c\u5e76\u7ee7\u7eed\u5148\u53d6\u5f97\u4efb\u4f55\u4e00\u4e2a\u6210\u529f\uff0c\u6216\u8005\u5b83\u53ef\u80fd\u4f1a\u9996\u5148\u5c1d\u8bd5\u901a\u8fc7IPv4\u8fdb\u884c\u8fde\u63a5\uff0c\u5e76\u4e14\u53ea\u4f1a\u5c1d\u8bd5IPv6\uff0c\u5982\u679c\u8be5\u8bbe\u5907\u5931\u8d25\uff0c\u6216\u8005\u5b83\u53ef\u80fd\u9996\u5148\u5c1d\u8bd5\u901a\u8fc7IPv6\u8fdb\u884c\u8fde\u63a5\uff0c\u5e76\u4e14\u4ec5\u5c1d\u8bd5IPv4 \u5931\u8d25\u4e86\u3002 \u5728\u7279\u5b9a\u5e94\u7528\u51b3\u5b9a\u5728\u8fde\u63a5\u5230VPN\u65f6\u8fde\u63a5\u5230IPv6\u4e3b\u673a\u7684\u60c5\u51b5\u4e0b\uff0cIPv6\u6d41\u91cf\u5f88\u53ef\u80fd\u4f1a\u76f4\u63a5\u8fdb\u5165\u4e92\u8054\u7f51\u800c\u4e0d\u662f\u901a\u8fc7\u96a7\u9053\u3002<\/li>\n<li>\u5e94\u7528\u7a0b\u5e8f\u51b3\u5b9a\u53d1\u9001\u6d41\u91cf\u7684IP\u7248\u672c\u4ee5\u53caVPN\u5ba2\u6237\u7aef\u5982\u4f55\u7ba1\u7406\u8be5\u6d41\u91cf\u7684\u8def\u7531\u7684\u884c\u4e3a\u53d6\u51b3\u4e8e\u5e94\u7528\u7a0b\u5e8f\u548c\u8bbe\u5907\u4e0a\u7684VPN\u5ba2\u6237\u7aef\u7684\u884c\u4e3a\u3002 \u6b64\u884c\u4e3a\u53d7\u5e94\u7528\u7a0b\u5e8f\u548cVPN\u5ba2\u6237\u7aef\u5f00\u53d1\u4eba\u5458\u7684\u63a7\u5236\u3002 \u5bf9VPN\u7aef\u70b9\u7684\u8fd9\u4e00\u70b9\u6ca1\u6709\u592a\u591a\u7684\u63a7\u5236\u3002 \u5bf9\u4e8eIPsec\uff0c\u6ca1\u6709\u914d\u7f6e\u53ef\u4ee5\u6d88\u9664\u6b64\u95ee\u9898\u3002 \u5bf9\u4e8eOpenVPN\uff0c\u81ea\u52a8\u914d\u7f6e\u7684OpenVPN\u8fdc\u7a0b\u8bbf\u95eeVPN\u4f1a\u5c1d\u8bd5\u63a8\u9001\u4e00\u4e2a\u914d\u7f6e\uff0c\u4ee5\u4f7fIPv6\u6d41\u91cf\u901a\u8fc7OpenVPN\u96a7\u9053\u8fdb\u884c\u8def\u7531\uff08\u6700\u7ec8\u6d41\u91cf\u4f1a\u88ab\u9ed1\u6389\uff0cIPv6\u5c06\u65e0\u6cd5\u5de5\u4f5c\uff0c\u4f46\u5b83\u53ef\u4ee5\u786e\u4fdd\u6d41\u91cf\u4e0d\u4f1a\u76f4\u63a5\u672a\u52a0\u5bc6\u5730\u53d1\u9001\u5230\u4e92\u8054\u7f51\uff09\u3002 \u5e76\u4e0d\u662f\u6240\u6709\u7684OpenVPN\u5ba2\u6237\u7aef\u90fd\u80fd\u63a5\u53d7\u6216\u6b63\u786e\u5730\u4f7f\u7528\u8fd9\u79cd\u914d\u7f6e\uff0c\u6240\u4ee5\u5b83\u4e0d\u80fd\u88ab\u8ba4\u4e3a\u662f\u6bcf\u79cd\u60c5\u51b5\u4e0b\u7684\u6709\u6548\u4fdd\u62a4\u63aa\u65bd\u3002<\/li>\n<li>\u76ee\u524d\u5927\u591a\u6570\u516c\u5171\u5c40\u57df\u7f51\u4e2d\u4e0d\u652f\u6301IPv6\u8def\u7531\uff0c\u56e0\u6b64\u8fd9\u79cd\u60c5\u51b5\u6240\u5e26\u6765\u7684\u98ce\u9669\u5bf9\u5927\u591a\u6570\u7528\u6237\u6765\u8bf4\u53ef\u80fd\u662f\u53ef\u4ee5\u5bb9\u5fcd\u7684\u3002 \u5efa\u8bae\u5728\u8fde\u63a5\u5230\u4efb\u4f55\u7f51\u7edc\u65f6\uff0c\u7279\u522b\u662f\u5728\u652f\u6301IPv6\u7684\u60c5\u51b5\u4e0b\uff0c\u610f\u8bc6\u5230\u5b58\u5728\u95ee\u9898\u7684\u53ef\u80fd\u6027\u5e76\u5c0f\u5fc3\u5904\u7406\u3002 \u5982\u679c\u4f60\u60f3\u786e\u5b9a\u4f60\u5f53\u524d\u8fde\u63a5\u7684\u7f51\u7edc\u662f\u5426\u652f\u6301IPv6\u8def\u7531\uff0c\u5219\u53ef\u4ee5\u5c1d\u8bd5\u5bfc\u822a\u5230\u53ef\u7528\u4e8e\u6d4b\u8bd5IPv6\u8fde\u63a5\u7684\u70ed\u95e8\u7ad9\u70b9\u4e4b\u4e00\uff0c\u4f8b\u5982http:\/\/test-ipv6.com\uff0c\u540c\u65f6\u8fde\u63a5\u5230VPN\u3002 \u5982\u679c\u6d4b\u8bd5\u663e\u793a\u5177\u6709IPv6\u8fde\u63a5\uff0c\u5219\u610f\u5473\u7740\u4f60\u7684IPv6\u6d41\u91cf\u6b63\u5728\u76f4\u63a5\u8def\u7531\u5230Internet\u3002 \u5728\u786e\u5b9a\u662f\u5426\u662f\u8fd9\u79cd\u60c5\u51b5\u540e\uff0c\u4f60\u5c31\u53ef\u4ee5\u8bc4\u4f30\u662f\u5426\u5e0c\u671b\u4fdd\u6301\u4ee5IPv6\u65b9\u5f0f\u8fde\u63a5\u5230\u7f51\u7edc\u3002<\/li>\n<\/ul>\n<h2 style=\"text-align: justify;\">\u5c06\u672c\u5730pfSense\u8bbe\u5907\u8fde\u63a5\u81f3Netgate pfSense\u8ba4\u8bc1\u7684\u9632\u706b\u5899\u548cVPN\u8bbe\u5907<\/h2>\n<p style=\"text-align: left;\">\u9664\u4e86\u5c06\u8fdc\u7a0b\u8bbe\u5907\u8fde\u63a5\u4e3a\u5ba2\u6237\u7aef\uff0c\u8fd0\u884cpfSense\u4f5c\u4e3a\u9632\u706b\u5899\/\u8def\u7531\u5668\u7684\u8bbe\u5907\u53ef\u4ee5\u4f5c\u4e3a\u5bf9\u7b49\u8fde\u63a5\u5230Netgate\u8bbe\u5907\u3002\u8be6\u89c1\uff1a<a class=\"reference external\" href=\"http:\/\/doc.pfsense.org\/index.php\/Open***_Site-to-Site_(Shared_Key,_2.0\">http:\/\/doc.pfsense.org\/index.php\/OpenVPN_Site-to-Site_(Shared_Key,_2.0<\/a>)\u3002<\/p>\n<p style=\"text-align: justify;\">\u5728\u5b9e\u65bd\u6587\u6863\u4e2d\u8be6\u8ff0\u7684\u914d\u7f6e\u4fee\u6539\u65f6\uff0c\u5e94\u5c06AWS\u4e0a\u7684Netgate\u8bbe\u5907\u5b9e\u4f8b\u7528\u4f5c\u8fde\u63a5\u7684\u201c\u670d\u52a1\u5668\u201d\u7aef\uff0c\u5c06\u672c\u5730pfSense\u8bbe\u5907\u5f53\u4f5c\u201c\u5ba2\u6237\u7aef\u201d\u3002\u00a0\u4f60\u8fd8\u9700\u8981\u786e\u4fdd\u4f60\u4f7f\u7528\u7684\u662f\u72ec\u7279\u7684\u7aef\u53e3\u3002 \u9ed8\u8ba4\u7684\u8fdc\u7a0b\u8bbf\u95eeOpenVPN\u670d\u52a1\u5668\u914d\u7f6e\u4e3a\u4f7f\u7528UDP\u7aef\u53e31194\u3002\u5efa\u8bae\u5982\u679c\u8981\u6dfb\u52a0\u7ad9\u70b9\u5230\u7ad9\u70b9\u96a7\u9053\uff0c\u5219\u5e94\u4f7f\u75281195\u52302000\u4e4b\u95f4\u7684\u7aef\u53e3\u3002\u65e0\u8bba\u51b3\u5b9a\u4f7f\u7528\u54ea\u4e2a\u7aef\u53e3\uff0c\u90fd\u9700\u8981\u786e\u4fdd\u7aef\u53e3\u5728Netgate\u8bbe\u5907\u5b9e\u4f8b\u7684\u9632\u706b\u5899\u89c4\u5219\u548cEC2\u7ba1\u7406\u63a7\u5236\u53f0\u7684\u5b89\u5168\u7ec4\u4e2d\u5747\u5904\u4e8e\u6253\u5f00\u72b6\u6001\u3002<\/p>\n<p style=\"text-align: justify;\">\u5982\u679c\u4f60\u5e0c\u671b\u5c06\u6765\u81ea\u5bb6\u5ead\/\u529e\u516c\u7f51\u7edc\u7684\u6240\u6709\u6d41\u91cf\u901a\u8fc7OpenVPN\u96a7\u9053\u8def\u7531\u5230\u4f60\u7684Netgate\u8bbe\u5907\u5b9e\u4f8b\uff0c\u5219\u9700\u8981\u5c06\u6b64\u8bed\u53e5\u6dfb\u52a0\u5230\u5bb6\u5ead\/\u529e\u516c\u5ba4pfSense\u8bbe\u5907\u4e0a\u7684OpenVPN\u5ba2\u6237\u7aef\u9ad8\u7ea7\u9009\u9879\uff1a<\/p>\n<pre>redirect-gateway\u00a0def1;<\/pre>\n<p style=\"text-align: justify;\">\u8fd9\u4f1a\u66f4\u6539\u9ed8\u8ba4\u8def\u7531\u8bbe\u7f6e\uff0c\u5f53\u5b83\u5efa\u7acb\u65f6\uff0c\u5c06\u901a\u8fc7OpenVPN\u96a7\u9053\u53d1\u9001\u5bb6\u5ead\/\u529e\u516c\u7f51\u7edc\u4e0a\u7684\u6240\u6709\u672c\u5730\u59cb\u53d1\u6d41\u91cf\u3002 \u5982\u679c\u4f60\u4f7f\u7528\u6b64\u914d\u7f6e\u901a\u8fc7OpenVPN\u96a7\u9053\u4ece\u672c\u5730\u7f51\u7edc\u53d1\u9001\u6240\u6709\u6d41\u91cf\uff0c\u5219\u8fd8\u9700\u8981\u5728AWS\u4e0a\u7684Netgate\u8bbe\u5907\u5b9e\u4f8b\u4e0a\u5efa\u7acbNAT\uff0c\u4ee5\u5904\u7406\u4ece\u5bb6\u5ead\/\u529e\u516c\u7f51\u7edc\u5230Internet\u7684\u6d41\u91cf\u3002 \u8fd9\u53ef\u4ee5\u901a\u8fc7\u5c06\u5bb6\u5ead\/\u529e\u516c\u7f51\u7edc\u7684CIDR\u63a9\u7801\u6dfb\u52a0\u5230\u540d\u4e3aNetworks_to_NAT\u7684\u9884\u914d\u7f6e\u522b\u540d\u6765\u5b8c\u6210\u3002\u00a0\u522b\u540d\u5728<strong>\u9632\u706b\u5899&gt;\u522b\u540d<\/strong>\u4e0b\u8fdb\u884c\u8bbe\u7f6e\uff0c\u7136\u540e\u5355\u51fbNetworks_to_NAT\u53f3\u4fa7\u7684\u7f16\u8f91\u56fe\u6807\u8fdb\u884c\u6dfb\u52a0\u3002 \u5c06\u65b0\u7684\u7f51\u7edc\u5730\u5740\u548c\u63a9\u7801\u6dfb\u52a0\u5230\u7f51\u7edc\u5217\u8868\u4e2d\uff0c\u7136\u540e\u5355\u51fb\u4fdd\u5b58\u6309\u94ae\u3002 \u7136\u540e\u70b9\u51fb<strong>\u5e94\u7528\u66f4\u6539<\/strong>\u6309\u94ae\u3002\u00a0\u4f60\u8fd8\u9700\u8981\u4f7f\u7528\u4e0e\u7528\u4e8e\u6dfb\u52a0\u5bb6\u5ead\/\u529e\u516c\u7f51\u7edc\u76f8\u540c\u7684\u8fc7\u7a0b\u5c06\u7528\u4e8e\u96a7\u9053\u7aef\u70b9\uff08IPv4\u96a7\u9053\u7f51\u7edc\uff09\u7684\u7f51\u7edc\u6dfb\u52a0\u5230Networks_to_NAT\u522b\u540d\u4e2d\u3002<\/p>\n<h3 style=\"text-align: justify;\">\u5c06\u591a\u4e2apfSense\u7f51\u5173\u8fde\u63a5\u5230Netgate\u8bbe\u5907<\/h3>\n<p style=\"text-align: justify;\">\u591a\u4e2a\u5bb6\u5ead\/\u529e\u516c\u7f51\u7edc\u53ef\u4ee5\u8fde\u63a5\u5230\u5355\u4e2aNetgate\u8bbe\u5907\u5b9e\u4f8b\u3002 \u8fd9\u53ef\u4ee5\u7528\u6765\u5141\u8bb8\u4e0d\u540c\u529e\u516c\u5730\u70b9\u7684\u5ba2\u6237\u8fdb\u884c\u901a\u4fe1\uff0c\u800c\u4e0d\u9700\u8981\u5728\u6bcf\u4e2a\u5355\u72ec\u4f4d\u7f6e\u4e4b\u95f4\u5efa\u7acb\u96a7\u9053\u3002 \u5b83\u4e5f\u53ef\u4ee5\u7528\u4f5c\u5728\u4e00\u4e2a\u5730\u65b9\u5bf9\u6765\u5f80\u4e92\u8054\u7f51\u7684\u6d41\u91cf\u5e94\u7528\u7b56\u7565\uff0c\u5e76\u4f7f\u5b83\u4eec\u5728\u591a\u4e2a\u5730\u70b9\u751f\u6548\u3002<\/p>\n<p style=\"text-align: justify;\">\u6bcf\u4e2a\u7ad9\u70b9\u90fd\u9700\u8981\u5177\u5907\u4e0a\u8ff0\u8bf4\u660e\uff0c\u7528\u4e8e\u8fde\u63a5\u91cd\u590d\u7684\u5355\u4e2a\u8bbe\u5907\uff0c\u4ee5\u5728Netgate\u8bbe\u5907\u5b9e\u4f8b\u4e0a\u6dfb\u52a0OpenVPN\u670d\u52a1\u5668\uff0c\u5e76\u5728\u672c\u5730pfSense\u8bbe\u5907\u4e0a\u6dfb\u52a0OpenVPN\u5ba2\u6237\u7aef\u3002 \u6bcf\u4e2a\u914d\u7f6e\u7684OpenVPN\u670d\u52a1\u5668\u90fd\u5fc5\u987b\u4f7f\u7528\u552f\u4e00\u7684\u7aef\u53e3\u548c\u552f\u4e00\u7684IPv4\u96a7\u9053\u7f51\u7edc\u3002 \u5efa\u8bae\u5728\u4e3aNetgate\u8bbe\u5907\u4e2d\u7684\u7ad9\u70b9\u6dfb\u52a0OpenVPN\u670d\u52a1\u5668\u65f6\uff0c\u5728\u63cf\u8ff0\u5b57\u6bb5\u4e2d\u4f7f\u7528\u552f\u4e00\u6807\u8bc6\u6765\u8bf4\u660e\u4ee5\u6b64\u65b9\u5f0f\u8fde\u63a5\u7684\u6bcf\u4e2a\u4f4d\u7f6e\u7684\u540d\u79f0\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Netgate pfSense\u662f\u4e9a\u9a6c\u900a\u8ba4\u8bc1\u7684\u7684EC2\u9632\u706b\u5899\u548cVPN\u8bbe\u5907\u4e4b\u4e00\u3002\u00a0\u4e00 &hellip; <a href=\"https:\/\/blog.pfchina.org\/?p=433\">\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":[197],"class_list":["post-433","post","type-post","status-publish","format-standard","hentry","category-pfsense","tag-aws"],"_links":{"self":[{"href":"https:\/\/blog.pfchina.org\/index.php?rest_route=\/wp\/v2\/posts\/433","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=433"}],"version-history":[{"count":0,"href":"https:\/\/blog.pfchina.org\/index.php?rest_route=\/wp\/v2\/posts\/433\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.pfchina.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=433"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.pfchina.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=433"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.pfchina.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=433"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}