- 论坛徽章:
- 0
|
我写的:
# Define interfaces
int_if = "re0"
ext_if = "tun0"
# RFC1918
priv_nets = "{ 127.0.0.0/8, 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16 }"
# Those wonderful scrubbing bubbles
scrub in all
# Filtering begins
block log all
# Local machine stuff
pass quick on lo0 all
pass in on $int_if from $int_if:network to any
pass out on $int_if from any to $int_if:network
block in quick on $ext_if from $priv_nets to any
block out quick on $ext_if from any to $priv_nets
antispoof log quick for $ext_if
# Pass in allowed servers
#pass in on $ext_if proto tcp from any to ($ext_if) port ssh flags S/SA keep state
#pass in on $ext_if proto tcp from any to ($ext_if) port 80 flags S/SA keep state
# Out to the internet
pass out on $ext_if proto tcp all modulate state flags S/SA
pass out on $ext_if proto { udp, icmp } all keep state
怎么样? |
|