September 15, 2020

Установка ipt_netflow на Ubuntu 14.04

Ставим зависимости:

sudo apt-get install -y iptables-dev locate pkg-config make gcc git dkms libsnmp-dev snmpd

Собираем:

cd /tmp
wget https://github.com/aabc/ipt-netflow/archive/v2.2.tar.gz
tar -xf v2.2.tar.gz
cd ipt-netflow-2.2/
./configure
make all
sudo make install
sudo dkms build ipt-netflow/2.2
sudo dkms install ipt-netflow/2.2

Запуск:

sudo modprobe ipt_NETFLOW protocol=9 destination=127.0.0.1:2055 inactive_timeout=10 hashsize=65535 maxflows=4000000 active_timeout=15

И направляем трафик:

sudo iptables -I INPUT -i lo -j NETFLOW