My linux world » ntop

ntop


“ntopng” 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

  1. #!/bin/bash
  2.  
  3. echo "add ntop repository"
  4. cat > /etc/yum.repos.d/ntop.repo << "EOF"
  5. [ntop]
  6. name=ntop packages
  7. baseurl=http://www.nmon.net/centos-stable/$releasever/$basearch/
  8. enabled=1
  9. gpgcheck=1
  10. gpgkey=http://www.nmon.net/centos-stable/RPM-GPG-KEY-deri
  11. [ntop-noarch]
  12. name=ntop packages
  13. baseurl=http://www.nmon.net/centos-stable/$releasever/noarch/
  14. enabled=1
  15. gpgcheck=1
  16. gpgkey=http://www.nmon.net/centos-stable/RPM-GPG-KEY-deri
  17. EOF
  18.  
  19. echo "install ntop and redis"
  20. dnf -y install redis ntopng hiredis-devel
  21.  
  22. cat > /etc/httpd/conf.d/ntopng.conf << "EOF"
  23. ProxyPreserveHost On
  24. Proxypass /ntopng/ http://localhost:3000/ntopng/
  25. Proxypassreverse /ntopng/ http://localhost:3000/ntopng/
  26. ProxyRequests Off
  27. EOF
  28.  
  29. echo "enable start ntopng on boot"
  30. systemctl enable ntopng.service
  31. systemctl enable redis.service
  32.  
  33. echo "start service ntopng and redis"
  34. systemctl restart httpd.service
  35. systemctl start ntopng.service
  36. systemctl start redis.service
  37.  
  38. echo "configure /etc/ntopng/ntopng.conf, created when service ntopng started".
  39. cat >> /etc/ntopng/ntopng.conf << "EOF"
  40. --http-prefix /ntopng
  41. EOF
  42.  
  43. echo "restart service ntopng"
  44. systemctl restart ntopng.service
  45.  
  46. myip=`hostname -I`
  47. echo "Now meet you there: http://$myip/ntopng"
  48.  

That’s all 🙂

Usage example

ntopng --dns-mode 1 --interface 5 --daemon --redis localhost:6379 --verbose

Read more


Copyright © 2024 My linux world - by Marc RABAHI
Design by Marc RABAHI and encelades.