Turning on PF

We use rsync from the PC to the root account on both firewalls to send the new PF configuration to both hosts, then use SSH to execute pfctl -f pf.conf && cp pf.conf /etc/pf.conf. Have a directory dual-fw with a pf.conf, a script update-pf.sh:

#!/bin/ksh

pfctl -f pf.conf && cp pf.conf /etc/pf.conf
      

and a Makefile:

DIRNAME=dual-fw
IP1=10.0.7.252
IP2=10.0.7.253

SSHOPTS=
SSH=/usr/bin/ssh

update: update-pf

update-pf: upload
$(SSH) $(SSHOPTS) root@$(IP1) 'cd $(DIRNAME) && make install-pf'
$(SSH) $(SSHOPTS) root@$(IP2) 'cd $(DIRNAME) && make install-pf'

install-pf:
./update-pf.sh

upload:
echo "Uploading"
rsync -rav . root@$(IP1):~/$(DIRNAME)
rsync -rav . root@$(IP2):~/$(DIRNAME)
      

... and just run