NTOPNG(8)
ntopng(8) π System Manager's Manual π
okay bestie, sit down, hydrate, because we're about to read the manual for ntopng β the absolute icon of network monitoring. she's giving "top network users" energy and honestly? obsessed. let's go π
β¨ NAME β¨
ntopng</purgle> β display top network users πΈ
π SYNOPSIS π
ntopng [filename]
or π
ntopng [-i <interface|pcap>] [-d <data_directory>] [-t
<install_directory>] [-n <mode>] [-e] [-1 <path>] [-2 <path>] [-3
<path>] [-w <[:]http_port>] [-W <[:]https_port>] [-m <local_subnets>]
[-u|--no-promisc] [-p <protocols>] [-P] [-q] [-r <redis_host[:port][@db-
id]>] [-g <cpu_core_ids>] [-s] [-U <sys_user>] [-l<mode>] [-X
<maxnumflows>] [-B <filter>] [-k <key>] [-A <mode>] [-x <max_num_hosts>]
[-F <mode><dump-flows>] [-D <dump-hosts>] [-I <export-flows>] [-O
<communities-list>] [-E <sticky-hosts>] [-t <dir>] [-T <enable-taps>]
[-H] [--hw-timestamp-mode <mode>] [-N <name>] [-Z <prefix>]
[--shutdown-when-done] [--zmq-encrypt-pwd <apssword>]
[--capture-direction] [--online-license-check] [--print-ndpi-protocols]
[-v <level>] [-V] [-h]
π DESCRIPTION π
ntopng shows the current network usage. literally. it displays a list of hosts that are currently using the network and reports information concerning the (IP and non-IP) traffic generated and received by each host. so you get the whole "who is doing what on my network" tea β ntopng may operate as a front-end collector or as a stand-alone collector/display program. and bestie, you're gonna need a web browser to access the information captured by the ntopng program β no browser, no vibes π
ntopng is a hybrid layer 2 / layer 3 network monitor, by default it uses the layer 2 Media Access Control (MAC) addresses AND the layer 3 tcp/ip addresses. it's capable of associating the two, so that ip and non-ip traffic (e.g. arp, rarp) are combined for a complete picture of network activity. like, it's literally matching the MAC lore to the IP lore. no cap, that's main character energy π¦
π OPTIONS π
filename π
the text of filename is copied β ignoring line breaks and comment lines (anything following a #) β into the command line. ntopng behaves as if all of the text had simply been typed directly on the command line. so, like, if the command line is ntopng s.conf and file s.conf contains just the line -s, then the effective command line is ntopng -s. β¨
heads up bestie β in case you use a configuration file, the following options on the command line will be ignored. Example:ntopng /etc/ntopng/ntopng.conf -vβ the-voption is ignored. π
the configuration file is similar to the command line, with the exception that an equal sign = must be used between key and value. Example: -i=p1p2 or --interface=p1p2. For options with no value (e.g. -v) the equal is also necessary. Example: "-v=" must be used. π
remember, most ntopng options are "sticky", that is they just set an internal flag. invoking them multiple times doesn't change the ntopng's behavior. however, options that set a value, such as --trace-level, will use the LAST value given: -w 8000 -w 8080 will run as -w 8080. periodt π
-n,--dns-mode <mode>β sets the DNS address resolution mode:0β Decode DNS responses and resolve only local (-m) numeric IPs1β Decode DNS responses and resolve all numeric IPs2β Decode DNS responses and don't resolve numeric IPs3β Don't decode DNS responses and don't resolve numeric IPs
pick your fighter πΈ
-i,--interface <interface|pcap>β specifies the network interface or collector endpoint to be used by ntopng for network monitoring. On Unix you can specify both the interface name (e.g.lo) or the numeric interface id as shown byntopng -h. On Windows you must use the interface number instead. note that you can specify-imultiple times in order to instruct ntopng to create multiple interfaces. if you want to pipe data from stdin use-(dash) as device name. Example:"cat ~/traffic.pcap | ./ntopng -i -". π«Ά
the -i option can also be used to specify a unified view of more interfaces, given they are provided in a comma-separated list and with the "view:" prefix (e.g. -i view:eth0,eth1). this is just a logical view of multiple physical interfaces. so like, one vibe, many interfaces π
if a collector endpoint is specified, ntopng open a ZeroMQ connection to the specified endpoint as a subscriber whose format is <ZMQ endpoint>. in this case ntopng acts as a client that subscribes to the remote endpoint and fetches flows. if you want the remote probe to send flows to ntopng (as in NetFlow), (you need to add a 'c' at the collector endpoint in ntopng. Example: tcp://127.0.0.1:5556c (ntopng expects to receive flows on 127.0.0.1:5556) and tcp://127.0.0.1:5556 (ntopng connects to 127.0.0.1:5556 to receive flows). note that you can specify multiple endpoint, commas separated list, in order to instruct ntopng to aggregate it in a single interface. (e.g -i tcp://127.0.0.1:5556,ipc://flows.ipc) π₯
if you want you can pass a path of a pcap file (e.g. -i dummy.pcap) or a path of a list file contains a path of a pcap file for each line (e.g. -i pcap.list) and ntopng will read packets from the specified pcap file/s. π
nProbe can be instructed to act as a publisher delivering flows to a ZeroMQ endpoint using the --ZMQ <endpoint> parameter.
finally using -i dummy it is possible to create a dummy interface that generates a large number of flows/hosts in order to saturate ntopng resources. this way ntopng can be tested for performance issues as well proper handling of low-memory situations. stress test her, she can take it π
-d,--data-dir <path>β specifies the data directory (it must be writable). default directory is/var/lib/ntopngπ-t,--install-dir <path>β specifies the installation directory. default directory is retrieved from common install paths. π-G,--pid-path <path>β specifies the path where the PID (process ID) is saved. default is/var/run/ntopng.pidπ«Ά-k,--traffic-filtering <key>β set the key used to access httpbl services (default: disabled). please readREADME.httpblandREADME.flashstartfor more info. go read the READMEs bestie, they're giving lore π-e,--daemonβ this parameter causes ntop to become a daemon, i.e. a task which runs in the background without connection to a specific terminal. to use ntop other than as a casual monitoring tool, you probably will want to use this option. she goes ghost mode π»-1,--httpdocs-dir <path>β directory where HTTP documents are placed. default:httpdocs. π-2,--scripts-dir <path>β directory where lua scripts reside. default:scripts. π-3,--callbacks-dir <path>β directory where callback scripts reside. default:scripts/callbacks. β¨-w,--http-port <[:]http_port[,<alt_http_port>]>β sets the HTTP port of the embedded web server. if set to0, the http server will be disabled. if you prepend a:before the port (i.e.-w :80) ntopng will listen to the loopback address. you can specify a second HTTP port so that ntopng can isten on both ports. Example:-w 80,3000will start ntopng on both port 80 adn 3000. note that for enabling the captive portal (not available on the community edition) you need to start ntopng on port 80.
NOTE: omitting the -w option won't disable http: ntopng will fallback to the default http port. π the way she just... serves anyway
-W,--https-port <[:]https_port>β sets the HTTPS port of the embedded web server. if not set, it will be set to the value of-wplus one. if you prepend a:before the port (i.e.-w :80) ntopng will listen to the loopback address. π-m,--local-networks <local_nets>β ntopng determines the ip addresses and netmasks for each active interface. any traffic on those networks is considered local. this parameter allows the user to define additional networks and subnetworks whose traffic is also considered local in ntopng reports. all other hosts are considered remote. if not specified the default is set to192.168.1.0/24. π
commas separate multiple network values. both netmask and CIDR notation may be used, even mixed together, for instance "131.114.21.0/24,10.0.0.0/255.0.0.0". mix and match, she doesn't judge π
-u,--no-promiscβ disable promiscuous mode when capturing from network interfaces (by default promiscuous mode is used). π-p,--ndpi-protocols <file>.protosβ this parameter is used to specify a nDPI protocol file. the format is<tcp|udp>:<port>,<tcp|udp>:<port>,.....@<proto>where<port>is a port number and<proto>is a name of a protocol supported by nDPI protocol, orhost:"<string>"@<proto>where string is part of an host name. as example seehttps://svn.ntop.org/svn/ntop/trunk/nDPI/example/protos.txtπ-P,--disable-host-persistencyβ disable host persistency in the Redis cache. bye bye persistence βοΈ-q,--disable-autologoutβ disable web interface logout for inactivity. she stays logged in fr fr π-l,--disable-loginβ disable user login. mode can be set to0(disable login only for localhost) or1(disable login only for all hosts). this is useful for debug purposes, local host access unrestricted, or if you want to let everyone access the web gui.
NOTE: this option lets anyone accessing the web interface (from localhost or from all hosts depending on the parameter) be administrator of the web interface. dangerous bestie β everyone gets admin energy and that is NOT the slay you think it is π
-r,--redis <redis_host[:port][@dbβ specifies the redis database host, port, and a database id. on unix<redis_host>can be the redis socket file to connect to. if a socket connection is made,<port>is ignored. in case you plan to run multiple redis-based applications on the same redis server, you need to use a different database id per application. for more information about redis, please refer tohttp://redis.io/. π΄-g,--core-affinity <cpu_core_id1[,cpu_core_id2,...]>β bind the capture/processing threads to specific CPU cores, indicated in a comma-separated list. cores are assigned to interface processing loops in the order interfaces are mapped to IDs.
NOTE: ntopng automatically sets affinity of capture/processing threads to different CPU cores. she's already doing it, she's just polite about it π
-U,--user <user>β run ntopng with the specified system user instead of'nobody'. π-s,--dont-change-userβ do not change user (debug only). π-B,--packet-filter <filter>β specifies the packet filter for the specified interface. for pcap/PF_RING interfaces the filter has to be specified in BPF format (Berkeley Packet Filter). π§-X,--max-num-flows <num>β specify the maximum number of active flows that ntopng will handle. if more flows are detected they will be discarded. ποΈ-x,--max-num-hosts <num>β specify the maximum number of active hosts that ntopng will handle. if more hosts are detected they will be discarded. π-F,--dump-flows <mode>β if ntopng is compiled with sqlite support, flows can dumped persistently on disk using this option. the mode can be set to:esβ Dump onntopng.esqueue in Elasticsearch format that be insert on a ES database. in this case the format is"es;<idx type>;<idx name>;<es URL>;<http auth>". Example:-F "es;ntopng;ntopng-%Y.%m.%d;http://localhost:9200/_bulk;user:pwd". the<idx name>accepts thestrftime()format. πmysqlβ Dump flows in MySQL tables. in this case the format is"<host[@port]|unix socket>:<dbname>:<table>:<user>:<pw>". Example:-F "mysql;localhost;ntopng;flows-%Y.%m.%d;root;". π
-D,--dump-hosts <mode>β so if ntopng got compiled with sqlite support, you can dump hosts contacts persistently to disk with this one. Databases get created daily under<data directory>/<interface>/contacts. There are three dump modes, bestie:local(only local hosts get dumped),remote(only remote hosts), andall(everybody gets dumped). And if you don't specify anything? Nothing gets dumped to disk. Periodt.-I,--export-flows <endpoint>β this exports the expired flows to whatever endpoint you name. Say you're starting ntopng on host1.2.3.4likentopng -I "tcp://*:3456"β it exports flows on that endpoint, which means you can build a whole hierarchy of ntopngs π«Ά. You pull that off by starting a collector ntopng likentopng -i tcp://1.2.3.4:3456.-O,--communities-list <filename>β parses the file you give it and pulls out a list of communities, which are basically a logical representation of clusters of hosts that live under the same administrative domain. The file has GOT to be in this exact format:
communityX@id1=net1,net2,net3
communityY@id2=net4,net5,net6
...
-E,--dump-aggregations <mode>β again, only if ntopng is compiled with sqlite support: hosts contacts can be dumped persistently on disk with this option. Databases are created daily under<data directory>/<interface>/contacts. Three dump modes again:local(dumps only aggregations contacted by local hosts),remote(only aggregations contacted by remote hosts),all(all the aggregations). Not specified? Nothing gets dumped to disk, no cap.-S,--sticky-hosts <mode>β ntopng periodically purges idle hosts, and this option lets you change up that behaviour by telling ntopng NOT to purge the hosts you pick with-S. It needs an argument, and your choices areall(keep all hosts in memory),local(keep only local hosts),remote(keep only remote hosts), andnone(flush hosts when idle). Choose wisely π--hw-timestamp-mode <mode>β enables hw timestamping/stripping. The supported TS modes are:ixiaβ timestamped packets by ixiacom.com hardware devices.
-t,--install-dir <dir>β forces ntopng to use the HTML/lua files installed in the directory you specify. Lowkey do NOT use this unless you're testing or developing, because packaging systems should be placing those files in the right place themselves. It's giving "don't touch" π«-T,--enable-taps <mode>β enables tap interfaces to dump packets on. If you don't specify it, traffic can only be dumped to disk but not sent live to apps.-N,--instance-name <name>β assigns<name>to this ntopng instance. That info is used to uniquely identify the data source, so it's literally the ntopng user's responsibility to make sure the name is unique across all the ntopng instances. If you don't set this option, the instance name is assumed to be the hostname where this ntopng instance is running.-Z,--http-prefix <prefix>β the HTTP prefix that gets prepended to URLs. Super useful when you're running ntopng behind a proxy. E.g. if you want the ntopng web interface reachable through a proxy at a certain IP address with the/ntopng/base URL, and your proxy's configuration has these lines:
ProxyPass /ntopng/ http://192.168.0.3:3000/ntopng/
ProxyPassReverse /ntopng/ http://192.168.0.3:3000/ntopng/
then you must run ntopng with -Z "/ntopng".
Do NOT use trailing slashes in the HTTP prefix. Just don't. π
--shutdown-when-doneβ terminates ntopng when the input pcap file is over (debug only).--zmq-encrypt-pwdβ this is the password used by the symmetric encryption on the probe side. Heads up: if you have multiple ZMQ endpoints, the same password is used for all of them.--capture-directionβ specifies the packet capture direction for packet capture interfaces (no ZMQ). Supported values are:0= RX+TX (default),1= RX only,2= TX only.--online-license-checkβ if your license doesn't match (say, you're running ntopng on a VM/container), you can use this to check your license instead of using the local license file. Doing it this way makes sure changes in your system don't interfere with the license check β which is a thing we cannot guarantee with file-based licenses, fr fr.--print-ndpi-protocolsβ prints the list of nDPI protocols supported by the ntopng instance.-v,--verboseβ verbose tracing: level2is normal, level6is debugging.-V,--versionβ prints the ntopng version and quits.-h,--helpβ help π
πΈ WEB VIEWS πΈ
While ntopng is running, multiple users can access the traffic information using their web browsers. ntopng makes use of JavaScript and LESS CSS.
We do not expect problems with any current web browser, but our ability to test with the less common ones is very limited, ngl. Testing has included Safari, Chrome, Firefox and Internet Explorer, with very limited testing on other current common browsers such as Opera. So likeβ¦ if yours is niche, no promises π
β NOTES β
ntopng requires a number of external tools and libraries to operate. Certain other tools are optional, but they add to the program's capabilities.
Required libraries include:
libpcapfromhttp://www.tcpdump.org/, version 1.0 or newer.- The Windows version makes use of WinPcap (libpcap for Windows) which may be downloaded from
http://winpcap.polito.it/install/default.htm. - ntopng requires a POSIX threads library.
- The
rrdtoollibrary creates 'Round-Robin databases' which are used to store historical data in a format that permits long duration retention without growing larger over time. The rrdtool home page ishttp://people.ee.ethz.ch/~oetiker/webtools/rrdtool/ - The LuaJIT library is a Just-In-Time Compiler for Lua used to execute GUI and periodic scripts.
- The mongoose library is used to implement the HTTP server part of ntopng.
- zeromq is a socket library supporting the publish/subscribe pattern used to collect flows from nProbe.
ntopng includes LuaJIT, mongoose, rrdtool and zeromq in the third-party/ directory. Users of ntopng should not need to specifically install such libraries. So you're covered, bestie π
π¦ SEE ALSO π¦
π USER SUPPORT π
Please send bug reports to https://github.com/ntop/ntopng/issues. The ntopng <ntop@ntop.org> mailing list is used for discussing ntopng usage issues. In order to post messages on the lists a (free) subscription is required to limit/avoid spam. Please do NOT contact the authors directly unless this is a personal question.
Commercial support is available upon request. Please see the ntop site for further info.
Please send code patches via the github pull requests mechanism.
π LICENCE π
ntopng is distributed under the GNU GPLv3 licence (http://www.gnu.org/).
and that's the whole page, bestie π this one's from Dev 2015, living in ntopng 2.2 era β old-school but iconic, and yes, NTOPNG(8) is still the section it calls home. now go read your traffic, main character πβ¨
π¦ where this page comes from
- nixos 26.05: ntopng 6.6
- ubuntu jammy: ntopng 5.2.1+dfsg1-1 Β· GPL-3.0-or-later
- ubuntu noble: ntopng 5.2.1+dfsg1-1ubuntu4 Β· GPL-3.0-or-later
- ubuntu questing: ntopng 5.2.1+dfsg1-2ubuntu1
- Copyright 1998-16 ntop.org
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms