Босс параноик - нужен трафик по всем.
Сеть - контроллер домена на 2003 Active Directory.
Всем компам нужен веб и мыло. [comp1,comp2,...]
Некоторым - ася.[comp10,comp11,...]
Очень некоторым фтп и ssh.[comp21,comp22,...]
Прокси - FreeBSD на ней SQUID.
Логи считает красиво, только понятно что многое идет "мимо кассы".
Ася понятно - метров 10 в месяц.
Мыло - не учитывается.
Делал IPFW по теме господина Лисяры.
Код: Выделить всё
check-state
allow ip from any to any via lo0
deny ip from any to 127.0.0.0/8
deny ip from 127.0.0.0/8 to any
deny icmp from any to any
deny ip from 122.64.0.0/10 to me
deny ip from any to any dst-port 137,138,139,81 in via fxp0
deny ip from any to any dst-port 5222,5223,7777 in via fxp0
deny ip from any to me dst-port 22 via fxp0
deny ip from any to any frag
deny ip from any to 10.0.0.0/8 in via fxp0
deny ip from any to 172.16.0.0/12 in via fxp0
deny ip from any to 192.168.0.0/16 in via fxp0
deny ip from any to 0.0.0.0/8 in via fxp0
deny ip from any to 169.254.0.0/16 in via fxp0
deny ip from any to 240.0.0.0/4 in via fxp0
fwd 127.0.0.1,8080 tcp from 192.168.0.0/24 to any dst-port 80 via fxp0
fwd 192.168.0.254,2121 tcp from 192.168.0.0/24 to any dst-port 21 via fxp0
divert 8668 ip from 192.168.0.0/24 to any out via fxp0
divert 8668 ip from any to 213.142.192.193 in via fxp0
deny ip from 10.0.0.0/8 to any out via fxp0
deny ip from 172.16.0.0/12 to any out via fxp0
deny ip from 192.168.0.0/16 to any out via fxp0
deny ip from 0.0.0.0/8 to any out via fxp0
deny ip from 169.254.0.0/16 to any out via fxp0
deny ip from 224.0.0.0/4 to any out via fxp0
deny ip from 240.0.0.0/4 to any out via fxp0
#DNS
allow udp from any to any dst-port 53
#MAIL SERVER
allow ip from 213.142.213.45 to 192.168.0.0/24
#INTERNAL DNS, CITRIX, SQL
allow ip from any to 192.168.0.4,192.168.0.11,192.168.0.16
#CS
allow udp from any 27010-27025 to 192.168.0.0/24 in via fxp0
allow udp from any 27010-27025 to 192.168.0.0/24 out via vr0
allow udp from 192.168.0.0/24 to any dst-port 27010-27025 in via vr0
allow udp from 213.142.192.193 to any dst-port 27010-27025 out via fxp0
#TIME
allow ip from any to any dst-port 123,37 via fxp0 setup
allow udp from 192.168.0.0/24 to me dst-port 123,37 via vr0
allow ip from any to any via vr0
allow ip from any to 213.142.192.193 via fxp0 keep-state
allow ip from 213.142.192.193 to any via fxp0
allow ip from any to any established
deny ip from any to any
И то есть трафик будет неучтенным?
Как мне сделать чтобы учитывать трафик фтп и запрещать "левый"?