ext_if="pppoe0"
int_if="we1"
lan="192.168.0.0/24"
set block-policy return
#table <spamd> persist
#table <spamd-white> persist
scrub in all
scrub out on $ext_if max-mss 1452
# NAT
#nat on $ext_if proto {tcp udp icmp gre} from !($ext_if) -> ($ext_if:0)
nat on $ext_if proto {tcp udp icmp gre} from !($ext_if) -> ($ext_if)
nat-anchor "ftp-proxy/*"
rdr-anchor "ftp-proxy/*"
# REDIRECTIONS
#rdr pass on $int_if proto tcp to port ftp -> 127.0.0.1 port 8021
#rdr on $int_if proto tcp from any to any port ftp -> 127.0.0.1 port 8021
#rdr pass on $ext_if proto tcp from <spamd> to port smtp \
# -> 127.0.0.1 port spamd
#rdr pass on $ext_if proto tcp from !<spamd-white> to port smtp \
#
rdr on $ext_if proto tcp to ($ext_if) port 4662 -> 192.168.0.101
rdr on $ext_if proto tcp to ($ext_if) port 6881 -> 192.168.0.101
rdr on $ext_if proto udp to ($ext_if) port 4444 -> 192.168.0.101
rdr pass on $int_if proto tcp from $lan to any port 21 -> 127.0.0.1 port 8021
rdr-anchor "ftp-proxy/*"
block in
pass out keep state
pass quick on { lo $int_if }
antispoof quick for { lo $int_if }
# VPN PPTP
#VPN out from internal network
pass in log quick on $int_if proto gre keep state
pass in log quick on $int_if inet proto tcp from any to any port 1723 flags S/SA keep state
pass out log quick on $ext_if proto gre keep state
pass out log quick on $ext_if inet proto tcp from any to any port 1723 flags S/SA keep state