diff --git a/usr/local/share/bastille/clone.sh b/usr/local/share/bastille/clone.sh index 7d057a65..ba6bc32d 100644 --- a/usr/local/share/bastille/clone.sh +++ b/usr/local/share/bastille/clone.sh @@ -123,6 +123,7 @@ define_ips() { if [ "${IP4_ADDR}" = "inherit" ] || [ "${IP4_ADDR}" = "ip_hostname" ]; then if [ "$(bastille config ${TARGET} get vnet)" = "enabled" ]; then error_exit "[ERROR]: Unsupported IP option for VNET jail: ${IP4_ADDR}" + fi elif [ "${IP4_ADDR}" = "0.0.0.0" ] || [ "${IP4_ADDR}" = "DHCP" ] || [ "${IP4_ADDR}" = "SYNCDHCP" ]; then if [ "$(bastille config ${TARGET} get vnet)" != "enabled" ]; then error_exit "[ERROR]: Unsupported IP option for standard jail: ${IP4_ADDR}" diff --git a/usr/local/share/bastille/network.sh b/usr/local/share/bastille/network.sh index b602217f..af66b20c 100644 --- a/usr/local/share/bastille/network.sh +++ b/usr/local/share/bastille/network.sh @@ -191,6 +191,7 @@ define_ips() { if [ "${IP4_ADDR}" = "inherit" ] || [ "${IP4_ADDR}" = "ip_hostname" ]; then if [ "$(bastille config ${TARGET} get vnet)" = "enabled" ]; then error_exit "[ERROR]: Unsupported IP option for VNET jail: ${IP4_ADDR}" + fi elif [ "${IP4_ADDR}" = "0.0.0.0" ] || [ "${IP4_ADDR}" = "DHCP" ] || [ "${IP4_ADDR}" = "SYNCDHCP" ]; then if [ "$(bastille config ${TARGET} get vnet)" != "enabled" ]; then error_exit "[ERROR]: Unsupported IP option for standard jail: ${IP4_ADDR}" @@ -468,9 +469,9 @@ EOF elif [ "${STANDARD}" -eq 1 ]; then if [ -n "${IP6_ADDR}" ]; then - sed -i '' "s/interface = .*/&\n ip6.addr += ${if}|${ip};/" ${jail_config} + sed -i '' "s/ip4.addr = .*/&\n ip6.addr += ${if}|${ip};/" ${jail_config} else - sed -i '' "s/interface = .*/&\n ip4.addr += ${if}|${ip};/" ${jail_config} + sed -i '' "s/ip6.addr = .*/&\n ip4.addr += ${if}|${ip};/" ${jail_config} fi fi }