Skip to content

Commit

Permalink
Set a default gateway for jails without NAT if not configured
Browse files Browse the repository at this point in the history
  • Loading branch information
John Hixson committed Jun 27, 2013
1 parent 6ebb623 commit 00c145c
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/pcbsd/warden/scripts/backend/startjail.sh
Expand Up @@ -174,7 +174,14 @@ start_jail_vimage()
# If NAT is not enabled, return now
#
if [ "${NATENABLE}" = "NO" ] ; then
return 0
if [ -z "${GATEWAY4}" ] ; then
GATEWAY4="$(get_default_route)"
fi
if [ -n "${GATEWAY4}" ] ; then
jexec ${JID} route add -inet default ${GATEWAY4}
fi

return 0
fi

#
Expand Down

0 comments on commit 00c145c

Please sign in to comment.