- 论坛徽章:
- 1
|
本人垃圾规则 忘高手指教
ext_if="em0"
set block-policy drop
set optimization aggressive
set loginterface $ext_if
set require-order yes
set limit { states 180000, frags 150000 src-nodes 10000 }
set fingerprints "/etc/pf.os"
scrub in all
block all
pass out all
pass quick on lo0
antispoof quick for $ext_if inet
block in on $ext_if from any to any
block in quick proto tcp all flags SF/SFRA
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
table <spammers> persist file "/etc/spammers"
block in on $ext_if from <spammers> to any
#pass quick on $ext_if all
pass in quick on $ext_if proto tcp from any to any port 6809 flags S/SA keep state
pass in quick on $ext_if proto tcp from any to any port 6808 flags S/SA keep state
pass in quick on $ext_if proto tcp from any to any port 250 flags S/SA keep state
pass in quick on $ext_if proto tcp from any to any port 2593 flags S/SA keep state
pass in quick on $ext_if proto tcp from any to any port 21 flags S/SA keep state
#pass in quick on $ext_if proto tcp from any to any port 14534 flags S/SA keep state
#pass in on $ext_if proto tcp from any to $ext_if port >50000 flags S/SA keep state
#pass in quick on $ext_if proto tcp from any to any port 80 flags S/SA keep state
pass in quick on $ext_if proto udp from any to any port 8767 keep state
pass in quick on $ext_if proto udp from any to any port 8768 keep state
pass in quick on $ext_if proto udp from any to any port 8769 keep state
table <abusive_hosts> persist
pass in on $ext_if proto tcp from <abusive_hosts> to $ext_if port 80 flags S/SA keep state \
(max-src-conn 5, max-src-states 1)
pass in on $ext_if proto tcp to $ext_if port 80 flags S/SA keep state \
(source-track rule, max-src-conn-rate 30/15, overload <abusive_hosts> flush global)
#pass out on $ext_if proto tcp all modulate state flags S/SA
#pass out on $ext_if proto { udp, icmp } all keep state |
|