All pastes #974073 Raw Edit

Stuff

public text v1 · immutable
·published 2008-04-06 15:21 UTC
rendered paste body
# macros
ext_if="tun0"
int_if="fxp0"

tcp_services="{ 25, 80, 110, 143 }"
icmp_types="echoreq"

#trusted = "{ 192.168.1.1, 10.0.0.100 }

# options
#set ruleset-optimization basic #testing this option
set block-policy drop
set loginterface $ext_if
set fingerprints "/etc/pf.os" #testing this option
set skip on lo
#set skip on $int_if #Testing this Option
#set limit { frags 2500, states 5000 } #testing this option

# scrub
#scrub in 
#scrub in on $ext_if  #Testing this option

# nat/rdr
nat on $ext_if from !($ext_if) -> ($ext_if:0)
# NAT section
# UPnPd rdr anchor
rdr-anchor "miniupnpd"

# Rules section
# uPnPd rule anchor
anchor "miniupnpd"
#nat-anchor "ftp-proxy/*"
#rdr-anchor "ftp-proxy/*"

# rdr pass on $int_if proto tcp to port ftp -> 127.0.0.1 port 8021
# rdr on $ext_if proto tcp from any to any port 80 -> $comp3

# filter rules
block in

pass out keep state

# anchor "ftp-proxy/*"
antispoof quick for { lo $int_if }

pass in quick on $ext_if inet proto tcp from <trusted> to port 22 keep state

pass in quick on $ext_if inet proto tcp from any to ($ext_if) \
   port $tcp_services flags S/SA keep state

# Rules section
# uPnPd rule anchor
anchor "miniupnpd"

pass in on $int_if inet proto tcp from any to ($int_if) \
   port $tcp_services flags S/SA keep state

pass in quick on $int_if

pass in inet proto icmp all icmp-type $icmp_types keep state