From owner-freebsd-jail@FreeBSD.ORG Mon Jan 10 15:48:14 2011 Return-Path: Delivered-To: freebsd-jail@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3CE6D1065670 for ; Mon, 10 Jan 2011 15:48:14 +0000 (UTC) (envelope-from peter@pean.org) Received: from system.jails.se (system.jails.se [IPv6:2001:16d8:cc1e:1::1]) by mx1.freebsd.org (Postfix) with ESMTP id E085D8FC1B for ; Mon, 10 Jan 2011 15:48:13 +0000 (UTC) Received: from localhost (system.jails.se [91.205.63.85]) by system.jails.se (Postfix) with SMTP id DD534136CB1 for ; Mon, 10 Jan 2011 16:48:11 +0100 (CET) Received: from wide.adxsearch.local (194-237-183-250.customer.telia.com [194.237.183.250]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by system.jails.se (Postfix) with ESMTPSA id 33090136CAB; Mon, 10 Jan 2011 16:48:11 +0100 (CET) Message-ID: <4D2B2A3F.2040202@pean.org> Date: Mon, 10 Jan 2011 16:48:15 +0100 From: =?ISO-8859-1?Q?Peter_Ankerst=E5l?= User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.12) Gecko/20101209 Thunderbird/3.1.6 MIME-Version: 1.0 To: Stefan Bethke References: <4D2B179C.8000408@pean.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-DSPAM-Result: Innocent X-DSPAM-Processed: Mon Jan 10 16:48:11 2011 X-DSPAM-Confidence: 1.0000 X-DSPAM-Probability: 0.0023 X-DSPAM-Signature: 4d2b2a3b26726018020942 X-DSPAM-Factors: 27, Received*183+250.customer.telia.com, 0.40000, private, 0.40000, private, 0.40000, from+a, 0.40000, tionally+each, 0.40000, References*BADA+4ABC78B6C218, 0.40000, a+jail, 0.40000, a+jail, 0.40000, jail__ip, 0.40000, address+is, 0.40000, or, 0.40000, or, 0.40000, list+of, 0.40000, a+comma, 0.40000, an, 0.40000, an, 0.40000, Oh, 0.40000, 0+2, 0.40000, the+manual, 0.40000, 10, 0.40000, User-Agent*Gecko/20101209+Thunderbird/3.1.6, 0.40000, interface, 0.40000, from, 0.40000, >+support, 0.40000, of, 0.40000, of, 0.40000, But, 0.40000 Cc: freebsd-jail@freebsd.org Subject: Re: Multiple interfaces X-BeenThere: freebsd-jail@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion about FreeBSD jail\(8\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Jan 2011 15:48:14 -0000 On 01/10/11 16:45, Stefan Bethke wrote: > Am 10.01.2011 um 15:28 schrieb Peter Ankerstål: > >> I want access to a public and a private network from a jail. >> >> Can I configure a jail with multiple interfaces? > Yes, see rc.conf(5): > jail__ip > (str) Unset by default. Set to the (primary) IPv4 and/or > IPv6 address(es) assigned to the jail. The argument can be a > sole address or a comma separated list of addresses. Addi- > tionally each address can be prefixed by the name of an > interface followed by a pipe to overwrite > jail__interface or jail_interface and/or suffixed by a > netmask, prefixlen or prefix. In case no netmask, prefixlen > or prefix is given, `/32' will be used for IPv4 and `/128' > will be used for an IPv6 address. If no address is given for > the jail then the jail will be started with no networking > support. > > Assuming that the private and the public networks are attached to em0 and em1, respectively, you'd set > jail_myjail_ip="em0|172.17.43.3,em1|192.0.2.27" > in rc.conf. > > > Stefan > Oh, thanks! Sorry about that. But the "pipe" part is very hard to miss in the manual. Thanks again!