Skip to content

Commit

Permalink
Merge pull request #595 from skenizen/fix-rdr-pf-path
Browse files Browse the repository at this point in the history
/etc/pf.conf path for rdr.sh set by a variable in bastille configuration
  • Loading branch information
cedwards committed Jul 14, 2023
2 parents e64a6af + 373ccd4 commit 7f41973
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions usr/local/etc/bastille/bastille.conf.sample
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ bastille_releasesdir="${bastille_prefix}/releases" ## default
bastille_templatesdir="${bastille_prefix}/templates" ## default: "${bastille_prefix}/templates"
bastille_logsdir="/var/log/bastille" ## default: "/var/log/bastille"

## pf configuration path
bastille_pf_conf="/etc/pf.conf" ## default: "/etc/pf.conf"

## bastille scripts directory (assumed by bastille pkg)
bastille_sharedir="/usr/local/share/bastille" ## default: "/usr/local/share/bastille"

Expand Down
2 changes: 1 addition & 1 deletion usr/local/share/bastille/rdr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ check_jail_validity() {
fi

# Check if ext_if is defined in pf.conf
EXT_IF=$(grep "^[[:space:]]*${bastille_network_pf_ext_if}[[:space:]]*=" /etc/pf.conf)
EXT_IF=$(grep "^[[:space:]]*${bastille_network_pf_ext_if}[[:space:]]*=" ${bastille_pf_conf})
if [ -z "${EXT_IF}" ]; then
error_exit "bastille_network_pf_ext_if (${bastille_network_pf_ext_if}) not defined in pf.conf"
fi
Expand Down

0 comments on commit 7f41973

Please sign in to comment.