All pastes #840445 Raw Edit

Stuff

public text v1 · immutable
#840445 ·published 2007-12-31 21:40 UTC
rendered paste body
# macros
ext_if="sis0"
int_if="sis1"
wi_if="sis2"

tcp_services="{ 22 }"
icmp_types="echoreq"


# options
set block-policy return
set loginterface $ext_if

set skip on lo

# scrub
scrub in

altq on sis2 cbq bandwidth 1Mb queue { std_in,std_out }

queue std_in bandwidth 949Kb cbq(default)
queue std_out bandwidth 50Kb priority 4

# nat/rdr
nat on $ext_if from !($ext_if) -> ($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

# filter rules
block in
pass out

anchor "ftp-proxy/*"
antispoof quick for { lo $int_if }

# Block traffic from the wireless network
block in quick on $int_if inet proto { tcp, udp } from $wi_if/24 to $int_if/24
block out quick on $wi_if inet proto { tcp, udp } from $int_if/24 to $wi_if/24

pass out on $ext_if inet proto { tcp udp } from ($wi_if) to any queue(std_out)
pass in on $ext_if inet proto { tcp udp } from any to ($wi_if) queue(std_in)

pass in on $ext_if inet proto tcp from any to ($ext_if) port $tcp_services
pass in inet proto icmp all icmp-type $icmp_types
pass quick on $int_if no state
pass quick on $wi_if no state