Код: Выделить всё
#########
#Макросы#
#########
ext_if="ngeth0"
int_if="ngeth1"
IpOut="внешний ИП шлюза"
MailSRV="ИП сервака в инете"
m9="ещё 1 ИП сервака в инете"
lo_if="lo0"
NetIn="10.20.0.0/16"
DenyLan="{ 127.0.0.0/8, 192.168.0.0/16, 172.16.0.0/12, 10.0.0.0/8, 169.254.0.0/16, 192.0.2.0/24, 0.0.0.0/8, 240.0.0.0/4 }"
icmp_types="{ echoreq, unreach }"
#########
#Таблицы#
#########
table <good_hosts> persist
#######
#Опции#
#######
set skip on lo0
set block-policy drop
set loginterface ngeth0
########################
#Параметры нормализации#
########################
scrub in all
##################
#Очереди или AltQ#
##################
###########
#NAT и RDR#
###########
#RDR
#Mail
rdr inet proto tcp from $NetIn to $MailSRV port 25 -> $MailSRV port 26
#Servers
rdr on $ext_if proto tcp from any to $IpOut port 50000 -> 10.20.3.110 port 5550
rdr on $ext_if proto tcp from any to $IpOut port 50001 -> 10.20.3.110 port 5550
#Cars
rdr on $ext_if proto tcp from $MailSRV to $IpOut port 3341 -> 10.20.3.30 port 1433
#NAT
nat pass on $ext_if from any to any -> ($ext_if)
####################
#Правила фильтрации#
####################
#Deny
block all
block drop in quick on $ext_if from $DenyLan to any
antispoof quick for { $lo_if, $int_if, $ext_if }
#Pass lo
pass on $lo_if
#allow internal
pass in on $int_if from any to $NetIn keep state
pass out on $int_if from $NetIn to any keep state
#Allow GW inet
pass out on $ext_if proto { tcp,udp,icmp } from $IpOut to any keep state
#pass from m9
pass in on $ext_if from $m9 to $IpOut keep state
pass in on $ext_if from $MailSRV to $IpOut keep state
#DNS
pass on $int_if proto udp from any to any port 53 keep state
pass on $int_if proto udp from any port 53 to any keep state
pass on $ext_if proto udp from any port 53 to any keep state
#Time
pass on $int_if proto udp from $NetIn to any port 123 keep state
#Inet
pass in on $ext_if proto tcp from any port 80 to $IpOut keep state
pass on $int_if from 10.20.3.200 to any keep state
#Without Proxy
pass on $int_if proto { tcp,udp } from $NetIn to any port { 1100,5550 } keep state
pass on $int_if from any to $MailSRV keep state
pass on $int_if from any to $m9 keep state
pass on $int_if from 10.20.1.10 to any keep state
pass on $int_if from 10.20.0.15 to any keep state
pass on $int_if from $NetIn to $portsnap keep state
#Pass rdr to servers
pass in on $ext_if proto tcp from any to $IpOut port 50000
pass in on $ext_if proto tcp from any to $IpOut port 50001
#TEMP
pass in on $ext_if proto tcp from any to $IpOut port 3307
#ICMP
pass log inet proto icmp all icmp-type $icmp_types
pass on $int_if proto icmp from $NetIn to any
#Table knock
pass in on $ext_if proto tcp from any to $IpOut port { 60000:65000 }
pass in on $ext_if proto tcp from <good_hosts> to $ext_if port 1723 keep state
#VPN_IF
pass on { ng0, ng1, ng2, ng3, ng4, ng5, ng6, ng7, ng8, ng9, ng10, ng11, ng12, ng13, ng14, ng15, ng16, ng17, ng18, ng19, ng20, ng21, ng22, ng23, ng24 }
Собственно проблема при загрузке этого конфига
1)Не работают редиректы(если убрать block all то работают)
2)не работает пинг изнутри сети наружу - хотя он вроде как прописан
3)не работает Tracert из сети наружу
И всячески преветствую любую критику как сделать фаер лучше, заранее спасибо огромное.