From owner-freebsd-questions@freebsd.org Thu Oct 19 18:59:13 2017 Return-Path: Delivered-To: freebsd-questions@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 E15CCE4465A for ; Thu, 19 Oct 2017 18:59:13 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mail.blih.net (mail.blih.net [212.83.177.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.blih.net", Issuer "mail.blih.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 51B16775E6 for ; Thu, 19 Oct 2017 18:59:12 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mail.blih.net (mail.blih.net [212.83.177.182]) by mail.blih.net (OpenSMTPD) with ESMTP id 07e25d8a; Thu, 19 Oct 2017 20:59:09 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=bidouilliste.com; h=date :from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; s=mail; bh=yTA90tpvqzLWi+cqlw7B86f9qhY=; b=JFV8XRbD/u62R8FU6BEiw9Du0IBM z+c0fPRdzW9RAWNoH98HDMAChILftCuKL3B6EIOmIRohgHAD5VCS8KOPPZgi6PIH x4ka1S/nQatYxdz7/uR9hywVwSkDlGQKyLUi3aESg/Nz6+Gr2p2EilmLTo0bhhZU EB3lrGlGiHXOVec= DomainKey-Signature: a=rsa-sha1; c=nofws; d=bidouilliste.com; h=date :from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; q=dns; s= mail; b=Iqd3E1EO+ELrSaofdcengU+8IZedXEj5x5ubiAsXaaSZ7rC4CKlSloa8 WpbfRm0ZKnRsV8MqHKlLcgzMkTsesGojx1e/Q+pTqWjDLudBS3jV7x0ND6zYD+17 wKitgpPPpML5R4wu8YKNaRcGqbwIdxM/uDHw8AiRe5WRTuTpiA0= Received: from knuckles.blih.net (ip-9.net-89-3-105.rev.numericable.fr [89.3.105.9]) by mail.blih.net (OpenSMTPD) with ESMTPSA id 7516f846 TLS version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO; Thu, 19 Oct 2017 20:59:09 +0200 (CEST) Date: Thu, 19 Oct 2017 20:59:08 +0200 From: Emmanuel Vadot To: Adam Vande More Cc: Steve Kargl , FreeBSD Questions Subject: Re: Two jail questions Message-Id: <20171019205908.f7062a2a6c70fede16d3cac1@bidouilliste.com> In-Reply-To: References: <20171019173224.GA31648@troutmask.apl.washington.edu> <20171019180038.GA32097@troutmask.apl.washington.edu> X-Mailer: Sylpheed 3.6.0 (GTK+ 2.24.31; amd64-portbld-freebsd12.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Oct 2017 18:59:14 -0000 On Thu, 19 Oct 2017 13:13:09 -0500 Adam Vande More wrote: > On Thu, Oct 19, 2017 at 1:00 PM, Steve Kargl < > sgk@troutmask.apl.washington.edu> wrote: > > > > > > sshd in the jail needs to run on a different port if you're using the > > same > > > ip, otherwise if you use an independent networking stack you would > > > configure as normal. > > > > So, then this comes down to > > > > ssh normal@a.b.c.d <-- host system's sshd listening on default > > port > > ssh -p 1111 guest@a.b.c.d <-- jailed sshd listening on port 1111 > > > > On a non-VNET/VIMAGE jail, this is the standard way. For a VNET/VIMAGE you > could do a regular > > ssh guest@w.x.y.z > > since the jail would have it's own real ip. That is assuming you added the > guest user to the jail and all the networking/routing is good. > > -- > Adam Even with non-VNET/VIMAGE a jail can have it's own IP and you can ssh directly into it. For a standard /etc/jail.conf configuration I think you need to add the IP to the host as an alias, for iocage it does that for you. -- Emmanuel Vadot