{"id":891,"date":"2018-10-21T10:25:26","date_gmt":"2018-10-21T02:25:26","guid":{"rendered":"https:\/\/blog.pfchina.org\/?p=891"},"modified":"2022-11-02T14:47:00","modified_gmt":"2022-11-02T06:47:00","slug":"opnsense%e7%94%a8%e6%88%b7%e6%89%8b%e5%86%8c-%e9%ab%98%e5%8f%af%e7%94%a8%e6%80%a7%e5%92%8c%e7%a1%ac%e4%bb%b6%e6%95%85%e9%9a%9c%e8%bd%ac%e7%a7%bb","status":"publish","type":"post","link":"https:\/\/blog.pfchina.org\/?p=891","title":{"rendered":"OPNsense\u7528\u6237\u624b\u518c-\u9ad8\u53ef\u7528"},"content":{"rendered":"<p style=\"text-align: justify;\">OPNsense\u5229\u7528\u901a\u7528\u5730\u5740\u5197\u4f59\u534f\u8bae\u6216CARP\u8fdb\u884c\u786c\u4ef6\u6545\u969c\u8f6c\u79fb\u3002\u53ef\u4ee5\u5c06\u4e24\u4e2a\u6216\u591a\u4e2a\u9632\u706b\u5899\u914d\u7f6e\u4e3a\u6545\u969c\u8f6c\u79fb\u7ec4\u3002\u5982\u679c\u4e3b\u8282\u70b9\u4e0a\u7684\u4e00\u4e2a\u63a5\u53e3\u51fa\u73b0\u6545\u969c\uff0c\u6216\u8005\u4e3b\u8282\u70b9\u5b8c\u5168\u8131\u673a\uff0c\u5219\u8f85\u52a9\u8282\u70b9\u5c06\u53d8\u4e3a\u6d3b\u52a8\u72b6\u6001\u3002<\/p>\n<p style=\"text-align: justify;\">\u5229\u7528OPNsense\u7684\u8fd9\u4e00\u5f3a\u5927\u529f\u80fd\uff0c\u53ef\u521b\u5efa\u5177\u6709\u81ea\u52a8\u65e0\u7f1d\u6545\u969c\u8f6c\u79fb\u529f\u80fd\u7684\u5b8c\u5168\u5197\u4f59\u9632\u706b\u5899\u3002\u5207\u6362\u5230\u5907\u4efd\u7f51\u7edc\u65f6\uff0c\u8fde\u63a5\u5c06\u4fdd\u6301\u6d3b\u52a8\u72b6\u6001\uff0c\u540c\u65f6\u5bf9\u7528\u6237\u7684\u5e72\u6270\u6700\u5c0f\u3002<\/p>\n<p style=\"text-align: justify;\"><a href=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2019\/11\/light_bulbs.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-3201\" src=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2019\/11\/light_bulbs.png\" alt=\"..\/_images\/light_bulbs.png\" width=\"496\" height=\"360\" srcset=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2019\/11\/light_bulbs.png 496w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2019\/11\/light_bulbs-300x218.png 300w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2019\/11\/light_bulbs-413x300.png 413w\" sizes=\"auto, (max-width: 496px) 100vw, 496px\" \/><\/a><\/p>\n<div id=\"automatic-failover\" class=\"section\" style=\"text-align: justify;\">\n<h2>\u81ea\u52a8\u6545\u969c\u8f6c\u79fb<\/h2>\n<p>\u5982\u679c\u4e3b\u9632\u706b\u5899\u53d8\u5f97\u4e0d\u53ef\u7528\uff0c\u5219\u8f85\u52a9\u9632\u706b\u5899\u5c06\u5728\u6ca1\u6709\u7528\u6237\u5e72\u9884\u548c\u6700\u5c0f\u4e2d\u65ad\u7684\u60c5\u51b5\u4e0b\u63a5\u7ba1\u3002<\/p>\n<\/div>\n<div id=\"synchronized-state-tables\" class=\"section\" style=\"text-align: justify;\">\n<h2>\u540c\u6b65\u72b6\u6001\u8868<\/h2>\n<p>\u9632\u706b\u5899\u7684\u72b6\u6001\u8868\u5c06\u590d\u5236\u5230\u6240\u6709\u6545\u969c\u8f6c\u79fb\u914d\u7f6e\u7684\u9632\u706b\u5899\u3002\u8fd9\u610f\u5473\u7740\u5728\u53d1\u751f\u6545\u969c\u65f6\u5c06\u4fdd\u6301\u73b0\u6709\u8fde\u63a5\uff0c\u8fd9\u5bf9\u4e8e\u9632\u6b62\u7f51\u7edc\u4e2d\u65ad\u975e\u5e38\u91cd\u8981\u3002<\/p>\n<\/div>\n<div id=\"configuration-synchronization\" class=\"section\" style=\"text-align: justify;\">\n<h2>\u914d\u7f6e\u540c\u6b65<\/h2>\n<p>OPNsense\u5305\u62ec\u914d\u7f6e\u540c\u6b65\u529f\u80fd\u3002\u5728\u4e3b\u7cfb\u7edf\u4e0a\u8fdb\u884c\u7684\u914d\u7f6e\u66f4\u6539\u4f1a\u81ea\u52a8\u540c\u6b65\u5230\u8f85\u52a9\u9632\u706b\u5899\u3002<\/p>\n<\/div>\n<div id=\"configure-ha-carp\" class=\"section\">\n<h2 style=\"text-align: justify;\">\u914d\u7f6eHA CARP<\/h2>\n<div id=\"overview\" class=\"section\" style=\"text-align: justify;\">\n<p>\u672c\u7ae0\u9010\u6b65\u4ecb\u7ecd\u5982\u4f55\u57fa\u4e8e\u4e24\u4e2a\u7f51\u7edc\u521b\u5efa\u8bbe\u7f6e\u3002192.168.1.0\/24\u5c06\u7528\u4e8e\u5185\u90e8\u7f51\u7edc\uff0c172.8.0.0 \/ 24\u7528\u4e8e\u5c06\u6211\u4eec\u7684\u6d41\u91cf\u8def\u7531\u5230\u4e92\u8054\u7f51\u3002<\/p>\n<p><a href=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/10\/900px-Carp_setup_example.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-6551\" src=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/10\/900px-Carp_setup_example.png\" alt=\"\" width=\"900\" height=\"279\" srcset=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/10\/900px-Carp_setup_example.png 900w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/10\/900px-Carp_setup_example-300x93.png 300w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/10\/900px-Carp_setup_example-768x238.png 768w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2018\/10\/900px-Carp_setup_example-500x155.png 500w\" sizes=\"auto, (max-width: 900px) 100vw, 900px\" \/><\/a>\u5f53\u4f7f\u7528CARP\uff08<a class=\"reference external\" href=\"https:\/\/www.freebsd.org\/doc\/handbook\/carp.html\">FreeBSD\u624b\u518c<\/a>\uff09\u65f6\uff0c\u6240\u6709\u6545\u969c\u5b89\u5168\u63a5\u53e3\u90fd\u5e94\u8be5\u6709\u4e00\u4e2a\u4e13\u7528\u7684IP\u5730\u5740\uff0c\u5b83\u5c06\u4e0e\u4e00\u4e2a\u5171\u4eab\u7684\u865a\u62dfIP\u5730\u5740\u76f8\u7ed3\u5408\uff0c\u4ee5\u4fbf\u4e0e\u4e24\u4e2a\u7f51\u7edc\u8fdb\u884c\u901a\u4fe1\u3002\u5728\u4e0a\u56fe\u4e2d\uff0c\u865a\u7ebf\u7528\u4e8e\u6807\u8bb0\u865a\u62df\u5730\u5740\u3002<\/p>\n<p><span style=\"color: #000000; font-weight: bold;\">\u672f\u8bed<\/span><\/p>\n<\/div>\n<div id=\"terminology\" class=\"section\" style=\"text-align: justify;\">\n<p>\u8bbe\u7f6eCARP\u96c6\u7fa4\u6d89\u53ca\u4e00\u4e9b\u672f\u8bed\uff0c\u6211\u4eec\u5c06\u9996\u5148\u7b80\u8981\u89e3\u91ca\uff1a<\/p>\n<p id=\"carp\" class=\"rubric\">CARP<\/p>\n<p>\u516c\u5171\u5730\u5740\u5197\u4f59\u534f\u8bae\u4f7f\u7528IP\u534f\u8bae112\uff0c\u6e90\u81eaOpenBSD\u5e76\u4f7f\u7528\u591a\u64ad\u6570\u636e\u5305\u5411\u5176\u90bb\u5c45\u53d1\u9001\u6709\u5173\u5176\u72b6\u6001\u7684\u4fe1\u53f7\u3002\u59cb\u7ec8\u786e\u4fdd\u6bcf\u4e2a\u63a5\u53e3\u90fd\u53ef\u4ee5\u63a5\u6536CARP\u6570\u636e\u5305\u3002\u6bcf\u4e2a\u865a\u62df\u63a5\u53e3\u90fd\u5fc5\u987b\u5177\u6709\u552f\u4e00\u7684\u865a\u62df\u4e3b\u673aID\uff08vhid\uff09\uff0c\u8be5ID\u5728\u7269\u7406\u673a\u5668\u4e4b\u95f4\u5171\u4eab\u3002\u8981\u786e\u5b9a\u54ea\u4e2a\u7269\u7406\u673a\u5177\u6709\u66f4\u9ad8\u7684\u4f18\u5148\u7ea7\uff0c\u8bf7\u4f7f\u7528\u5e7f\u64ad\u6765\u901a\u544a\u504f\u79bb\u503c\u3002\u8f83\u4f4e\u7684\u504f\u79bb\u503c\u610f\u5473\u7740\u8f83\u9ad8\u7684\u4f18\u5148\u7ea7\u3002\uff08\u6211\u4eec\u7684\u4e3b\u9632\u706b\u5899\u4f7f\u75280\uff09\u3002<\/p>\n<p id=\"pfsync\" class=\"rubric\">pfsync<\/p>\n<p>\u4e0eCARP\u4e00\u8d77\uff0c\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528pfSync\u6765\u590d\u5236\u6211\u4eec\u7684\u9632\u706b\u5899\u72b6\u6001\u3002\u5f53\u6545\u969c\u8f6c\u79fb\u65f6\uff0c\u60a8\u9700\u8981\u786e\u4fdd\u4e24\u53f0\u673a\u5668\u90fd\u77e5\u9053\u6240\u6709\u8fde\u63a5\uff0c\u4ee5\u5b9e\u73b0\u65e0\u7f1d\u8fc1\u79fb\u3002\u4e3a\u5b89\u5168\u8d77\u89c1\uff08\u72b6\u6001\u6ce8\u5165\uff09\u548c\u786e\u4fdd\u6027\u80fd\uff0c\u5efa\u8bae\u5728\u4e3b\u673a\u4e4b\u95f4\u4f7f\u7528\u4e13\u7528\u63a5\u53e3\u6765\u5b9e\u73b0pfSync\u6570\u636e\u5305\u540c\u6b65\u3002<\/p>\n<p id=\"xmlrpc-sync\" class=\"rubric\">xmlrpc sync<\/p>\n<p>OPNsense\u5305\u62ec\u4e00\u79cd\u673a\u5236\uff0c\u7528\u4e8e\u4f7f\u5907\u4efd\u670d\u52a1\u5668\u7684\u914d\u7f6e\u4e0e\u4e3b\u670d\u52a1\u5668\u4fdd\u6301\u540c\u6b65\u3002\u6b64\u673a\u5236\u79f0\u4e3a\uff0c\u53ef\u5728System &#8211; &gt; High Availability\u4e0b\u627e\u5230\u3002<\/p>\n<\/div>\n<div id=\"setup-interfaces-basic-firewall-rules\" class=\"section\" style=\"text-align: justify;\">\n<h2>\u8bbe\u7f6e\u63a5\u53e3\u548c\u57fa\u672c\u9632\u706b\u5899\u89c4\u5219<\/h2>\n<p>\u6211\u4eec\u7684\u793a\u4f8b\u4f7f\u7528\u4e09\u4e2a\u63a5\u53e3\uff0c\u5b83\u4eec\u8fdb\u884c\u4e86\u57fa\u672c\u7684\u8bbe\u7f6e\u3002<\/p>\n<p id=\"master\" class=\"rubric\">\u4e3b\u9632\u706b\u5899<\/p>\n<p>\u8f6c\u5230\u63a5\u53e3\uff0c\u786e\u4fdd\u5df2\u5206\u914d\u6240\u6709\u4e09\u4e2a\u63a5\u53e3\u5e76\u8bbe\u7f6e\u4ee5\u4e0b\u5730\u5740\u548c\u5b50\u7f51\uff1a<\/p>\n<div class=\"wy-table-responsive\">\n<table class=\"docutils\" border=\"1\">\n<colgroup>\n<col width=\"100%\" \/><\/colgroup>\n<tbody valign=\"top\">\n<tr class=\"row-odd\">\n<td>LAN 192.168.1.10\/24<\/td>\n<\/tr>\n<tr class=\"row-even\">\n<td>WAN 172.18.0.101\/24<\/td>\n<\/tr>\n<tr class=\"row-odd\">\n<td>PFSYNC 10.0.0.1<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>\u63a5\u4e0b\u6765\u6211\u4eec\u9700\u8981\u786e\u4fdd\u53ef\u4ee5\u5728\u4e0d\u540c\u7684\u63a5\u53e3\u4e0a\u4f7f\u7528\u5408\u9002\u7684\u534f\u8bae\uff0c\u8f6c\u5230\u9632\u706b\u5899 &#8211; &gt;\u89c4\u5219\u5e76\u786e\u4fddLAN\u548cWAN\u90fd\u53ef\u4ee5\u63a5\u53d7carp\u00a0\u6570\u636e\u5305\uff08\u53c2\u89c1\u534f\u8bae\u9009\u62e9\uff09\u3002\u56e0\u4e3a\u6211\u4eec\u4f7f\u7528\u76f4\u63a5\u7535\u7f06\u8fde\u63a5\u4e24\u4e2a\u9632\u706b\u5899\uff0c\u6240\u4ee5\u6211\u4eec\u5c06\u6dfb\u52a0\u4e00\u4e2a\u89c4\u5219\u6765\u63a5\u53d7\u8be5\u7279\u5b9a\u63a5\u53e3\u7684\u6240\u6709\u534f\u8bae\u4e0a\u7684\u6240\u6709\u6d41\u91cf\u3002\u53e6\u4e00\u79cd\u9009\u62e9\u662f\u4ec5\u63a5\u53d7GUI\u7aef\u53e3\u548cpfSync\u534f\u8bae\u7684\u6d41\u91cf\u3002<\/p>\n<p id=\"backup\" class=\"rubric\">\u5907\u7528\u9632\u706b\u5899<\/p>\n<p>\u5907\u4efd\u9632\u706b\u5899\u9700\u8981\u5b83\u81ea\u5df1\u7684\u4e13\u7528\u5730\u5740\uff0c\u6211\u4eec\u5c06\u4f7f\u7528\u8fd9\u4e9b\uff1a<\/p>\n<div class=\"wy-table-responsive\">\n<table class=\"docutils\" border=\"1\">\n<colgroup>\n<col width=\"34%\" \/>\n<col width=\"66%\" \/><\/colgroup>\n<tbody valign=\"top\">\n<tr class=\"row-odd\">\n<td>LAN<\/td>\n<td>192.168.1.20\/24<\/td>\n<\/tr>\n<tr class=\"row-even\">\n<td>WAN<\/td>\n<td>172.18.0.102\/24<\/td>\n<\/tr>\n<tr class=\"row-odd\">\n<td>PFSYNC<\/td>\n<td>10.0.0.2<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>\u56e0\u4e3a\u6211\u4eec\u8981\u5728\u4e24\u4e2a\u4e3b\u673a\u4e4b\u95f4\u540c\u6b65\u9632\u706b\u5899\u8bbe\u7f6e\uff0c\u6240\u4ee5\u6211\u4eec\u53ea\u9700\u8981\u786e\u4fddpfsync\u63a5\u53e3\u53ef\u4ee5\u63a5\u53d7\u6765\u81ea\u4e3b\u670d\u52a1\u5668\u7684\u6570\u636e\u4ee5\u8fdb\u884c\u521d\u59cb\u8bbe\u7f6e\u3002\u4f7f\u7528\u4e0e\u6b64\u63a5\u53e3\u4e0a\u7684\u4e3b\u670d\u52a1\u5668\u76f8\u540c\u7684\u89c4\u5219\u3002<\/p>\n<\/div>\n<div id=\"setup-virtual-ips\" class=\"section\" style=\"text-align: justify;\">\n<h2>\u8bbe\u7f6e\u865a\u62dfIPs<\/h2>\n<p>\u5728\u4e3b\u8282\u70b9\u4e0a\uff0c\u6211\u4eec\u5c06\u8bbe\u7f6e\u865a\u62dfIP\u5730\u5740\uff0c\u8fd9\u4e9b\u5730\u5740\u4e5f\u5c06\u5728\u540c\u6b65\u540e\u7528\u4e8e\u5907\u4efd\u8282\u70b9\u3002\u8f6c\u5230\u9632\u706b\u5899 &#8211; &gt;\u865a\u62dfIP\u5e76\u6dfb\u52a0\u4e00\u4e2a\u5177\u6709\u4ee5\u4e0b\u7279\u5f81\u7684\u65b0IP\uff1a<\/p>\n<div class=\"wy-table-responsive\">\n<table class=\"docutils\" border=\"1\">\n<colgroup>\n<col width=\"41%\" \/>\n<col width=\"59%\" \/><\/colgroup>\n<tbody valign=\"top\">\n<tr class=\"row-odd\">\n<td>\u7c7b\u578b<\/td>\n<td>Carp<\/td>\n<\/tr>\n<tr class=\"row-even\">\n<td>\u63a5\u53e3<\/td>\n<td>WAN<\/td>\n<\/tr>\n<tr class=\"row-odd\">\n<td>IP\u5730\u5740<\/td>\n<td>172.18.0.100 \/ 24<\/td>\n<\/tr>\n<tr class=\"row-even\">\n<td>\u865a\u62dfIP\u5bc6\u7801<\/td>\n<td>opnsense<\/td>\n<\/tr>\n<tr class=\"row-odd\">\n<td>VHID\u7ec4<\/td>\n<td>1<\/td>\n<\/tr>\n<tr class=\"row-even\">\n<td>\u5e7f\u64ad\u9891\u7387<\/td>\n<td>\u57fa\u672c\u503c1 \/\u504f\u79bb\u503c0<\/td>\n<\/tr>\n<tr class=\"row-odd\">\n<td>\u63cf\u8ff0<\/td>\n<td>VIP WAN<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>\u53e6\u4e00\u4e2a\u4f7f\u7528\u4ee5\u4e0b\u5185\u5bb9\uff1a<\/p>\n<div class=\"wy-table-responsive\">\n<table class=\"docutils\" border=\"1\">\n<colgroup>\n<col width=\"41%\" \/>\n<col width=\"59%\" \/><\/colgroup>\n<tbody valign=\"top\">\n<tr class=\"row-odd\">\n<td>\u7c7b\u578b<\/td>\n<td>Carp<\/td>\n<\/tr>\n<tr class=\"row-even\">\n<td>\u63a5\u53e3<\/td>\n<td>LAN<\/td>\n<\/tr>\n<tr class=\"row-odd\">\n<td>IP\u5730\u5740<\/td>\n<td>192.168.1.1 \/ 24<\/td>\n<\/tr>\n<tr class=\"row-even\">\n<td>\u865a\u62dfIP\u5bc6\u7801<\/td>\n<td>opnsense<\/td>\n<\/tr>\n<tr class=\"row-odd\">\n<td>VHID\u7ec4<\/td>\n<td>3<\/td>\n<\/tr>\n<tr class=\"row-even\">\n<td>\u5e7f\u64ad\u9891\u7387<\/td>\n<td>\u57fa\u672c\u503c1 \/\u504f\u79bb\u503c0<\/td>\n<\/tr>\n<tr class=\"row-odd\">\n<td>\u63cf\u8ff0<\/td>\n<td>VIPLAN<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<div id=\"setup-outbound-nat\" class=\"section\" style=\"text-align: justify;\">\n<h2>\u51fa\u7ad9\u8bbe\u7f6e<\/h2>\n<p>\u5f53\u6d41\u91cf\u79bb\u5f00\u9632\u706b\u5899\u65f6\uff0c\u5b83\u8fd8\u5e94\u8be5\u4f7f\u7528\u865a\u62dfIP\u5730\u5740\u6765\u5b9e\u73b0\u65e0\u7f1d\u8fc1\u79fb\u3002OPNsense\u7684\u9ed8\u8ba4\u8bbe\u7f6e\u662f\u4f7f\u7528\u63a5\u53e3IP\u5730\u5740\uff0c\u5728\u6211\u4eec\u7684\u4f8b\u5b50\u4e2d\u8fd9\u662f\u9519\u8bef\u7684\u3002<\/p>\n<p>\u8f6c\u5230\u9632\u706b\u5899 &#8211; &gt; NAT\u5e76\u9009\u62e9\u51fa\u7ad9nat\u3002\u5728\u6b64\u9875\u9762\u4e0a\u9009\u62e9\u624b\u52a8\u51fa\u7ad9nat\uff0c\u5e76\u66f4\u6539\u6e90\u81ea192.168.1.0\/24\u7f51\u7edc\u7684\u89c4\u5219\u4ee5\u4f7f\u7528CARP\u865a\u62df\u63a5\u53e3\uff08172.18.0.100\uff09\u3002<\/p>\n<\/div>\n<div id=\"optional-setup-dhcp-server\" class=\"section\" style=\"text-align: justify;\">\n<h2>\u8bbe\u7f6eDHCP\u670d\u52a1\u5668\uff08\u53ef\u9009\uff09<\/h2>\n<p>\u5c06dhcp\u7528\u4e8e\u5c40\u57df\u7f51\u65f6\uff0c\u9700\u8981\u8003\u8651\u4e00\u4e9b\u4e8b\u9879\u3002\u6240\u6709\u5ba2\u6237\u7aef\u90fd\u5e94\u4f7f\u7528\u865a\u62df\u5730\u5740\u800c\u4e0d\u662f\u901a\u5e38\u4f20\u64ad\u7684\u7269\u7406\u5730\u5740\u3002\u63a5\u4e0b\u6765\u8981\u8003\u8651\u7684\u662f\u540c\u65f6\u6709\u4e24\u4e2a\u670d\u52a1\u5668\u5904\u4e8e\u6d3b\u52a8\u72b6\u6001\uff0c\u5e94\u8be5\u77e5\u9053\u6bcf\u4e2a\u5176\u4ed6\u670d\u52a1\u5668\u6c60\u3002\u5982\u679cdns\u8bf7\u6c42\u4e5f\u7531OPNsense\u8f6c\u53d1\uff0c\u8bf7\u786e\u4fdddhcp\u670d\u52a1\u5668\u53d1\u9001\u6b63\u786e\u7684IP\u5730\u5740\u3002\u8fd9\u4e9b\u662f\u6211\u4eec\u7684\u793a\u4f8b\u4e2d\u4f7f\u7528\u7684\u8bbe\u7f6e\uff08\u5728\u4e3b\u670d\u52a1\u5668\u4e0a\uff09\uff1a<\/p>\n<div class=\"wy-table-responsive\">\n<table class=\"docutils\" border=\"1\">\n<colgroup>\n<col width=\"56%\" \/>\n<col width=\"44%\" \/><\/colgroup>\n<tbody valign=\"top\">\n<tr class=\"row-odd\">\n<td>DNS\u670d\u52a1\u5668<\/td>\n<td>192.168.1.1<\/td>\n<\/tr>\n<tr class=\"row-even\">\n<td>\u7f51\u5173<\/td>\n<td>192.168.1.1<\/td>\n<\/tr>\n<tr class=\"row-odd\">\n<td>\u6545\u969c\u8f6c\u79fb\u5bf9\u7b49IP<\/td>\n<td>192.168.1.20<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<div id=\"setup-ha-sync-xmlrpc-and-pfsync\" class=\"section\" style=\"text-align: justify;\">\n<h2>\u8bbe\u7f6eHA sync (xmlrpc)\u00a0\u548cpfsync<\/h2>\n<p>\u9996\u5148\uff0c\u6211\u4eec\u5728\u4e3b\u9632\u706b\u5899\u7684\u4e13\u7528\u63a5\u53e3\u4e0a\u542f\u7528pfSync\u3002\u8f6c\u5230System -&gt; High Availability\uff08\u7cfb\u7edf &#8211; &gt;\u70ed\u5907\uff09\uff0c\u542f\u7528pfsync\uff08\u540c\u6b65\u72b6\u6001\uff09\u5e76\u9009\u62e9\u7528\u4e8epfSync\u7684\u63a5\u53e3\u3002\u63a5\u4e0b\u6765\u5c06\u00a0peer ip\uff08\u540c\u6b65\u5bf9\u7b49IP\uff09\u8bbe\u7f6e\u4e3a\u53e6\u4e00\u4e2a\u4e3b\u673a\u7684IP\u5730\u5740\uff0810.0.0.2\uff09\u3002<\/p>\n<p>\u73b0\u5728\uff0c\u6211\u4eec\u9700\u8981\u4f7f\u7528xmlrpc sync\u9009\u9879\u914d\u7f6e\u8981\u590d\u5236\u5230\u5907\u4efd\u670d\u52a1\u5668\u7684\u8bbe\u7f6e\u3002\u5bf9\u4e8e\u6211\u4eec\u7684\u8bbe\u7f6e\uff0c\u6211\u4eec\u5c06\u542f\u7528\u4ee5\u4e0b\u5185\u5bb9\uff1a<\/p>\n<div class=\"wy-table-responsive\">\n<table class=\"docutils\" border=\"1\">\n<colgroup>\n<col width=\"100%\" \/><\/colgroup>\n<tbody valign=\"top\">\n<tr class=\"row-odd\">\n<td>\u540c\u6b65-\u89c4\u5219<\/td>\n<\/tr>\n<tr class=\"row-even\">\n<td>\u540c\u6b65-NAT<\/td>\n<\/tr>\n<tr class=\"row-odd\">\n<td>\u540c\u6b65-DHCPD<\/td>\n<\/tr>\n<tr class=\"row-even\">\n<td>\u540c\u6b65-\u865a\u62dfIP<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<div id=\"finalize-setup\" class=\"section\" style=\"text-align: justify;\">\n<h2>\u5b8c\u6210\u8bbe\u7f6e<\/h2>\n<p>\u4e3a\u4e86\u786e\u4fdd\u6b63\u786e\u5e94\u7528\u6240\u6709\u8bbe\u7f6e\uff0c\u5728\u6d4b\u8bd5\u4e4b\u524d\u91cd\u542f\u4e24\u4e2a\u9632\u706b\u5899\u3002<\/p>\n<\/div>\n<div id=\"testing-setup\" class=\"section\">\n<h2 style=\"text-align: justify;\">\u6d4b\u8bd5\u8bbe\u7f6e<\/h2>\n<p style=\"text-align: justify;\">\u9996\u5148\u8f6c\u5230OPNsense Web\u754c\u9762\u4e2d\u7684Status &#8211; &gt; Carp\uff0c\u7136\u540e\u68c0\u67e5\u4e24\u53f0\u673a\u5668\u662f\u5426\u90fd\u5df2\u6b63\u786e\u521d\u59cb\u5316\u3002<\/p>\n<p style=\"text-align: justify;\">\u4e3a\u4e86\u6d4b\u8bd5\u6211\u4eec\u7684\u8bbe\u7f6e\uff0c\u6211\u4eec\u5c06\u5ba2\u6237\u7aef\u8fde\u63a5\u5230\u5c40\u57df\u7f51\uff0c\u5e76\u6253\u5f00\u4e0e\u4e24\u4e2a\u9632\u706b\u5899\u540e\u9762\u7684\u4e3b\u673a\u7684ssh\u8fde\u63a5\u3002\u73b0\u5728\u8fde\u63a5\u65f6\uff0c\u60a8\u5e94\u8be5\u80fd\u591f\u67e5\u770b\u4e24\u4e2aOPNsense\u9632\u706b\u5899\uff08\u8bca\u65ad &#8211; &gt;\u72b6\u6001\uff09\u4e0a\u7684\u72b6\u6001\u8868\uff0c\u5b83\u4eec\u90fd\u5e94\u8be5\u663e\u793a\u76f8\u540c\u7684\u8fde\u63a5\u3002\u63a5\u4e0b\u6765\u5c1d\u8bd5\u4ece\u4e3b\u9632\u706b\u5899\u4e2d\u62d4\u51fa\u7f51\u7edc\u63d2\u5934\uff0c\u5b83\u5e94\u8be5\u8f6c\u79fb\u5230\u5907\u4efd\u9632\u706b\u5899\u800c\u4e0d\u4f1a\u5931\u53bbssh\u8fde\u63a5\u3002<\/p>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>OPNsense\u5229\u7528\u901a\u7528\u5730\u5740\u5197\u4f59\u534f\u8bae\u6216CARP\u8fdb\u884c\u786c\u4ef6\u6545\u969c\u8f6c\u79fb\u3002\u53ef\u4ee5\u5c06\u4e24\u4e2a\u6216\u591a\u4e2a &hellip; <a href=\"https:\/\/blog.pfchina.org\/?p=891\">\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":[4],"tags":[374],"class_list":["post-891","post","type-post","status-publish","format-standard","hentry","category-opnsense","tag-374"],"_links":{"self":[{"href":"https:\/\/blog.pfchina.org\/index.php?rest_route=\/wp\/v2\/posts\/891","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=891"}],"version-history":[{"count":0,"href":"https:\/\/blog.pfchina.org\/index.php?rest_route=\/wp\/v2\/posts\/891\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.pfchina.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=891"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.pfchina.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=891"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.pfchina.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=891"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}