From owner-freebsd-questions@freebsd.org Thu Dec 24 09:07:21 2020 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9A5794BCFF0 for ; Thu, 24 Dec 2020 09:07:21 +0000 (UTC) (envelope-from freebsd@qeng-ho.org) Received: from mailout.qeng-ho.org (mailout.qeng-ho.org [217.155.128.244]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4D1kjh438Rz3Pxb for ; Thu, 24 Dec 2020 09:07:20 +0000 (UTC) (envelope-from freebsd@qeng-ho.org) Received: from arthur.home.qeng-ho.org (unknown [IPv6:2a02:8010:64c9:1::2]) by mailout.qeng-ho.org (Postfix) with ESMTP id 61901341E2; Thu, 24 Dec 2020 09:07:13 +0000 (GMT) Subject: Re: Network namespaces in FreeBSD To: Ihor Antonov , freebsd-questions@freebsd.org References: <20201223182227.da6c11d3604eb07bb4f18ce5@sohara.org> <2581038e-fa0f-231d-ae33-1b42d50c8600@antonovs.family> From: Arthur Chance Message-ID: Date: Thu, 24 Dec 2020 09:07:11 +0000 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 MIME-Version: 1.0 In-Reply-To: <2581038e-fa0f-231d-ae33-1b42d50c8600@antonovs.family> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4D1kjh438Rz3Pxb X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of freebsd@qeng-ho.org designates 217.155.128.244 as permitted sender) smtp.mailfrom=freebsd@qeng-ho.org X-Spamd-Result: default: False [-3.30 / 15.00]; RCVD_TLS_LAST(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[217.155.128.244:from]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:217.155.128.240/29]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[qeng-ho.org]; ARC_NA(0.00)[]; SPAMHAUS_ZRD(0.00)[217.155.128.244:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_HAM_SHORT(-1.00)[-1.000]; RCPT_COUNT_TWO(0.00)[2]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:13037, ipnet:217.155.0.0/16, country:GB]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[freebsd-questions] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Dec 2020 09:07:21 -0000 On 23/12/2020 18:40, Ihor Antonov wrote: > On 12/23/20 10:32 AM, Kristof Provost wrote: >> On 23 Dec 2020, at 19:22, Steve O'Hara-Smith wrote: >>> On Wed, 23 Dec 2020 16:48:11 +0000 >>> Ameya Deshpande via freebsd-questions >>> wrote: >>> >>>> Hi, >>>> >>>> I am new to FreeBSD. I was wondering if there is concept like Network >>>> Namespaces in FreeBSD, like it is in Linux? >>> >>>     There is something similar see man setfib for details. >>> >> I’ve only briefly played with linux network namespaces, but aren’t >> vnet jails much closer to that? > > I have more experience with Linux than with FreeBSD, so I don't know for > sure what setfib is about. > > VNET jails is the closest thing that comes to mind when comparing to > Linux network namespaces. Unlike Linux, in a jail you will get all other > namespaces separated too (e.g. mount, pid etc.) > > Unfortunately I don't know if it is possible to get exactly same > behavior as in Linux - share all other namespaces except for network > stack. I imagine you can get something like this with Capsicum, but it > would require making changes to the app. Wouldn't a VNET jail rooted at / effectively be that? -- The number of people predicting the demise of Moore's Law doubles every 18 months.