Код: Выделить всё
#!/bin/sh
case "$1" in
start)
/usr/sbin/ngctl mkpeer ipfw: netflow 30 iface0
/usr/sbin/ngctl name ipfw:30 netflow
/usr/sbin/ngctl msg netflow: setdlt {iface=0 dlt=12}
/usr/sbin/ngctl msg netflow: setifindex {iface=0 index=5}
/usr/sbin/ngctl mkpeer netflow: ksocket export inet/dgram/udp
/usr/sbin/ngctl msg netflow:export connect inet/127.0.0.1:9996
;;
stop)
/usr/sbin/ngctl shutdown netflow:
;;
restart)
sh $0 stop
sleep 5
sh $0 start
;;
*)
echo ""
echo "Usage: `basename $0` { start | stop | restart }"
echo ""
exit 64
;;
esac
Код: Выделить всё
add 110 ngtee 30 ip from any to any out via ng*
add 111 ngtee 30 ip from any to any in via ng*