[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

example pf.conf



I've been searching for some examples of pf.conf but all I can find are
examples for a gateway/firewall with emphasis towards NAT.
I need to set up packet filter on a stand alone (single NIC) OpenBSD 3.4
box which will run ssh, httpd, dns, smtp, pop3.
Please can anyone point me towards such examples or perhaps post their
pf.conf for me to try. 
At the moment I'm just trying to get dns working, I tried the following
but it seems not to work. ssh is working fine. I think dns needs to use
other ports as well.
# cat /etc/pf.conf                                                      
#$OpenBSD: pf.conf,v 1.21 2003/09/02
block in log all
# pass ssh
pass  in  on $ext_if proto tcp from any to $ext_if port 22 keep state
pass  out on $ext_if proto { tcp, udp } all keep state
# pass dns
pass in on $ext_if proto { tcp, udp } from any to any port 53 
pass out on $ext_if proto { tcp, udp } from any to any port 53
Many thanks in advance
Gary