diff --git a/usr/local/bin/bastille b/usr/local/bin/bastille index fa2f59d9..34f43a6f 100755 --- a/usr/local/bin/bastille +++ b/usr/local/bin/bastille @@ -69,7 +69,7 @@ bastille_perms_check . /usr/local/etc/bastille/bastille.conf ## version -BASTILLE_VERSION="0.6.20200412" +BASTILLE_VERSION="0.6.20200414" usage() { cat << EOF diff --git a/usr/local/share/bastille/start.sh b/usr/local/share/bastille/start.sh index 4e580bfb..8116b318 100644 --- a/usr/local/share/bastille/start.sh +++ b/usr/local/share/bastille/start.sh @@ -89,7 +89,7 @@ for _jail in ${JAILS}; do fi ## add ip4.addr to firewall table:jails - if [ ! -z "${bastille_network_loopback}" ]; then + if grep "interface = ${bastille_network_loopback}" "${bastille_jailsdir}/${_jail}/jail.conf"; then pfctl -q -t jails -T add "$(jls -j "${_jail}" ip4.addr)" fi fi diff --git a/usr/local/share/bastille/stop.sh b/usr/local/share/bastille/stop.sh index 655f4dc9..15d79a0b 100644 --- a/usr/local/share/bastille/stop.sh +++ b/usr/local/share/bastille/stop.sh @@ -67,7 +67,7 @@ for _jail in ${JAILS}; do ## test if running if [ "$(jls name | awk "/^${_jail}$/")" ]; then ## remove ip4.addr from firewall table:jails - if [ -n "${bastille_network_loopback}" ]; then + if grep "interface = ${bastille_network_loopback}" "${bastille_jailsdir}/${_jail}/jail.conf"; then pfctl -q -t jails -T delete "$(jls -j "${_jail}" ip4.addr)" fi