fusionpbx-install.sh/freebsd/resources/pf.sh

29 lines
641 B
Bash
Raw Normal View History

#!/bin/sh
#move to script directory so all relative paths work
cd "$(dirname "$0")"
. ./config.sh
. ./colors.sh
2024-08-26 01:38:37 +02:00
#send a message
2017-03-25 18:52:49 +01:00
verbose "Configuring PF"
2017-04-04 01:25:28 +02:00
#enable the service
echo 'pf_enable="YES"' >> /etc/rc.conf
2017-04-04 05:03:58 +02:00
echo 'pf_rules="/etc/pf.conf"' >> /etc/rc.conf
2017-04-04 05:01:12 +02:00
#echo 'pf_flags=""' >> /etc/rc.conf
2017-04-04 01:25:28 +02:00
echo 'pflog_enable="YES"' >> /etc/rc.conf
echo 'pflog_logfile="/var/log/pflog"' >> /etc/rc.conf
2017-04-04 05:01:12 +02:00
#echo 'pflog_flags=""' >> /etc/rc.conf
2017-04-04 05:01:12 +02:00
#copy the pf config file
cp pf/pf.conf /etc/pf.conf
2024-08-26 01:38:37 +02:00
#add the pf table files
touch /etc/pf-pass.conf
2024-08-26 04:01:59 +02:00
touch /etc/pf-block.conf
touch /etc/pf-block-sip-auth-ip.conf
touch /etc/pf-block-sip-auth-fail.conf