From owner-freebsd-jail@FreeBSD.ORG Mon Dec 22 14:05:24 2014 Return-Path: Delivered-To: freebsd-jail@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5FFEFB8F for ; Mon, 22 Dec 2014 14:05:24 +0000 (UTC) Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2F997645B9 for ; Mon, 22 Dec 2014 14:05:23 +0000 (UTC) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 6D66020D6D for ; Mon, 22 Dec 2014 09:05:22 -0500 (EST) Received: from web3 ([10.202.2.213]) by compute3.internal (MEProxy); Mon, 22 Dec 2014 09:05:22 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=message-id:x-sasl-enc:from:to :mime-version:content-transfer-encoding:content-type:in-reply-to :references:subject:date; s=smtpout; bh=UvLpOXQDo7U5jIbm1Bygvyul N3A=; b=B3hs9II/kFkchgpdde7fz2M8vR8dtRGndw4pQHtwSRj9A8LZG3cegC8C sPDdpi5733nMePpb3d/9m52AglaOqfN2veUL1Yw0TA6M0z5mIzPwMeh6StI5Ixaa /k2GXWsGNfWweYe0CA53ZAPwAe0d275hOADwWpA4dp8WPZ8FAec= Received: by web3.nyi.internal (Postfix, from userid 99) id 44E72106254; Mon, 22 Dec 2014 09:05:22 -0500 (EST) Message-Id: <1419257122.839910.205722545.5A95A973@webmail.messagingengine.com> X-Sasl-Enc: /L+EVR/HxTnLuU+4bcAFil64MsewXgUIRjeDW+ze0Pu+ 1419257122 From: Mark Felder To: freebsd-jail@freebsd.org MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain X-Mailer: MessagingEngine.com Webmail Interface - ajax-31f62092 In-Reply-To: References: <0096d1968fd2758df224a9dea6934ddb@gritton.org> <5491ED4F.4040002@freebsd.org> Subject: Re: only lo0 interface inside jail, no default gw Date: Mon, 22 Dec 2014 08:05:22 -0600 X-BeenThere: freebsd-jail@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "Discussion about FreeBSD jail\(8\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Dec 2014 14:05:24 -0000 On Thu, Dec 18, 2014, at 00:18, Alexander Lunev wrote: > As i said in message to Jamie Gritton, i found why jails couldn't ping > internet - i forget to add jail's address to table which permitted to > NAT. > > Why subnet mask should be /32? What harm could be done if subnet mask of > an > alias is the same as for the other address of that interface? > That's just the way the network stack has always worked; weird things happen if you use the wrong subnet mask on the aliases. IPv4 aliases are /32 and IPv6 aliases are /128. As documented in the man page for ifconfig: Usually 0xffffffff is most appropriate. Of course that hasn't been updated to mention IPv6 yet. From owner-freebsd-jail@FreeBSD.ORG Mon Dec 22 20:20:38 2014 Return-Path: Delivered-To: freebsd-jail@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 43E4468C; Mon, 22 Dec 2014 20:20:38 +0000 (UTC) Received: from wonkity.com (wonkity.com [67.158.26.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "wonkity.com", Issuer "wonkity.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id E31DD29B; Mon, 22 Dec 2014 20:20:37 +0000 (UTC) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.14.9/8.14.9) with ESMTP id sBMKKalq095528 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 22 Dec 2014 13:20:36 -0700 (MST) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.14.9/8.14.9/Submit) with ESMTP id sBMKKaKI095525; Mon, 22 Dec 2014 13:20:36 -0700 (MST) (envelope-from wblock@wonkity.com) Date: Mon, 22 Dec 2014 13:20:36 -0700 (MST) From: Warren Block To: Mark Felder Subject: Re: only lo0 interface inside jail, no default gw In-Reply-To: <1419257122.839910.205722545.5A95A973@webmail.messagingengine.com> Message-ID: References: <0096d1968fd2758df224a9dea6934ddb@gritton.org> <5491ED4F.4040002@freebsd.org> <1419257122.839910.205722545.5A95A973@webmail.messagingengine.com> User-Agent: Alpine 2.11 (BSF 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (wonkity.com [127.0.0.1]); Mon, 22 Dec 2014 13:20:36 -0700 (MST) Cc: freebsd-jail@freebsd.org X-BeenThere: freebsd-jail@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "Discussion about FreeBSD jail\(8\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Dec 2014 20:20:38 -0000 On Mon, 22 Dec 2014, Mark Felder wrote: > > > On Thu, Dec 18, 2014, at 00:18, Alexander Lunev wrote: >> As i said in message to Jamie Gritton, i found why jails couldn't ping >> internet - i forget to add jail's address to table which permitted to >> NAT. >> >> Why subnet mask should be /32? What harm could be done if subnet mask of >> an >> alias is the same as for the other address of that interface? >> > > That's just the way the network stack has always worked; weird things > happen if you use the wrong subnet mask on the aliases. IPv4 aliases are > /32 and IPv6 aliases are /128. As documented in the man page for > ifconfig: > > Usually 0xffffffff is most appropriate. At one time, only /32 would work. Didn't that change a few releases ago, so non-/32 netmasks could be used on aliases?