{"id":183,"date":"2018-07-29T08:48:37","date_gmt":"2018-07-29T00:48:37","guid":{"rendered":"https:\/\/pfsense.freeddns.org\/wp\/?p=183"},"modified":"2020-08-24T22:12:30","modified_gmt":"2020-08-24T14:12:30","slug":"pfsense-book%e4%b9%8bipsec-%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","status":"publish","type":"post","link":"https:\/\/blog.pfchina.org\/?p=183","title":{"rendered":"pfSense book\u4e4bIPsec \u7ad9\u70b9\u5230\u7ad9\u70b9\u8fde\u63a5\u793a\u4f8b"},"content":{"rendered":"<p style=\"text-align: justify;\">\u901a\u8fc7\u7ad9\u70b9\u5230\u7ad9\u70b9IPsec\u96a7\u9053\u5c06\u4e24\u4e2a\u7f51\u7edc\u4e92\u8fde\uff0c\u5c31\u597d\u50cf\u5b83\u4eec\u662f\u901a\u8fc7\u8def\u7531\u5668\u76f4\u63a5\u8fde\u63a5\u4e00\u6837\u3002 \u7ad9\u70b9A\u7684\u7cfb\u7edf\u53ef\u4ee5\u5230\u8fbe\u7ad9\u70b9B\u7684\u670d\u52a1\u5668\u6216\u5176\u4ed6\u7cfb\u7edf\uff0c\u53cd\u4e4b\u4ea6\u7136\u3002 \u8fd9\u4e2a\u6d41\u91cf\u4e5f\u53ef\u4ee5\u901a\u8fc7\u9632\u706b\u5899\u89c4\u5219\u6765\u8c03\u8282\uff0c\u5c31\u50cf\u4efb\u4f55\u5176\u4ed6\u7f51\u7edc\u63a5\u53e3\u4e00\u6837\u3002 \u5982\u679c\u4e0d\u6b62\u4e00\u4e2a\u5ba2\u6237\u7aef\u5c06\u4ece\u540c\u4e00\u4e2a\u53d7\u63a7\u4f4d\u7f6e\u8fde\u63a5\u5230\u53e6\u4e00\u4e2a\u7ad9\u70b9\uff0c\u5219\u7ad9\u70b9\u5230\u7ad9\u70b9\u96a7\u9053\u7684\u6548\u7387\u53ef\u80fd\u4f1a\u66f4\u9ad8\uff0c\u66f4\u4e0d\u7528\u8bf4\u66f4\u65b9\u4fbf\u548c\u66f4\u5bb9\u6613\u652f\u6301\u3002<\/p>\n<p style=\"text-align: justify;\">\u901a\u8fc7\u7ad9\u70b9\u5230\u7ad9\u70b9\u96a7\u9053\uff0c\u4efb\u4f55\u4e00\u4e2a\u7f51\u7edc\u4e0a\u7684\u7cfb\u7edf\u90fd\u4e0d\u9700\u8981\u77e5\u9053\u5b58\u5728VPN\u3002 \u4e0d\u9700\u8981\u5ba2\u6237\u7aef\u8f6f\u4ef6\uff0c\u6240\u6709\u7684\u96a7\u9053\u5de5\u4f5c\u90fd\u7531\u96a7\u9053\u7ad9\u70b9\u5904\u7406\u3002 \u5bf9\u4e8e\u6709\u7f51\u7edc\u652f\u6301\u4f46\u4e0d\u5904\u7406VPN\u8fde\u63a5\u7684\u8bbe\u5907\uff08\u4f8b\u5982\u6253\u5370\u673a\uff0c\u76f8\u673a\uff0cHVAC\u7cfb\u7edf\u548c\u5176\u4ed6\u5d4c\u5165\u5f0f\u786c\u4ef6\uff09\uff0c\u8fd9\u4e5f\u662f\u4e00\u4e2a\u5f88\u597d\u7684\u89e3\u51b3\u65b9\u6848\u3002<\/p>\n<h2 style=\"text-align: justify;\">\u7ad9\u70b9\u5230\u7ad9\u70b9\u5230\u914d\u7f6e\u793a\u4f8b<\/h2>\n<p style=\"text-align: justify;\">\u5efa\u7acbIPsec\u96a7\u9053\u7684\u5173\u952e\u662f\u786e\u4fdd\u53cc\u65b9\u90fd\u6709\u5339\u914d\u7684\u8ba4\u8bc1\u3001\u52a0\u5bc6\u7b49\u8bbe\u7f6e\u3002 \u5728\u5f00\u59cb\u4e4b\u524d\uff0c\u8bf7\u8bb0\u5f55\u672c\u5730\u548c\u8fdc\u7a0bWAN IP\u5730\u5740\uff0c\u4ee5\u53ca\u5c06\u901a\u8fc7\u96a7\u9053\u4f20\u8f93\u7684\u672c\u5730\u548c\u8fdc\u7a0b\u5185\u90e8\u5b50\u7f51\u3002ping\u8fdc\u7a0b\u5b50\u7f51\u7684IP\u5730\u5740\u662f\u53ef\u9009\u7684\uff0c\u4f46\u5efa\u8bae\u4fdd\u6301\u96a7\u9053\u4e00\u76f4\u5904\u4e8e\u6d3b\u52a8\u8fde\u63a5\u72b6\u6001\u3002 \u9632\u706b\u5899\u4e0d\u68c0\u67e5\u56de\u590d\uff0c\u56e0\u4e3a\u53d1\u8d77\u5230\u8fdc\u7a0b\u7f51\u7edc\u4e0aIP\u5730\u5740\u7684\u4efb\u4f55\u6d41\u91cf\u90fd\u5c06\u89e6\u53d1IPsec\u534f\u5546\uff0c\u56e0\u6b64\uff0c\u53ea\u8981\u4e3b\u673a\u662f\u53e6\u4e00\u4e2a\u7ad9\u70b9\u7684\u4efb\u610f\u4e00\u4e2aIP\u5730\u5740\uff0c\u4e3b\u673a\u662f\u5426\u5b9e\u9645\u54cd\u5e94\u5e76\u4e0d\u91cd\u8981\u3002 \u9664\u4e86\u96a7\u9053\u8bf4\u660e\u548c\u8fd9\u4e9b\u4fe1\u606f\u5916\uff0c\u5176\u4ed6\u8fde\u63a5\u8bbe\u7f6e\u53ef\u4ee5\u662f\u76f8\u540c\u7684\u3002<\/p>\n<p style=\"text-align: justify;\">\u5728\u672c\u4f8b\u4e2d\uff0c\u5c06\u5047\u8bbe\u4ee5\u4e0b\u8bbe\u7f6e\uff1a<\/p>\n<table class=\"docutils\">\n<caption>IPsec\u7ad9\u70b9\u8bbe\u7f6e<\/caption>\n<colgroup>\n<col width=\"22%\" \/>\n<col width=\"29%\" \/>\n<col width=\"22%\" \/>\n<col width=\"27%\" \/><\/colgroup>\n<tbody valign=\"top\">\n<tr class=\"row-odd firstRow\">\n<td colspan=\"2\">\u7ad9\u70b9 A<\/td>\n<td colspan=\"2\" width=\"349\">\u7ad9\u70b9 B<\/td>\n<\/tr>\n<tr class=\"row-even\">\n<td>\u540d\u79f0<\/td>\n<td>Austin Office\uff08\u5965\u65af\u6c40\u529e\u516c\u5ba4\uff09<\/td>\n<td>\u540d\u79f0<\/td>\n<td width=\"232\">London Office\uff08\u4f26\u6566\u529e\u516c\u5ba4\uff09<\/td>\n<\/tr>\n<tr class=\"row-odd\">\n<td>WAN IP<\/td>\n<td>198.51.100.3<\/td>\n<td>WAN IP<\/td>\n<td width=\"260\">203.0.113.5<\/td>\n<\/tr>\n<tr class=\"row-even\">\n<td>LAN\u00a0\u5b50\u7f51<\/td>\n<td>10.3.0.0\/24<\/td>\n<td>LAN\u00a0\u5b50\u7f51<\/td>\n<td width=\"271\">10.5.0.0\/24<\/td>\n<\/tr>\n<tr class=\"row-odd\">\n<td>LAN IP<\/td>\n<td>10.3.0.1<\/td>\n<td>LAN IP<\/td>\n<td width=\"282\">10.5.0.1<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p style=\"text-align: justify;\">\u4ece\u7ad9\u70b9A\u5f00\u59cb\u3002\u5bfc\u822a\u5230***&gt;IPsec\u83dc\u5355\uff0c\u901a\u8fc7\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\u521b\u5efa\u96a7\u9053<strong>\u00a0P1<\/strong>\uff0c \u663e\u793a\u96a7\u9053\u7684\u9636\u6bb51\u914d\u7f6e\u9875\u9762\uff0c\u00a0\u4e00\u4e9b\u8bbe\u7f6e\u53ef\u80fd\u4f1a\u4fdd\u7559\u5176\u9ed8\u8ba4\u503c\u3002<\/p>\n<p style=\"text-align: justify;\">\u9996\u5148\uff0c\u586b\u5199\u9636\u6bb51\u4e00\u822c\u4fe1\u606f\u8bbe\u7f6e\u9879\uff0c\u5982\u4e0b\u56fe\u6240\u793a\u3002 \u7c97\u4f53\u9879\u76ee\u662f\u5fc5\u9700\u662f\u586b\u5199\u7684\uff0c \u6309\u7167\u8bf4\u660e\u586b\u5199\u8bbe\u7f6e\uff1a<\/p>\n<p style=\"text-align: justify;\"><strong>\u7981\u7528<\/strong>:\u4e0d\u9009\u4e2d\u6b64\u6846\uff0c\u4ee5\u4fbf\u8ba9\u96a7\u9053\u8fd0\u884c\u3002<\/p>\n<p style=\"text-align: justify;\"><strong>\u5bc6\u94a5\u4ea4\u6362\u7248\u672c<\/strong>:\u63d0\u793a\u662f\u4f7f\u7528IKEv1\u8fd8\u662fIKEv2\u3002 \u5bf9\u4e8e\u8fd9\u4e2a\u793a\u4f8b\uff0c\u4f7f\u7528IKEv2\uff0c\u4f46\u662f\u5982\u679c\u4e00\u65b9\u4e0d\u652f\u6301IKEv2\uff0c\u8bf7\u6539\u4e3aIKEv1\u3002<\/p>\n<p style=\"text-align: justify;\"><strong>Internet\u534f\u8bae<\/strong>:\u5927\u591a\u6570\u60c5\u51b5\u4e0b\u90fd\u662fIPv4\uff0c\u9664\u975e\u4e24\u4e2aWAN\u90fd\u6709IPv6\uff0c\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u53ef\u4ee5\u4f7f\u7528\u4efb\u4f55\u4e00\u79cd\u7c7b\u578b\u7684IPv6\u3002<\/p>\n<p style=\"text-align: justify;\"><strong>\u63a5\u53e3<\/strong>:\u9009 WAN \u3002<\/p>\n<p style=\"text-align: justify;\"><strong>\u8fdc\u7a0b\u7f51\u5173<\/strong>:\u7ad9\u70b9B\u7684WAN\u5730\u5740\uff0c\u5728\u672c\u4f8b\u4e2d\u4e3a\uff1a 203.0.113.5 \u3002<\/p>\n<p style=\"text-align: justify;\"><strong>\u63cf\u8ff0<\/strong>:\u8f93\u5165\u6587\u5b57\u6765\u8bf4\u660e\u96a7\u9053\u7684\u76ee\u7684\u6216\u8eab\u4efd\u3002 \u5728\u672c\u4f8b\u5b50\u4e2d\u8f93\u5165 ExampleCo London Office \u3002<\/p>\n<p style=\"text-align: justify;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1810\" src=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/1513653728547765.png\" alt=\"\" width=\"1144\" height=\"558\" srcset=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/1513653728547765.png 1144w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/1513653728547765-1024x499.png 1024w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/1513653728547765-300x146.png 300w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/1513653728547765-768x375.png 768w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/1513653728547765-500x244.png 500w\" sizes=\"auto, (max-width: 1144px) 100vw, 1144px\" \/><\/p>\n<p class=\"caption\" style=\"text-align: justify;\">\u7ad9\u70b9 A VPN \u96a7\u9053\u8bbe\u7f6e<\/p>\n<p style=\"text-align: justify;\">\u4e0b\u4e00\u6b65\u7ee7\u7eed\u8bbe\u7f6eIPsec\u9636\u6bb51\u3002\u00a0 \u5bf9\u4e8e\u5927\u591a\u6570\u8bbe\u7f6e\uff0c\u4f7f\u7528\u9ed8\u8ba4\u503c\u5c31\u53ef\u4ee5\u4e86\u3002<\/p>\n<p style=\"text-align: justify;\"><strong>\u8ba4\u8bc1\u65b9\u6cd5<\/strong>\uff1a\u9009\u62e9\u9ed8\u8ba4\uff0c\u672c\u4f8b\u4e2d\u4e3a Mutual PSK\u3002<\/p>\n<p style=\"text-align: justify;\"><strong>\u6211\u7684\u6807\u8bc6\u7b26<\/strong>: \u9009\u62e9\u9ed8\u8ba4, My IP Address<\/p>\n<p style=\"text-align: justify;\"><strong>\u5bf9\u7aef\u6807\u8bc6\u7b26<\/strong>:\u9009\u62e9\u9ed8\u8ba4, Peer IP Address\u3002<\/p>\n<p style=\"text-align: justify;\"><strong>\u9884\u5171\u4eab\u5bc6\u94a5<\/strong>:\u00a0\u8fd9\u662f\u6b63\u786e\u7684\u6700\u91cd\u8981\u7684\u8bbe\u7f6e\u3002\u00a0\u5982\u679c\u4f7f\u7528\u5f31\u5bc6\u94a5\uff0c\u5219\u53ef\u80fd\u4f1a\u7834\u574f\u4f7f\u7528\u9884\u5171\u4eab\u5bc6\u94a5\u7684IPsec\u3002 \u4f7f\u7528\u5f3a\u5bc6\u7801\uff0c\u957f\u5ea6\u81f3\u5c11\u4e3a10\u4e2a\u5b57\u7b26\uff0c\u5305\u542b\u5927\u5c0f\u5199\u5b57\u6bcd\uff0c\u6570\u5b57\u548c\u7b26\u53f7\u7684\u7ec4\u5408\u3002 \u4ee5\u540e\u9700\u8981\u5728\u7ad9\u70b9B\u7684\u96a7\u9053\u914d\u7f6e\u4e2d\u8f93\u5165\u76f8\u540c\u7684\u786e\u8ba4\u5bc6\u94a5\uff0c\u6240\u4ee5\u8bb0\u4e0b\u6216\u590d\u5236\u5e76\u7c98\u8d34\u5230\u5176\u4ed6\u5730\u65b9\u3002 \u590d\u5236\u548c\u7c98\u8d34\u53ef\u80fd\u6d3e\u4e0a\u7528\u573a\uff0c\u7279\u522b\u662f\u50cf aBc123%XyZ9$7qwErty99\u8fd9\u6837\u4e00\u4e2a\u590d\u6742\u7684\u5bc6\u7801\u3002<\/p>\n<p style=\"text-align: justify;\"><strong>\u52a0\u5bc6\u7b97\u6cd5<\/strong>:\u4f7f\u7528\u5bc6\u94a5\u957f\u5ea6\u4e3a256\u4f4d\u7684AES\u3002<\/p>\n<p style=\"text-align: justify;\"><strong>\u54c8\u5e0c\u7b97\u6cd5<\/strong>:\u5982\u679c\u53cc\u65b9\u90fd\u652f\u6301\uff0c\u4f7f\u7528SHA256\uff0c\u5426\u5219\u4f7f\u7528\u9ed8\u8ba4\u7684SHA1\u3002<\/p>\n<p style=\"text-align: justify;\"><strong>DH \u7ec4<\/strong>:\u4f7f\u7528\u9ed8\u8ba4\u76842 (1024 bit) \uff0c\u66f4\u9ad8\u7684\u503c\u66f4\u5b89\u5168\uff0c\u4f46\u4f1a\u5360\u7528\u66f4\u591a\u7684CPU\u3002<\/p>\n<p style=\"text-align: justify;\"><strong>\u6709\u6548\u671f<\/strong>:\u4e5f\u53ef\u4ee5\u6307\u5b9a\uff0c\u5426\u5219\u5c06\u4f7f\u752828800\u7684\u9ed8\u8ba4\u503c\u3002<\/p>\n<p style=\"text-align: justify;\"><strong>\u7981\u7528\u9884\u6388\u5bc6\u94a5<\/strong>:\u4e0d\u9009\u4e2d<\/p>\n<p style=\"text-align: justify;\"><strong>\u4ec5\u54cd\u5e94\u8005<\/strong>:\u4e0d\u9009\u4e2d<\/p>\n<p style=\"text-align: justify;\"><strong>NAT\u7a7f\u8d8a<\/strong>:\u4f7f\u7528Auto\uff0c\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\u9632\u706b\u5899\u90fd\u4e0d\u5728NAT\u540e\u9762\u3002<\/p>\n<p style=\"text-align: justify;\"><strong>\u5931\u6548\u5bf9\u7b49\u4f53\u68c0\u6d4b<\/strong>:\u4e0d\u9009\u4e2d, \u9ed8\u8ba4\u5ef6\u8fdf\u4e3a 10 \u79d2\uff0c \u6700\u5927\u6545\u969c\u6b21\u6570 5 \u6b21\u662f\u8db3\u591f\u7684\u3002\u6839\u636e\u7ad9\u70b9\u7684\u9700\u6c42\uff0c\u66f4\u9ad8\u7684\u503c\u53ef\u80fd\u4f1a\u66f4\u597d\u3002<\/p>\n<p style=\"text-align: justify;\">\u5355\u51fb\u4fdd\u5b58\u5b8c\u6210\u9636\u6bb51\u8bbe\u7f6e\u3002<\/p>\n<p style=\"text-align: justify;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1812\" src=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/1513653774184266.png\" alt=\"\" width=\"1148\" height=\"1122\" srcset=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/1513653774184266.png 1148w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/1513653774184266-1024x1001.png 1024w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/1513653774184266-300x293.png 300w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/1513653774184266-768x751.png 768w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/1513653774184266-307x300.png 307w\" sizes=\"auto, (max-width: 1148px) 100vw, 1148px\" \/><\/p>\n<p class=\"caption\" style=\"text-align: justify;\">\u7ad9\u70b9A\u9636\u6bb51\u8bbe\u7f6e<\/p>\n<p style=\"text-align: justify;\">\u5728\u6dfb\u52a0\u9636\u6bb51\u4e4b\u540e\uff0c\u5c06\u65b0\u7684\u9636\u6bb52\u5b9a\u4e49\u6dfb\u52a0\u5230VPN\uff1a<\/p>\n<ul class=\"simple list-paddingleft-2\" style=\"text-align: justify;\">\n<li>\u5355\u51fb <img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1688\" src=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/fa-plus-circle.png\" alt=\"\" width=\"25\" height=\"25\" \/>\u00a0\u663e\u793a\u9636\u6bb52\u6761\u76ee<strong>\uff0c<\/strong>\u5982\u4e0b\u56fe\u6240\u793a\uff0c\u5c55\u5f00\u8fd9\u4e2aVPN\u9636\u6bb52\u7684\u5217\u8868\u3002<\/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\u00a0P2\u5230\u65b0\u7684\u9636\u6bb52\u6761\u76ee\uff0c\u89c1\u4e0b\u56fe\u3002<\/li>\n<\/ul>\n<p style=\"text-align: justify;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1813\" src=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/1513653844728537.png\" alt=\"\" width=\"1147\" height=\"274\" srcset=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/1513653844728537.png 1147w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/1513653844728537-1024x245.png 1024w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/1513653844728537-300x72.png 300w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/1513653844728537-768x183.png 768w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/1513653844728537-500x119.png 500w\" sizes=\"auto, (max-width: 1147px) 100vw, 1147px\" \/><\/p>\n<p class=\"caption\" style=\"text-align: justify;\">\u7ad9\u70b9A\u9636\u6bb52\u5217\u8868<\/p>\n<p style=\"text-align: justify;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1814\" src=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/1513653881717088.png\" alt=\"\" width=\"1150\" height=\"308\" srcset=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/1513653881717088.png 1150w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/1513653881717088-1024x274.png 1024w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/1513653881717088-300x80.png 300w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/1513653881717088-768x206.png 768w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/1513653881717088-500x134.png 500w\" sizes=\"auto, (max-width: 1150px) 100vw, 1150px\" \/><\/p>\n<p class=\"caption\" style=\"text-align: justify;\">\u6dfb\u52a0\u9636\u6bb52\u6761\u76ee\u5230\u7ad9\u70b9A<\/p>\n<p style=\"text-align: justify;\">\u73b0\u5728\u5728\u8fd9\u4e2a VPN\u4e0a\u6dfb\u52a0\u9636\u6bb52\u7684\u8bbe\u7f6e\uff0c\u9636\u6bb52\u8bbe\u7f6e\u4f1a\u591a\u4e8e\u9636\u6bb51\uff0c\u89c1\u4e0b\u56fe:<\/p>\n<p style=\"text-align: justify;\"><strong>\u6a21\u5f0f<\/strong>: \u9009\u62e9Tunnel IPv4<\/p>\n<p style=\"text-align: justify;\"><strong>\u672c\u5730\u5b50\u7f51<\/strong>:\u6700\u597d\u9009\u4e3aLAN Subnet\uff0c\u4f46\u662f\u4e5f\u53ef\u4ee5\u628a\u5b83\u6539\u6210Network\uff0c\u586b\u5165\u6b63\u786e\u7684\u5b50\u7f51\u503c\uff0c\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\u662f10.3.0.0\/24\u3002 \u5c06\u5176\u4fdd\u7559\u4e3aLAN Subnet\u5c06\u786e\u4fdd\u5982\u679c\u7f51\u7edc\u91cd\u65b0\u7f16\u53f7\uff0c\u96a7\u9053\u7684\u8fd9\u4e00\u7aef\u5c06\u968f\u4e4b\u66f4\u6539\u3002 \u5982\u679c\u53d1\u751f\u8fd9\u79cd\u60c5\u51b5\uff0c\u5219\u5fc5\u987b\u624b\u52a8\u66f4\u6539\u53e6\u4e00\u7aef\u3002<\/p>\n<p style=\"text-align: justify;\">NAT\/BINAT:\u00a0\u8bbe\u7f6e\u4e3aNone.<\/p>\n<p style=\"text-align: justify;\"><strong>\u8fdc\u7a0b\u5b50\u7f51<\/strong>:\u00a0\u8f93\u5165\u7ad9\u70b9B\u7684\u7f51\u7edc, \u5728\u8fd9\u91cc\u4e3a10.5.0.0\/24\u3002<\/p>\n<p style=\"text-align: justify;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1815\" src=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/1513654129299622.png\" alt=\"\" width=\"1140\" height=\"558\" srcset=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/1513654129299622.png 1140w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/1513654129299622-1024x501.png 1024w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/1513654129299622-300x147.png 300w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/1513654129299622-768x376.png 768w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/1513654129299622-500x245.png 500w\" sizes=\"auto, (max-width: 1140px) 100vw, 1140px\" \/><\/p>\n<p class=\"caption\" style=\"text-align: justify;\">\u7ad9\u70b9 A\u9636\u6bb52\u5e38\u89c4\u8bbe\u7f6e<\/p>\n<p style=\"text-align: justify;\">\u4e0b\u56fe\u7684\u8bbe\u7f6e\u6db5\u76d6\u4e86\u901a\u4fe1\u52a0\u5bc6\u3002 \u52a0\u5bc6\u7b97\u6cd5\u548c\u54c8\u5e0c\u7b97\u6cd5\u53ef\u4ee5\u5141\u8bb8\u6709\u591a\u4e2a\u9009\u9879\uff0c\u53ea\u8981\u6bcf\u4e00\u65b9\u81f3\u5c11\u6709\u4e00\u4e2a\u5171\u540c\u70b9\uff0c\u53cc\u65b9\u5c31\u4f1a\u8fdb\u884c\u534f\u5546\u5e76\u8fbe\u6210\u4e00\u81f4\u3002 \u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\uff0c\u8fd9\u53ef\u80fd\u662f\u4e00\u4ef6\u597d\u4e8b\uff0c\u4f46\u901a\u5e38\u5c06\u5176\u9650\u5236\u5728\u53cc\u65b9\u6240\u671f\u671b\u7684\u5355\u4e00\u7279\u5b9a\u9009\u9879\u4e0a\u901a\u5e38\u4f1a\u66f4\u597d\u3002<\/p>\n<p style=\"text-align: justify;\"><strong>\u534f\u8bae<\/strong>:\u8bbe\u7f6e\u4e3a ESP<\/p>\n<p style=\"text-align: justify;\"><strong>\u52a0\u5bc6\u7b97\u6cd5<\/strong>\uff1a\u7406\u60f3\u60c5\u51b5\u4e0b\uff0c\u5982\u679c\u53cc\u65b9\u90fd\u652f\u6301\uff0c\u5219\u9009\u62e9128\u4f4d\u5bc6\u94a5\u957f\u5ea6\u7684AES256-GCM\u3002 \u5426\u5219\uff0c\u4f7f\u7528AES 256\uff0c\u6216\u8005\u4e24\u7aef\u90fd\u652f\u6301\u7684\u5bc6\u7801\u3002<\/p>\n<p style=\"text-align: justify;\"><strong>\u54c8\u5e0c\u7b97\u6cd5<\/strong>:\u00a0\u4f7f\u7528AES-GCM\u65f6\uff0c\u4e0d\u9700\u8981\u54c8\u5e0c \u00a0\u3002 \u5426\u5219\uff0c\u8bf7\u4f7f\u7528SHA 256\u6216SHA 1\uff0c\u5c3d\u53ef\u80fd\u907f\u514d\u4f7f\u7528MD5\u3002<\/p>\n<p style=\"text-align: justify;\"><strong>PFS<\/strong>:\u5b8c\u5168\u6b63\u5411\u4fdd\u5bc6\uff08perfect forward secrecy\uff09\u53ef\u4ee5\u5e2e\u52a9\u9632\u6b62\u67d0\u4e9b\u5173\u952e\u653b\u51fb\uff0c\u4f46\u662f\u662f\u53ef\u9009\u7684\u3002 \u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\uff0c\u5b83\u88ab\u7981\u7528\u3002<\/p>\n<p style=\"text-align: justify;\"><strong>\u6709\u6548\u671f<\/strong>:\u8bbe\u4e3a 3600<\/p>\n<p style=\"text-align: justify;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1816\" src=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/1513654158876775.png\" alt=\"\" width=\"1143\" height=\"628\" srcset=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/1513654158876775.png 1143w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/1513654158876775-1024x563.png 1024w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/1513654158876775-300x165.png 300w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/1513654158876775-768x422.png 768w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/1513654158876775-500x275.png 500w\" sizes=\"auto, (max-width: 1143px) 100vw, 1143px\" \/><\/p>\n<p class=\"caption\" style=\"text-align: justify;\">\u7ad9\u70b9A\u9636\u6bb52\u00a0\u8bbe\u7f6e<\/p>\n<p style=\"text-align: justify;\">\u6700\u540e\uff0c\u53ef\u4ee5\u5728\u8fdc\u7a0b\u5c40\u57df\u7f51\u4e0a\u4e3a\u7cfb\u7edf\u8f93\u5165\u4e00\u4e2aIP\u5730\u5740\uff0c\u8be5\u5730\u5740\u5c06\u5b9a\u671f\u53d1\u9001\u4e00\u4e2aICMP ping\uff0c\u5982\u4e0b\u56fe\u6240\u793a\u3002 ping\u7684\u8fd4\u56de\u503c\u4e0d\u4f1a\u88ab\u68c0\u67e5\uff0c\u8fd9\u53ea\u4f1a\u53d1\u9001\u6d41\u91cf\u7684\u96a7\u9053\uff0c\u4ee5\u4fbf\u5b83\u5c06\u4fdd\u6301\u5efa\u7acb\u3002 \u5728\u6b64\u8bbe\u7f6e\u4e2d\uff0c\u5c06\u4f7f\u7528\u7ad9\u70b9B\uff0810.5.0.1\uff09\u4e2d\u7684pfSense\u9632\u706b\u5899\u7684LAN IP\u5730\u5740\u3002<\/p>\n<p style=\"text-align: justify;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1817\" src=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/1513654190565626.png\" alt=\"\" width=\"1139\" height=\"108\" srcset=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/1513654190565626.png 1139w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/1513654190565626-1024x97.png 1024w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/1513654190565626-300x28.png 300w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/1513654190565626-768x73.png 768w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/1513654190565626-500x47.png 500w\" sizes=\"auto, (max-width: 1139px) 100vw, 1139px\" \/><\/p>\n<p class=\"caption\" style=\"text-align: justify;\">\u7ad9\u70b9A\u4fdd\u6301\u6d3b\u52a8\u8fde\u63a5<\/p>\n<p style=\"text-align: justify;\">\u8981\u5b8c\u6210\u8bbe\u7f6e\u5e76\u4f7f\u5176\u751f\u6548\uff0c\u8bf7\u6267\u884c\u4ee5\u4e0b\u64cd\u4f5c\uff1a\u5355\u51fbSave\u4fdd\u5b58\uff0c\u5355\u51fb\u5e94\u7528\u66f4\u6539\uff0c\u5982\u4e0b\u56fe\u6240\u793a\u3002<\/p>\n<p style=\"text-align: justify;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1818\" src=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/1513654218512024.png\" alt=\"\" width=\"1153\" height=\"88\" srcset=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/1513654218512024.png 1153w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/1513654218512024-1024x78.png 1024w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/1513654218512024-300x23.png 300w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/1513654218512024-768x59.png 768w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/1513654218512024-500x38.png 500w\" sizes=\"auto, (max-width: 1153px) 100vw, 1153px\" \/><\/p>\n<p class=\"caption\" style=\"text-align: justify;\">\u5e94\u7528IPsec\u8bbe\u7f6e<\/p>\n<p style=\"text-align: justify;\">\u7ad9\u70b9A\u7684\u96a7\u9053\u5df2\u7ecf\u5b8c\u6210\uff0c\u73b0\u5728\u9700\u8981\u8bbe\u7f6e\u9632\u706b\u5899\u89c4\u5219\u6765\u5141\u8bb8\u6765\u81ea\u7ad9\u70b9B\u7684\u7f51\u7edc\u6d41\u91cf\u901a\u8fc7IPsec\u96a7\u9053\u8fdb\u5165\u3002 \u8fd9\u4e9b\u89c4\u5219\u5fc5\u987b\u6dfb\u52a0\u5230\u9632\u706b\u5899\u89c4\u5219\u4e0b\u7684IPsec\u9009\u9879\u5361\u4e2d\u3002 \u53ef\u4ee5\u6839\u636e\u9700\u8981\u653e\u5bbd\uff08\u5141\u8bb8\u4ece\u4efb\u4f55\u5730\u65b9\u5230\u4efb\u4f55\u5730\u65b9\u7684\u4efb\u4f55\u534f\u8bae\uff09\u6216\u9650\u5236\u6027\u7684\uff08\u5141\u8bb8\u7ad9\u70b9B\u4e0a\u7684\u7279\u5b9a\u4e3b\u673a\u5230\u7279\u5b9a\u7aef\u53e3\u4e0a\u7684\u7ad9\u70b9A\u7684\u7279\u5b9a\u4e3b\u673a\u7684TCP\uff09\u3002 \u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u786e\u4fdd\u6e90\u5730\u5740\u662f\u7ad9\u70b9B\u5730\u5740\uff0c\u4f8b\u598210.5.0.0\/24\u3002 \u76ee\u6807\u5730\u5740\u5c06\u662f\u7ad9\u70b9A\u7f51\u7edc\uff0c10.3.0.0\/24\u3002<\/p>\n<p style=\"text-align: justify;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1819\" src=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/1513654766720927.png\" alt=\"\" width=\"1141\" height=\"234\" srcset=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/1513654766720927.png 1141w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/1513654766720927-1024x210.png 1024w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/1513654766720927-300x62.png 300w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/1513654766720927-768x158.png 768w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/1513654766720927-500x103.png 500w\" sizes=\"auto, (max-width: 1141px) 100vw, 1141px\" \/><\/p>\n<p style=\"text-align: justify;\">\u7ad9\u70b9A\u5df2\u7ecf\u914d\u7f6e\u5b8c\u6210\uff0c\u73b0\u5728\u6765\u914d\u7f6e\u7ad9\u70b9B\u3002<\/p>\n<p style=\"text-align: justify;\">\u5982\u56feB\u7ad9\u70b91\u8bbe\u7f6e\u548c\u7ad9\u70b9B\u9636\u6bb52\u8bbe\u7f6e\u6240\u793a\uff0c\u8be5\u8bbe\u7f6e\u7684\u5c11\u90e8\u5206\u4e0e\u7ad9\u70b9A\u4e0d\u540c\u3002<\/p>\n<ul class=\"simple list-paddingleft-2\" style=\"text-align: justify;\">\n<li>\u9636\u6bb51\u7684WAN\u5730\u5740\u548c\u8bf4\u660e\u8bbe\u7f6e<\/li>\n<li>\u9636\u6bb52\u96a7\u9053\u7f51\u7edc<\/li>\n<li>\u4fdd\u6301\u6d3b\u52a8\u8fde\u63a5<\/li>\n<\/ul>\n<p style=\"text-align: justify;\">\u4f7f\u7528\u7ad9\u70b9A\u4e0a\u7684\u76f8\u540c\u8bbe\u7f6e\u5c06\u201c\u9636\u6bb51\u201d\u6761\u76ee\u6dfb\u52a0\u5230\u201c\u7ad9\u70b9B\u201d\u9632\u706b\u5899\uff0c\u4f46\u6709\u4ee5\u4e0b\u533a\u522b:<\/p>\n<p style=\"text-align: justify;\"><strong>\u8fdc\u7a0b\u7f51\u5173<\/strong>:\u8f93\u5165\u7ad9\u70b9A\u7684WAN\u5730\u5740\uff1a 198.51.100.3<\/p>\n<p style=\"text-align: justify;\"><strong>\u8bf4\u660e<\/strong>:\u4f8b\u5982\uff1a ExampleCo Austin Office<\/p>\n<p style=\"text-align: justify;\">\u5355\u51fb<strong>\u4fdd\u5b58<\/strong><\/p>\n<p style=\"text-align: justify;\">\u4f7f\u7528\u7ad9\u70b9A\u4e0a\u7684\u76f8\u540c\u8bbe\u7f6e\uff0c\u5c06\u201c\u9636\u6bb52\u201d\u6761\u76ee\u6dfb\u52a0\u5230\u201c\u7ad9\u70b9B\u201d\u9632\u706b\u5899\uff0c\u4f46\u6709\u4ee5\u4e0b\u533a\u522b<\/p>\n<p style=\"text-align: justify;\"><strong>\u8fdc\u7a0b\u5b50\u7f51<\/strong>\uff1a\u8f93\u5165\u7ad9\u70b9A\u7684\u7f51\u7edc\uff0c\u5728\u672c\u4f8b\u4e2d\u4e3a\uff1a 10.3.0.0\/24<\/p>\n<p style=\"text-align: justify;\"><strong>\u81ea\u52a8PING\u4e3b\u673a<\/strong>:\u8f93\u5165\u7ad9\u70b9A\u4e0a\u7684pfSense\u9632\u706b\u5899\u7684LAN IP\u5730\u5740, 10.3.0.1<\/p>\n<p style=\"text-align: justify;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1821\" src=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/1513654594999190.png\" alt=\"\" width=\"1139\" height=\"553\" srcset=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/1513654594999190.png 1139w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/1513654594999190-1024x497.png 1024w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/1513654594999190-300x146.png 300w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/1513654594999190-768x373.png 768w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/1513654594999190-500x243.png 500w\" sizes=\"auto, (max-width: 1139px) 100vw, 1139px\" \/><\/p>\n<p class=\"caption\" style=\"text-align: justify;\">\u7ad9\u70b9B\u00a0\u9636\u6bb51\u8bbe\u7f6e<\/p>\n<p style=\"text-align: justify;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1822\" src=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/1513654527801912.png\" alt=\"\" width=\"1141\" height=\"553\" srcset=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/1513654527801912.png 1141w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/1513654527801912-1024x496.png 1024w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/1513654527801912-300x145.png 300w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/1513654527801912-768x372.png 768w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/1513654527801912-500x242.png 500w\" sizes=\"auto, (max-width: 1141px) 100vw, 1141px\" \/><\/p>\n<p class=\"caption\" style=\"text-align: justify;\">\u7ad9\u70b9B\u9636\u6bb52\u8bbe\u7f6e<\/p>\n<p style=\"text-align: justify;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1823\" src=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/1513654555668431.png\" alt=\"\" width=\"1143\" height=\"99\" srcset=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/1513654555668431.png 1143w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/1513654555668431-1024x89.png 1024w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/1513654555668431-300x26.png 300w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/1513654555668431-768x67.png 768w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/1513654555668431-500x43.png 500w\" sizes=\"auto, (max-width: 1143px) 100vw, 1143px\" \/><\/p>\n<p class=\"caption\" style=\"text-align: justify;\">\u7ad9\u70b9B\u4fdd\u6301\u6d3b\u52a8\u8fde\u63a5<\/p>\n<ul class=\"simple list-paddingleft-2\" style=\"text-align: justify;\">\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;\">\u4e0e\u7ad9\u70b9A\u4e00\u6837\uff0c\u8fd8\u5fc5\u987b\u6dfb\u52a0\u9632\u706b\u5899\u89c4\u5219\u4ee5\u5141\u8bb8\u96a7\u9053\u4e0a\u7684\u6d41\u91cf\u4ece\u7ad9\u70b9A\u7a7f\u8d8a\u5230\u7ad9\u70b9B\u3002\u5c06\u8fd9\u4e9b\u89c4\u5219\u6dfb\u52a0\u5230\u9632\u706b\u5899\u89c4\u5219\u4e0b\u7684IPsec\u9009\u9879\u5361\u3002\u6ce8\u610f\u6765\u6e90\u662f\u7ad9\u70b9A\uff0c\u76ee\u7684\u5730\u662f\u7ad9\u70b9B\u3002<\/p>\n<p style=\"text-align: justify;\">\u73b0\u5728\u4e24\u4e2a\u96a7\u9053\u90fd\u5df2\u914d\u7f6e\uff0c\u73b0\u5728\u5904\u4e8e\u6d3b\u52a8\u72b6\u6001\u3002\u00a0\u53ef\u4ee5\u901a\u8fc7\u8bbf\u95ee<strong>\u7cfb\u7edf\u72b6\u6001&gt; IPsec<\/strong>\u6765\u67e5\u770bIPsec\u8fde\u63a5\u72b6\u51b5\u3002<\/p>\n<p style=\"text-align: justify;\">\u5982\u679c\u96a7\u9053\u4e0d\u663e\u793a\u4e3a\u201c\u5df2\u5efa\u7acb\u201d\uff0c\u6700\u6709\u53ef\u80fd\u7684\u539f\u56e0\u662f\u6ca1\u6709\u6d41\u91cf\u901a\u8fc7\u96a7\u9053\u3002 \u7531\u4e8e\u672c\u5730\u7f51\u7edc\u5305\u542b\u9632\u706b\u5899\u6240\u5177\u6709\u7684\u5730\u5740\uff0c\u56e0\u6b64\u5728\u6b64\u9875\u9762\u4e0a\u63d0\u4f9b\u4e86\u4e00\u4e2a\u8fde\u63a5\u6309\u94ae\uff0c\u8be5\u6309\u94ae\u5c06\u542f\u52a8\u5bf9\u8fdc\u7a0b\u9636\u6bb52\u7684ping\u3002\u5355\u51fb<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1824\" src=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/fa-sign-in.png\" alt=\"\" width=\"25\" height=\"25\" \/><strong>\u8fde\u63a5VPN<\/strong>\u6309\u94ae\u5c1d\u8bd5\u542f\u52a8\u96a7\u9053\uff0c\u89c1\u4e0b\u56fe\u3002 \u5982\u679c\u6ca1\u6709\u51fa\u73b0\u8fde\u63a5\u6309\u94ae\uff0c\u8bf7\u5c1d\u8bd5\u4ece\u7ad9\u70b9A\u7684\u9636\u6bb52\u672c\u5730\u7f51\u7edc\u5185\u90e8\u7684\u8bbe\u5907\uff08\u5728\u7ad9\u70b9B\u7684\u8fdc\u7a0b\u5b50\u7f51\u4e2d\uff09ping\u7ad9\u70b9B\u7684\u8fdc\u7a0b\u5b50\u7f51\u4e2d\u7684\u7cfb\u7edf\uff08\u53cd\u4e4b\u4ea6\u7136\uff09\uff0c\u7136\u540e\u67e5\u770b\u96a7\u9053\u662f\u5426\u5df2\u5efa\u7acb\u3002<\/p>\n<p style=\"text-align: justify;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1825\" src=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/1513654721225221.png\" alt=\"\" width=\"1161\" height=\"263\" srcset=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/1513654721225221.png 1161w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/1513654721225221-1024x232.png 1024w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/1513654721225221-300x68.png 300w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/1513654721225221-768x174.png 768w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/1513654721225221-500x113.png 500w\" sizes=\"auto, (max-width: 1161px) 100vw, 1161px\" \/><\/p>\n<p class=\"caption\" style=\"text-align: justify;\">\u7ad9\u70b9A IPsec\u00a0\u72b6\u6001<\/p>\n<p style=\"text-align: justify;\">IPsec\u65e5\u5fd7\u4e5f\u4f1a\u63d0\u4f9b\u8bf4\u660e\u3002 \u5b83\u4eec\u4f4d\u4e8e\u201c\u7cfb\u7edf\u72b6\u6001\u201d&gt;\u201c\u7cfb\u7edf\u65e5\u5fd7\u201d\u201cIPsec\u201d\u9009\u9879\u5361\u4e0a\u3002 \u4e00\u5b9a\u8981\u68c0\u67e5\u4e24\u4e2a\u7ad9\u70b9\u7684\u72b6\u6001\u548c\u65e5\u5fd7\u3002<\/p>\n<div id=\"routing-and-gateway-considerations\" class=\"section\">\n<h2>\u8def\u7531\u548c\u7f51\u5173\u6ce8\u610f\u4e8b\u9879<\/h2>\n<p style=\"text-align: justify;\">\u5f53VPN\u7aef\u70b9\uff08\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\u4e3apfSense\u9632\u706b\u5899\uff09\u662f\u7f51\u7edc\u7684\u9ed8\u8ba4\u7f51\u5173\u65f6\uff0c\u8def\u7531\u901a\u5e38\u4e0d\u4f1a\u51fa\u73b0\u95ee\u9898\u3002\u5f53\u5ba2\u6237\u7aefPC\u53d1\u9001\u6d41\u91cf\u65f6\uff0c\u5b83\u5c06\u901a\u8fc7\u96a7\u9053\u8fdb\u5165pfSense\u9632\u706b\u5899\uff0c\u7136\u540e\u5230\u8fbe\u53e6\u4e00\u7aef\u3002\u4f46\u662f\uff0c\u5982\u679cpfSense\u9632\u706b\u5899\u4e0d\u662f\u7ed9\u5b9a\u7f51\u7edc\u7684\u9ed8\u8ba4\u7f51\u5173\uff0c\u5219\u5c06\u9700\u8981\u91c7\u53d6\u5176\u4ed6\u8def\u7531\u63aa\u65bd\u3002<\/p>\n<p style=\"text-align: justify;\">\u4f8b\u5982\uff0c\u5047\u8bbepfSense\u9632\u706b\u5899\u662f\u7ad9\u70b9B\u7684\u7f51\u5173\uff0c\u800c\u4e0d\u662f\u7ad9\u70b9A\u7684\u7f51\u5173\uff0c\u5982\u4e0b\u56fe\u6240\u793a\u3002Site B\u4e0a\u7684PC1\u5c06ping\u53d1\u9001\u5230Site A\u4e0a\u7684PC2\u3002\u6570\u636e\u5305\u79bb\u5f00PC1\uff0c\u7136\u540e\u901a\u8fc7Site B\u4e0a\u7684pfSense\u9632\u706b\u5899\uff0c\u7a7f\u8fc7\u96a7\u9053\uff0c\u6d41\u51faSite A\u4e0a\u7684pfSense\u9632\u706b\u5899\uff0c\u7136\u540e\u5230\u8fbePC2\u3002\u4f46\u662f\u8fd4\u56de\u9014\u4e2d\u53d1\u751f\u4e86\u4ec0\u4e48\uff1fPC2\u4e0a\u7684\u7f51\u5173\u5b8c\u5168\u662f\u53e6\u4e00\u4e2a\u8def\u7531\u5668\u3002\u5bf9ping\u7684\u56de\u590d\u5c06\u53d1\u9001\u5230\u7f51\u5173\u8def\u7531\u5668\uff0c\u6700\u6709\u53ef\u80fd\u88ab\u4e22\u5f03\uff0c\u751a\u81f3\u66f4\u7cdf\u7684\u662f\uff0c\u5b83\u53ef\u80fd\u4f1a\u4eceInternet\u94fe\u63a5\u53d1\u9001\u51fa\u53bb\uff0c\u5e76\u56e0\u6b64\u4e22\u5931\u3002<\/p>\n<p style=\"text-align: justify;\">\u89e3\u51b3\u6b64\u95ee\u9898\u7684\u65b9\u6cd5\u6709\u591a\u79cd\uff0c\u6839\u636e\u7ed9\u5b9a\u60c5\u51b5\u7684\u4e0d\u540c\uff0c\u9009\u62e9\u5408\u9002\u7684\u65b9\u6cd5\u3002<\/p>\n<ul class=\"simple\" style=\"text-align: justify;\">\n<li>\u53ef\u4ee5\u5728\u7f51\u5173\u8def\u7531\u5668\u4e2d\u8f93\u5165\u4e00\u6761\u9759\u6001\u8def\u7531\uff0c\u8be5\u8def\u7531\u4f1a\u5c06\u53d1\u5f80\u96a7\u9053\u8fdc\u7aef\u7684\u6d41\u91cf\u91cd\u5b9a\u5411\u5230pfSense\u9632\u706b\u5899\u3002\u5373\u4f7f\u4f7f\u7528\u6b64\u8def\u7531\uff0c\u4e5f\u4f1a\u5f15\u5165\u989d\u5916\u7684\u590d\u6742\u6027\uff0c\u56e0\u4e3a\u8fd9\u79cd\u60c5\u51b5\u4f1a\u5bfc\u81f4\u4e0d\u5bf9\u79f0\u8def\u7531\u3002\u89c1<span><a href=\"https:\/\/blog.pfchina.org\/?p=169\">\u5728\u540c\u4e00\u63a5\u53e3\u4e0a\u7ed5\u8fc7\u6d41\u91cf\u7684\u9632\u706b\u5899\u89c4\u5219<\/a>\u3002<\/span><\/li>\n<li>\u53ef\u4ee5\u5c06\u9759\u6001\u8def\u7531\u5355\u72ec\u6dfb\u52a0\u5230\u5ba2\u6237\u7aef\u7cfb\u7edf\uff0c\u4ee5\u4fbf\u5b83\u4eec\u77e5\u9053\u5c06\u6d41\u91cf\u76f4\u63a5\u53d1\u9001\u5230pfSense\u9632\u706b\u5899\uff0c\u800c\u65e0\u9700\u901a\u8fc7\u5176\u9ed8\u8ba4\u7f51\u5173\u3002\u9664\u975e\u53ea\u6709\u5f88\u5c11\u6570\u91cf\u7684\u4e3b\u673a\u9700\u8981\u8bbf\u95eeVPN\uff0c\u5426\u5219\u8fd9\u4f1a\u7ed9\u7ba1\u7406\u5e26\u6765\u9ebb\u70e6\u3002<\/li>\n<li>\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\uff0c\u5c06pfSense\u9632\u706b\u5899\u4f5c\u4e3a\u7f51\u5173\u5e76\u8ba9\u5b83\u5904\u7406Internet\u8fde\u63a5\u800c\u4e0d\u662f\u73b0\u6709\u7f51\u5173\u53ef\u80fd\u66f4\u5bb9\u6613\u3002<\/li>\n<\/ul>\n<div id=\"id14\" class=\"align-center figure\" style=\"text-align: justify;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1827\" src=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/diagrams-example-ipsec-pfsense-notgateway.png\" alt=\"\" width=\"757\" height=\"391\" srcset=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/diagrams-example-ipsec-pfsense-notgateway.png 757w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/diagrams-example-ipsec-pfsense-notgateway-300x155.png 300w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/diagrams-example-ipsec-pfsense-notgateway-500x258.png 500w\" sizes=\"auto, (max-width: 757px) 100vw, 757px\" \/><br \/>\n<span id=\"figure-site-to-site-ipsec-no-gateway\"><\/span><\/p>\n<p class=\"caption\"><em>pfSense\u4e0d\u662f\u7ad9\u70b9\u5230\u7ad9\u70b9IPsec\u7684\u7f51\u5173<\/em><\/p>\n<\/div>\n<\/div>\n<div id=\"pfsense-initiated-traffic-and-ipsec\" class=\"section\"><span id=\"ipsec-pfsensetraffic\"><\/span><\/p>\n<h2 style=\"text-align: justify;\">pfSense\u542f\u52a8\u7684\u6d41\u91cf\u548cIPsec<\/h2>\n<p style=\"text-align: justify;\"><span>\u8981\u4ecepfSense\u9632\u706b\u5899\u672c\u8eab\u8bbf\u95eeIPsec\u8fde\u63a5\u7684\u8fdc\u7a0b\u7aef\uff0c\u8bf7\u901a\u8fc7\u6dfb\u52a0\u5c06\u8fdc\u7a0b\u7f51\u7edc\u6307\u5411pfSense\u9632\u706b\u5899\u7684LAN IP\u5730\u5740\u7684\u9759\u6001\u8def\u7531\u6765\u201c\u4f2a\u9020\u201d\u7cfb\u7edf\u3002\u8bf7\u6ce8\u610f\uff0c\u6b64\u793a\u4f8b\u5047\u5b9aVPN\u4e24\u7aef\u90fd\u8fde\u63a5\u4e86LAN\u63a5\u53e3\u3002\u5982\u679cIPsec\u8fde\u63a5\u5728\u5176\u4ed6OPT\u63a5\u53e3\uff0c\u8bf7\u76f8\u5e94\u5730\u66ff\u6362\u63a5\u53e3\u548c\u63a5\u53e3\u7684IP\u5730\u5740\u3002\u7531\u4e8eIPsec\u7ed1\u5b9a\u5230FreeBSD\u5185\u6838\u7684\u65b9\u5f0f\uff0c\u5982\u679c\u6ca1\u6709\u9759\u6001\u8def\u7531\uff0c\u6d41\u91cf\u5c06\u9075\u5faa\u7cfb\u7edf\u8def\u7531\u8868\uff0c\u7cfb\u7edf\u8def\u7531\u8868\u53ef\u80fd\u4f1a\u5c06\u6d41\u91cf\u53d1\u9001\u5230WAN\u63a5\u53e3\uff0c\u800c\u4e0d\u662f\u901a\u8fc7IPsec\u96a7\u9053\u53d1\u9001\u3002\u5982\u4e0b\u56fe\u6240\u793a\uff1a<\/span><\/p>\n<div id=\"id15\" class=\"align-center figure\" style=\"text-align: justify;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1828\" src=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/diagrams-ipsec-site-to-site-static-routes.png\" alt=\"\" width=\"771\" height=\"126\" srcset=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/diagrams-ipsec-site-to-site-static-routes.png 771w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/diagrams-ipsec-site-to-site-static-routes-300x49.png 300w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/diagrams-ipsec-site-to-site-static-routes-768x126.png 768w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/diagrams-ipsec-site-to-site-static-routes-500x82.png 500w\" sizes=\"auto, (max-width: 771px) 100vw, 771px\" \/><br \/>\n<span id=\"figure-site-to-site-ipsec\"><\/span><\/p>\n<p class=\"caption\">\u6bcf\u4e2a\u9632\u706b\u5899\u90fd\u9700\u8981\u4e00\u6761\u9759\u6001\u8def\u7531\uff0c\u65b9\u6cd5\u662f\u5148\u6dfb\u52a0\u4e00\u4e2a\u6307\u5411\u9632\u706b\u5899\u7684LAN IP\u5730\u5740\u7684\u7f51\u5173\uff0c\u7136\u540e\u518d\u4f7f\u7528\u8be5\u7f51\u5173\u6dfb\u52a0\u4e00\u6761\u9759\u6001\u8def\u7531\uff0c\u5982\u4e0b\u56fe\u6240\u793a\uff1a<\/p>\n<\/div>\n<div id=\"id16\" class=\"align-center figure\" style=\"text-align: justify;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1829\" src=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/ipsec-site-a-staticroute.png\" alt=\"\" width=\"1141\" height=\"282\" srcset=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/ipsec-site-a-staticroute.png 1141w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/ipsec-site-a-staticroute-1024x253.png 1024w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/ipsec-site-a-staticroute-300x74.png 300w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/ipsec-site-a-staticroute-768x190.png 768w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/ipsec-site-a-staticroute-500x124.png 500w\" sizes=\"auto, (max-width: 1141px) 100vw, 1141px\" \/><br \/>\n<span id=\"figure-site-a-static-route-to-remote\"><\/span><\/p>\n<p class=\"caption\"><em><span class=\"caption-text\">\u7ad9\u70b9A\u5230\u8fdc\u7a0b\u5b50\u7f51\u7684\u9759\u6001\u8def\u7531<\/span><\/em><\/p>\n<\/div>\n<div id=\"id17\" class=\"align-center figure\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1830\" src=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/ipsec-site-b-staticroute.png\" alt=\"\" width=\"1142\" height=\"281\" srcset=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/ipsec-site-b-staticroute.png 1142w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/ipsec-site-b-staticroute-1024x252.png 1024w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/ipsec-site-b-staticroute-300x74.png 300w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/ipsec-site-b-staticroute-768x189.png 768w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/07\/ipsec-site-b-staticroute-500x123.png 500w\" sizes=\"auto, (max-width: 1142px) 100vw, 1142px\" \/><br \/>\n<span id=\"figure-site-b-static-route-to-remote\"><\/span><\/p>\n<p class=\"caption\" style=\"text-align: justify;\"><em><span class=\"caption-text\">\u7ad9\u70b9B\u5230\u8fdc\u7a0b\u5b50\u7f51\u7684\u9759\u6001\u8def\u7531<\/span><\/em><\/p>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u901a\u8fc7\u7ad9\u70b9\u5230\u7ad9\u70b9IPsec\u96a7\u9053\u5c06\u4e24\u4e2a\u7f51\u7edc\u4e92\u8fde\uff0c\u5c31\u597d\u50cf\u5b83\u4eec\u662f\u901a\u8fc7\u8def\u7531\u5668\u76f4\u63a5\u8fde\u63a5\u4e00\u6837\u3002 &hellip; <a href=\"https:\/\/blog.pfchina.org\/?p=183\">\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":[166],"class_list":["post-183","post","type-post","status-publish","format-standard","hentry","category-pfsense","tag-ipsec"],"_links":{"self":[{"href":"https:\/\/blog.pfchina.org\/index.php?rest_route=\/wp\/v2\/posts\/183","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=183"}],"version-history":[{"count":0,"href":"https:\/\/blog.pfchina.org\/index.php?rest_route=\/wp\/v2\/posts\/183\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.pfchina.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=183"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.pfchina.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=183"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.pfchina.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=183"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}