summaryrefslogtreecommitdiffstats
path: root/usr.sbin/jail/jail.8
diff options
context:
space:
mode:
authorbz <bz@FreeBSD.org>2008-11-29 14:32:14 +0000
committerbz <bz@FreeBSD.org>2008-11-29 14:32:14 +0000
commitd2730d5b27273f2e5a9b9f2703b896b5194496ee (patch)
tree2b8f4835032d12a0e61cc40dad151e279cf7a49f /usr.sbin/jail/jail.8
parent3b10ad8d71152b89fda1bef42dc519fc460aba1b (diff)
downloadFreeBSD-src-d2730d5b27273f2e5a9b9f2703b896b5194496ee.zip
FreeBSD-src-d2730d5b27273f2e5a9b9f2703b896b5194496ee.tar.gz
MFp4:
Bring in updated jail support from bz_jail branch. This enhances the current jail implementation to permit multiple addresses per jail. In addtion to IPv4, IPv6 is supported as well. Due to updated checks it is even possible to have jails without an IP address at all, which basically gives one a chroot with restricted process view, no networking,.. SCTP support was updated and supports IPv6 in jails as well. Cpuset support permits jails to be bound to specific processor sets after creation. Jails can have an unrestricted (no duplicate protection, etc.) name in addition to the hostname. The jail name cannot be changed from within a jail and is considered to be used for management purposes or as audit-token in the future. DDB 'show jails' command was added to aid debugging. Proper compat support permits 32bit jail binaries to be used on 64bit systems to manage jails. Also backward compatibility was preserved where possible: for jail v1 syscalls, as well as with user space management utilities. Both jail as well as prison version were updated for the new features. A gap was intentionally left as the intermediate versions had been used by various patches floating around the last years. Bump __FreeBSD_version for the afore mentioned and in kernel changes. Special thanks to: - Pawel Jakub Dawidek (pjd) for his multi-IPv4 patches and Olivier Houchard (cognet) for initial single-IPv6 patches. - Jeff Roberson (jeff) and Randall Stewart (rrs) for their help, ideas and review on cpuset and SCTP support. - Robert Watson (rwatson) for lots and lots of help, discussions, suggestions and review of most of the patch at various stages. - John Baldwin (jhb) for his help. - Simon L. Nielsen (simon) as early adopter testing changes on cluster machines as well as all the testers and people who provided feedback the last months on freebsd-jail and other channels. - My employer, CK Software GmbH, for the support so I could work on this. Reviewed by: (see above) MFC after: 3 months (this is just so that I get the mail) X-MFC Before: 7.2-RELEASE if possible
Diffstat (limited to 'usr.sbin/jail/jail.8')
-rw-r--r--usr.sbin/jail/jail.846
1 files changed, 40 insertions, 6 deletions
diff --git a/usr.sbin/jail/jail.8 b/usr.sbin/jail/jail.8
index 147c210..95af6ec 100644
--- a/usr.sbin/jail/jail.8
+++ b/usr.sbin/jail/jail.8
@@ -33,7 +33,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd April 5, 2007
+.Dd November 29, 2008
.Dt JAIL 8
.Os
.Sh NAME
@@ -41,11 +41,12 @@
.Nd "imprison process and its descendants"
.Sh SYNOPSIS
.Nm
-.Op Fl i
+.Op Fl hi
+.Op Fl n Ar jailname
.Op Fl J Ar jid_file
.Op Fl s Ar securelevel
.Op Fl l u Ar username | Fl U Ar username
-.Ar path hostname ip-number command ...
+.Ar path hostname [ip[,..]] command ...
.Sh DESCRIPTION
The
.Nm
@@ -53,8 +54,26 @@ utility imprisons a process and all future descendants.
.Pp
The options are as follows:
.Bl -tag -width ".Fl u Ar username"
+.It Fl h
+Resolve
+.Va hostname
+and add all IP addresses returned by the resolver
+to the list of
+.Va ip-addresses
+for this prison.
+This may affect default address selection for outgoing IPv4 connections
+of prisons.
+The address first returned by the resolver for the IPv4 address family
+will be used as default.
+For IPv6 source address selection is done by a well defined algorithm.
.It Fl i
Output the jail identifier of the newly created jail.
+.It Fl n Ar jailname
+Assign and administrative name to the jail that can be used for management
+or auditing purposes.
+The system will
+.Sy not enforce
+the name to be unique.
.It Fl J Ar jid_file
Write a
.Ar jid_file
@@ -92,8 +111,14 @@ should run.
Directory which is to be the root of the prison.
.It Ar hostname
Hostname of the prison.
-.It Ar ip-number
-IP number assigned to the prison.
+.It Ar ip-addresses
+None, one or more IPv4 and IPv6 addresses assigned to the prison.
+The first address of each address family that was assigned to the jail will
+be used as the source address in case source address selection on unbound
+sockets cannot find a better match.
+It is only possible to start multiple jails with the same IP address,
+if none of the jails has more than this single overlapping IP address
+assigned to itself for the address family in question.
.It Ar command
Pathname of the program which is to be executed.
.El
@@ -179,7 +204,7 @@ is to disable IP services on the host system that listen on all local
IP addresses for a service.
If a network service is present in the host environment that binds all
available IP addresses rather than specific IP addresses, it may service
-requests sent to jail IP addresses.
+requests sent to jail IP addresses if the jail did not bind the port.
This means changing
.Xr inetd 8
to only listen on the
@@ -555,6 +580,9 @@ command can be used to find file system types available for mount from within
a jail.
This functionality is disabled by default, but can be enabled by setting this
MIB entry to 1.
+.It Va security.jail.jail_max_af_ips
+This MIB entry determines how may address per address family a prison
+may have. The default is 255.
.El
.Pp
The read-only sysctl variable
@@ -622,6 +650,12 @@ who contributed it to
.An Robert Watson
wrote the extended documentation, found a few bugs, added
a few new features, and cleaned up the userland jail environment.
+.Pp
+.An Bjoern A. Zeeb
+added multi-IP jail support for IPv4 and IPv6 based on a patch
+originally done by
+.An Pawel Jakub Dawidek
+for IPv4.
.Sh BUGS
Jail currently lacks the ability to allow access to
specific jail information via
OpenPOWER on IntegriCloud