-
Notifications
You must be signed in to change notification settings - Fork 1
Server pre installation
You need superuser permissions to perform installation
sudo apt update
sudo apt upgrade -y
sudo apt install -y dialog ntpdate git perl cpanminus cpanoutdated postgresql libdbd-pg-perl libdatetime-perl
If you going install netflow-analyzer and/or netflow-web, you need also:
sudo apt install -y apache2 php8.1 php8.1-pgsql php8.1-snmp
echo "listen_addresses='*'" | sudo tee -a /etc/postgresql/14/main/postgresql.conf
echo "host netflow netflow 0.0.0.0/0 trust" | sudo tee -a /etc/postgresql/14/main/pg_hba.conf
sudo service postgresql restart
sudo -u postgres psql
ALTER USER postgres with password 'yourpassword';
exit
Note: It's better to replace 0.0.0.0/0 to your analyzer server ip in pg_hba.conf. For example "host netflow netflow 10.10.10.10/32 trust".
sudo cpanm App::cpanoutdated
sudo cpan-outdated -p | sudo cpanm
sudo cpanm Daemon::Daemonize
sudo ntpdate <your.ntp.server.address>
sudo adduser netflow
8. To be able to start collector and/or analyzer as daemon, you need to grant access rights for log and pid files:
sudo touch /var/log/netflow.log
sudo chown -R netflow:netflow /var/log/netflow.log
sudo mkdir /var/run/netflow
sudo chown -R netflow:netflow /var/run/netflow
echo "d /run/netflow 2775 netflow netflow - -" | sudo tee -a /usr/lib/tmpfiles.d/netflow-common.conf
You need root permissions to perform installation
pkg update
pkg upgrade
pkg install perl5 p5-App-cpanminus p5-App-cpanoutdated p5-JSON p5-DateTime p5-DBI p5-DBD-Pg postgresql13-server git
If you going install netflow-analyzer and/or netflow-web, you need also:
pkg install apache24 php81 php81-pgsql mod_php81 php81-extensions php81-snmp
echo postgresql_enable="YES" >> /etc/rc.conf
echo "listen_addresses = '*'" >> /var/db/postgres/data13/postgresql.conf
echo "host netflow netflow 0.0.0.0/0 trust" >> /var/db/postgres/data13/pg_hba.conf
/usr/local/etc/rc.d/postgresql initdb
/usr/local/etc/rc.d/postgresql start
Note: It's better to replace 0.0.0.0/0 to your analyzer server ip in pg_hba.conf. For example "host netflow netflow 10.10.10.10/32 trust".
cpanm App::cpanoutdated
cpan-outdated -p | cpanm
cpanm Daemon::Daemonize
ntpdate <your.ntp.server.address>
pw useradd -n netflow -d /home/netflow -m -s /bin/csh -c 'netflow user'
passwd netflow
8. To be able to start collector and/or analyzer as daemon, you need to grant access rights for log and pid files:
touch /var/log/netflow.log
chown -R netflow:netflow /var/log/netflow.log
mkdir /var/run/netflow
chown -R netflow:netflow /var/run/netflow
echo "d /run/netflow 0755 netflow netflow - -" > /etc/tmpfiles.d/netflow.conf
TOSS A COIN:
BTC 13jSSBQjNzYkGNsiZniXr7hYtW24DFQR8h
ETH (ERC20) 0xa43d3a2796285842c2496bf9aef5796f1c832cb5
1 Overview
3.2 Netflow collector deployment
3.3 Netflow analyzer deployment
3.4 Web interface
3.4.1 Web Interface quickstart
3.5 Sensors configuration examples
3.5.1 Cisco routers
3.5.2 Juniper SRX jflow v5