# How to Configure Flow Risk Exclusions in nDPI and ntopng | ntop

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

# How to Configure Flow Risk Exclusions in nDPI and ntopng

May 26, 20222 min read

Flow risks are the mechanism nDPI implements for detecting issues in network traffic whose theoretical design is documented in this paper [Using Deep Packet Inspection in CyberTraffic Analysis](https://ieeexplore.ieee.org/abstract/document/9527976) we have written last year. While we are [reworking](https://github.com/ntop/ntopng/issues/6620) the definition of risk exceptions in ntopng to make them fully configurable with a matter of clicks, you can easily configure risk exceptions by adding them to a protos.txt file. Such file can be passed to ntopng on the configuration file by adding a line such as

\--ndpi-protocols=/etc/ntopng/protos.txt

and creating the /etc/ntopng/protos.txt file.

This said how do we define flow risk exceptions in nDPI? These are the directives you have to use:

-   IP address based exceptions (caveat for the time being we support only IPv4)  
    ip\_risk\_mask:a.b.c.d/CIDR=mask
-   Hostname based exceptions  
    host\_risk\_mask:”name”=mask
-   Custom protocol ports  
    tcp|udp:port@ExistingProtocolName
-   Custom encryption certificate authorities  
    trusted\_issuer\_dn:”CN=….”

Usage examples:

-   Q. In my network I have HTTP running on 8008: how can I silence “Known Protocol on Non Standard Port” alerts?  
    A. Add the following entry in the protos.txt file  
    tcp:8008@HTTP  
    Note that HTTP is the name of an existing protocol known to nDPI. Make sure the string case matches the existing protocol name. If the protocol name string does not exist, a new port-based protocol is defined in nDPI.
-   Q. My device 1.2.3.4 is old, and it has several cybersecurity issues (e.g. obsolete TLS ciphers). However the device is well protected in the network and thus such issues should be ignored. How can I silence them?  
    A. Add the following entry in the protos.txt file (note: 0 means mask all exceptions)  
    ip\_risk\_mask:1.2.3.4=0
-   Q. I see many DGA alerts for domain sms.it. How can I silence them?  
    A. Add the following entry in the protos.txt file (note: 0 means mask all exceptions)  
    host\_risk\_mask:”.sms.it”=0  
    
-   Q. In my network we have self-signed TLS certificates created with a custom CA. How can I tell nDPI not to generate these alerts?  
    A. Open ntopng (or wireshark) to see the issuer DN string inside the TLS flows, copy the string, and add a new line in the protos.txt file as follows:  
    trusted\_issuer\_dn:”CN=813845657003339838, O=Code42, OU=TEST, ST=MN, C=US”

If you want to fully explore what you can define in the protos.txt file, please see this [comprehensive example file](https://github.com/ntop/nDPI/blob/dev/example/protos.txt) that contains all the possible exceptions you can define.

Enjoy !

## Keep reading

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

[![](/images/2026/09/Screenshot-2026-09-09-151028-1.webp)](https://www.ntop.org/october-20th-join-us-for-the-ntopng-7-0-webinar/)

AnnounceOct 5, 2026

### [October 20th: Join us for the ntopng 7.0 Webinar](https://www.ntop.org/october-20th-join-us-for-the-ntopng-7-0-webinar/)

Is your network monitoring keeping pace with AI, larger infrastructures, and the growing need for real observability? We’re excited to introduce ntopng 7.0, alongside new releases of the rest of the ntop…

## 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/how-to-configure-flow-risk-exclusions-in-ndpi-and-ntopng/