<s>
The	O
jail	O
mechanism	O
is	O
an	O
implementation	O
of	O
FreeBSD	B-Operating_System
's	O
OS-level	B-Application
virtualisation	I-Application
that	O
allows	O
system	B-Application
administrators	I-Application
to	O
partition	O
a	O
FreeBSD-derived	O
computer	O
system	O
into	O
several	O
independent	O
mini-systems	O
called	O
jails	O
,	O
all	O
sharing	O
the	O
same	O
kernel	O
,	O
with	O
very	O
little	O
overhead	O
.	O
</s>
<s>
It	O
is	O
implemented	O
through	O
a	O
system	B-Operating_System
call	I-Operating_System
,	O
jail(2 )	O
,	O
as	O
well	O
as	O
a	O
userland	O
utility	O
,	O
jail(8 )	O
,	O
plus	O
,	O
depending	O
on	O
the	O
system	O
,	O
a	O
number	O
of	O
other	O
utilities	O
.	O
</s>
<s>
The	O
functionality	O
was	O
committed	O
into	O
FreeBSD	B-Operating_System
in	O
1999	O
by	O
Poul-Henning	O
Kamp	O
after	O
some	O
period	O
of	O
production	O
use	O
by	O
a	O
hosting	O
provider	O
,	O
and	O
was	O
first	O
released	O
with	O
FreeBSD	B-Application
4.0	I-Application
,	O
thus	O
being	O
supported	O
on	O
a	O
number	O
of	O
FreeBSD	B-Operating_System
descendants	O
,	O
including	O
DragonFly	B-Application
BSD	I-Application
,	O
to	O
this	O
day	O
.	O
</s>
<s>
The	O
need	O
for	O
the	O
FreeBSD	B-Language
jails	I-Language
came	O
from	O
a	O
small	O
shared-environment	O
hosting	O
provider	O
's	O
(	O
R&D	O
Associates	O
,	O
Inc.	O
'	O
s	O
owner	O
,	O
Derrick	O
T	O
.	O
Woolworth	O
)	O
desire	O
to	O
establish	O
a	O
clean	O
,	O
clear-cut	O
separation	O
between	O
their	O
own	O
services	O
and	O
those	O
of	O
their	O
customers	O
,	O
mainly	O
for	O
security	O
and	O
ease	O
of	O
administration	O
(	O
)	O
.	O
</s>
<s>
Jails	O
were	O
first	O
introduced	O
in	O
FreeBSD	B-Operating_System
version	O
4.0	O
,	O
that	O
was	O
released	O
on	O
.	O
</s>
<s>
FreeBSD	B-Language
jails	I-Language
mainly	O
aim	O
at	O
three	O
goals	O
:	O
</s>
<s>
Virtualization	O
:	O
Each	O
jail	O
is	O
a	O
virtual	O
environment	O
running	O
on	O
the	O
host	B-Operating_System
machine	I-Operating_System
with	O
its	O
own	O
files	O
,	O
processes	O
,	O
user	O
and	O
superuser	B-Application
accounts	O
.	O
</s>
<s>
Ease	O
of	O
delegation	O
:	O
The	O
limited	O
scope	O
of	O
a	O
jail	O
allows	O
system	B-Application
administrators	I-Application
to	O
delegate	O
several	O
tasks	O
which	O
require	O
superuser	B-Application
access	O
without	O
handing	O
out	O
complete	O
control	O
over	O
the	O
system	O
.	O
</s>
<s>
Unlike	O
chroot	B-Application
jail	I-Application
,	O
which	O
only	O
restricts	O
processes	O
to	O
a	O
particular	O
view	O
of	O
the	O
filesystem	B-Application
,	O
the	O
FreeBSD	B-Language
jail	I-Language
mechanism	O
restricts	O
the	O
activities	O
of	O
a	O
process	O
in	O
a	O
jail	O
with	O
respect	O
to	O
the	O
rest	O
of	O
the	O
system	O
.	O
</s>
<s>
They	O
are	O
bound	O
to	O
specific	O
IP	B-Protocol
addresses	I-Protocol
,	O
and	O
a	O
jailed	O
process	O
cannot	O
access	O
divert	O
or	O
routing	O
sockets	O
.	O
</s>
<s>
Raw	B-Protocol
sockets	I-Protocol
are	O
also	O
disabled	O
by	O
default	O
,	O
but	O
may	O
be	O
enabled	O
by	O
setting	O
the	O
security.jail.allow_raw_sockets	O
sysctl	B-Application
option	O
.	O
</s>
<s>
The	O
utility	O
and	O
system	B-Operating_System
call	I-Operating_System
first	O
appeared	O
in	O
FreeBSD	B-Application
4.0	I-Application
.	O
</s>
<s>
New	O
utilities	O
(	O
for	O
example	O
to	O
list	O
jails	O
)	O
and	O
system	B-Operating_System
calls	I-Operating_System
(	O
for	O
example	O
to	O
attach	O
a	O
new	O
process	O
to	O
a	O
jail	O
)	O
that	O
render	O
jail	O
management	O
much	O
easier	O
were	O
added	O
in	O
FreeBSD	B-Operating_System
5.1	O
.	O
</s>
<s>
The	O
jail	O
subsystem	O
received	O
further	O
significant	O
updates	O
with	O
FreeBSD	B-Operating_System
7.2	O
,	O
including	O
support	O
for	O
multiple	O
IPv4	O
and	O
IPv6	O
addresses	O
per	O
jail	O
and	O
support	O
for	O
binding	O
jails	O
to	O
specific	O
CPUs	O
.	O
</s>
<s>
Jails	O
can	O
also	O
have	O
their	O
own	O
,	O
independent	O
,	O
jailed	O
superusers	B-Application
.	O
</s>
<s>
The	O
FreeBSD	B-Language
jail	I-Language
does	O
not	O
however	O
achieve	O
true	O
virtualization	O
;	O
it	O
does	O
not	O
allow	O
the	O
virtual	O
machines	O
to	O
run	O
different	O
kernel	O
versions	O
than	O
that	O
of	O
the	O
base	O
system	O
.	O
</s>
<s>
There	O
is	O
no	O
support	O
for	O
clustering	B-Architecture
or	O
process	B-Operating_System
migration	I-Operating_System
.	O
</s>
<s>
FreeBSD	B-Language
jails	I-Language
are	O
an	O
effective	O
way	O
to	O
increase	O
the	O
security	O
of	O
a	O
server	O
because	O
of	O
the	O
separation	O
between	O
the	O
jailed	O
environment	O
and	O
the	O
rest	O
of	O
the	O
system	O
(	O
the	O
other	O
jails	O
and	O
the	O
base	O
system	O
)	O
.	O
</s>
<s>
FreeBSD	B-Language
jails	I-Language
are	O
limited	O
in	O
the	O
following	O
ways	O
:	O
</s>
<s>
Modifying	O
most	O
sysctls	B-Application
and	O
the	O
securelevel	B-Operating_System
is	O
prohibited	O
.	O
</s>
<s>
Modifying	O
the	O
network	O
configuration	O
,	O
including	O
interfaces	O
,	O
interface	O
or	O
IP	B-Protocol
addresses	I-Protocol
,	O
and	O
the	O
routing	B-Protocol
table	I-Protocol
,	O
is	O
prohibited	O
.	O
</s>
<s>
Additionally	O
,	O
raw	B-Protocol
sockets	I-Protocol
are	O
disabled	O
by	O
default	O
.	O
</s>
<s>
A	O
jail	O
is	O
bound	O
only	O
to	O
specific	O
IP	B-Protocol
addresses	I-Protocol
and	O
firewall	O
rules	O
cannot	O
be	O
changed	O
.	O
</s>
<s>
With	O
the	O
introduction	O
of	O
VNET(virtual network stack )	O
,	O
the	O
jails	O
are	O
free	O
to	O
modify	O
their	O
Network	O
Configuration	O
(	O
including	O
interfaces	O
,	O
IP	B-Protocol
addresses	I-Protocol
,	O
etc	O
.	O
</s>
<s>
)	O
,	O
provided	O
the	O
vnet	B-General_Concept
is	O
enabled	O
for	O
the	O
jail	O
.	O
</s>
<s>
Mounting	B-Application
and	O
unmounting	O
filesystems	B-Application
is	O
prohibited	O
.	O
</s>
<s>
a	O
jail	O
is	O
chroot'ed	O
)	O
.	O
</s>
