All pastes #355428 Raw Edit

Mine

public text v1 · immutable
·published 2007-02-14 14:04 UTC
rendered paste body
# create a macro to list all ports allowed inbound traffic
allowed_ports="{443, 444, 22, 21}"
# create a table to store all reserved/private addresses
table <bogons> { 192.168.0.0/16, 172.16.0.0/12, 10.0.0.0/8 , 127.0.0.0/8, \
        0.0.0.0/8, 169.254.0.0/16, 192.0.2.0/24, 204.152.64.0/23, 224.0.0.0/3 }

# don't filter the loopback
set skip on lo0

# default to blocking everything
block in log all

# block all inbound traffic on rl0 from private/reserved networks.

block in quick on rl0 from <bogons> to any

# allow inbound traffic to $allowed_ports
pass in quick on rl0 proto tcp from any to any port $allowed_ports \
        keep state

# allow ftp/ftp-data from 66.93.233.40
pass in quick on rl0 proto tcp from 66.93.233.40 to any port { 21, 20 } \
        keep state

# uncomment this if you want to allow communications originating from the host
#pass out quick on rl0