Всем привет!
Ситуация следующая. Имеется пк под FreeBSD 6.0 он соединяется другим пк Windows (через провайдера) средствами OPENVPN.
Дано:# ifconfig
de0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
inet6 fe80::203:ffff:fe6a:519bч0 prefixlen 64 scopeid 0x1
inet 90.157.67.203 netmask 0xfffffe00 broadcast 90.157.67.255
ether 00:03:ff:6a:51:9b
media: Ethernet autoselect (100baseTX)
status: active
plip0: flags=108810<POINTOPOINT,SIMPLEX,MULTICAST,NEEDSGIANT> mtu 1500
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
inet 127.0.0.1 netmask 0xff000000
pflog0: flags=141<UP,RUNNING,PROMISC> mtu 33208
tap0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
inet6 fe80::2bd:49ff:fe73:1400%tap0 prefixlen 64 scopeid 0x5
inet 192.168.0.190 netmask 0xffffff00 broadcast 192.168.0.255
ether 00:bd:49:73:14:00
Opened by PID 459
#ee /etc/pf.conf
ext_if="de0"
vpn_if="tap0"
scrub in all
block all
pass quick on { lo0, $vpn_if }
pass out quick on $ext_if inet proto icmp all keep state
pass in quick on $ext_if inet proto icmp all
pass out quick on $vpn_if inet proto icmp all keep state
pass in quick on $vpn_if inet proto icmp all
Далаем следующее
# pfctl -e
pf enabled
# pfctl -f /etc/pf.conf
# pfctl -s rules
block drop all
pass quick on lo0 all
pass quick on tap0 all
pass out quick on de0 inet proto icmp all keep state
pass in quick on de0 inet proto icmp all
pass out quick on tap0 inet proto icmp all keep state
pass in quick on tap0 inet proto icmp all
# ping 90.157.66.1 (это шлюз)
PING 90.157.66.1 (90.157.66.1): 56 data bytes
64 bytes from 90.157.66.1: icmp_seq=0 ttl=64 time=1.100 ms
64 bytes from 90.157.66.1: icmp_seq=1 ttl=64 time=1.147 ms
64 bytes from 90.157.66.1: icmp_seq=2 ttl=64 time=0.999 ms
# ping 192.168.0.3
PING 192.168.0.3 (192.168.0.3): 56 data bytes
^C
--- 192.168.0.3 ping statistics ---
14 packets transmitted, 0 packets received, 100% packet loss
Отключаем PF
# pfctl -d
pf disabled
# ping 192.168.0.3
PING 192.168.0.3 (192.168.0.3): 56 data bytes
64 bytes from 192.168.0.3: icmp_seq=0 ttl=128 time=1.382 ms
64 bytes from 192.168.0.3: icmp_seq=1 ttl=128 time=1.096 ms
64 bytes from 192.168.0.3: icmp_seq=2 ttl=128 time=0.848 ms
64 bytes from 192.168.0.3: icmp_seq=3 ttl=128 time=0.919 ms
Собственно что не так в конфиге, почему пинг идет при выключенном фаерволе, а при включенном нет?