Annotation of src/etc/pf.conf, Revision 1.5
1.5 ! henning 1: # $OpenBSD: pf.conf,v 1.4 2002/06/17 08:07:58 henning Exp $
1.1 kjell 2: #
1.2 smart 3: # See pf.conf(5) for syntax and examples
1.4 henning 4: #
5: # replace ext0 with external interface name, 10.0.0.0/8 with internal network
6: # and 192.168.1.1 with external address
1.5 ! henning 7:
! 8: # Normalize: reassemble fragments and resolve or reduce traffic ambiguities
! 9:
! 10: # scrub in all
! 11:
1.4 henning 12: # nat: packets going out through ext0 with source address 10.0.0.0/8 will get
13: # translated as coming from 192.168.1.1. a state is created for such packets,
14: # and incoming packets will be redirected to the internal address.
15:
16: # nat on ext0 from 10.0.0.0/8 to any -> 192.168.1.1
17:
18: # rdr: packets coming in through ext0 with destination 192.168.1.1:1234 will
19: # be redirected to 10.1.1.1:5678. a state is created for such packets, and
20: # outgoing packets will be translated as coming from the external address.
1.1 kjell 21:
1.4 henning 22: # rdr on ext0 proto tcp from any to 192.168.1.1/32 port 1234 -> 10.1.1.1 port 5678
23:
24: # filter rules
25: # the implicit first two rules are
1.1 kjell 26: # pass in all
27: # pass out all
1.4 henning 28:
29: # block all incoming packets but allow ssh, pass all outgoing tcp and udp
30: # connections and keep state
31: # log blocked pakets
32:
33: # block in log all
34: # pass in on ext0 proto tcp from any to ext0 port 22 keep state
35: # pass out on ext0 proto { tcp, udp } all keep state