All pastes #117916 Raw Edit

hubastink

public text v1 · immutable
·published 2006-08-06 03:37 UTC
rendered paste body
ext_if="nfe0"
int_if="dc0"

icmp_types="echoreq"
ssh_allowed="{ 172.16.1.147, 172.16.1.25, 172.16.1.45 }"

# options
set block-policy return
set loginterface $ext_if
set limit states 30000

set skip on lo

# scrub
scrub in

# nat/rdr
nat on $ext_if from !($ext_if) -> ($ext_if:0)
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 quick on $int_if
pass out keep state

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

pass in on $ext_if inet proto tcp from any to ($ext_if) \
   port 113 flags S/SA keep state
pass in quick log on { $ext_if, $int_if } proto tcp from $ssh_allowed to any port 33 keep state
pass in inet proto icmp all icmp-type $icmp_types keep state
#