Возник тут вопрос, глупый наверно.. Пытаюсь посчитать трафик трафик по определённому порту (20,21), добавляю правило в ipfw
Код: Выделить всё
${ipfw} add count tcp from 10.20.0.7 20,21 to ${ip} in via xl0
${ipfw} add count tcp from ${ip} to 10.20.0.7 20,21 out via xl0
Код: Выделить всё
gw# ftp
ftp> open
(to) 10.20.0.7
Connected to 10.20.0.7.
220 ProFTPD 1.2.10 Server ready.
Name (10.20.0.7:bugness): anonymous
331 Anonymous login ok, send your complete email address as your password.
Password:
230 Anonymous access granted, restrictions apply.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> get ls-lR
local: ls-lR remote: ls-lR
200 EPRT command successful
150 Opening BINARY mode data connection for ls-lR (25391536 bytes)
100% |************************************************************************************************************| 24796 KB 5.32 MB/s 00:00 ETA
226 Transfer complete.
25391536 bytes received in 00:04 (5.32 MB/s)
ftp> bye
221 Goodbye.
Код: Выделить всё
gw# ls -l | grep ls-lR
-rw-r--r-- 1 bugness bugness 25391536 26 фев 12:17 ls-lR
Код: Выделить всё
gw# ipfw -a list | grep count
00400 17582 26306517 count tcp from 10.20.0.7 20,21 to 10.20.35.42 in via xl0
00500 11725 609883 count tcp from 10.20.35.42 to 10.20.0.7 dst-port 20,21 out via xl0
