From owner-freebsd-net@freebsd.org Wed Oct 21 10:19:26 2020 Return-Path: Delivered-To: freebsd-net@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 5733F4485B5 for ; Wed, 21 Oct 2020 10:19:26 +0000 (UTC) (envelope-from meka@tilda.center) Received: from mail.tilda.center (mail.tilda.center [45.63.43.31]) (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 4CGRLP1szXz47nJ for ; Wed, 21 Oct 2020 10:19:25 +0000 (UTC) (envelope-from meka@tilda.center) Received: from localhost (unknown [109.92.19.191]) by mail.tilda.center (Postfix) with ESMTPSA id 649F02133D; Wed, 21 Oct 2020 12:19:16 +0200 (CEST) Date: Wed, 21 Oct 2020 10:19:02 +0000 In-Reply-To: References: MIME-Version: 1.0 Subject: Re: Help with VNET To: freebsd-net@freebsd.org,Andrea Venturoli From: =?UTF-8?Q?Goran_Meki=C4=87?= Message-ID: <432738E4-FBC6-4768-A898-3F82CAFDB533@tilda.center> X-Rspamd-Queue-Id: 4CGRLP1szXz47nJ X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.05 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[tilda.center:s=mail]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+mx]; NEURAL_HAM_LONG(-1.00)[-1.005]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; NEURAL_HAM_MEDIUM(-1.02)[-1.022]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[tilda.center:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[tilda.center,reject]; NEURAL_HAM_SHORT(-0.85)[-0.853]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; R_MIXED_CHARSET(0.83)[subject]; ASN(0.00)[asn:20473, ipnet:45.63.40.0/22, country:US]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[freebsd-net]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Oct 2020 10:19:26 -0000 On October 21, 2020 10:13:38 AM UTC, Andrea Venturoli wr= ote: >Hello=2E > >I've been using jails for years with ezjail=2E Now I'm trying to=20 >experiment with VNET=2E >I've looked for a tutorial, but found scarce (and possibly outdated) >info=2E > > > >Box is a 12=2E1/amd64=2E >Basic configuration involves wlan0 configured via DHCP >(192=2E168=2E133=2E26)=2E >Host networking works=2E >For a start, let's get IPFW out of the way: >#ipfw add 1 pass ip from any to any > >Then I setup the host: ># ifconfig epair create >(Now I see epair0a and epair0b) ># ifconfig bridge create up ># ifconfig bridge0 addm wlan0 addm epair0a > >Now I start the jail and I don't see epair0b anymore on the host=2E > >In the jail I issue: >#ipfw add 1 pass ip from any to any >#ifconfig epair0b 192=2E168=2E133=2E27 > > > >Now: >_ pinging the host from the jail works; >_ pinging the jail from the host works; >_ pinging another host from the base system works; >_ pinging another host from the jail does NOT work=2E > >tcpdump on wlan0 shows ARP packets from the jail (who tries to get the=20 >MAC address of the external host), but these do not reach the network >(a=20 >tcpdump on the external host doesn't show them)=2E > >IPFW logging shows that it's not blocking anything=2E > >Any hint? > > bye & Thanks > av=2E >_______________________________________________ >freebsd-net@freebsd=2Eorg mailing list >https://lists=2Efreebsd=2Eorg/mailman/listinfo/freebsd-net >To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd=2Eorg" Did you setup NAT? --=20 Sent from my Android device with K-9 Mail=2E Please excuse my brevity=2E From owner-freebsd-net@freebsd.org Wed Oct 21 10:20:23 2020 Return-Path: Delivered-To: freebsd-net@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 37399448846 for ; Wed, 21 Oct 2020 10:20:23 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (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-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CGRMW0mYGz47TW; Wed, 21 Oct 2020 10:20:23 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from venus.codepro.be (venus.codepro.be [5.9.86.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mx1.codepro.be", Issuer "Let's Encrypt Authority X3" (verified OK)) (Authenticated sender: kp) by smtp.freebsd.org (Postfix) with ESMTPSA id D8DE62BCFA; Wed, 21 Oct 2020 10:20:22 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: by venus.codepro.be (Postfix, authenticated sender kp) id 0540F20F9B; Wed, 21 Oct 2020 12:20:20 +0200 (CEST) From: "Kristof Provost" To: "Andrea Venturoli" Cc: freebsd-net@freebsd.org Subject: Re: Help with VNET Date: Wed, 21 Oct 2020 12:20:20 +0200 X-Mailer: MailMate (1.13.2r5673) Message-ID: <40361B2B-50AD-474B-A5A7-654F5A958FE2@FreeBSD.org> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Oct 2020 10:20:23 -0000 On 21 Oct 2020, at 12:13, Andrea Venturoli wrote: > Hello. > > I've been using jails for years with ezjail. Now I'm trying to > experiment with VNET. > I've looked for a tutorial, but found scarce (and possibly outdated) > info. > > > > Box is a 12.1/amd64. > Basic configuration involves wlan0 configured via DHCP > (192.168.133.26). > Host networking works. > For a start, let's get IPFW out of the way: > #ipfw add 1 pass ip from any to any > > Then I setup the host: > # ifconfig epair create > (Now I see epair0a and epair0b) > # ifconfig bridge create up > # ifconfig bridge0 addm wlan0 addm epair0a > This is your problem. You can’t bridge over wifi interfaces. That’s a limitation of station mode wifi. Try routing, or try with a wired interface. Best regards, Kristof