public inbox for passt-user@passt.top
 help / color / mirror / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: baleti <baleti3266@gmail.com>
Cc: passt-user@passt.top
Subject: Re: port forward from guest to host- inquiry
Date: Sat, 25 Oct 2025 19:14:12 +1100	[thread overview]
Message-ID: <aPyG1HLJ30ZrnZCB@zatzit> (raw)
In-Reply-To: <69c1a8e2-2f28-4905-8bc5-682f3cfa1eb8@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1308 bytes --]

On Sat, Oct 25, 2025 at 01:02:36AM +0100, baleti wrote:
> does anyone know if passt can port forward from guest to host? I'm trying to
> make a diod server available on the guest?

I'm assuming you're using passt (guest is a VM) not pasta (guest is a
container).

> 
> on host I run a service listening on 9564:
>  ~ $ diod --foreground --listen 0.0.0.0:9564 --export
> /home/user/autocad-ballet --no-auth
> 
> is there a way for passt to make it available on the guest?

Yes, but you don't need an explicit forward for this - passt's default
behaviour is to let the guest access things outside, including the
host.  The complication is that, by default, the guest gets the same
address as the host, so the guest can't access the host using it's
normal address.

However, also by default, we remap the default gateway address to the
host.  That is, if on the guest you connect to the address of the
default gateway, port 9564, that will actually connect to diod on the
host.

The details of this can be adjusted with the --map-host-loopback,
--map-guest-addr and -no-map-gw options.

-- 
David Gibson (he or they)	| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you, not the other way
				| around.
http://www.ozlabs.org/~dgibson

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2025-10-25  8:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-25  0:02 baleti
2025-10-25  8:14 ` David Gibson [this message]
2025-10-25 21:23   ` baleti
2025-10-27  1:46     ` David Gibson
2025-10-28  0:13       ` baleti

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aPyG1HLJ30ZrnZCB@zatzit \
    --to=david@gibson.dropbear.id.au \
    --cc=baleti3266@gmail.com \
    --cc=passt-user@passt.top \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).