From owner-freebsd-virtualization@freebsd.org Wed Aug 12 13:54:41 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 E30C33A1C12 for ; Wed, 12 Aug 2020 13:54:41 +0000 (UTC) (envelope-from odhiambo@gmail.com) Received: from mail-ot1-x335.google.com (mail-ot1-x335.google.com [IPv6:2607:f8b0:4864:20::335]) (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 4BRWR529tCz3gSj for ; Wed, 12 Aug 2020 13:54:41 +0000 (UTC) (envelope-from odhiambo@gmail.com) Received: by mail-ot1-x335.google.com with SMTP id e11so1980693otk.4 for ; Wed, 12 Aug 2020 06:54:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ULTI/OPbdiYJjuUko9dT33qiKwT0fAeHOUDCkIea2lE=; b=vEA62SrCYn//yBYXJzsTt++I3C3bYA/rhKiXVogg3Qdz9Eac9rQDMPZVH8Q99ITgii HuEBl/IRKkZeo4PirtEnGPDJNbBTZaJX88gctYN0mEfyTYfscktWl585GI70oWIej3pk iX6Z2ZTTPw4eAkPIWdw1LSI8x5u2TFnJCJz8Y8OrvmJosZrbM8NSgYyHBohXU/g8PVpF dPK8Bq7IPqqIj7+d+XwjRDI+K2XS6mpecQW5UKLV3vszsFhiG4DN8J0RJy3kN98eH4qp SXtROBKs155JY+sGRkWFcW04RdycraXSKtPTG/6Wu2pxeWgV6tFf7gsMJaJ1ucSQnU1n cgiQ== 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=ULTI/OPbdiYJjuUko9dT33qiKwT0fAeHOUDCkIea2lE=; b=DabktuVUk8/eY2hZB0MLcHThvXWz6hQM7ZWnxVZKUudhVid5QoZgGbBQ6Ae0Kvic/4 W/8Nm3Om7byQxi+JAC1IZ6sAhgJLPf4Tna0UDLHPON7WZ9VrbGuMifjFIM01x59XSlAV vEHXdJUdfgXTqPAXOxlA0U4OSTuA5aUlyyaSh0LCY4KhoyN7p3ucklcl1iVRi6py8jVp oBLOskUyZaIbDiPM/M6xUiHyPmzhMTVZ7Wqzsh0DBjSBoY9PGkOziacI+GobMnTABMR2 gvK5ahqWQCyA2jiGjBDK6/QtaaOLokdvVseb7JkbcwYzaE1hHJSxdHCKalb98q7SHxlp /UUA== X-Gm-Message-State: AOAM5317XMx0vO/dbIKwDTRvTCqpFi9S9DIeG+nuzxxR0BvyVqsEE6e+ VyqPEMZ888hXdbL6+MlrC18PQvgnH3CT0quX8TZya7zeM1gs0g== X-Google-Smtp-Source: ABdhPJzLmBcv/+Yeh0GV28LgzPWW3rfX+20rA2P4MS/n8kd2tpBS/x0Kjyt8kN+teyfsVouO0KaHgrtZjRXUmHQ1u3k= X-Received: by 2002:a05:6830:1486:: with SMTP id s6mr6055352otq.248.1597240480244; Wed, 12 Aug 2020 06:54:40 -0700 (PDT) MIME-Version: 1.0 References: <1c1e71ea-9f4f-b4a6-c6bb-f7cd201c0182@gmx.at> <0acc82ba-4779-f006-7ece-a003d0d0759c@nomadlogic.org> <036260EA-C5A3-411E-8FF0-271BE267E14B@punkt.de> In-Reply-To: <036260EA-C5A3-411E-8FF0-271BE267E14B@punkt.de> From: Odhiambo Washington Date: Wed, 12 Aug 2020 16:54:03 +0300 Message-ID: Subject: Re: FreeBSD a server and bhyve To: "Patrick M. Hausen" Cc: Pete Wright , freebsd-virtualization@freebsd.org X-Rspamd-Queue-Id: 4BRWR529tCz3gSj X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=vEA62SrC; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of odhiambo@gmail.com designates 2607:f8b0:4864:20::335 as permitted sender) smtp.mailfrom=odhiambo@gmail.com X-Spamd-Result: default: False [-3.41 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.02)[-1.025]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; FREEMAIL_FROM(0.00)[gmail.com]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-virtualization@freebsd.org]; NEURAL_HAM_LONG(-1.01)[-1.011]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::335:from]; NEURAL_HAM_SHORT(-0.37)[-0.372]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.33 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: Wed, 12 Aug 2020 13:54:41 -0000 On Wed, 12 Aug 2020 at 14:33, Patrick M. Hausen wrote: > Hi all, > > > Am 11.08.2020 um 22:15 schrieb Pete Wright : > > this should be pretty straight forward - the first step would be to > setup the additional public IP's as virtual addresses on your NIC similar > to this: > > https://www.freebsd.org/doc/handbook/configtuning-virtual-hosts.html > > > > then setting up your firewall (pf or ipfw) to forward requests coming in > on one of those public IP's to the specific bhyve VM which is listening on > a private IP. this would be identical to hosting multiple services on a > single IP. > > > > here's an example pf config that does the forwarding of SMTP on port 25 > to a VM using a private IP to give you an idea of what the syntax would > look like: > > rdr pass on $ext_if inet proto tcp from any to 1.2.3.4 port = 25 -> > 10.1.0.10 port 25 > > Why so complicated? Why not just bridge the bhyve VM to the physical NIC > and assign that additional IP address in the guest OS? > > At least that is what I do all the time ;-) > Hi Patrick, Do you mind sharing the tools you use (scripts) for creating/managing VMs? So far, my Googlefu has led me to two sites: 1. https://www.davd.io/install-ubuntu-on-freebsd-with-bhyve/ 2. https://www.daemon-security.com/blog/bhyve-simple-0713/ Looks like there are several tools out there, so wondering which ones experienced virtualizers like you love. -- Best regards, Odhiambo WASHINGTON, Nairobi,KE +254 7 3200 0004/+254 7 2274 3223 "Oh, the cruft.", grep ^[^#] :-)