From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: passt.top; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=L6yzW4Rj; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by passt.top (Postfix) with ESMTPS id 8CDDF5A0624 for ; Wed, 07 Jan 2026 16:20:25 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1767799224; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=MDsDEbaHHDVMMfwffilDJszPwiv1g0pmc6j3V0I2ojM=; b=L6yzW4Rjt94aLW5fXfq29Oh1+68EuASrfoJFyRbvbXDY1XwziFn2sBKUfimNL7sjE825XL 4YHHfX01kQNdYoaxINcqr6f0amH6k+HcVdNwt1K4ZF5PH91oXDsw6b6qu3uVhoFaISJWKi zj9lBoiYDfQAXLXhtUtOkFAUM2Xoj0g= Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-45-m-r4jGwENkGt0L2hdolMnQ-1; Wed, 07 Jan 2026 10:20:22 -0500 X-MC-Unique: m-r4jGwENkGt0L2hdolMnQ-1 X-Mimecast-MFC-AGG-ID: m-r4jGwENkGt0L2hdolMnQ_1767799221 Received: by mail-wr1-f72.google.com with SMTP id ffacd0b85a97d-430fcfe4494so1669547f8f.2 for ; Wed, 07 Jan 2026 07:20:22 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767799221; x=1768404021; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=MDsDEbaHHDVMMfwffilDJszPwiv1g0pmc6j3V0I2ojM=; b=tIy2og5VWZrmg0N4qRjWbgZZth+RIELH7SN2l+xvby3BWVA9ERg+xDh3ughAWVEHOC BMEH30Rob42kl0thSaOszoylqDaxA6sBWUy364M5fQptRteIXPHaiAcsH5SJNZxWrz3G WyNWi4HjEQtRKKNKiQMDd+QvQl4H8jvDnY3nKzNwDfAYTYhVck/gozNNaXrFzC5jCQG4 mFNLNVYjSJNwjjeUVjFqIDeqY/3VDaUqr49s7miFPdw55YHDb+PBJWAibKzVpEjBvVPo uQiJXWlZP2TkM3g1DmLGm1JvYp4UtYXEOsv4BpiAHHE+8McVhSC24/47CGM+aaSiw32N wEMw== X-Forwarded-Encrypted: i=1; AJvYcCXTUwOSRgihLVIlWp4vZf3K6LPE1dTdngibaqCyse/X8fw5p45Ka9fEXrE1TTX7R35KHD7+cDr0zBY=@passt.top X-Gm-Message-State: AOJu0Ywjz2+DLU1xP1CySD3Cq2radFYgdh+LH2jAsUJYvw+Oj5bgMceV xsie3tkiNE6XNSf9iyVTfQ35Kzkvpf+5kuDqjTtnG/OGGXsmxMWyWXVdTIsK6LEKTnvJAcL47CF Fqa/aQ7RyFQgRsTd9B3kJkKhCIQAw7kw2yLBSyk6l4KSCmd5P6c0QWg== X-Gm-Gg: AY/fxX4p3tGk28duehURgAUGGux7EAZxBGPpfvJpK5bNLcesQBSoPytC6W1U9X7/ivH 4zdXqaLG6m3yP64239vyF7OnEgQJ+9/fsZtSht4bdZ/m5MjK43QrqpTe9//IUhISSwsugnpekfJ q47O03bNaYQrajI+PGZIrvoazS2TgTf4903zWryZJ6omEpeyrrM38uHpj55Gr5f5O2lbzmrQwrf DSelLAMbdLeZ/4ksnJcGC7DfQ/UbfPN1pHkJrcSlocwWVQKYVDUtK2OHd+N0yXqbVGWeGTQ+eqF Xhasjj7Uzu4jIgv/G+wlNqfq8SyzWgfz82bZdoySXgzvpVIwxRMpPk01ypNhp0C9EevL/XqJjiv 0y39aSSVnk42Vd0E= X-Received: by 2002:a5d:494e:0:b0:432:86e1:bd38 with SMTP id ffacd0b85a97d-432c379529emr3296986f8f.39.1767799221047; Wed, 07 Jan 2026 07:20:21 -0800 (PST) X-Google-Smtp-Source: AGHT+IEpZVgD0DM8l0IL+H2JUFdFuDRzU9JXRBPBI8siWPcBL3u0FvJNjGMOmIaccxErvEAfhOm2hQ== X-Received: by 2002:a5d:494e:0:b0:432:86e1:bd38 with SMTP id ffacd0b85a97d-432c379529emr3296947f8f.39.1767799220562; Wed, 07 Jan 2026 07:20:20 -0800 (PST) Received: from [192.168.188.22] ([80.243.52.135]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-432bd0e19bfsm10951633f8f.18.2026.01.07.07.20.19 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 07 Jan 2026 07:20:20 -0800 (PST) Message-ID: <337b7401-7794-4538-80b0-7ddae66daae7@redhat.com> Date: Wed, 7 Jan 2026 16:20:18 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] conf, pasta: Add --no-tap option To: Stefano Brivio References: <20251229095558.918055-1-yuhuang@redhat.com> <20260105221056.71e7ff8b@elisabeth> From: Paul Holzinger In-Reply-To: <20260105221056.71e7ff8b@elisabeth> X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: srdGHKjVFpDT2hIhkI1RafsJGd7crA9cFtRIfGuDv6g_1767799221 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Message-ID-Hash: RXQCYKXWMWEATFAI2BSAOTF6NYSSBOEZ X-Message-ID-Hash: RXQCYKXWMWEATFAI2BSAOTF6NYSSBOEZ X-MailFrom: pholzing@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Yumei Huang , passt-dev@passt.top, david@gibson.dropbear.id.au X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On 05/01/2026 22:10, Stefano Brivio wrote: > On Mon, 5 Jan 2026 14:48:15 +0100 > Paul Holzinger 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. yes, rootlesskit handles ipv6 just fine, it is just that our rootlessport code remaps that to v4 inside the container. > >> 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 I don't see how this can be fixed on the podman side, the network namespace of a rootful container (not userns=auto) is owned by the root user. If you configure something in there you must have real CAP_NET_ADMIN from the host init userns. So pasta must not drop this privilege before configuring the netns. And even then with the future netlink monitor work we would need to keep that privilege level to modify the netns even during runtime? > >> 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. > I am not sure how I would use or integrate a loopback to loopback forwarder in podman so I don't think we would need or can use that as is. I think the use case itself is still interesting and if there are end users asking for it sure not objections from me. I guess it could be interesting to expose a service without giving it access to the full internet and without having to deal with complicated firewall rules, i.e. with this we get a container that only could communicate by replying to the forwarded ports. -- Paul Holzinger