All pastes #627945 Raw Edit

Something

public text v1 · immutable
·published 2007-07-20 16:38 UTC
rendered paste body
mlds# cat /etc/pf.conf
# macros
ext_if="nfe0"
int_if="nfe1"
tcp_services="{ 22 }"
icmp_types="echoreq"
mx_pc="192.168.1.112"
mx_ports="{4077}"
server="192.168.1.100"
# options
set block-policy return
set loginterface $ext_if
set skip on lo
# scrub
scrub in
# nat/rdr
nat on $ext_if from !($ext_if) -> ($ext_if:0)
rdr on $ext_if proto tcp from any to any port $mx_ports -> $mx_pc
rdr pass on $ext_if proto tcp from any to any port 23 ->  192.168.1.100 port 22
# filter rules
block in
pass out keep state
antispoof quick for { lo $int_if }
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 ($ext_if) port 23 flags   S/SA keep state
pass in on $ext_if inet proto tcp from any to $mx_pc port $mx_ports flags S/SA synproxy state
#pass in on $ext_if inet proto tcp from any to 192.168.1.100  port 23 flags S/SA synproxy state
pass in on $ext_if inet proto tcp from any to $server port 22 flags S/SA synproxy state
pass in inet proto icmp all icmp-type $icmp_types keep state
pass quick on $int_if