Modeling Your Network: Part I
For years, we have expanded ntopng with behavioral checks, threshold-based alerts, and anomaly detection heuristics to flag unexpected network activity. However, in real-world deployments, we frequently encounter infrastructures where even the network administrators lack complete visibility into active assets and services. Production networks are inherently dynamic. Users modify service configurations or run local applications that bind to listening sockets, exposing unauthorized server ports to external connections without IT oversight. Additionally, lax enforcement of security policies often results in permissive "allow all except" architectures that fail to contain lateral movement or unauthorized services. To address this visibility gap, we are introducing continuous network learning to dynamically baseline infrastructure and detect state changes. This architecture is built on two core pillars:
- Automated discovery and baselining of servers and exposed services
- Behavioral profiling and drift detection for client hosts
In this post, we examine the implementation of the first pillar.
Server Model: Passive Service Discovery

In the latest development builds of ntopng (Enterprise XL and above with ClickHouse historical flow storage enabled), you can activate the Server Model via Preferences > Experimental Features. Leveraging Deep Packet Inspection via nDPI, ntopng passively inspects network flows to identify and classify core infrastructure services, including DNS resolvers, Windows Domain Controllers (Active Directory/LDAP/Kerberos), and SMTP/IMAP mail servers. Rather than relying on error-prone manual configuration, ntopng implements a human-in-the-loop workflow: it continuously analyzes historical ClickHouse flow records to propose a baseline inventory of active servers, which the operator reviews and approves. On a nightly schedule, ntopng recomputes the model against recent traffic data to detect topology drift. If a new server appears or an existing service changes state, ntopng triggers an alert—enabling administrators to either commit the legitimate asset to the baseline or remediate an unauthorized service. Crucially, this mechanism tracks both newly provisioned endpoints and existing infrastructure that has stopped responding to requests.
Server Lifecycle Monitoring

To provide granular visibility into infrastructure state transitions, we introduced the Server Lifecycle view. This module correlates historical traffic baselines with real-time flow metrics, allowing operators to immediately identify servers that:
- Have transitioned to an unresponsive or inactive state (e.g., silent service failures or decommissioned hosts).
- Exhibit significant throughput or connection-rate anomalies (spikes or drops) relative to their historical baseline, surfacing potential resource exhaustion, misconfigurations, or active attacks.
Automated Network Configuration & Policy Enforcement

Approved assets from the Server Model directly populate ntopng's Network Configuration, serving as the ground truth for downstream behavioral checks and security alerts. Consider DNS traffic: due to recursive and iterative resolution mechanics, an authorized DNS resolver is expected to initiate queries to numerous external DNS servers. Conversely, a standard client endpoint should strictly query designated internal resolvers rather than arbitrary or hardcoded external DNS servers. By dynamically maintaining an accurate inventory of legitimate infrastructure servers, ntopng enforces strict behavioral boundaries while minimizing false positives. Automated server and service baselining is a foundational step toward deterministic network visibility, though it represents only half of the model. In upcoming posts, we will detail our work on client behavioral profiling to complete a comprehensive network model capable of isolating anomalies, service degradation, and configuration drift.
Enjoy!
