Имеем:
Код: Выделить всё
FreeBSD test.ru 8.2-RELEASE FreeBSD 8.2-RELEASE #1: Fri Jan 13 15:14:01 SAMT 2012 root@test.ru:/usr/obj/usr/src/sys/test amd64
Код: Выделить всё
ext_if_a="em0"
ext_gw_a="IP1"
ext_if_b="em1"
ext_gw_b="IP2"
int_if101="vlan101"
int_if102="vlan102"
int_if103="vlan103"
int_if104="vlan104"
int_if105="vlan105"
set skip on lo0
scrub in all
nat on $ext_if_a from $int_if101:network to any -> ($ext_if_a)
nat on $ext_if_a from $int_if103:network to any -> ($ext_if_a)
nat on $ext_if_b from $int_if102:network to any -> ($ext_if_b)
nat on $ext_if_b from $int_if104:network to any -> ($ext_if_b)
nat on $ext_if_b from $int_if105:network to any -> ($ext_if_b)
pass in on $int_if101 route-to ($ext_if_a $ext_gw_a) inet from $int_if101:network to any
pass in on $int_if103 route-to ($ext_if_a $ext_gw_a) inet from $int_if103:network to any
pass in on $int_if102 route-to ($ext_if_b $ext_gw_b) inet from $int_if102:network to any
pass in on $int_if104 route-to ($ext_if_b $ext_gw_b) inet from $int_if104:network to any
pass in on $int_if105 route-to ($ext_if_b $ext_gw_b) inet from $int_if105:network to any
pass out on $ext_if_a from $ext_if_a to any
pass out on $ext_if_b from $ext_if_b to any
Код: Выделить всё
23:31:32.758840 IP dns.comcor.ru.domain > 10.1.4.15.53495: 29003 1/3/3 A 87.240.191.90 (156)
23:31:51.413218 IP 10.1.4.15.63785 > ns2.comcor.ru.domain: 36136+ A? cs4565.vkontakte.ru. (37)
23:31:51.422041 IP ns2.comcor.ru.domain > 10.1.4.15.63785: 36136 1/3/3 A 93.186.237.189 (155)
23:31:56.891478 IP 10.1.4.20.3072 > ns2.comcor.ru.domain: 49756+ A? js.aplatform.ru. (33)
23:31:57.791206 IP 10.1.4.20.3072 > 91.219.164.1.domain: 49756+ A? js.aplatform.ru. (33)
23:31:57.791327 IP 10.1.4.20.3072 > ns2.comcor.ru.domain: 49756+ A? js.aplatform.ru. (33)
23:31:57.799746 IP ns2.comcor.ru.domain > 10.1.4.20.3072: 49756 2/2/2 CNAME[|domain]
23:31:57.808299 IP 91.219.164.1.domain > 10.1.4.20.3072: 49756 Refused- 0/0/0 (33)