Доброго дня суток! Администрирую машину на ОС FreeBSD 7.2, настроен ipfw, кастом-ядро. Собственно, недавно настроил проброс некоторых портов извне в локальну сеть на основе семерочного NAT-а (IPFW+NAT), и тут выяснил что не могу закрыть доступ к интересующим мне портам, по причине того что трафик заходит в НАТ и соответственно открывается доступ всем к любому порту....Вот правила фаервола///////////////////////////////////////////////////////////////////////////////////////
#!/bin/sh
FwCMD="/sbin/ipfw -q"
LanIn="rl0"
LanOut="rl1"
IpIn="192.168.0.5"
IpOut="1.2.3.4"
NetMask="24"
local_1="192.168.0.6"
local_2="192.168.0.7"
${FwCMD} -f flush
${FwCMD} -f pipe flush
${FwCMD} -f queue flush
#${FwCMD} add check-state
${FwCMD} add allow ip from any to any via lo0
${FwCMD} add deny ip from any to 127.0.0.0/8
${FwCMD} add deny ip from 127.0.0.0/8 to any
# disable x-scan
${FwCMD} add reject tcp from any to any tcpflags fin, syn, rst, psh, ack, urg
# disable N-scan
${FwCMD} add reject tcp from any to any tcpflags !fin, !syn, !rst, !psh, !ack, !urg
# disable FIN-scan
${FwCMD} add reject tcp from any to any not established tcpflags fin
# disable IP-Spoof
${FwCMD} add reject log ip from any to any not verrevpath in
# limiti
${FwCMD} add allow tcp from any to ${IpOut} 80 limit src-addr 15
#rubim chastnie seti na vneshke
${FwCMD} add deny ip from any to 192.168.0.0/16 in recv ${LanOut}
${FwCMD} add deny ip from 192.168.0.0/16 to any in recv ${LanOut}
${FwCMD} add deny ip from any to 172.16.0.0/12 in recv ${LanOut}
${FwCMD} add deny ip from 172.16.0.0/12 to any in recv ${LanOut}
${FwCMD} add deny ip from any to 10.0.0.0/8 in recv ${LanOut}
${FwCMD} add deny ip from 10.0.0.0/8 to any in recv ${LanOut}
${FwCMD} add deny ip from any to 169.254.0.0/16 in recv ${LanOut}
${FwCMD} add deny ip from 169.254.0.0/16 to any in recv ${LanOut}
#spamers
${FwCMD} add deny ip from 62.175.248.0/21 to any
# ICMP
${FwCMD} add deny icmp from any to any frag
${FwCMD} add allow icmp from any to any via ${LanIn}
${FwCMD} add allow icmp from any to ${IpOut} in via ${LanOut} icmptype 3,8,12
${FwCMD} add allow icmp from ${IpOut} to any out via ${LanOut} icmptype 0,3,4,11,12
${FwCMD} add allow icmp from ${IpOut} to any out via ${LanOut} frag
#server v inet
${FwCMD} add allow tcp from any to any out via ${LanIn}
${FwCMD} add allow udp from any to any out via ${LanIn}
#dns
${FwCMD} add allow udp from any 53 to me in via ${LanOut}
${FwCMD} add allow udp from any 53 to me in via ${LanIn}
#ssh server
${FwCMD} add allow tcp from any to any 22 in via ${LanIn}
${FwCMD} add allow tcp from any to any 22 in via ${LanOut}
#web server
${FwCMD} add allow tcp from any to any 80 in via ${LanOut}
${FwCMD} add allow tcp from any to any 80 in via ${LanOut}
#ntp time
${FwCMD} add allow udp from any to any 123 via ${LanOut}
${FwCMD} add allow udp from any to any 123 via ${LanIn}
################################ NAT ############################
${FwCMD} nat 1 config log if ${LanOut} same_ports redirect_port tcp ${local_1}:3434 5001 redirect_port tcp ${local_2}:3434 5002
${FwCMD} add nat 1 ip from any to any via ${LanOut}
${FwCMD} nat 2 config log if ${LanIn} reset same_ports
${FwCMD} add nat 2 ip from any to any via ${LanIn}
##################################################################
${FwCMD} add deny log ip from any to any
///////////////////////////////////////////////////////////////////////////////////////
Как сделать так, чтобы все же можно было прикрыть доступ например к 80-му порту или ограничить доступ к 22 порту? Помогите пожалуйста...