# MACROS
ext_if = "hme0"
int_if = "hme1"
tcp_services = "{ www, https, ftp-data, ftp, ssh, domain, pop3, pop3s, \
smtp, auth, nntp, cvspserver, 446, 1863, 2628, 8000, \
8080 }"
icmp_types = "echoreq"
cary_n1 = "10.10.11.1"
# OPTIONS
set block-policy drop
set loginterface $ext_if
set skip on lo
scrub in
nat on $ext_if from !($ext_if) to any -> ($ext_if)
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 -> $cary_n1
rdr on $ext_if proto tcp from any to any port 25 -> $cary_n1
rdr on $ext_if proto tcp from any to any port 15566:15766 -> 10.0.100.9 port 15566:15766
# FILTER RULES
block in log
pass out keep state
anchor "ftp-proxy/*"
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 any to $cary_n1 port 80 \
flags S/SA synproxy state
pass in inet proto icmp all icmp-type $icmp_types keep state
pass in on $ext_if inet proto tcp from any to ($ext_if) \
port 15566:15766 flags S/SA keep state
pass quick on $int_if
#antispoof for { $int_if }