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

By | 15.03.2017
Test stand

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 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
./autogen.sh
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.

Leave a Reply

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