Access jails by name

The jails on my FreeBSD root server are configured like this:

#TEST jail

jls gives the following output:Accessing the jail by it’s

   JID  IP Address      Hostname                Path
     2        /usr/jail/TEST
     3       /usr/jail/TEST2

Till now i only was able to access the jails by their jid. Running jexec with the jail name gives the following error:

[root@server:~] jexec TEST tcsh
jexec: jail "TCSH" not found

After adding the following line to the rc.conf it’s possible to access the jail by it’s name.

jail_TEST_flags="-n TEST"

Leave a Reply

Your email address will not be published. Required fields are marked *