I'm getting closer.
This is what I think I want. Is there a problem with it?
-----------------------
# macros
int_if = "rl0"
ext_if = "ne1"
tcp_services = "{ 22, 113 }"
bad_services = "{ 137, 138, 139, 445 }"
icmp_types = "echoreq"
table <private> const \
{ 127/8, 10/8, 172.16/12, 192.168/16, !192.168.0/24 }
# options
set block-policy return
set loginterface $ext_if
# scrub
scrub in all
# nat/rdr
nat on $ext_if from $int_if:network to any -> $ext_if
rdr on $int_if proto tcp from any to any port 21 -> 127.0.0.1 \
port 8021
# filter rules
block all
pass quick on lo0 all
block drop in quick on $ext_if from <private>
block drop quick on $ext_if port $bad_services
pass in on $ext_if inet proto tcp from any to $ext_if \
port $tcp_services flags S/SA keep state
pass in on $ext_if inet proto tcp from port 20 to $ext_if \
user proxy flags S/SA keep state
pass in inet proto icmp all icmp-type $icmp_types 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
--
Don't knock President Fillmore. He kept us out of Vietnam.