From owner-freebsd-virtualization@freebsd.org Fri Nov 6 00:46:18 2020 Return-Path: Delivered-To: freebsd-virtualization@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 ADEFA2D646B for ; Fri, 6 Nov 2020 00:46:18 +0000 (UTC) (envelope-from jtubnor@gmail.com) Received: from mail-wm1-f67.google.com (mail-wm1-f67.google.com [209.85.128.67]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CS1sj2ygNz3sph for ; Fri, 6 Nov 2020 00:46:17 +0000 (UTC) (envelope-from jtubnor@gmail.com) Received: by mail-wm1-f67.google.com with SMTP id d142so3298059wmd.4 for ; Thu, 05 Nov 2020 16:46:17 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=MC8hRDD3loralQ+oU1rPicN4YLx8WrxeCgt0CmvD3MQ=; b=Tjjb0AMqDmPzJ0lhhKWtvlDXoIk6g8KgxrxrzgoZ8moa0RnDsDJSp1uZtd3b1mDf56 +uH0f2FA/ILSzsFML0ImmFlYYunHmX8yzJt0QXlFHZ0b7W6jjldiPiSuL2DPUd0nIEY5 qGm0g7gB+He1t6XRQwvVeztih/h2IQ25Nvbx0FnKW386JcqILmRKUhFEXMbpiax1dl6p UjUvbOs7ci3ROlT7v0RbfwnXwth5Ger9Y9soIn5UZiJc95WVYtp2XieaQMiqZBIF4s75 qwIbijdesmuDFdLVlsptXZCnCCEc9SUHpPG0wt0YL86OH2Gr4visaoXy/zRBk1vpJ2pD Dppw== X-Gm-Message-State: AOAM5331jGStesrHH4rTh1VK05Xr1VQXZVpRbCYOeZCnqRqdjuwHDIDJ 0WgpR6uueS1MXX2enhHSUfmk+FDCnREK9PCZXPQ= X-Google-Smtp-Source: ABdhPJy8T2WNQxjO0t/wG2XSQxO8wB4YCC02gYNBKFnOEsyz5D/FvKazBI574tUN4nGiOXFeNb0U3qgU+RlnF2PQ0XM= X-Received: by 2002:a1c:61d4:: with SMTP id v203mr5240100wmb.1.1604623575872; Thu, 05 Nov 2020 16:46:15 -0800 (PST) MIME-Version: 1.0 References: <01000175941a2783-79804ed8-eafa-4f80-92d4-3f500e9d7993-000000@email.amazonses.com> <01000175986c2d21-4256d477-387f-4379-9dd3-8e60fc88b94a-000000@email.amazonses.com> In-Reply-To: <01000175986c2d21-4256d477-387f-4379-9dd3-8e60fc88b94a-000000@email.amazonses.com> From: Jason Tubnor Date: Fri, 6 Nov 2020 11:46:04 +1100 Message-ID: Subject: Re: Using OpenBSD guest as PF firewall To: lausts@acm.org Cc: "freebsd-virtualization@freebsd.org" X-Rspamd-Queue-Id: 4CS1sj2ygNz3sph X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of jtubnor@gmail.com designates 209.85.128.67 as permitted sender) smtp.mailfrom=jtubnor@gmail.com X-Spamd-Result: default: False [0.46 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[209.85.128.67:from]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; NEURAL_SPAM_SHORT(1.00)[0.996]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-virtualization@freebsd.org]; ARC_NA(0.00)[]; DMARC_NA(0.00)[tubnor.net]; SPAMHAUS_ZRD(0.00)[209.85.128.67:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[209.85.128.67:from]; NEURAL_HAM_MEDIUM(-0.53)[-0.532]; FORGED_SENDER(0.30)[jason@tubnor.net,jtubnor@gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.128.67:from]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[jason@tubnor.net,jtubnor@gmail.com]; MAILMAN_DEST(0.00)[freebsd-virtualization]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Nov 2020 00:46:18 -0000 On Thu, 5 Nov 2020 at 23:40, Thomas Laus wrote: > > My question to this list was how this can be done using vm-bhyve > commands. This 'how-to' showed the traditional scripting method and I > would prefer using the 'vm' commands. The tap0 created as part of the > 'vm switch' utility, is able to make the connection to the OpenBSD guest > 'vio0'. The OpenBSD guest is also able to make the connection to 'tap0' > on the FreeBSD host. The OpenBSD guest has normal internet connections > to the world using the NIC that was passed through. The FreeBSD host is > not able to make any other connections anywhere other than to the > OpenBSD guest. This forum article says it is possible. I just need a > handbook reference or a 'how-to' writeup for doing this using the > vm-bhyve utility. > Review the vm-bhyve man page. You just need to add an option to {guest}.conf file that references the device you are passing through. The section you are looking for is passthruX passthru0=Base/Slot/Function. Cheers, Jason.