{"id":12579,"date":"2024-05-20T10:17:25","date_gmt":"2024-05-20T02:17:25","guid":{"rendered":"https:\/\/blog.pfchina.org\/?p=12579"},"modified":"2024-06-18T14:27:37","modified_gmt":"2024-06-18T06:27:37","slug":"ntopng-for-opnsense%e4%b8%ad%e6%96%87%e8%af%ad%e8%a8%80%e5%8c%85","status":"publish","type":"post","link":"https:\/\/blog.pfchina.org\/?p=12579","title":{"rendered":"pfSense\u65b0\u7248\u672c\u5b89\u88c5ntopng\u6559\u7a0b"},"content":{"rendered":"<p style=\"text-align: justify;\"><span data-immersive-translate-walked=\"4a81e76d-b45e-4a6a-a558-e2ab728d0930\"><span class=\"VIpgJd-yAWNEb-VIpgJd-fmcmS-sn54Q\" data-immersive-translate-walked=\"4a81e76d-b45e-4a6a-a558-e2ab728d0930\">ntopng\u662f\u4e00\u4e2a\u7f51\u7edc\u6d41\u91cf\u63a2\u6d4b\u5668\uff0c\u80fd\u591f\u4ece\u6d41\u91cf\u955c\u50cf\u3001NetFlow\u5bfc\u51fa\u5668\u3001SNMP\u8bbe\u5907\u3001\u9632\u706b\u5899\u65e5\u5fd7\u3001\u5165\u4fb5\u68c0\u6d4b\u7cfb\u7edf\u6536\u96c6\u6d41\u91cf\u4fe1\u606f\u3002<\/span><\/span><span data-immersive-translate-walked=\"4a81e76d-b45e-4a6a-a558-e2ab728d0930\">ntopng\u652f\u6301\u591a\u5e73\u53f0\u5b89\u88c5\uff0c\u5305\u62ecLinux\u548cFreeBSD\u3001MacOS\u4ee5\u53caWindows\u3002<\/span><span data-immersive-translate-walked=\"4a81e76d-b45e-4a6a-a558-e2ab728d0930\">ntopng\u6709\u4e09\u4e2a\u7248\u672c\uff1a\u793e\u533a\u7248\u3001\u4e13\u4e1a\u7248\u548c\u4f01\u4e1a\u7248 \u3002\u793e\u533a\u7248\u514d\u8d39\u4f7f\u7528\u4e14\u5f00\u653e\u6e90\u4ee3\u7801\uff08\u53ef\u5728<\/span><a href=\"https:\/\/github.com\/ntop\/ntopng\" data-immersive-translate-walked=\"4a81e76d-b45e-4a6a-a558-e2ab728d0930\"><span data-immersive-translate-walked=\"4a81e76d-b45e-4a6a-a558-e2ab728d0930\">Github<\/span><\/a><span data-immersive-translate-walked=\"4a81e76d-b45e-4a6a-a558-e2ab728d0930\">\u4e0a\u627e\u5230\uff09\u3002<\/span><span data-immersive-translate-walked=\"4a81e76d-b45e-4a6a-a558-e2ab728d0930\">pfSense\u65e9\u671f\u7248\u672c\u53ef\u4ee5\u5728\u81ea\u5e26\u63d2\u4ef6\u91cc\u76f4\u63a5\u5b89\u88c5<span class=\"VIpgJd-yAWNEb-VIpgJd-fmcmS-sn54Q\" data-immersive-translate-walked=\"4a81e76d-b45e-4a6a-a558-e2ab728d0930\">ntopng\u793e\u533a\u7248\uff0cpfSense CE 2.7\u4ee5\u540e\uff0cntopng\u9700\u8981\u624b\u52a8\u5b89\u88c5<\/span>\u3002<\/span><\/p>\n<h2 style=\"text-align: justify;\" data-immersive-translate-paragraph=\"1\" data-immersive-translate-walked=\"4a81e76d-b45e-4a6a-a558-e2ab728d0930\">pfSense CE 2.7<\/h2>\n<p style=\"text-align: justify;\"><span data-immersive-translate-walked=\"4a81e76d-b45e-4a6a-a558-e2ab728d0930\">\u7531\u4e8e\u8f6f\u4ef6\u517c\u5bb9\u95ee\u9898\uff0cpfSense CE 2.7\u5b89\u88c5ntopng\uff0c\u9700\u8981<\/span><span data-immersive-translate-walked=\"2477b55e-06f5-4ecb-901f-266bf5cb51ce\">\u914d\u7f6eFreeBSD\u5b58\u50a8\u5e93\uff0c\u624b\u52a8\u8fdb\u884c\u5b89\u88c5\u3002<\/span><\/p>\n<h3 style=\"text-align: justify;\">\u6dfb\u52a0\u5b58\u50a8\u5e93<\/h3>\n<pre class=\"code\">pkg add https:\/\/packages.ntop.org\/FreeBSD\/FreeBSD:14:amd64\/latest\/ntop-1.0.pkg<\/pre>\n<h3 style=\"text-align: justify;\">\u5b89\u88c5ntopng<\/h3>\n<pre class=\"code\">pkg install nprobe ntopng n2disk<\/pre>\n<h3 style=\"text-align: justify;\">\u6dfb\u52a0\u670d\u52a1<\/h3>\n<pre class=\"code\">sysrc redis_enable=\"YES\"\r\nsysrc ntopng_enable=\"YES\"<\/pre>\n<h3 style=\"text-align: justify;\">\u542f\u52a8ntopng<\/h3>\n<pre class=\"code\">service redis start\r\nservice ntopng start<\/pre>\n<h3 style=\"text-align: justify;\"><strong>\u8bbf\u95eentopng<\/strong><\/h3>\n<p class=\"code\" style=\"text-align: justify;\">\u6d4f\u89c8\u5668\u8f93\u5165http:\/\/lan ip:3000\uff0c\u5373\u53ef\u8fdb\u5165ntopng\u7684Web\u7ba1\u7406\u754c\u9762\u3002<\/p>\n<h2 class=\"code\" style=\"text-align: justify;\"><span style=\"text-align: justify;\">pfSense Plus 23.05\u53ca\u66f4\u9ad8\u7248\u672c<\/span><\/h2>\n<p class=\"code\" style=\"text-align: justify;\">pfSense Plus\u9ed8\u8ba4\u4f7f\u7528\u81ea\u5b9a\u4e49\u6839\u8bc1\u4e66\u94fe\uff0c\u8fd9\u4f1a\u963b\u6b62ntop\u5b58\u50a8\u5e93\u8f6f\u4ef6\u5305\u7684\u5b89\u88c5\u3002\u89e3\u51b3\u8be5\u95ee\u9898\uff0c\u9700\u8981\u624b\u52a8\u4fee\u6539\u914d\u7f6e\u3002<\/p>\n<h3 class=\"code\" style=\"text-align: justify;\"><span style=\"text-align: justify;\">\u6dfb\u52a0\u5b58\u50a8\u5e93<\/span><\/h3>\n<p class=\"code\" style=\"text-align: justify;\">\u521b\u5efa\u4e00\u4e2a\u6587\u672c\u6587\u4ef6 \/usr\/local\/etc\/pkg\/repos\/ntop.conf\uff08\u6ce8\u610f\uff0c\u8fd9\u5305\u542b\u7528\u4e8e\u6307\u5b9a SSL \u8bc1\u4e66\u6839\u6587\u4ef6\u7684 SSL_CA_CERT_FILE \u73af\u5883\u53d8\u91cf\uff09\uff0c\u5185\u5bb9\u5982\u4e0b\uff0c\u5176\u4e2d\u5305\u542bntop\u5b58\u50a8\u5e93\u7684\u4fe1\u606f\uff1a<\/p>\n<pre class=\"code\">ntop: { \r\n env: { \r\n  SSL_CA_CERT_FILE=\/usr\/local\/share\/certs\/ca-root-nss.crt \r\n }, \r\n fingerprints: \"\/usr\/local\/etc\/pkg\/fingerprints\/ntop\", \r\n url: https:\/\/packages.ntop.org\/FreeBSD\/${ABI}\/latest, \r\n signature_type: \"fingerprints\", \r\n priority: 100, \r\n enabled: yes \r\n}<\/pre>\n<h3 class=\"code\" style=\"text-align: justify;\"><span style=\"text-align: justify;\">\u6dfb\u52a0\u6307\u7eb9<\/span><\/h3>\n<p class=\"code\" style=\"text-align: justify;\">\u521b\u5efa\u4e00\u4e2a\u6587\u672c\u6587\u4ef6 \/usr\/local\/etc\/pkg\/fingerprints\/ntop\/trusted\/packages.ntop.org.20210108\uff0c\u5185\u5bb9\u5982\u4e0b\uff1a<\/p>\n<pre class=\"code\">function: \"sha256\"\r\nfingerprint: \"d912f631f592c3aebc4f59b25ee85b5118d24a50066c6013d736fa64eb0c4cd2\"<\/pre>\n<h3 data-immersive-translate-walked=\"2477b55e-06f5-4ecb-901f-266bf5cb51ce\">\u5b89\u88c5ntopng<\/h3>\n<p class=\"code\">\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u5b89\u88c5redis\u548cntopng\uff1a<\/p>\n<pre class=\"code\">pkg install redis \r\npkg <span class=\"n\" style=\"text-align: justify;\">install<\/span> <span class=\"n\" style=\"text-align: justify;\">ntopng<\/span><\/pre>\n<h3 style=\"text-align: justify;\">\u6dfb\u52a0\u670d\u52a1<\/h3>\n<pre class=\"code\">sysrc redis_enable=\"YES\"\r\nsysrc ntopng_enable=\"YES\"<\/pre>\n<h3 style=\"text-align: justify;\">\u542f\u52a8ntopng<\/h3>\n<pre class=\"code\">service redis start\r\nservice ntopng start<\/pre>\n<h3 style=\"text-align: justify;\"><strong>\u8bbf\u95eentopng<\/strong><\/h3>\n<p class=\"code\" style=\"text-align: justify;\">\u6d4f\u89c8\u5668\u8f93\u5165http:\/\/lan ip:3000\uff0c\u5373\u53ef\u8fdb\u5165ntopng\u7684Web\u7ba1\u7406\u754c\u9762\u3002<\/p>\n<h3 class=\"code\" style=\"text-align: justify;\"><strong>\u5f00\u673a\u81ea\u542f<\/strong><\/h3>\n<p class=\"code\" style=\"text-align: justify;\">pfSense\u5ffd\u7565\u6807\u51c6<code class=\"code docutils literal notranslate\" data-immersive-translate-walked=\"2477b55e-06f5-4ecb-901f-266bf5cb51ce\"><span class=\"pre\">rc.d<\/span><\/code><span data-immersive-translate-walked=\"2477b55e-06f5-4ecb-901f-266bf5cb51ce\">\u6587\u4ef6\uff0c\u8981\u5728\u5f00\u673a\u65f6\u81ea\u52a8\u542f\u52a8redis\u548cntopng\uff0c\u53ef\u4ee5\u4f7f\u7528Shellcmd\u63d2\u4ef6\u3002<\/span>\u5728Shellcmd\u6dfb\u52a0\u4e24\u4e2a\u5f00\u673a\u542f\u52a8\u670d\u52a1\uff0c\u5982\u4e0b\u56fe\u6240\u793a\uff1a<\/p>\n<p class=\"code\" style=\"text-align: justify;\"><a href=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2024\/05\/\u5728pfsense\u4e0a\u5b89\u88c5ntopng\u65b9\u6cd5.png\"><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-12648 alignnone\" src=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2024\/05\/\u5728pfsense\u4e0a\u5b89\u88c5ntopng\u65b9\u6cd5.png\" alt=\"pfSense Shellcmd \u5b89\u88c5\" width=\"1080\" height=\"367\" srcset=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2024\/05\/\u5728pfsense\u4e0a\u5b89\u88c5ntopng\u65b9\u6cd5.png 1157w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2024\/05\/\u5728pfsense\u4e0a\u5b89\u88c5ntopng\u65b9\u6cd5-300x102.png 300w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2024\/05\/\u5728pfsense\u4e0a\u5b89\u88c5ntopng\u65b9\u6cd5-1024x348.png 1024w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2024\/05\/\u5728pfsense\u4e0a\u5b89\u88c5ntopng\u65b9\u6cd5-768x261.png 768w\" sizes=\"auto, (max-width: 1080px) 100vw, 1080px\" \/><\/a><\/p>\n<p class=\"code\" style=\"text-align: justify;\"><strong>\u5378\u8f7dntopng<\/strong><\/p>\n<pre class=\"code\"><span class=\"n\" style=\"font-family: Consolas, Monaco, monospace;\">pkg<\/span> <span class=\"n\" style=\"font-family: Consolas, Monaco, monospace;\">remove<\/span> <span class=\"n\" style=\"font-family: Consolas, Monaco, monospace;\">ntop<\/span> <span class=\"n\" style=\"font-family: Consolas, Monaco, monospace;\">ntopng<\/span><\/pre>\n<p>\u8fd9\u5c06\u5220\u9664\u5b58\u50a8\u5e93\u548c\u8f6f\u4ef6\u5305\u3002\u82e5\u8981\u6e05\u9664\u6570\u636e\uff0c\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<pre class=\"code\">rm <span class=\"o\">-<\/span><span class=\"n\">rf<\/span> <span class=\"o\">\/<\/span><span class=\"n\">var<\/span><span class=\"o\">\/<\/span><span class=\"n\">db<\/span><span class=\"o\">\/<\/span><span class=\"n\">ntopng<\/span><\/pre>\n<p>\u5982\u679c\u4e0d\u518d\u9700\u8981Redis\uff0c\u53ef\u4ee5\u7981\u7528 Redis\uff1a<\/p>\n<pre class=\"code\">service redis disable<\/pre>\n<h2>\u4e2d\u6587\u6c49\u5316<\/h2>\n<p>ntopng\u5b98\u65b9\u7248\u672c\u652f\u6301\u5207\u6362\u7b80\u4f53\u4e2d\u6587\u663e\u793a\uff0c\u4f46\u6c49\u5316\u4e0d\u5b8c\u6574\uff0c\u7ffb\u8bd1\u4e5f\u4e0d\u591f\u51c6\u786e\u3002<span style=\"font-size: 16px;\">\u4e3a\u4e86\u4fbf\u4e8e\u5927\u5bb6\u4f7f\u7528\uff0c\u6211\u6839\u636e<\/span><a style=\"font-size: 16px;\" href=\"https:\/\/github.com\/ntop\/ntopng\" data-immersive-translate-walked=\"4a81e76d-b45e-4a6a-a558-e2ab728d0930\"><span data-immersive-translate-walked=\"4a81e76d-b45e-4a6a-a558-e2ab728d0930\">Github<\/span><\/a><span style=\"font-size: 16px;\">\u4e0a\u6700\u65b0\u7684\u7684\u82f1\u6587\u8bed\u8a00\u5305\uff0c\u91cd\u65b0\u8fdb\u884c\u4e86\u6c49\u5316\u3002<\/span><span style=\"text-align: justify;\">\u5c06\u9644\u4ef6\u89e3\u538b\u540e\u4e0a\u4f20\u5230pfSense\u6216OPNsense\u9632\u706b\u5899\u7684\/usr\/local\/share\/ntopng\/scripts\/locales\u76ee\u5f55\uff0c\u5237\u65b0\u6d4f\u89c8\u5668\u5373\u53ef\u3002<\/span><\/p>\n<p><a style=\"text-align: justify;\" href=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2024\/05\/Snipaste_2024-05-21_08-44-43.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-12598\" src=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2024\/05\/Snipaste_2024-05-21_08-44-43.png\" alt=\"\" width=\"1093\" height=\"775\" srcset=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2024\/05\/Snipaste_2024-05-21_08-44-43.png 1994w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2024\/05\/Snipaste_2024-05-21_08-44-43-300x213.png 300w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2024\/05\/Snipaste_2024-05-21_08-44-43-1024x726.png 1024w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2024\/05\/Snipaste_2024-05-21_08-44-43-768x545.png 768w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2024\/05\/Snipaste_2024-05-21_08-44-43-1536x1089.png 1536w\" sizes=\"auto, (max-width: 1093px) 100vw, 1093px\" \/><\/a><\/p>\n<p><span style=\"text-align: justify;\">ntopng\u4e2d\u6587\u8bed\u8a00\u5305\uff1a<\/span><strong style=\"text-align: justify;\"><a href=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2024\/05\/ntopng_cn.zip\">ntopng_cn<\/a><\/strong><\/p>\n<p><strong style=\"text-align: justify;\"><a href=\"https:\/\/www.ntop.org\/guides\/ntopng\/third_party_integrations\/pfsense.html\">\u539f\u6587\u5730\u5740<\/a><\/strong><\/p>\n<div id=\"gtx-trans\" style=\"position: absolute; left: 106px; top: 2827.11px;\">\n<div class=\"gtx-trans-icon\"><\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>ntopng\u662f\u4e00\u4e2a\u7f51\u7edc\u6d41\u91cf\u63a2\u6d4b\u5668\uff0c\u80fd\u591f\u4ece\u6d41\u91cf\u955c\u50cf\u3001NetFlow\u5bfc\u51fa\u5668\u3001SNMP &hellip; <a href=\"https:\/\/blog.pfchina.org\/?p=12579\">\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,28],"tags":[207,132],"class_list":["post-12579","post","type-post","status-publish","format-standard","hentry","category-opnsense","category-pfsense","tag-ntopng","tag-132"],"_links":{"self":[{"href":"https:\/\/blog.pfchina.org\/index.php?rest_route=\/wp\/v2\/posts\/12579","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=12579"}],"version-history":[{"count":79,"href":"https:\/\/blog.pfchina.org\/index.php?rest_route=\/wp\/v2\/posts\/12579\/revisions"}],"predecessor-version":[{"id":12702,"href":"https:\/\/blog.pfchina.org\/index.php?rest_route=\/wp\/v2\/posts\/12579\/revisions\/12702"}],"wp:attachment":[{"href":"https:\/\/blog.pfchina.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=12579"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.pfchina.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=12579"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.pfchina.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=12579"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}