From nobody Tue Oct 17 14:00:54 2023 X-Original-To: freebsd-virtualization@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S8wd90wbSz4xXtn for ; Tue, 17 Oct 2023 14:01:33 +0000 (UTC) (envelope-from odhiambo@gmail.com) Received: from mail-lj1-x22c.google.com (mail-lj1-x22c.google.com [IPv6:2a00:1450:4864:20::22c]) (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 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S8wd83d4Nz3Nbm for ; Tue, 17 Oct 2023 14:01:32 +0000 (UTC) (envelope-from odhiambo@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20230601 header.b=M9YyvAOz; spf=pass (mx1.freebsd.org: domain of odhiambo@gmail.com designates 2a00:1450:4864:20::22c as permitted sender) smtp.mailfrom=odhiambo@gmail.com; dmarc=pass (policy=none) header.from=gmail.com Received: by mail-lj1-x22c.google.com with SMTP id 38308e7fff4ca-2c53c5f7aaaso7771501fa.0 for ; Tue, 17 Oct 2023 07:01:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697551290; x=1698156090; darn=freebsd.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=sXZDQquRF+wvfB1vT3nZoTEZkyUuHveIEHt+47LyBFo=; b=M9YyvAOzDKhqo967O3PgbfqN66LjjxgxjEQgGfKxLWzNHr5X4v1DdF0VuwfetIAHSk gEfSuDYtrqayK0BMijBxfEBUu3WSmN76e5q7BYqZIdgSEi7GemRzLwrD77YXicnIQD1Q IX6ENhn4edOZKiTZzFuB9usJn6RrjRB+LwNfW8HxAsTjGAo/KvP00z0ymqyLDzFgWIjI S4HckNLSfJ+3yRC//Q9OXKdmcqJtgq5mySvfSD9ZW6aei+ruEBxwgz2Sa9wCzvuq3zCx IURt5hK8a6IlV9X8yBvMeHfb6keLrhIEFyTSmJCAkGBY4yskSfCZv5KNLlQ4VN3MSoBm 3xsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697551290; x=1698156090; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=sXZDQquRF+wvfB1vT3nZoTEZkyUuHveIEHt+47LyBFo=; b=b+bzwQmodmLfIRRi047ITh2OjPalHL3TOS0gCAdqmOW3hE1ixVSLtBshw08MH0Y9VU YtA0HCkBR+Cysd/FW3kXFPCFlYzMUZ9ZwQ3yjo9su58ZJCBGtgmb/0dv+SDYH/wToxLP 8hBySZ+tUNDt1uX6bAVns+Huw6N+YQkVGOlL1Nvi9irwsTFIWF71U7XvH0kgZxrPOxCj 0DLsFUa0FeIXYunMsROudFSTKgCH/gQXG04SgJM14n/VxaOUil8tD/+tGAddHnkO0WUc AR+In2YPYXQscZFuNJn89KzkoakiGLU0a+ItJ8MycUbUeXcZ+HqkK+oM4FvMPngHUxhR XdwA== X-Gm-Message-State: AOJu0Yzt8u6Fq1PNosGq0DQDwemafPMZIwl8vjEfSbnIDjDNqoludnF1 PZdV6iEQtBwwmD5fUxsTSYYjAii+pCSYIs9gNmYe5HgoF0Jebg== X-Google-Smtp-Source: AGHT+IEq4Uhbw8qIN3Rpg2KPlJpMPn80uAOmDNsmuuzgEpFqziMN5qPx+7O9woxUA+VeudPwAOp4MCCKLLpNdROVB7g= X-Received: by 2002:a05:651c:1989:b0:2bc:dab2:c7dc with SMTP id bx9-20020a05651c198900b002bcdab2c7dcmr2294861ljb.47.1697551290353; Tue, 17 Oct 2023 07:01:30 -0700 (PDT) List-Id: Discussion List-Archive: https://lists.freebsd.org/archives/freebsd-virtualization List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-virtualization@freebsd.org X-BeenThere: freebsd-virtualization@freebsd.org MIME-Version: 1.0 From: Odhiambo Washington Date: Tue, 17 Oct 2023 17:00:54 +0300 Message-ID: Subject: Running a webserver inside a bhyve host and exposing it to the world via PF To: freebsd-virtualization@freebsd.org Content-Type: multipart/alternative; boundary="000000000000a64f880607e9f5d7" X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.97 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.97)[-0.967]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20230601]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; FREEMAIL_ENVFROM(0.00)[gmail.com]; RCVD_COUNT_ONE(0.00)[1]; FROM_EQ_ENVFROM(0.00)[]; MLMMJ_DEST(0.00)[freebsd-virtualization@freebsd.org]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::22c:from]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ARC_NA(0.00)[]; RCVD_TLS_LAST(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; FROM_HAS_DN(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; PREVIOUSLY_DELIVERED(0.00)[freebsd-virtualization@freebsd.org]; RCPT_COUNT_ONE(0.00)[1]; TO_DN_NONE(0.00)[]; MID_RHS_MATCH_FROMTLD(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim] X-Rspamd-Queue-Id: 4S8wd83d4Nz3Nbm --000000000000a64f880607e9f5d7 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I am stuck on how I can achieve this. I have a Linux VM running under bhyve. I have installed a webserver running on port 80 that I'd like to expose to the outside world. I am unable to figure out how to achieve this with PF running on the host machine. 1. I am able to access my VM using VNC Viewer 2. My VM is able to access the Internet 3. I am NOT able to ping my VM from the host 4. I am unable to SSH into the VM from the host. My hunch tells me it's about my PF.conf, but is there a guide somewhere on achieving the above? --=20 Best regards, Odhiambo WASHINGTON, Nairobi,KE +254 7 3200 0004/+254 7 2274 3223 "Oh, the cruft.", egrep -v '^$|^.*#' =C2=AF\_(=E3=83=84)_/=C2=AF :-) [How to ask smart questions: http://www.catb.org/~esr/faqs/smart-questions.html] --000000000000a64f880607e9f5d7 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I am stuck on how I can achieve this.
I have a Linux= =C2=A0VM running under bhyve. I have installed a webserver running on port= =C2=A080 that I'd like to expose to the outside world.
I am u= nable to figure out how to achieve this with PF running on the host machine= .

1. I am able to access my VM using VNC Viewer
2. My VM is able to access the Internet
3. I am NOT able = to ping my VM from the host
4. I am unable to SSH into the VM fro= m the host.=C2=A0

My hunch tells me it's about= my PF.conf, but is there a guide somewhere on achieving the above?


= --
Best regards,
Od= hiambo WASHINGTON,
Nairobi,KE
+254 7 3200 0004/+254 7 2274 3223
&q= uot;Oh, the cruft.",=C2=A0egrep = -v '^$|^.*#'=C2=A0=C2=AF\_(=E3=83=84)_/= =C2=AF=C2=A0:-)
[How to ask smart questions:=C2=A0http://www.catb.org/~esr/faqs/smart-que= stions.html]
--000000000000a64f880607e9f5d7--