In my opinion, ntopng on SO is just to provide a graphical instantaneous snapshot of current flows and meant to be used as a supplementary tool to Bro connection logs and Argus, which keep more historical data. With ntopng, you can see current flows to Netflix, YouTube, BitTorrent, etc without digging into the data. Ntopng also uses very little resources.
I have zero packet loss from ntopng after running this and .0001% packet loss on my Bro processes. With ZeroMQ, both Bro and Ntopng share the packets from pf_ring.
Note, I'm only running Bro and ntopng on this system.
apt-get install redis-server rrdtool libzmq-dev build-essential
cd /usr/local/src
wget http://www.nmon.net/packages/ubuntu/x64/ntopng/ntopng_1.1.1-7131_amd64.deb
dpkg --install ntopng_1.1.1-7131_amd64.deb
vi /etc/ntopng/ntopng.start
--local-networks "xxx.xxx.0.0/16"
--interface 1
--daemon
--dns-mode 1
vi /etc/ntopng/ntopng.conf
-G=/var/run/ntopng.pid
wget http://download.zeromq.org/zeromq-3.2.4.tar.gz
tar xzvf zeromq-3.2.4.tar.gz
cd zeromq-3.2.4.tar.gz
./configure
make && make install
vi /etc/ld.so.conf
/usr/local/lib
ldconfig
cd ..
wget http://download.maxmind.com/download/geoip/database/asnum/GeoIPASNumv6.dat.gz
wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCityv6-beta/GeoLiteCityv6.dat.gz
wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz
wget http://download.maxmind.com/download/geoip/database/asnum/GeoIPASNum.dat.gz
gunzip Geo*
mv Geo*.dat /usr/local/share/ntopng/httpdocs/geoip/
ufw allow from xxx.xxx.xxx.xxx to any port 3000 proto tcp
/etc/init.d/ntopng start
Make sure you change the username/password for ntopng from admin/admin to something else.
Hope you enjoy!
=========================================================================
pf_ring stats
=========================================================================
Appl. Name : ntopng
Tot Packets : 168217588
Tot Pkt Lost : 0
TX: Send Errors : 0
Reflect: Fwd Errors: 0
Appl. Name : <unknown>
Tot Packets : 27968256
Tot Pkt Lost : 22
TX: Send Errors : 0
Reflect: Fwd Errors: 0
Appl. Name : <unknown>
Tot Packets : 32436165
Tot Pkt Lost : 29
TX: Send Errors : 0
Reflect: Fwd Errors: 0
Appl. Name : <unknown>
Tot Packets : 25166047
Tot Pkt Lost : 23
TX: Send Errors : 0
Reflect: Fwd Errors: 0
Appl. Name : <unknown>
Tot Packets : 26893841
Tot Pkt Lost : 27
TX: Send Errors : 0
Reflect: Fwd Errors: 0
Appl. Name : <unknown>
Tot Packets : 26135909
Tot Pkt Lost : 23
TX: Send Errors : 0
Reflect: Fwd Errors: 0
Appl. Name : <unknown>
Tot Packets : 27267537
Tot Pkt Lost : 49
TX: Send Errors : 0
Reflect: Fwd Errors: 0
What does your ntopng.start look like? What are the permissions? How are you starting ntopng? Just want to make sure
I came across your tutorial and loved that it gave me a nice upstart script, which I had been lacking in other installations (I have previously been adding the startup to /etc/rc.local) When using rc.local I previously just added all the switches there, which made using ntopng.start unnecessary. However, I would much rather use ntopng.start, but have never been able to get it to work.
ntopng.start looks like this (I have masked my actual network ip range) Permissions are 640
--local-networks xxx.xxx.xxx.0/21
--interface 2
--http-port 3100
--daemon
I use /etc/init.d/ntopng start to start it, but it simply does not respect the parameters I have placed above.
Thank you for you assistance with this.
--local-networks "xxx.xxx.xxx.0/21"
No change, still nothing
Seems to work fine for me.
Good piece of info for adding users: https://svn.ntop.org/svn/ntop/trunk/ntopng/README.users
Kind Regards,
Martin Paszkiewicz
Here are a few revisions I made along the way so it would work for me:
1. /etc/ntopng/ntopng.start is just a flag file which if present will result in ntopng running at boot time. The actual content of the file is not used at all, at least according to my review of /etc/init.d/ntopng and the ntopng man page. Thus all config options need to be put into /etc/ntopng/ntopng.conf
2. Any of the options in /etc/ntopng/ntopng.conf which take a value must have an equal sign rather than a space between the option at the value, like this:
--dns-mode=1
Otherwise the option seems to be ignored.
3. ntopng runs by default as nobody, and nobody does not have write permission to /var/run so we can't put the pid file there. It defaults to using /var/tmp for the pid file location so I use this in ntopng.conf for pid path:
-G=/var/tmp/ntopng.pid
4. Unless you are using nprobe to send flows to ntopng, I don't think zeromq is needed at all. With or without zeromq installed, a separate PF_RING ring is allocated for ntop, so I skip zeromq and its dependencies.
Here is the procedure I'm using now for installing ntopng on SO:
apt-get install redis-server rrdtool
cd /usr/local/src
# Get the latest ntopng deb package from http://www.nmon.net/packages/ubuntu/x64/ntopng/. This apepars to change daily. Adjust deb filenames in following 2 lines accordingly.
wget http://www.nmon.net/packages/ubuntu/x64/ntopng/ntopng_1.1.2-7258_amd64.deb
dpkg --install ntopng_1.1.2-7258_amd64.deb
touch /etc/ntopng/ntopng.start
mkdir /usr/local/ntopng
chown nobody:root /usr/local/ntopng
# Edit /etc/ntopng/ntopng.conf, making sure it at least contains "-G=/var/tmp/ntopng.pid" which is used by the control script. Use the ntopng man page to figure out what options you want. I use something like this:
--data-dir=/usr/local/ntopng
--local-networks="192.168.0.0/16,10.0.0.0/8"
--interface=eth1
--dns-mode=1
--disable-login
--packet-filter="ip and not proto ipv6 and not ether host ff:ff:ff:ff:ff:ff and not net (224.0.0.0/8 or 239.0.0.0/8)"
--daemon
-G=/var/tmp/ntopng.pid
# Make sure you use -G instead of its long name (--pid-path) in the above file. The control script looks for a literal "-G=" line in the conf file and if you use --pid-path instead, the script will not be able to find the pid file.
wget http://download.maxmind.com/download/geoip/database/asnum/GeoIPASNumv6.dat.gz
wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCityv6-beta/GeoLiteCityv6.dat.gz
wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz
wget http://download.maxmind.com/download/geoip/database/asnum/GeoIPASNum.dat.gz
gunzip Geo*
mv Geo*.dat /usr/local/share/ntopng/httpdocs/geoip/
ufw allow 3000/tcp
service ntopng start
Thanks again for taking the time to write things up. You saved me a bunch of time.
Kevin
Hi Wayne,
Here's what a possible ntopng integration in Security Onion would look like:
- ntopng would be optional, not required
- 32-bit and 64-bit packages in our PPA
- compiled against PF_RING
- updates to Setup for configuration
- updates to NSM scripts for handling processes
- What does a full enterprise deployment of ntopng look like? If I
have a 10-sensor deployment, how do I view ntop data from all of them
in one web interface?
To get started, you can create your own PPA and begin building your
own packages there using Ubuntu's documentation:
https://help.launchpad.net/Packaging/PPA
You received this message because you are subscribed to a topic in the Google Groups "security-onion" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/security-onion/PycIs8P7Tbg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to security-onio...@googlegroups.com.