From owner-freebsd-jail@freebsd.org Sat Sep 3 15:52:28 2016 Return-Path: Delivered-To: freebsd-jail@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 12A2FBCED93 for ; Sat, 3 Sep 2016 15:52:28 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A0664252D; Sat, 3 Sep 2016 15:52:27 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id u83FqMSU033897 (version=TLSv1 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Sat, 3 Sep 2016 18:52:22 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua u83FqMSU033897 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id u83FqM3C033896; Sat, 3 Sep 2016 18:52:22 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 3 Sep 2016 18:52:22 +0300 From: Konstantin Belousov To: James Gritton Cc: Grzegorz Junka , freebsd-jail@freebsd.org Subject: Re: Changing jail's IP automatically Message-ID: <20160903155222.GV83214@kib.kiev.ua> References: <872dfbe1-3f39-bf5f-44b2-611bd92a1210@gjunka.com> <4fa37d2e14665ff5a00548626e55142f@gritton.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4fa37d2e14665ff5a00548626e55142f@gritton.org> User-Agent: Mutt/1.6.1 (2016-04-27) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: freebsd-jail@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "Discussion about FreeBSD jail\(8\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Sep 2016 15:52:28 -0000 On Sat, Sep 03, 2016 at 09:33:08AM -0600, James Gritton wrote: > On 2016-09-02 15:08, Grzegorz Junka wrote: > > I am using a jail on my laptop and I often connect to different > > WiFi's, which of course assign different IPs to my laptop. I set up > > the jail by adding an alias to wlan0 and I need to update the IP every > > time I switch the WiFi network. Is it possible to create a jail with > > IP assigned dynamically, e.g. from DHCP, or at least switch between > > predefined IPs more easily than by editing /etc/jail.conf? > > You can always add addresses later. I use private address in the jail, and NAT it on outside interface. This worked fine on a roaming laptop with DHCP, several years ago.