Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 29 Jun 2007 10:25:54 +0200
From:      Roger Gujord <roger@gujord.com>
To:        freebsd-jail@freebsd.org
Subject:   Re: Different Netmasks for jails
Message-ID:  <4684C212.1070005@gujord.com>
In-Reply-To: <4684B4C9.90101@gujord.com>
References:  <468386A5.9040900@gujord.com> <20070628213520.6e561b42@localhost> <4684B4C9.90101@gujord.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4684C212.1070005>