- 论坛徽章:
- 0
|
最近准备托管一台服务器,主要是做网页服务器和虚拟主机,使用的是FreeBSD6.0+Apache2,现在公司的内部网内部进行测试。公司是租用专线,供应商提供了20个IP,从59.x.x.42~61,DNS为10.254.131.253。主机的服务器的Ip地址为最后一个。本来一切顺利,准备下个月就托管了,最近看了一篇关于托管的文章,就学着使用PF作为防火墙,谁知PF启动之后,回家测试一切正常,但第二天到了公司发现同局域网的机器不能正常通过域名访问主页了,使用IP地址倒还可以。停掉PF后就一切正常了。
pf.conf配置如下:
pf.conf
ext_if = "{ nve0 }"
loop = "lo0"
noroute = "{ 127.0.0.1/8, 192.168.0.0/16, 172.16.0.0/12, 10.0.0.0/8, 255.255.255.255/32 }"
ports = "{ 20, 21, 22, 25, 80, 110 }"
set block-policy return
set optimization aggressive
set loginterface nve0
set skip on lo0
scrub in all
antispoof for $ext_if inet
block all
block return
block in quick on $ext_if os NMAP
block in quick on $ext_if from $noroute to any
block out quick on $ext_if from any to $noroute
pass in on $ext_if proto tcp from any to $web port 80 flags S/SA synproxy state
pass quick on $loop all
pass in quick on $ext_if proto {tcp,udp} from any to any port $ports keep state
pass in quick proto tcp from any to any port 55000 >< 56000 keep state
pass out quick on $ext_if all keep state
不知道是什么原因,请大家指教,再就是如果这样进行托管,会不会影响托管商那里的机器。
[ 本帖最后由 512song 于 2006-3-23 23:19 编辑 ] |
|