Different Netmasks for jails
Roger Gujord
roger at gujord.com
Fri Jun 29 08:25:56 UTC 2007
UPDATE:
-------
I managed to do what I wanted by adding the following to /etc/rc.d/jail:
# init_variables _j
eval _netmask=\"\$jail_${_j}_netmask\"
# Debugging aid
debug "$_j netmask: $_netmask"
...
if [ -z "${_netmask}" ]; then
err 3 "$name: No netmask has been defined for ${_j}"
fi
# jail_start()
ifconfig ${_interface} alias ${_ip} netmask ${_netmask}
and the following for each jail in /etc/rc.conf:
jail_jailname_netmask="xxx.xxx.xxx.xxx"
I'm not sure if this is the proper way to do it, but it seems to work for me.
--Roger
More information about the freebsd-jail
mailing list