mirror of
https://github.com/hackacad/bastille.git
synced 2025-12-22 18:21:53 +01:00
Merge pull request #592 from BastilleBSD/rdr_fix
fix rdr issue detecting IP6 when disabled or not set
This commit is contained in:
@@ -76,11 +76,12 @@ check_jail_validity() {
|
|||||||
fi
|
fi
|
||||||
# Check if jail ip6 address (ip6.addr) is valid (non-VNET only)
|
# Check if jail ip6 address (ip6.addr) is valid (non-VNET only)
|
||||||
if [ "$(bastille config $TARGET get vnet)" != 'enabled' ]; then
|
if [ "$(bastille config $TARGET get vnet)" != 'enabled' ]; then
|
||||||
if [ "$(bastille config $TARGET get ip6)" != 'disabled' ]; then
|
if [ "$(bastille config $TARGET get ip6)" != 'disabled' ] && [ "$(bastille config $TARGET get ip6)" != 'not set' ]; then
|
||||||
JAIL_IP6=$(/usr/sbin/jls -j "${TARGET}" ip6.addr 2>/dev/null)
|
JAIL_IP6=$(/usr/sbin/jls -j "${TARGET}" ip6.addr 2>/dev/null)
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
# Check if rdr-anchor is defined in pf.conf
|
# Check if rdr-anchor is defined in pf.conf
|
||||||
if ! (pfctl -sn | grep rdr-anchor | grep 'rdr/\*' >/dev/null); then
|
if ! (pfctl -sn | grep rdr-anchor | grep 'rdr/\*' >/dev/null); then
|
||||||
error_exit "rdr-anchor not found in pf.conf"
|
error_exit "rdr-anchor not found in pf.conf"
|
||||||
|
|||||||
Reference in New Issue
Block a user