# Configuring nDPI for Custom Protocol Detection | ntop

[Blog](https://www.ntop.org/blog/)[nDPI](https://www.ntop.org/category/ndpi/)

# Configuring nDPI for Custom Protocol Detection

March 4, 20132 min read

The first release of nDPI was basically a refresh of the OpenDPI library on which nDPI is built. Over the past few months we have made many changes including:

-   Port to various platforms including Linux, MacOSX, Windows and FreeBSD.
-   Enhancement of the demo [pcapReader](https://github.com/ntop/nDPI) application both in terms of speed/features and encapsulations supported (for instance you can now analyse GTP-tunneled traffic).
-   Ability to compile nDPI for the Linux kernel so that you can use it for developing efficient kernel-based modules.
-   Various speed enhancements so that nDPI is now faster than its predecessor.
-   Added many protocols (we not support almost 160 protocols) ranging from “business” protocols such as SAP and Citrix, as well as “desktop” protocols such as Dropbox and Spotify.
-   Ability to define port (and port range)-based protocol detection, so that you can complement protocol detection with classic port-based detection.

In addition to all this, we have recently added in nDPI the ability to support sub-protocols using string-based matching. This is because many new sub-protocols such as Apple iCloud/iMessage, WhatsApp and many others use HTTP(S) can be detected by decoding the SSL certificate host or the HTTP “Host:”. Thus we have decided to embed in nDPI an [efficient string-matching library](http://multifast.sourceforge.net) based on the popular [Aho-Corasick](http://en.wikipedia.org/wiki/Aho–Corasick_string_matching_algorithm) algorithm for matching hundred of thousand sub-strings efficiently (i.e. fast enough to sustain 10 Gbit traffic on commodity hardware). You can now specify sub-protocols at runtime  using a configuration file with the following format:

\# Subprotocols
# Format:
# host:"<value>",host:"<value>",.....@<subproto>
host:"googlesyndacation.com"@Google
host:"venere.com"@Venere

in addition to port-based protocol detection using the following format:

\#  Format:
#  <tcp|udp>:,<tcp|udp>:,.....@
tcp:81,tcp:8181@HTTP
udp:5061-5062@SIP
tcp:860,udp:860,tcp:3260,udp:3260@iSCSI
tcp:3000@ntop

You can test your custom configuration using the pcapReader (use -p option)  application or enhance your application using the `ndpi_load_protocols_file()` nDPI API call.

This said, every month new protocol are introduced and become popular, thus nDPI needs constant maintenance and enhancement. We need your help for developing new protocol dissectors. Please [contact us](https://www.ntop.org/support/need-help/contacts/) if you want to join the nDPI team.

See also:

-   nDPI Supports Skype, Whatsapp and Netflix

## Keep reading

ntopngNov 23, 2026

### [Modeling Your Network: Part I](https://www.ntop.org/network-model-intro/)

ntopng is introducing continuous network learning to help administrators close visibility gaps in dynamic networks, starting with a new Server Model feature. Using DPI and historical flow data, the system passively discovers and baselines core servers—alerting operators to unauthorized services, unresponsive hosts, or traffic anomalies while automatically updating network configurations to reduce false-positive security alerts.

AINov 7, 2026

### [Sharkfest 26EU: HowTo Detect Stealth VPN and AI Inference Traffic](https://www.ntop.org/sharkfest-26eu-howto-detect-stealth-vpn-and-ai-inference-traffic/)

Earlier this week we have presented at Sharkfest Europe 2026 a presentation of our work about traffic detection of Stealth VPNs and AI Inference. The presentation addresses the challenges of detecting modern obfuscated network traffic, specifically from stealth VPNs and custom/local artificial intel

nDPINov 7, 2026

### [Detecting CVE-2026-98432 using nDPI/ntopng](https://www.ntop.org/detecting-cve-2026-98432-using-ndpi-ntopng/)

CVE-2026-98432 is a critical, 9.8-severity use-after-free (UAF) vulnerability in the Linux kernel’s IPv4 TCP networking stack. It allows an unauthenticated remote attacker to potentially cause system crashes, memory corruption, or execute arbitrary commands with root privileges. From a network stand

## Try it on your own network

Download the free Community edition and see your first flows in five minutes.

[Download ntopng free](https://www.ntop.org/support/documentation/software-installation/)[Talk to an engineer](https://www.ntop.org/support/need-help/contacts/)
Source: https://www.ntop.org/configuring-ndpi-for-custom-protocol-detection/