На шлюзе стоит FreeBSD 6.2, Squid 2.6, PF. Также стоят еще несколько программ (Apache, MySQL и т.д.). Работает вся система приемлимо, т.к. окончательная доработка займет кучу времени (только учусь).
Главная задача, чтобы интернетовский трафик учитывался(ограничивался) в squid, соответсвенно был поставлен PF чтобы перекрыть доступ ко всему остальному. Ознакомившись с мануалом по PF, но в основном опираясь на примеры в частности и с данного форума, составил следующий конфиг:ext_if="xl0"
int_if="rl0"
icmp_types="echoreq"
mail_ports = "{25, 110}"
scrub in
nat on $ext_if from !($ext_if) to any -> ($ext_if)
no rdr on $int_if proto tcp from $int_if:network to $int_if port 22
no rdr on $int_if proto tcp from $int_if:network to $int_if port 88
no rdr on $int_if proto tcp from $int_if:network to $int_if port 82
no rdr on $int_if proto tcp from $int_if:network to $int_if port 3306
no rdr on $int_if proto tcp from $int_if:network to $int_if port 25
no rdr on $int_if proto tcp from $int_if:network to $int_if port 110
no rdr on $int_if proto tcp from any port $mail_ports to any port $mail_ports
no rdr on $int_if proto tcp from $int_if:network to $int_if port 139
rdr on $int_if proto tcp from $int_if:network to any -> $int_if port 8080
block in
pass out keep state
set skip on lo0
antispoof quick for {lo, $int_if}
pass in on $int_if proto tcp from $int_if:network to $int_if port 22 flags S/SA keep state
pass in on $int_if inet proto {tcp, udp} from $int_if:network to $int_if port 8080 keep state
pass in on $ext_if inet proto {tcp, udp} from any to $ext_if keep state
#pass in on $int_if proto tcp from any to 192.168.0.100 port 8080
#pass out on $int_if proto tcp from 192.168.0.100 port 8080 to any
pass in on $int_if proto tcp from any to any port $mail_ports keep state
pass in on $int_if inet proto tcp from $int_if:network to $int_if port 3306 keep state
pass in on $int_if inet proto tcp from $int_if:network to $int_if port 88 keep state
pass in on $int_if inet proto tcp from $int_if:network to $int_if port 82 keep state
pass in on $int_if inet proto icmp from $int_if:network to $int_if icmp-type $icmp_types
Порты
8080 - squid
88, 82 - Apache
3306 - MySQL
Почта обрабатывается на рабочих машинах почтовыми клиентами. Соответственно при включенном PF идет сообщение "Сервер недоступен", все остальное работает нормально. При отключенном PF почта соответственно проходит "на ура". Подскажите, пожалуйста, в чем дело. Заранее благодарю всех откликнувшихся.