mirror of
https://github.com/hackacad/bastille.git
synced 2025-12-21 17:52:01 +01:00
If dual stack ip6 gw will be last will be the last output line of netstat ... comand in _gateway
This commit is contained in:
@@ -383,7 +383,11 @@ create_jail() {
|
||||
if [ -n "${bastille_network_gateway}" ]; then
|
||||
_gateway="${bastille_network_gateway}"
|
||||
else
|
||||
_gateway="$(netstat -rn | awk '/default/ {print $2}')"
|
||||
if [ -z ${ip6} ]; then
|
||||
_gateway="$(netstat -4rn | awk '/default/ {print $2}')"
|
||||
else
|
||||
_gateway="$(netstat -6rn | awk '/default/ {print $2}')"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
bastille template "${NAME}" ${bastille_template_vnet} --arg BASE_TEMPLATE="${bastille_template_base}" --arg HOST_RESOLV_CONF="${bastille_resolv_conf}" --arg EPAIR="${uniq_epair}" --arg GATEWAY="${_gateway}" --arg IFCONFIG="${_ifconfig}"
|
||||
|
||||
Reference in New Issue
Block a user