- 论坛徽章:
- 0
|
新问题出来了~~
我按照PF手册进行设置.虽然NAT起作用了.但是好像外网口防火墙没有起作用,PING也可以PING到,SSH也可以登录.下面是我的配置文件:
# macros
ext_if="fxp1"
int_if="fxp0"
#dmz_net=""
proxy_ip="2xx.xxx.xxx.xxx"
loc_net="10.1.0.0/21"
pri_net="{192.168.0.0/16,127.0.0.0/8,172.16.0.0/12,10.0.0.0/8,169.254.0.0/16}"
icmp_types="echoreq"
# Servers
# tables
table <spamd-white> persist
# options
#set skip on lo
set block-policy drop
set loginterface $ext_if
set optimization normal
set timeout interval 10
set timeout frag 30
# scrub
#scrub in on $ext_if all
scrub in all
# nat
nat on $ext_if inet from $int_if:network to any -> $proxy_ip
# redirections
# filters
block drop all
pass quick on lo0 all
# SSH login
pass in on $int_if inet proto tcp from $loc_net to $int_if port 22 keep state
pass out on $int_if inet proto tcp from $int_if to $loc_net port 22 keep state
#pass in inet proto icmp all icmp-type $icmp_types keep state
pass in on $int_if from $int_if:network to any keep state
pass out on $int_if from any to $int_if:network keep state
block drop in quick on $ext_if from $pri_net to any
block drop out quick on $ext_if from any to $pri_net
pass out on $ext_if proto tcp all modulate state flags S/SA
pass out on $ext_if proto {udp,icmp} all keep state |
|