nDPI as iptables module(ndpi-netfilter) on Orange PI.

There are many OpenDPI based implementations and their versions. There are many ndpi-netfilter implementations and versions too. But I found only one that works pretty well on Orange PI.
I’ve tested it on Orange PI Plus and Armbian.

I’ve searched a lot for working nDPI so now I don’t know how many additional packages you will need to compile it.
I know exactly that you will need this packages:

apt-get install libtool libpcap-dev iptables-dev

But maybe you will need this in addition:

apt-get install conntrack libnetfilter-conntrack-dev

Now the main part.
First, download and extract all sources.

cd /home/root
wget https://github.com/betolj/ndpi-netfilter/archive/master.zip -O ndpi-netfilter-master.zip
unzip ndpi-netfilter-master.zip
cd ndpi-netfilter-master
tar -xvzf nDPI.tar.gz

Second, preconfig nDPI and compile iptables module.

cd nDPI
cd ..
NDPI_PATH=/home/root/ndpi-netfilter-master/nDPI make
make modules_install

Finally, copy iptables module and test it.

cp ipt/libxt_ndpi.so /lib/xtables/ 
iptables -m ndpi --help
Test output

That’s it. Now you can use it, as shown on many examples all over the net.

2 thoughts on “nDPI as iptables module(ndpi-netfilter) on Orange PI.

  1. Did you use the kernel version tested in the git repo or did you use i with current kernel (4.12/4.13) ?

Leave a Reply

Your email address will not be published. Required fields are marked *