Hi,
I have following LAN configuration:
[ COMP_1 ] ... [ COMP_n ]
| | ADSL
---+------+-----+------- int_if [ OpenBSD ] ext_if -------- ( Internet )
"comp_1" ... "comp_n" are running a web base application and a number of ports
on each machine have to be accessible from the internet.
I have the following pf.conf file which doesn't seem to work apart from the
redirection to port 80!:
--------------------------
ext_if="vr0"
int_if="rl0"
tcp_services = "{ 80, 20, 21, 22, 25, 110, 113 }"
cam_services = "{ 5000, 6000, 6001, 6002, 6005 }"
icmp_types = "echoreq"
priv_nets = "{ 127.0.0.0/8, 192.168.0.0/16, 172.16.0.0/12, 10.0.0.0/8 }"
cam1 = "192.168.1.33"
set block-policy return
set loginterface $ext_if
scrub in all
nat on $ext_if from $int_if:network to any -> $ext_if
rdr on $int_if proto tcp from any to any port 21 -> 127.0.0.1 port 8021
rdr pass on $ext_if proto tcp from any to any port 8000 -> $cam1 port 80
block all
block in log all
pass quick on lo0 all
block drop in quick on $ext_if from $priv_nets to any
block drop out quick on $ext_if from any to $priv_nets
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 proto tcp from any to $cam1 port $cam_services keep state
pass in inet proto icmp all icmp-type $icmp_types keep state
pass in on $int_if from $int_if:network to any keep state
pass out on $int_if from any to $int_if:network keep state
pass out on $ext_if proto tcp all modulate state flags S/SA
pass out on $ext_if proto { udp, icmp } all keep state
----------------------------------
Thanks for your help
George