{"id":1217,"date":"2014-08-24T16:31:37","date_gmt":"2014-08-24T14:31:37","guid":{"rendered":"http:\/\/blog.rabahi.net\/?page_id=1217"},"modified":"2014-08-24T16:31:58","modified_gmt":"2014-08-24T14:31:58","slug":"ntop","status":"publish","type":"page","link":"https:\/\/blog.rabahi.net\/?page_id=1217","title":{"rendered":"ntop"},"content":{"rendered":"<blockquote><p>&#8220;ntopng&#8221; is an open-source network traffic monitor. ntopng relies on the Redis key-value server rather than a traditional database, takes advantage of nDPI for protocol detection, supports geolocation of hosts, and is able to display real-time flow analysis for connected hosts<\/p><\/blockquote>\n<p style=\"text-align: right;\">Wikipedia<\/p>\n<hr \/>\n<h1>Installation<\/h1>\n<pre class=\"bash\" style=\"font-family:monospace;\"><ol><li style=\"background: #fcfcfc;\"><div style=\"font-size: 12px;\"><span style=\"color: #666666; font-style: italic;\">#!\/bin\/bash<\/span><\/div><\/li><li style=\"background: #f0f0f0;\"><div style=\"font-size: 12px;\">&nbsp;<\/div><\/li><li style=\"background: #fcfcfc;\"><div style=\"font-size: 12px;\"><span style=\"color: #7a0874; font-weight: bold;\">echo<\/span> <span style=\"color: #ff0000;\">&quot;add ntop repository&quot;<\/span><\/div><\/li><li style=\"background: #f0f0f0;\"><div style=\"font-size: 12px;\"><span style=\"color: #c20cb9; font-weight: bold;\">cat<\/span> <span style=\"color: #000000; font-weight: bold;\">&gt;<\/span> <span style=\"color: #000000; font-weight: bold;\">\/<\/span>etc<span style=\"color: #000000; font-weight: bold;\">\/<\/span>yum.repos.d<span style=\"color: #000000; font-weight: bold;\">\/<\/span>ntop.repo <span style=\"color: #000000; font-weight: bold;\">&lt;&lt;<\/span> <span style=\"color: #ff0000;\">&quot;EOF&quot;<\/span><\/div><\/li><li style=\"background: #fcfcfc;\"><div style=\"font-size: 12px;\"><span style=\"color: #7a0874; font-weight: bold;\">[<\/span>ntop<span style=\"color: #7a0874; font-weight: bold;\">]<\/span><\/div><\/li><li style=\"background: #f0f0f0;\"><div style=\"font-size: 12px;\"><span style=\"color: #007800;\">name<\/span>=ntop packages<\/div><\/li><li style=\"background: #fcfcfc;\"><div style=\"font-size: 12px;\"><span style=\"color: #007800;\">baseurl<\/span>=http:<span style=\"color: #000000; font-weight: bold;\">\/\/<\/span>www.nmon.net<span style=\"color: #000000; font-weight: bold;\">\/<\/span>centos-stable<span style=\"color: #000000; font-weight: bold;\">\/<\/span><span style=\"color: #007800;\">$releasever<\/span><span style=\"color: #000000; font-weight: bold;\">\/<\/span><span style=\"color: #007800;\">$basearch<\/span><span style=\"color: #000000; font-weight: bold;\">\/<\/span><\/div><\/li><li style=\"background: #f0f0f0;\"><div style=\"font-size: 12px;\"><span style=\"color: #007800;\">enabled<\/span>=<span style=\"color: #000000;\">1<\/span><\/div><\/li><li style=\"background: #fcfcfc;\"><div style=\"font-size: 12px;\"><span style=\"color: #007800;\">gpgcheck<\/span>=<span style=\"color: #000000;\">1<\/span><\/div><\/li><li style=\"background: #f0f0f0;\"><div style=\"font-size: 12px;\"><span style=\"color: #007800;\">gpgkey<\/span>=http:<span style=\"color: #000000; font-weight: bold;\">\/\/<\/span>www.nmon.net<span style=\"color: #000000; font-weight: bold;\">\/<\/span>centos-stable<span style=\"color: #000000; font-weight: bold;\">\/<\/span>RPM-GPG-KEY-deri<\/div><\/li><li style=\"background: #fcfcfc;\"><div style=\"font-size: 12px;\"><span style=\"color: #7a0874; font-weight: bold;\">[<\/span>ntop-noarch<span style=\"color: #7a0874; font-weight: bold;\">]<\/span><\/div><\/li><li style=\"background: #f0f0f0;\"><div style=\"font-size: 12px;\"><span style=\"color: #007800;\">name<\/span>=ntop packages<\/div><\/li><li style=\"background: #fcfcfc;\"><div style=\"font-size: 12px;\"><span style=\"color: #007800;\">baseurl<\/span>=http:<span style=\"color: #000000; font-weight: bold;\">\/\/<\/span>www.nmon.net<span style=\"color: #000000; font-weight: bold;\">\/<\/span>centos-stable<span style=\"color: #000000; font-weight: bold;\">\/<\/span><span style=\"color: #007800;\">$releasever<\/span><span style=\"color: #000000; font-weight: bold;\">\/<\/span>noarch<span style=\"color: #000000; font-weight: bold;\">\/<\/span><\/div><\/li><li style=\"background: #f0f0f0;\"><div style=\"font-size: 12px;\"><span style=\"color: #007800;\">enabled<\/span>=<span style=\"color: #000000;\">1<\/span><\/div><\/li><li style=\"background: #fcfcfc;\"><div style=\"font-size: 12px;\"><span style=\"color: #007800;\">gpgcheck<\/span>=<span style=\"color: #000000;\">1<\/span><\/div><\/li><li style=\"background: #f0f0f0;\"><div style=\"font-size: 12px;\"><span style=\"color: #007800;\">gpgkey<\/span>=http:<span style=\"color: #000000; font-weight: bold;\">\/\/<\/span>www.nmon.net<span style=\"color: #000000; font-weight: bold;\">\/<\/span>centos-stable<span style=\"color: #000000; font-weight: bold;\">\/<\/span>RPM-GPG-KEY-deri<\/div><\/li><li style=\"background: #fcfcfc;\"><div style=\"font-size: 12px;\">EOF<\/div><\/li><li style=\"background: #f0f0f0;\"><div style=\"font-size: 12px;\">&nbsp;<\/div><\/li><li style=\"background: #fcfcfc;\"><div style=\"font-size: 12px;\"><span style=\"color: #7a0874; font-weight: bold;\">echo<\/span> <span style=\"color: #ff0000;\">&quot;install ntop and redis&quot;<\/span><\/div><\/li><li style=\"background: #f0f0f0;\"><div style=\"font-size: 12px;\">dnf <span style=\"color: #660033;\">-y<\/span> <span style=\"color: #c20cb9; font-weight: bold;\">install<\/span> redis ntopng hiredis-devel<\/div><\/li><li style=\"background: #fcfcfc;\"><div style=\"font-size: 12px;\">&nbsp;<\/div><\/li><li style=\"background: #f0f0f0;\"><div style=\"font-size: 12px;\"><span style=\"color: #c20cb9; font-weight: bold;\">cat<\/span> <span style=\"color: #000000; font-weight: bold;\">&gt;<\/span> <span style=\"color: #000000; font-weight: bold;\">\/<\/span>etc<span style=\"color: #000000; font-weight: bold;\">\/<\/span>httpd<span style=\"color: #000000; font-weight: bold;\">\/<\/span>conf.d<span style=\"color: #000000; font-weight: bold;\">\/<\/span>ntopng.conf <span style=\"color: #000000; font-weight: bold;\">&lt;&lt;<\/span> <span style=\"color: #ff0000;\">&quot;EOF&quot;<\/span><\/div><\/li><li style=\"background: #fcfcfc;\"><div style=\"font-size: 12px;\">ProxyPreserveHost On<\/div><\/li><li style=\"background: #f0f0f0;\"><div style=\"font-size: 12px;\">Proxypass <span style=\"color: #000000; font-weight: bold;\">\/<\/span>ntopng<span style=\"color: #000000; font-weight: bold;\">\/<\/span> http:<span style=\"color: #000000; font-weight: bold;\">\/\/<\/span>localhost:<span style=\"color: #000000;\">3000<\/span><span style=\"color: #000000; font-weight: bold;\">\/<\/span>ntopng<span style=\"color: #000000; font-weight: bold;\">\/<\/span><\/div><\/li><li style=\"background: #fcfcfc;\"><div style=\"font-size: 12px;\">Proxypassreverse <span style=\"color: #000000; font-weight: bold;\">\/<\/span>ntopng<span style=\"color: #000000; font-weight: bold;\">\/<\/span> http:<span style=\"color: #000000; font-weight: bold;\">\/\/<\/span>localhost:<span style=\"color: #000000;\">3000<\/span><span style=\"color: #000000; font-weight: bold;\">\/<\/span>ntopng<span style=\"color: #000000; font-weight: bold;\">\/<\/span><\/div><\/li><li style=\"background: #f0f0f0;\"><div style=\"font-size: 12px;\">ProxyRequests     Off<\/div><\/li><li style=\"background: #fcfcfc;\"><div style=\"font-size: 12px;\">EOF<\/div><\/li><li style=\"background: #f0f0f0;\"><div style=\"font-size: 12px;\">&nbsp;<\/div><\/li><li style=\"background: #fcfcfc;\"><div style=\"font-size: 12px;\"><span style=\"color: #7a0874; font-weight: bold;\">echo<\/span> <span style=\"color: #ff0000;\">&quot;enable start ntopng on boot&quot;<\/span><\/div><\/li><li style=\"background: #f0f0f0;\"><div style=\"font-size: 12px;\">systemctl <span style=\"color: #7a0874; font-weight: bold;\">enable<\/span> ntopng.service<\/div><\/li><li style=\"background: #fcfcfc;\"><div style=\"font-size: 12px;\">systemctl <span style=\"color: #7a0874; font-weight: bold;\">enable<\/span> redis.service<\/div><\/li><li style=\"background: #f0f0f0;\"><div style=\"font-size: 12px;\">&nbsp;<\/div><\/li><li style=\"background: #fcfcfc;\"><div style=\"font-size: 12px;\"><span style=\"color: #7a0874; font-weight: bold;\">echo<\/span> <span style=\"color: #ff0000;\">&quot;start service ntopng and redis&quot;<\/span><\/div><\/li><li style=\"background: #f0f0f0;\"><div style=\"font-size: 12px;\">systemctl restart httpd.service<\/div><\/li><li style=\"background: #fcfcfc;\"><div style=\"font-size: 12px;\">systemctl start ntopng.service<\/div><\/li><li style=\"background: #f0f0f0;\"><div style=\"font-size: 12px;\">systemctl start redis.service<\/div><\/li><li style=\"background: #fcfcfc;\"><div style=\"font-size: 12px;\">&nbsp;<\/div><\/li><li style=\"background: #f0f0f0;\"><div style=\"font-size: 12px;\"><span style=\"color: #7a0874; font-weight: bold;\">echo<\/span> <span style=\"color: #ff0000;\">&quot;configure \/etc\/ntopng\/ntopng.conf, created when service ntopng started&quot;<\/span>.<\/div><\/li><li style=\"background: #fcfcfc;\"><div style=\"font-size: 12px;\"><span style=\"color: #c20cb9; font-weight: bold;\">cat<\/span> <span style=\"color: #000000; font-weight: bold;\">&gt;&gt;<\/span> <span style=\"color: #000000; font-weight: bold;\">\/<\/span>etc<span style=\"color: #000000; font-weight: bold;\">\/<\/span>ntopng<span style=\"color: #000000; font-weight: bold;\">\/<\/span>ntopng.conf <span style=\"color: #000000; font-weight: bold;\">&lt;&lt;<\/span> <span style=\"color: #ff0000;\">&quot;EOF&quot;<\/span><\/div><\/li><li style=\"background: #f0f0f0;\"><div style=\"font-size: 12px;\"><span style=\"color: #660033;\">--http-prefix<\/span> <span style=\"color: #000000; font-weight: bold;\">\/<\/span>ntopng<\/div><\/li><li style=\"background: #fcfcfc;\"><div style=\"font-size: 12px;\">EOF<\/div><\/li><li style=\"background: #f0f0f0;\"><div style=\"font-size: 12px;\">&nbsp;<\/div><\/li><li style=\"background: #fcfcfc;\"><div style=\"font-size: 12px;\"><span style=\"color: #7a0874; font-weight: bold;\">echo<\/span> <span style=\"color: #ff0000;\">&quot;restart service ntopng&quot;<\/span><\/div><\/li><li style=\"background: #f0f0f0;\"><div style=\"font-size: 12px;\">systemctl restart ntopng.service<\/div><\/li><li style=\"background: #fcfcfc;\"><div style=\"font-size: 12px;\">&nbsp;<\/div><\/li><li style=\"background: #f0f0f0;\"><div style=\"font-size: 12px;\"><span style=\"color: #007800;\">myip<\/span>=<span style=\"color: #000000; font-weight: bold;\">`<\/span><span style=\"color: #c20cb9; font-weight: bold;\">hostname<\/span> -I<span style=\"color: #000000; font-weight: bold;\">`<\/span><\/div><\/li><li style=\"background: #fcfcfc;\"><div style=\"font-size: 12px;\"><span style=\"color: #7a0874; font-weight: bold;\">echo<\/span> <span style=\"color: #ff0000;\">&quot;Now meet you there: http:\/\/<span style=\"color: #007800;\">$myip<\/span>\/ntopng&quot;<\/span><\/div><\/li><li style=\"background: #f0f0f0;\"><div style=\"font-size: 12px;\">&nbsp;<\/div><\/li><\/ol><\/pre>\n<p>That&#8217;s all \ud83d\ude42<\/p>\n<h1>Usage example<\/h1>\n<pre lang=\"bash\">\r\nntopng --dns-mode 1 --interface 5 --daemon --redis localhost:6379 --verbose\r\n<\/pre>\n<h1>Read more<\/h1>\n<ul>\n<li><a href=\"http:\/\/www.ntop.org\/\" title=\"ntop\">ntop<\/a><\/li>\n<li><a href=\"http:\/\/en.wikipedia.org\/wiki\/Ntopng\" title=\"wikipedia\">wikipedia<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>&#8220;ntopng&#8221; is an open-source network traffic monitor. ntopng relies on the Redis key-value server rather than a traditional database, takes advantage of nDPI for protocol detection, supports geolocation of hosts, and is able to display real-time flow analysis for connected hosts Wikipedia Installation That&#8217;s all \ud83d\ude42 Usage example ntopng &#8211;dns-mode 1 &#8211;interface 5 &#8211;daemon &#8211;redis [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":271,"menu_order":4,"comment_status":"closed","ping_status":"open","template":"","meta":{"footnotes":""},"class_list":["post-1217","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/blog.rabahi.net\/index.php?rest_route=\/wp\/v2\/pages\/1217","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.rabahi.net\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/blog.rabahi.net\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/blog.rabahi.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.rabahi.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1217"}],"version-history":[{"count":1,"href":"https:\/\/blog.rabahi.net\/index.php?rest_route=\/wp\/v2\/pages\/1217\/revisions"}],"predecessor-version":[{"id":1218,"href":"https:\/\/blog.rabahi.net\/index.php?rest_route=\/wp\/v2\/pages\/1217\/revisions\/1218"}],"up":[{"embeddable":true,"href":"https:\/\/blog.rabahi.net\/index.php?rest_route=\/wp\/v2\/pages\/271"}],"wp:attachment":[{"href":"https:\/\/blog.rabahi.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1217"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}