OPNsense Forum

Archive => 18.7 Legacy Series => Topic started by: guest15389 on August 10, 2018, 06:02:30 PM

Title: Running ntopng
Post by: guest15389 on August 10, 2018, 06:02:30 PM
I went through and was going with setting up ntopng via installing the packages via the freebsd package site and all works very well actually.

I hit one minor issue with running as the ntopng user that my files are getting created with super odd permissions:

./0:
total 32
drwx------  8 ntopng  ntopng   512 Aug 10 11:55 .
drwxr-xr-x  8 ntopng  ntopng   512 Aug 10 11:54 ..
drwx------  2 ntopng  ntopng   512 Aug 10 11:54 alerts
d--x------  3 root    ntopng   512 Aug 10 11:55 asnstats
d--x------  9 root    ntopng   512 Aug 10 11:55 countrystats
drwx------  5 ntopng  ntopng  1024 Aug 10 11:55 rrd
d--x------  4 ntopng  ntopng   512 Aug 10 11:53 subnetstats
drwx------  2 ntopng  ntopng   512 Aug 10 11:55 top_talkers

./0/alerts:
total 180
drwx------  2 ntopng  ntopng     512 Aug 10 11:54 .
drwx------  8 ntopng  ntopng     512 Aug 10 11:55 ..
-rw-r--r--  1 ntopng  ntopng  176128 Aug 10 11:55 alerts_v7.db

./0/asnstats:
total 12
d--x------  3 root    ntopng  512 Aug 10 11:55 .
drwx------  8 ntopng  ntopng  512 Aug 10 11:55 ..
d--x------  2 root    ntopng  512 Aug 10 11:55 0


I listed a few examples of what I was seeing as I fixed the issue by running as root but that wasn't really how I wanted it to work.

High level steps:


http://pkg.freebsd.org/FreeBSD:11:amd64/latest/All/redis-4.0.10_1.txz
echo redis_enable=YES >> /etc/rc.conf

service redis start


pkg add http://pkg.freebsd.org/FreeBSD:11:amd64/latest/All/json-c-0.13.txz
pkg add http://pkg.freebsd.org/FreeBSD:11:amd64/latest/All/libsodium-1.0.16.txz
pkg add http://pkg.freebsd.org/FreeBSD:11:amd64/latest/All/norm-1.5r6.txz
pkg add http://pkg.freebsd.org/FreeBSD:11:amd64/latest/All/openpgm-5.2.122_3.txz
pkg add http://pkg.freebsd.org/FreeBSD:11:amd64/latest/All/libzmq4-4.2.3.txz
pkg add http://pkg.freebsd.org/FreeBSD:11:amd64/latest/All/mysql56-client-5.6.40.txz
pkg add http://pkg.freebsd.org/FreeBSD:11:amd64/latest/All/ndpi-2.2.2.d20180406_1,1.txz
pkg add http://pkg.freebsd.org/FreeBSD:11:amd64/latest/All/ntopng-3.4.d20180604,1.txz

ntopng-geoipupdate.sh

echo "ntopng_enable=YES" >> /etc/rc.conf
echo "ntopng_flags=/usr/local/etc/ntopng.conf" >> /etc/rc.conf


I configured my /usr/local/etc/ntopng.conf with my settings and overall it works like I'd expect it.


Title: Re: Running ntopng
Post by: mimugmail on August 10, 2018, 06:16:20 PM
18.7.1 will deliver a stable pkg
Title: Re: Running ntopng
Post by: guest15389 on August 10, 2018, 06:30:24 PM
Oh nice.

Would be super if you add in the ability to add in a custom proto file as well :)

In my example:
--ndpi-protocols /usr/local/etc/protos.conf

cat protos.conf
tcp:32400@Plex
Title: Re: Running ntopng
Post by: mimugmail on August 10, 2018, 06:34:09 PM
I'll build a plugin around it
Title: Re: Running ntopng
Post by: franco on August 11, 2018, 01:48:06 PM
ntopng is working now on 18.7... that's a very recent addition. given a bit more time we'll make this even more useful :)
Title: Re: Running ntopng
Post by: jkemp on August 19, 2018, 06:47:14 PM
Hello,

How can one install the ntopng package?

Is it done at the terminal prompt as if only using FreeBSD as an operating environment?

I take it there is no way to install from the GUI?

Once installed from the terminal it can be accessed from the router address and port?

When will there be a ntopng package to install from the GUI?

Once it's available it will make OPNsense a stronger platform, IMO.

Keep up the good work guys,

James
Title: Re: Running ntopng
Post by: mimugmail on August 19, 2018, 07:43:14 PM
I already pulled a plugin. Will be in stable with 18.7.3 I'd guess.
Title: Re: Running ntopng
Post by: jkemp on August 19, 2018, 09:04:50 PM
Excellent!

Can you tell me whether it will use redis database and nginx server?

Than k you for your responses
Title: Re: Running ntopng
Post by: fabian on August 19, 2018, 09:40:29 PM
Quote from: jkemp on August 19, 2018, 09:04:50 PM
Can you tell me whether it will use redis database and nginx server?
It very likely uses the redis plugin if installed - I don't know if it is required.
On the nginx side, I have not gotten any information / requests from Michael for any includes.
Title: Re: Running ntopng
Post by: mimugmail on August 19, 2018, 10:28:45 PM
It uses Redis and has it's own webserver. You can for sure use nginx plugin as a reverse proxy to access ntopng UI.
Title: Re: Running ntopng
Post by: jljb66 on October 16, 2018, 09:56:10 PM
Any chance of re-configuring the plugin to add a link in the reporting section of the dashboard?
Title: Re: Running ntopng
Post by: fabian on October 16, 2018, 10:22:00 PM
From a technical perspective it would be possible.