freebsd binat
Добавлено: 2015-03-03 8:55:25
доброе время суток
настраиваю binat
если делаю так то к примеру на хост 91.x.x.6 не приходят пакеты если они по падают под правило rdr то есть пытаюсь достучаться до хоста 91.x.x.6 по 80 порту а попадаю на хост 172.16.0.250
настраиваю binat
Код: Выделить всё
ext_if="em0" #wan
int_if="em1" #lan
local_if="lo0" # 127.0.0.1
crm="172.16.0.249"
set block-policy drop
set skip on lo0
set fingerprints "/etc/pf.os"
set debug urgent
set require-order yes
set loginterface $ext_if
set timeout { frag 10, tcp.established 3600 udp.first 300, udp.single 150, udp.multiple 900 }
set limit { frags 100000, states 100000 }
set optimization normal
icmp_types="{ echoreq, unreach }"
scrub in all fragment reassemble
scrub out all random-id
scrub out on $int_if max-mss 1383
scrub out on $ext_if max-mss 1383
binat on $ext_if inet from $crm to any -> 91.x.x.6
nat-anchor "ftp-proxy/*"
rdr on $ext_if proto tcp from any to any port 143 -> 172.16.0.250
rdr on $ext_if proto tcp from any to any port 25 -> 172.16.0.250
rdr on $ext_if proto tcp from any to any port 80 -> 172.16.0.250