This post documents the process of setting up network traffic monitoring with a Raspberry Pi using ntopng as well as configuring an OpenWRT router to mirror packets to the Pi.
Install ntopng & nprobe
Perform the following commands a root on your Raspberry Pi to install ntopng and nprobe
apt-key add ntop.key
echo "deb http://apt.ntop.org/jessie_pi armhf/" > /etc/apt/sources.list.d/ntop.list
echo "deb http://apt.ntop.org/jessie_pi all/" >> /etc/apt/sources.list.d/ntop.list
apt-get install ntopng nprobe
Test ntopng & nprobe
Execute the following commands in separate sessions to confirm that everything is working:
ntopng -i tcp://127.0.0.1:5556
nprobe --zmq "tcp://*:5556" -i ethX -n none -b 2
Browse to your Pi at port 3000 to login to ntopng:
You should start seeing packet statistics but only for traffic that the Pi can see. We need to mirror all packets to the Pi so that we can see everything happening on the network.
Mirror Packets to the Raspberry Pi
I’m using an OpenWRT router. To mirror packets to the Raspberry Pi, I used these instructions. They amount to setting the iptables mangle table to mirror packets to ntopng. For example, if the ntop system is at IP 192.168.1.120, you would execute these commands:
opkg install iptables-mod-tee
iptables -t mangle -A PREROUTING -j TEE --gateway 192.168.1.120
iptables -t mangle -A POSTROUTING -j TEE --gateway 192.168.1.120
To view the mangle table, enter the command:
iptables -vL -t mangle
Watchmen is lightweight node.js based website and service monitoring tool. This is a cheatsheet to setup Wachmen on a Raspberry Pi.
I ran into dependency problems with the Mosca install on Raspbian 2016-02-26. Here are the steps that resolved it:
Here are the steps to install an updated version of Node.js on Raspberry Pi. As of this writing, the Raspbian image from Feb 2016 is shipping Node.js vers 0.10.29 which was released in June 2014.
Here are my setup steps for a new Raspberry Pi. I assume Raspbian has been installed. The setup file associated with this post are available on GitHub.
Notes on setting up Bitbucket for the first time. I’m switching from Springloops to Bitbucket because they support more private repositories with the free account. Continue reading
This is a cheatsheet on deploying a Meteor app to an Ubuntu droplet on Digital Ocean using Meteor Up.
This is a cheatsheet on deploying a Meteor app to a base Linux server using Meteor Up. I’m currently using Digital Ocean but it could be any Linux server.
These are my notes how to get a quick PhoneGap / Cordova sample app running on Uubntu with Intellij Idea. Continue reading