public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
From: Stefano Brivio <sbrivio@redhat.com>
To: Paul Holzinger <pholzing@redhat.com>
Cc: Yumei Huang <yuhuang@redhat.com>,
	passt-dev@passt.top, david@gibson.dropbear.id.au
Subject: Re: [PATCH] conf, pasta: Add --no-tap option
Date: Mon, 5 Jan 2026 22:10:56 +0100	[thread overview]
Message-ID: <20260105221056.71e7ff8b@elisabeth> (raw)
In-Reply-To: <e6ea3c46-08d7-49ea-b78a-40d6bbb302bd@redhat.com>

On Mon, 5 Jan 2026 14:48:15 +0100
Paul Holzinger <pholzing@redhat.com> wrote:

> Sorry I was out for a while so I didn't had time to clarify on the bug 
> before.
> 
> On 29/12/2025 10:55, Yumei Huang wrote:
> > This patch introduces a mode where we only forward loopback connections
> > and traffic between two namespaces (via the loopback interface, 'lo'),
> > without a tap device.
> >
> > With this, podman can support forwarding ::1 in custom networks when using
> > rootlesskit for forwarding ports.  
> 
> I guess I didn't really communicate my requirements well.

I guess it's more likely that you actually did, but I mixed up the
association between requirements and use cases, sorry for that.

In any case, good that we need this anyway, just for another use case.
:)

> When we use 
> rootlessport (rootlesskit) today for custom networks we only do so as 
> rootless user and it forwards ::1 (by possibly mapping this to v4 inside 
> the container) fine.

So, wait a moment, is my comment at:

  https://github.com/containers/podman/issues/14491#issuecomment-2898191772

actually wrong? I don't have time right now to test that but from user
reports and some vague memory I thought ::1 forwarding wouldn't work
with custom networks regardless of root or rootless, because
rootlesskit didn't handle that anyway.

> My main point for this feature was using as root (requires further 
> changes to allow pasta running as root).

...which should be entirely on Podman side and it's still on my plate,
by the way:

  https://github.com/containers/podman/issues/17840
  https://pad.passt.top/p/Features_2025#L40

> Because as root podman does 
> port forwarding via DNAT firewall rules (i.e. custom nftables rules we 
> add). The kernel however never added support for DNAT on ::1 meaning 
> clients trying to access that are not getting forwarded. The only way to 
> support this is using a user space helper. Right now this doesn't work 
> and we do not use rootlessport for this either so I was just thinking 
> ahead because we do have these users requests who want ::1 to work as root.
> 
> For the current rootlessport use case we also must bind all ports as 
> given (i.e. also addresses 0.0.0.0 bind address), just forwarding 
> loopback to loopback is not what we want or do for security reasons, see 
> CVE-2021-20199. And logically it would not really work to have another 
> process bind 0.0.0.0 and this pasta helper bind lo on the same port at 
> the same time.
> 
> The way I am thinking is bind ports as normal, add the no-tap option and 
> add two options to give the v4 and v6 namespace (container) side connect 
> addresses so we never actually connect to lo. Then we also should have a 
> dynamic way to update the connect addresses at runtime which is required 
> for podman network connect/disconnect to work which changes the 
> addresses inside the namespace, see 
> https://github.com/containers/podman/commit/e88d8dbeae2aebd2d816f16a21891764163afcd4.
> 
> Overall none of this is a blocker for removing rootlessport. I think our 
> plan was and still is to use the dynamic port forwarding logic David is 
> working on to replace the rootless custom network port forwarding case 
> with that.

Regardless of other requirements that are needed as well to support
forwarding ::1 for root containers (or rootless with --userns=auto),
this feature by itself makes sense as it is and we'll need it as it is,
right?

By the way we routinely get requests for this feature by pasta (and
Podman) users, regardless of any specific Podman integration, so I
think the feature is generic enough as to make sense regardless of your
plan for root containers.

-- 
Stefano


  reply	other threads:[~2026-01-05 21:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-29  9:55 Yumei Huang
2025-12-31 15:07 ` Stefano Brivio
2026-01-05  4:18 ` David Gibson
2026-01-05  8:53   ` Yumei Huang
2026-01-05 13:48 ` Paul Holzinger
2026-01-05 21:10   ` Stefano Brivio [this message]
2026-01-07 15:20     ` Paul Holzinger

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=20260105221056.71e7ff8b@elisabeth \
    --to=sbrivio@redhat.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=passt-dev@passt.top \
    --cc=pholzing@redhat.com \
    --cc=yuhuang@redhat.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://passt.top/passt

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).