Hello There,
I'm a complete newbie to OpenBSD - a veteran from FreeBSD attracted by
the green grass of pf for a new firewall. Here's the rub - simple setup
with nic connected to internet, nic connected to subnet, wireless card
bridged to internal subnet. Dhcpd is running, working fine, handing out
licenses on the internal ethernet - but no licenses on the wlan. If I
manually configure a machine on the wireless lan - all is fine...also I
can't ping from one side of the bridge to the other - but both sides
reach the internet and router fine. Attached is a messy (well hacked)
pf.conf
# macros
int_if = "rl0"
ext_if = "le1"
wi_if = "wi0"
localnet = "10.0.0.0/24"
tcp_services = "{ 20, 21, 22, 113 }"
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 }"
comp3 = "10.0.0.2"
# options
set block-policy return
set loginterface $ext_if
# scrub
scrub in all
# nat/rdr
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 on $ext_if proto tcp from any to any port 80 -> $comp3
# filter rules
block 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 $comp3 port 80 \
flags S/SA synproxy 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
pass out on $ext_if proto udp from any port = bootpc to { $localnet,
255.255.255.255 } port = bootps
pass in on $ext_if proto udp from $localnet port = bootps to {
$localnet, 255.255.255.255 } port = bootpc