All pastes #932255 Raw Edit

Something

public text v1 · immutable
·published 2008-03-07 16:44 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.1 }"
# options
set block-policy return
set loginterface $ext_if

set skip on lo

# scrub
scrub in

# 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 on $ext_if inet proto tcp from { $trusted } to port 22

pass in 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