Install and configure NfSen on Ubuntu 18 server
git clone https://github.com/phaag/nfdump
tar zxf nfsen-1.3.8.tar.gz
apt-get update apt-get upgrade apt-get install build-essential
add-apt-repository universe apt-get install autoconf rrdtool librrds-perl librrdp-perl librrd-dev libmailtools-perl apache2 libapache2-mod-php php bison flex libsocket6-perl liburi-perl libnet-idn-encode-perl libtool m4 automake pkg-config libbz2-dev
useradd netflow
usermod -G www-data netflow
cd nfdump ./autogen.sh ./configure --prefix=/opt/nfdump --enable-nfprofile make make install
cd nfsen-1.3.8 cd etc cp nfsen-dist.conf nfsen.conf vi nfsen.conf
$BASEDIR = "/opt/nfsen"; $HTMLDIR = "/opt/nfsen/www/"; $PREFIX = '/opt/nfdump/bin'; $WWWUSER = "www-data"; $WWWGROUP = "www-data"; $MAIL_FROM = 'nfsen@yourdomain.tld'; $SMTP_SERVER = 'fqdn.mail.server'; %sources = ( 'source1' => { 'port' => '9995', 'col' => '#0000ff', 'type' => 'netflow' }, 'source2' => { 'port' => '9996', 'col' => '#cc3333', 'type' => 'netflow' }, 'source3' => { 'port' => '9997', 'col' => '#99ff33', 'type' => 'netflow' }, ); # OR %sources = ( 'ccr1016' => { 'port' => '9995', 'IP' => 'x.x.x.x', 'col' => '#0000ff', 'type' => 'netflow' }, 'apfloor1' => { 'port' => '9995', 'IP' => 'x.x.x.x', 'col' => '#8B0000' }, 'apfloor2' => { 'port' => '9995', 'IP' => 'x.x.x.x', 'col' => '#DC143C'}, 'apfloor3' => { 'port' => '9995', 'IP' => 'x.x.x.x', 'col' => '#FF7F50'}, );
cd .. sudo ./install.pl ./etc/nfsen.conf
<Directory "/opt/nfsen/www"> AllowOverride None Require all granted </Directory> Alias /nfsen "/opt/nfsen/www"
systemctl enable apache2 systemctl start apache2
/opt/nfsen/bin/nfsen start
[Unit] Description=NfSen Service After=network.target [Service] Type=forking PIDFile=/opt/nfsen/var/run/nfsend.pid ExecStart=/opt/nfsen/bin/nfsen start ExecStop=/opt/nfsen/bin/nfsen stop Restart=on-abort [Install] WantedBy=multi-user.target
systemctl enable nfsen systemctl start nfsen