Ishodnye:
vr0 - setevaya smotrit v modem IP poluchaet po DHCP.
fxp0 - smotrit v switch(domashnaya set)
ng0 - podnatiy sredstvami Mpd interfeys.
Код: Выделить всё
home# ifconfig
fxp0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=b<RXCSUM,TXCSUM,VLAN_MTU>
ether 00:0e:0c:a1:66:3d
inet 192.168.2.1 netmask 0xffffff00 broadcast 192.168.2.255
media: Ethernet autoselect (100baseTX <full-duplex>)
status: active
fxp1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=b<RXCSUM,TXCSUM,VLAN_MTU>
ether 00:0e:0c:a1:98:5e
inet 192.168.3.1 netmask 0xffffff00 broadcast 192.168.3.255
media: Ethernet autoselect (none)
status: no carrier
vr0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=8<VLAN_MTU>
ether 00:0f:ea:41:b1:2d
inet 10.3.44.94 netmask 0xfffffc00 broadcast 10.3.47.255
media: Ethernet autoselect (100baseTX <full-duplex>)
status: active
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x4
inet6 ::1 prefixlen 128
inet 127.0.0.1 netmask 0xff000000
ng0: flags=88d1<UP,POINTOPOINT,RUNNING,NOARP,SIMPLEX,MULTICAST> metric 0 mtu 146 0
inet 10.128.31.173 --> 93.125.5.137 netmask 0xffffffff
home#
Код: Выделить всё
Routing tables
Internet:
Destination Gateway Flags Refs Use Netif Expire
default 93.125.5.137 UGS 0 19793 ng0
10.0.0.0/12 10.3.44.1 UGS 0 0 vr0
10.3.44.0/22 link#3 UC 0 0 vr0
10.3.44.1 00:14:a9:27:78:43 UHLW 3 0 vr0 68
10.254.254.1 10.3.44.1 UGHS 0 25919 vr0
93.125.5.137 10.128.31.173 UH 1 0 ng0
127.0.0.1 127.0.0.1 UH 0 0 lo0
192.168.2.0/24 link#1 UC 0 0 fxp0
192.168.2.2 00:14:85:be:6a:8f UHLW 1 32979 fxp0 1188
192.168.2.255 ff:ff:ff:ff:ff:ff UHLWb 1 203 fxp0
192.168.3.0/24 link#2 UC 0 0 fxp1
192.168.3.255 ff:ff:ff:ff:ff:ff UHLWb 1 203 fxp1
213.184.225.32/27 10.3.44.1 UGS 0 6067 vr0
IPFW:
Код: Выделить всё
home# ipfw list
00100 allow ip from any to any via lo0
00200 deny ip from any to 127.0.0.0/8
00300 deny ip from 127.0.0.0/8 to any
00400 check-state
08668 divert 8668 ip4 from 192.168.2.0/24 to any out xmit ng0
08668 divert 8668 ip4 from any to me in recv ng0
08768 allow tcp from me to any dst-port 1223
08868 allow tcp from any 1723 to me
08968 allow gre from any to any
09068 allow tcp from any to any established
09168 allow ip from me to any out xmit ng0
09268 allow udp from any 53 to any
09368 allow tcp from any to any
09468 allow udp from any to any
09568 allow icmp from any to any
65535 allow ip from any to any
home#
Po IP vneshka pinguetsa i po IP mozhno hodit v net. DNS ne pashet voobche. Vnutrennyaa set prova tozhe nedostupna(10.x.x.x). Esli NAT-it vr0 to vsio naoboro. DNS rabotaet i vnutrennie resursy.
Chego delat ?