|
发表于 2006-5-11 16:04:58
|
显示全部楼层
用到现在没问题,请问用什么原理呢?只是修改了ttl为128吗?其他的呢?
另外贴出我的pf.conf,希望可以探讨一下。
ext_if="tun0"
int_if="rl1"
loop="lo0"
tcp_services = "22"
internal_net="192.168.0.0/24"
external_addr="192.168.10.3"
squid="192.168.0.1"
set block-policy return
set loginterface $ext_if
scrub on $ext_if all fragment reassemble reassemble tcp random-id no-df min-ttl 128 max-mss 1400
rdr on $int_if proto tcp from $internal_net to any port http -> $squid port 3128
rdr on $ext_if inet proto tcp from any to ($ext_if) port 6251 -> 192.168.0.18
block return-rst out on $ext_if proto tcp all
block return-rst in on $ext_if proto tcp all
block return-icmp out on $ext_if proto udp all
block return-icmp in on $ext_if proto udp all
block all
pass quick on $loop all
block in quick proto tcp all flags SF/SFRA
block in quick proto tcp all flags SFUP/SFRAU
block in quick proto tcp all flags FPU/SFRAUP
block in quick proto tcp all flags /SFRA
block in quick proto tcp all flags F/SFRA
block in quick proto tcp all flags U/SFRAU
block in quick on $ext_if inet proto icmp all icmp-type 8 code 0
pass out on $ext_if inet proto icmp all icmp-type 8 code 0 keep state
pass in on $ext_if inet proto tcp from any to 192.168.0.18 port 6251 keep state
block drop in quick on $ext_if from $internal_net to any
block drop out quick on $ext_if from any to $internal_net
pass in on $ext_if inet proto tcp from any to ($ext_if) port $tcp_services flags S/SA 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
pass out on $ext_if proto tcp all modulate state flags S/SA
pass out on $ext_if proto { udp, icmp } all keep state
Danger_Port="{445 135 139 593 5554 9995 9996}"
block quick on $int_if inet proto tcp from any to any port $Danger_Port
block quick on $ext_if inet proto tcp from any to any port $Danger_Port
block log quick on $ext_if inet proto tcp from any to any flags FUP/FUP
block quick on $ext_if inet proto tcp from any to any flags SF/SFRA
block quick on $ext_if inet proto tcp from any to any flags /SFRA
block quick on $ext_if os NMAP
noroute="{127.0.0.1/8,127.16.0.0/12,10.0.0/8,255.255.255.255/32}"
antispoof quick for $int_if inet
block quick on $ext_if inet from $noroute to any
block quick on $ext_if inet from any to $noroute |
|