{"id":4374,"date":"2020-02-02T12:35:23","date_gmt":"2020-02-02T04:35:23","guid":{"rendered":"https:\/\/blog.pfchina.org\/?p=4374"},"modified":"2022-11-02T14:46:12","modified_gmt":"2022-11-02T06:46:12","slug":"%e4%ba%94%e4%b8%aa%e6%96%b9%e6%b3%95%ef%bc%8c%e5%b8%ae%e5%8a%a9%e4%bd%a0%e6%9b%b4%e5%a5%bd%e7%9a%84%e4%bd%bf%e7%94%a8pfsense","status":"publish","type":"post","link":"https:\/\/blog.pfchina.org\/?p=4374","title":{"rendered":"\u4e94\u4e2a\u65b9\u6cd5\uff0c\u5e2e\u52a9\u4f60\u66f4\u597d\u7684\u4f7f\u7528pfSense"},"content":{"rendered":"<p style=\"text-align: justify;\">\u4e92\u8054\u7f51\u8fde\u63a5\u548c\u5bb6\u5ead\u7f51\u7edc\u6bcf\u5929\u53d8\u5f97\u8d8a\u6765\u8d8a\u91cd\u8981\u3002\u8bf8\u5982\u5207\u65ad\u7535\u6e90\u3001\u6dfb\u52a0\u7269\u8054\u7f51\u8bbe\u5907\uff08IoT \u2013\u4f8b\u5982\uff0c\u667a\u80fd\u626c\u58f0\u5668\uff0c\u6444\u50cf\u673a\uff0c\u667a\u80fd\u4ea4\u6362\u673a\u7b49\uff09\u4e4b\u7c7b\u7684\u6d3b\u52a8\u589e\u52a0\u4e86\u6211\u4eec\u5bf9\u6b63\u5e38\u5de5\u4f5c\u7684\u5bb6\u5ead\u7f51\u7edc\u7684\u4f9d\u8d56\u3002\u5bb6\u5ead\u7528\u6237\u4f7f\u7528pfSense\u80fd\u591f\u5efa\u7acb\u9ad8\u6548\u3001\u5feb\u901f\u548c\u5b89\u5168\u7684\u7f51\u7edc\u3002\u5982\u679c\u60a8\u6b63\u5728\u4f7f\u7528pfSense\uff0c\u8fd9\u91cc\u6709\u4e94\u4e2a\u65b9\u6cd5\u5e2e\u52a9\u4f60\u66f4\u597d\u7684\u4f7f\u7528pfSense\u3002<\/p>\n<h1 style=\"text-align: justify;\"><span id=\"Tip_1_Get_notified_when_someone_connects_to_your_OpenVPN_server\" class=\"ez-toc-section\">\u65b9\u6cd5\u4e00\uff1a\u5728\u6709\u4eba\u8fde\u63a5\u5230\u60a8\u7684OpenVPN\u670d\u52a1\u5668\u65f6\u4f1a\u6536\u5230\u901a\u77e5<\/span><\/h1>\n<p style=\"text-align: justify;\">VPN\u652f\u6301\u662f\u5927\u591a\u6570\u4eba\u9009\u62e9pfSense\u7684\u539f\u56e0\u4e4b\u4e00\u3002OpenVPN\u662f\u8bb8\u591a\u4e2a\u4eba\u548c\u516c\u53f8\u5e7f\u6cdb\u4f7f\u7528\u7684\u53d7\u652f\u6301\u7684\u5f00\u6e90VPN\u65b9\u6848\uff0c\u5f53\u7136\u4e5f\u53d7pfSense\u652f\u6301\u3002<\/p>\n<p style=\"text-align: justify;\">\u5982\u679c\u5f53\u6709\u4eba\u6210\u529f\u8fde\u63a5\u5230VPN\u670d\u52a1\u5668\u65f6\u5e0c\u671b\u6536\u5230\u901a\u77e5\uff0c\u53ea\u9700\u8981\u4fee\u6539OpenVPN\u8fde\u63a5\u811a\u672c\u5373\u53ef\u53d1\u9001\u7535\u5b50\u90ae\u4ef6\u8fdb\u884c\u901a\u77e5\u3002\u6b65\u9aa4\u5982\u4e0b\uff1a<\/p>\n<h2 style=\"text-align: justify;\"><span id=\"Setup_email_notifications_in_pfSense\" class=\"ez-toc-section\">1\u3001\u5728pfSense\u4e2d\u8bbe\u7f6e\u7535\u5b50\u90ae\u4ef6\u901a\u77e5<\/span><\/h2>\n<p style=\"text-align: justify;\">\u9996\u5148\u5fc5\u987b\u6709\u6743\u8bbf\u95eeSMTP\u670d\u52a1\u5668\u4ee5\u4f7f\u7528pfSense\u53d1\u9001\u7535\u5b50\u90ae\u4ef6\u3002\u5728\u201c\u00a0<strong>\u7cfb\u7edf\u201d-&gt;\u201c\u9ad8\u7ea7\u201d\u4e2d<\/strong>\u8bbe\u7f6eSMTP\u8fde\u63a5\uff0c\u7136\u540e\u9009\u62e9\u201c\u901a\u77e5\u201d\u9009\u9879\u5361\u3002<\/p>\n<h2 style=\"text-align: justify;\"><span id=\"Locate_and_backup_openvpnattributesssh\" class=\"ez-toc-section\">2\u3001\u627e\u5230\u5e76\u5907\u4efdopenvpn.attributes.ssh\u6587\u4ef6<\/span><\/h2>\n<p style=\"text-align: justify;\">\u6bcf\u5f53\u5efa\u7acb\u6216\u65ad\u5f00OpenVPN\u65f6\uff0c\u90fd\u4f1a\u8c03\u7528\u6587\u4ef6\u201c openvpn.attributes.ssh\u201d\u6587\u4ef6\u3002\u53ef\u4ee5\u901a\u8fc7\u4fee\u6539\u6b64\u6587\u4ef6\u6765\u63a5\u6536\u901a\u77e5\u3002\u8be5\u6587\u4ef6\u4f4d\u4e8e\/ usr \/ local \/ sbin \/\u4e2d\u3002\u5728\u5bf9\u8be5\u6587\u4ef6\u8fdb\u884c\u4fee\u6539\u4e4b\u524d\uff0c\u5efa\u8bae\u9996\u5148\u8fdb\u884c\u5907\u4efd\u3002<\/p>\n<h2 style=\"text-align: justify;\"><span class=\"ez-toc-section\">3\u3001\u4fee\u6539<\/span><span id=\"Locate_and_backup_openvpnattributesssh\" class=\"ez-toc-section\">openvpn.attributes.ssh<\/span><span id=\"Modify_the_openvpnattributesssh_file\" class=\"ez-toc-section\">\u6587\u4ef6<\/span><\/h2>\n<p style=\"text-align: justify;\">\u6587\u4ef6\u5185\u5bb9\u5982\u4e0b\uff08\u4f60\u7684\u4e5f\u8bb8\u4e0d\u540c\uff09\u3002\u53ea\u9700\u8981\u6dfb\u52a0\u7ea2\u8272\u7c97\u4f53\u90e8\u5206\u3002<\/p>\n<pre class=\"wp-block-code\"><code>#!\/bin\/sh\r\n#\r\n# openvpn.attributes.sh\r\n#\r\n# part of pfSense (https:\/\/www.pfsense.org)\r\n# Copyright (c) 2004-2016 Rubicon Communications, LLC \r\n# (Netgate)\r\n# All rights reserved.\r\n#\r\n# Licensed under the Apache License, Version 2.0 (the # \"License\");\r\n# you may not use this file except in compliance \r\n# with the License.\r\n# You may obtain a copy of the License at\r\n#\r\n# http:\/\/www.apache.org\/licenses\/LICENSE-2.0\r\n#\r\n# Unless required by applicable law or agreed to in \r\n# writing, software\r\n# distributed under the License is distributed on an \r\n# \"AS IS\" BASIS,\r\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either \r\n# express or implied.\r\n# See the License for the specific language governing permissions and\r\n# limitations under the License.\r\n\r\nif [ \"$script_type\" = \"client-connect\" ]; then\r\n<span style=\"color: #ff0000;\"><strong>#BEGIN EDIT\r\n\/bin\/echo \"Client $common_name from $trusted_ip connected @ `date`\" \\\r\n| \/usr\/local\/bin\/mail.php -s\"OpenVPN Connection Beginning\"\r\n#END EDIT<\/strong><\/span>\r\n\r\n        if [ -f \/tmp\/$common_name ]; then\r\n                \/bin\/cat \/tmp\/$common_name &gt; $1\r\n                \/bin\/rm \/tmp\/$common_name\r\n        fi\r\nelif [ \"$script_type\" = \"client-disconnect\" ]; then\r\n        command=\"\/sbin\/pfctl -a 'openvpn\/$common_name' -F rules\"\r\n        eval $command\r\n        \/sbin\/pfctl -k $ifconfig_pool_remote_ip\r\n        \/sbin\/pfctl -K $ifconfig_pool_remote_ip\r\n<span style=\"color: #ff0000;\"><strong>#BEGIN EDIT\r\n\/bin\/echo \"Client $common_name from $trusted_ip disconnected @`date`\" \\\r\n| \/usr\/local\/bin\/mail.php -s\"OpenVPN Connection Ending\"\r\n#END EDIT<\/strong><\/span>\r\nfi\r\n\r\nexit 0<\/code><\/pre>\n<p style=\"text-align: justify;\">\u7b2c\u4e00\u4e2a\u7ea2\u8272\u7c97\u4f53\u90e8\u5206\u5728\u6210\u529f\u8fde\u63a5\u5230OpenVPN\u670d\u52a1\u5668\u540e\u53d1\u9001\u5e26\u6709IP\u5730\u5740\u7684\u7535\u5b50\u90ae\u4ef6\uff0c\u7b2c\u4e8c\u4e2a\u7c97\u4f53\u90e8\u5206\u5728\u65ad\u5f00\u8fde\u63a5\u65f6\u4e5f\u53d1\u9001\u540c\u6837\u7684\u7535\u5b50\u90ae\u4ef6\u3002<\/p>\n<p style=\"text-align: justify;\">\u6ce8\u610f\uff1a\u5982\u679c\u7cfb\u7edf\u5347\u7ea7\u4f1a\u8986\u76d6\u6b64\u6587\u4ef6\uff0c\u56e0\u6b64\u60a8\u5fc5\u987b\u5728\u6bcf\u6b21\u5347\u7ea7\u540e\u5e94\u7528\u6b64\u8865\u4e01\u3002<\/p>\n<h1 style=\"text-align: justify;\"><span id=\"Tip_2_Automate_config_file_backups\" class=\"ez-toc-section\">\u65b9\u6cd5\u4e8c\uff1a\u81ea\u52a8\u6267\u884c\u914d\u7f6e\u6587\u4ef6\u5907\u4efd<\/span><\/h1>\n<p style=\"text-align: justify;\">\u5982\u679c\u60a8\u4f1a\u4e0d\u65ad\u5730\u5c1d\u8bd5\u5404\u79cd\u914d\u7f6e\u6765\u5c1d\u8bd5\u65b0\u4e8b\u7269\uff0c\u4e3a\u4e86\u4fdd\u8bc1\u9632\u706b\u5899\u80fd\u53ca\u65f6\u6062\u590d\uff0c\u5efa\u7acb\u60a8\u505a\u597d\u7cfb\u7edf\u914d\u7f6e\u5907\u4efd\u5de5\u4f5c\u3002\u73b0\u5728pfSense2.43\u4ee5\u540e\u7684\u7248\u672c\u90fd\u5df2\u7ecf\u81ea\u5e26\u4e86\u81ea\u52a8\u5907\u4efd\u3002\u5982\u679c\u60a8\u60f3\u5728\u5176\u4ed6\u5907\u4efd\u6240\u5728\u7684\u4f4d\u7f6e\u8fdb\u884c\u81ea\u52a8\u5907\u4efd\uff0c\u53ef\u4ee5\u901a\u8fc7\u4f7f\u7528pfSense\u670d\u52a1\u5668\u4e0a\u7684cron\u4f5c\u4e1a\u5c06SCP\u6587\u4ef6\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u6765\u5b8c\u6210\uff0c\u6216\u8005\u901a\u8fc7\u4e00\u4e2a\u5185\u90e8\u670d\u52a1\u5668\u8bbf\u95eepfSense\u6765\u590d\u5236\u6587\u4ef6\u3002\u5c3d\u7ba1\u5b89\u5168\u6027\u7a0d\u5dee\uff08\u53ef\u4ee5\u53ea\u5141\u8bb8\u4eceLAN\u8fdb\u884cssh\u8bbf\u95ee\uff09\uff0c\u65b9\u6cd5\u5982\u4e0b\uff1a<\/p>\n<h2 style=\"text-align: justify;\"><span id=\"Setup_SSH_on_pfSense\" class=\"ez-toc-section\">1\u3001\u5728pfSense\u4e0a\u8bbe\u7f6eSSH<\/span><\/h2>\n<p style=\"text-align: justify;\">\u8fd9\u53ef\u4ee5\u901a\u8fc7GUI\u5b8c\u6210\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u53ea\u4ec5\u5bf9admin\u548croot\u5e10\u6237\u542f\u7528ssh\u3002<\/p>\n<h2 style=\"text-align: justify;\"><span id=\"Setup_ssh_key_access_to_pfSense\" class=\"ez-toc-section\">2\u3001\u8bbe\u7f6e\u5bf9pfSense\u7684ssh\u5bc6\u94a5\u8bbf\u95ee<\/span><\/h2>\n<p style=\"text-align: justify;\">\u8fd9\u53ef\u4ee5\u4f7fssh\u8bbf\u95ee\u66f4\u52a0\u5b89\u5168\uff0c\u7f51\u4e0a\u6709\u5f88\u591a\u5173\u4e8e\u6b64\u7684\u6559\u7a0b\u3002\u53ea\u9700\u8981\u4eceSSH\u7684\u5e10\u6237\u4e2d\u521b\u5efa\u516c\u94a5\uff0c\u7136\u540e\u5c06\u8be5\u516c\u94a5\u590d\u5236\u5230pfSense\u4e2d\uff0cssh\u4fbf\u53ef\u4ee5\u6b63\u5e38\u8fde\u63a5\u3002<\/p>\n<h2 style=\"text-align: justify;\"><span id=\"Create_cron_job_to_copy_relevant_config_files\" class=\"ez-toc-section\">3\u3001\u521b\u5efacron\u4f5c\u4e1a\u6765\u590d\u5236\u76f8\u5173\u7684\u914d\u7f6e\u6587\u4ef6<\/span><\/h2>\n<p style=\"text-align: justify;\">\u6807\u51c6\u914d\u7f6e\u6587\u4ef6\uff08config.xml\uff09\u5305\u542b\u4e86pfSense\u7684\u6240\u6709\u914d\u7f6e\u3002\u8bbe\u7f6essh\u8bbf\u95ee\u6743\u9650\u540e\uff0c\u53ef\u4ee5\u4f7f\u7528scp\uff0c\u901a\u8fc7\u7c7b\u4f3c\u4e8e\u4ee5\u4e0b\u7684\u547d\u4ee4\u6765\u8fdc\u7a0b\u5907\u4efd\u8be5\u6587\u4ef6\uff1a<\/p>\n<pre class=\"wp-block-code\"><code>scp root@&lt;pfSenseIP&gt;:\/cf\/conf\/config.xml \/backup\/pfSense\/<\/code><\/pre>\n<p style=\"text-align: justify;\">\u60a8\u53ef\u4ee5\u6839\u636e\u81ea\u5df1\u8bbe\u7f6e\u66ff\u6362\u4e0a\u9762\u7684IP\u5730\u5740\u548c\u76ee\u6807\u6587\u4ef6\u5939\u3002\u53ef\u4ee5\u521b\u5efa\u4e00\u4e2acron\u4f5c\u4e1a\u6765\u590d\u5236\u8be5\u6587\u4ef6\uff0c\u5f53\u7136\u4e5f\u53ef\u4ee5\u590d\u5236\u5176\u4ed6\u6587\u4ef6\u3002\u4f8b\u5982\uff0c\u53ef\u4ee5\u5c06\/var\/dhcpd\/etc\/dhcpd.conf\u6587\u4ef6\u590d\u5236\u5230\u5907\u4efd\u670d\u52a1\u5668\u3002<\/p>\n<h1 style=\"text-align: justify;\"><span id=\"Tip_3_Restrict_access_to_pfSense_management_UI\" class=\"ez-toc-section\">\u65b9\u6cd5\u4e09\uff1a\u9650\u5236\u5bf9pfSense\u7ba1\u7406\u9875\u9762\u7684\u8bbf\u95ee<\/span><\/h1>\n<p style=\"text-align: justify;\">\u4fdd\u8bc1\u5b89\u5168\u7684\u65b9\u6cd5\u662f\u5c3d\u91cf\u51cf\u5c11\u53ef\u8bbf\u95ee\u8def\u7531\u5668\u8bbe\u7f6e\u7684\u8ba1\u7b97\u673a\u6570\u91cf\u3002\u53ef\u4ee5\u901a\u8fc7\u6dfb\u52a0\u9632\u706b\u5899\u89c4\u5219\u6765\u63a7\u5236\u5bf9\u9632\u706b\u5899\u7684\u8bbf\u95ee\u3002<\/p>\n<p style=\"text-align: justify;\">pfSense\u9ed8\u8ba4\u914d\u7f6e\u5141\u8bb8\u4eceLAN\u4e0a\u7684\u4efb\u4f55\u8ba1\u7b97\u673a\u8fdb\u884c\u7ba1\u7406\u8bbf\u95ee\uff0c\u5e76\u62d2\u7edd\u5b83\u8bbf\u95ee\u672c\u5730\u7f51\u7edc\u4e4b\u5916\u7684\u4efb\u4f55\u8ba1\u7b97\u673a\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u8fd8\u542f\u7528\u4e86\u4e00\u4e2a\u53cd\u9501\u5b9a\u89c4\u5219\uff0c\u8be5\u89c4\u5219\u53ef\u4ee5\u9632\u6b62\u5c06\u9632\u706b\u5899\u89c4\u5219\u914d\u7f6e\u4e3a\u5c06\u7528\u6237\u9501\u5b9a\u5728Web\u754c\u9762\u4e4b\u5916\u3002<\/p>\n<p style=\"text-align: justify;\">\u9996\u5148\u8981\u9650\u5236\u7ba1\u7406\u8bbf\u95ee\uff0c\u8bf7\u786e\u4fddLAN\u89c4\u5219\u5141\u8bb8\u8bbf\u95ee\u7528\u4e8ewebGUI\u7684\u7aef\u53e3\u3002\u8fd9\u63cf\u8ff0\u4e86\u9ed8\u8ba4\u7684LAN\u89c4\u5219\uff0c\u8be5\u89c4\u5219\u5141\u8bb8\u8bbf\u95eeWeb\u754c\u9762\u3002<\/p>\n<p style=\"text-align: justify;\"><a href=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2020\/02\/default-lan-rule-8.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-4428\" src=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2020\/02\/default-lan-rule-8.png\" alt=\"..\/_images\/default-lan-rule.png\" width=\"1150\" height=\"226\" srcset=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2020\/02\/default-lan-rule-8.png 1150w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2020\/02\/default-lan-rule-8-300x59.png 300w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2020\/02\/default-lan-rule-8-1024x201.png 1024w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2020\/02\/default-lan-rule-8-768x151.png 768w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2020\/02\/default-lan-rule-8-500x98.png 500w\" sizes=\"auto, (max-width: 1150px) 100vw, 1150px\" \/><\/a><\/p>\n<p style=\"text-align: justify;\">\u5982\u679cLAN\u4e0a\u5b58\u5728\u9650\u5236\u6027\u89c4\u5219\u96c6\uff0c\u8bf7\u5728\u7ee7\u7eed\u64cd\u4f5c\u4e4b\u524d\u786e\u4fdd\u5b83\u5141\u8bb8\u8bbf\u95eeWeb\u754c\u9762\u3002<\/p>\n<p style=\"text-align: justify;\">\u73b0\u5728\u7981\u7528\u53cd\u9501\u5b9a\u89c4\u5219\u3002\u5bfc\u822a\u5230<strong>\u7cfb\u7edf&gt;\u9ad8\u7ea7<\/strong>\uff0c\u00a0<strong>\u7ba1\u7406\u5458\u8bbf\u95ee<\/strong>\u9009\u9879\u5361\uff0c\u7136\u540e\u9009\u4e2d<strong>\u7981\u7528webConfigurator\u53cd\u9501\u5b9a\u89c4\u5219<\/strong>\u3002\u5355\u51fb<strong>\u4fdd\u5b58<\/strong>\uff0c\u8be5\u89c4\u5219\u5c06\u88ab\u5220\u9664\u3002<\/p>\n<p style=\"text-align: justify;\">\u5f3a\u70c8\u5efa\u8bae\u4f7f\u7528\u7f51\u7edc\u522b\u540d\u8fdb\u884c\u7ba1\u7406\u8bbf\u95ee\uff0c\u5982\u679c\u540c\u65f6\u4f7f\u7528\u4e86Web\u548cSSH\u7ba1\u7406\uff0c\u53ef\u4ee5\u4e3a\u8fd9\u4e9b\u7aef\u53e3\u6dfb\u52a0\u4e00\u4e2a\u522b\u540d\u3002\u4e0b\u9762\u662f\u793a\u4f8b\uff1a<\/p>\n<h2 style=\"text-align: justify;\"><strong>1\u3001<\/strong>\u5141\u8bb8\u8bbf\u95ee\u7ba1\u7406\u63a5\u53e3\u7684\u7f51\u7edc\u522b\u540d<\/h2>\n<p style=\"text-align: justify;\"><a href=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2020\/02\/management-access-alias-8.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-4429\" src=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2020\/02\/management-access-alias-8.png\" alt=\"..\/_images\/management-access-alias.png\" width=\"694\" height=\"438\" srcset=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2020\/02\/management-access-alias-8.png 694w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2020\/02\/management-access-alias-8-300x189.png 300w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2020\/02\/management-access-alias-8-475x300.png 475w\" sizes=\"auto, (max-width: 694px) 100vw, 694px\" \/><\/a><\/p>\n<h2 style=\"text-align: justify;\"><strong>2\u3001<\/strong>\u5141\u8bb8\u8bbf\u95ee\u7ba1\u7406\u754c\u9762\u7aef\u53e3\u7684\u522b\u540d<\/h2>\n<p style=\"text-align: justify;\"><a href=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2020\/02\/management-ports-alias-8.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-4430\" src=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2020\/02\/management-ports-alias-8.png\" alt=\"..\/_images\/management-ports-alias.png\" width=\"732\" height=\"407\" srcset=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2020\/02\/management-ports-alias-8.png 732w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2020\/02\/management-ports-alias-8-300x167.png 300w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2020\/02\/management-ports-alias-8-500x278.png 500w\" sizes=\"auto, (max-width: 732px) 100vw, 732px\" \/><\/a><\/p>\n<p style=\"text-align: justify;\">\u6dfb\u52a0\u4e00\u4e2a\u9632\u706b\u5899\u89c4\u5219\uff0c\u6e90\u9009\u62e9\u524d\u9762\u5b9a\u4e49\u7684IP\u522b\u540d\uff0c\u76ee\u6807\u4e3a\u8be5\u9632\u706b\u5899\uff0c\u76ee\u6807\u7aef\u53e3\u4e3a\u524d\u9762\u5b9a\u4e49\u7684\u7aef\u53e3\u522b\u540d\u3002\u786e\u4fdd\u6b64\u89c4\u5219\u4f4d\u4e8e\u5217\u8868\u7684\u7b2c\u4e00\u4f4d\u3002\u7136\u540e\u518d\u6dfb\u52a0\u57fa\u4e8e\u8be5\u89c4\u5219\u7684\u89c4\u5219\uff08\u70b9\u51fb\u53f3\u4fa7\u7684\u6dfb\u52a0\u56fe\u6807\uff09\uff0c\u5c06\u52a8\u4f5c\u6539\u4e3a\u963b\u6b62\u6216\u62d2\u7edd\uff0c\u6e90\u4e3aany\uff0c\u76ee\u6807\u4e3a\u8be5\u9632\u706b\u5899\u3002\u5b8c\u6210\u540e\u7684\u89c4\u5219\u5217\u8868\u5982\u4e0b\u6240\u793a\u3002<\/p>\n<p style=\"text-align: justify;\"><a href=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2020\/02\/restricted-management-lan-rules-8.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-4431\" src=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2020\/02\/restricted-management-lan-rules-8.png\" alt=\"..\/_images\/restricted-management-lan-rules.png\" width=\"1159\" height=\"303\" srcset=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2020\/02\/restricted-management-lan-rules-8.png 1159w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2020\/02\/restricted-management-lan-rules-8-300x78.png 300w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2020\/02\/restricted-management-lan-rules-8-1024x268.png 1024w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2020\/02\/restricted-management-lan-rules-8-768x201.png 768w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2020\/02\/restricted-management-lan-rules-8-500x131.png 500w\" sizes=\"auto, (max-width: 1159px) 100vw, 1159px\" \/><\/a><\/p>\n<p style=\"text-align: justify;\">\u5355\u51fb\u201c\u00a0<strong>\u5e94\u7528\u66f4\u6539\u201d<\/strong>\uff0c\u73b0\u5728\u7ba1\u7406\u9875\u9762\u4ec5\u9650\u5df2\u5b9a\u4e49\u7684\u522b\u540d\u5185\u7684\u4e3b\u673a\u53ef\u4ee5\u8bbf\u95ee\u3002<\/p>\n<h1 style=\"text-align: justify;\"><span id=\"Tip_4_Block_Internet_access_for_devices_that_dont_need_it\" class=\"ez-toc-section\">\u65b9\u6cd5\u56db\uff1a\u963b\u6b62\u4e0d\u9700\u8981\u7684\u8bbe\u5907\u8bbf\u95eeInternet<\/span><\/h1>\n<p style=\"text-align: justify;\">pfSense\u9632\u706b\u5899\u53ef\u4ee5\u975e\u5e38\u65b9\u4fbf\u7684\u63a7\u5236LAN\u7f51\u7edc\u4e0a\u54ea\u4e9b\u8bbe\u5907\u53ef\u4ee5\u8bbf\u95ee\u6216\u4e0d\u80fd\u8bbf\u95ee\uff0c\u53ef\u4ee5\u6709\u6548\u963b\u6b62\u67d0\u4e9b\u8bbe\u5907\u8bbf\u95eeInternet\u6216\u4eceInternet\u8bbf\u95ee\u5185\u90e8\u8bbe\u5907\u3002<\/p>\n<p style=\"text-align: justify;\">\u4f8b\u5982\uff0c\u5982\u679c\u5728\u5bb6\u5ead\u5185\u90e8\u5b89\u88c5\u4e86\u51e0\u4e2a\u76d1\u63a7\u6444\u50cf\u5934\uff0c\u4e00\u822c\u53ea\u5e0c\u671b\u80fd\u5728\u672c\u5730\u7f51\u7edc\u4e0a\u67e5\u770b\uff0c\u56e0\u6b64\u5fc5\u987b\u7981\u6b62\u5b83\u4eec\u8bbf\u95eeInternet(<span style=\"color: #191e23;\">\u4e5f\u53ef\u4ee5\u4f7f\u7528<\/span>VPN\u8fdc\u7a0b\u67e5\u770b)\u3002\u53ea\u9700\u5728\u9632\u706b\u5899\u89c4\u5219LAN\u63a5\u53e3\u7684\u9876\u90e8\u521b\u5efa\u4e00\u4e2a\u89c4\u5219\uff1a<\/p>\n<ul style=\"text-align: justify;\">\n<li>\u52a8\u4f5c\uff1a\u963b\u6b62<\/li>\n<li>\u63a5\u53e3\uff1aLAN\uff08\u6216\u9002\u5408\u60a8\u7684\u8bbe\u7f6e\u7684LAN\u63a5\u53e3\uff09<\/li>\n<li>\u5730\u5740\u65cf\uff1aIPv4 + IPv6<\/li>\n<li>\u534f\u8bae\uff1aany<\/li>\n<li>\u6765\u6e90\uff1a\u5355\u4e2a\u4e3b\u673a\u6216\u522b\u540d\uff0c\u7136\u540e\u6dfb\u52a0\u4e00\u7ec4IP\u6216\u522b\u540d\u7ec4<\/li>\n<li>\u76ee\u6807\uff1aany<\/li>\n<\/ul>\n<p style=\"text-align: justify;\">\u5e94\u7528\u8be5\u89c4\u5219\u540e\uff0c\u88ab\u963b\u6b62\u7684\u6240\u6709\u8bbe\u5907\u5c06\u65e0\u6cd5\u53d1\u9001\u4efb\u4f55\u5185\u5bb9\u5230Internet\u3002<\/p>\n<h1 style=\"text-align: justify;\"><span class=\"ez-toc-section\">\u65b9\u6cd5\u4e94\uff1a\u8bbe\u7f6epfSense\u770b\u95e8\u72d7<\/span><span id=\"Tip_5_Setup_pfSense_service_watchdog\" class=\"ez-toc-section\">\u670d\u52a1<\/span><\/h1>\n<p style=\"text-align: justify;\">pfSense\u8fd0\u884c\u867d\u7136\u975e\u5e38\u7a33\u5b9a\uff0c\u4f46\u662f\u6709\u65f6\u670d\u52a1\u4f1a\u505c\u6b62\u3002\u4e3a\u4e86\u9632\u6b62\u5173\u952e\u670d\u52a1\u5728\u4e0d\u76d1\u89c6\u9632\u706b\u5899\u65f6\u505c\u6b62\u8fd0\u884c\uff0c\u53ef\u4ee5\u4f7f\u7528\u670d\u52a1\u76d1\u89c6\u7a0b\u5e8f\u3002<\/p>\n<p style=\"text-align: justify;\">\u8be5\u670d\u52a1\u7a0b\u5e8f\u76d1\u89c6\u6307\u5b9a\u7684pfSense\u670d\u52a1\uff0c\u5e76\u53ef\u4ee5\u53d1\u9001\u901a\u77e5\u3002\u5728\u5b89\u88c5Service Watchdog\u63d2\u4ef6\u540e\uff0c\u53ef\u4ee5\u8f6c\u5230Services-&gt; Service Watchdog\u6dfb\u52a0\u60f3\u8981\u76d1\u89c6\u7684\u670d\u52a1\uff0c\u5982\u4e0b\u56fe\u6240\u793a\uff1a<\/p>\n<figure class=\"wp-block-image\" style=\"text-align: justify;\"><a href=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2020\/02\/ServiceWatchdog-21.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-4432\" src=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2020\/02\/ServiceWatchdog-21.png\" alt=\"\u670d\u52a1\u770b\u95e8\u72d7\u622a\u56fe\" width=\"1024\" height=\"573\" srcset=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2020\/02\/ServiceWatchdog-21.png 1024w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2020\/02\/ServiceWatchdog-21-300x168.png 300w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2020\/02\/ServiceWatchdog-21-768x430.png 768w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2020\/02\/ServiceWatchdog-21-500x280.png 500w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>\u4e92\u8054\u7f51\u8fde\u63a5\u548c\u5bb6\u5ead\u7f51\u7edc\u6bcf\u5929\u53d8\u5f97\u8d8a\u6765\u8d8a\u91cd\u8981\u3002\u8bf8\u5982\u5207\u65ad\u7535\u6e90\u3001\u6dfb\u52a0\u7269\u8054\u7f51\u8bbe\u5907\uff08IoT \u2013 &hellip; <a href=\"https:\/\/blog.pfchina.org\/?p=4374\">\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":[226],"class_list":["post-4374","post","type-post","status-publish","format-standard","hentry","category-pfsense","tag-226"],"_links":{"self":[{"href":"https:\/\/blog.pfchina.org\/index.php?rest_route=\/wp\/v2\/posts\/4374","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=4374"}],"version-history":[{"count":0,"href":"https:\/\/blog.pfchina.org\/index.php?rest_route=\/wp\/v2\/posts\/4374\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.pfchina.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4374"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.pfchina.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4374"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.pfchina.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4374"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}