public inbox for passt-user@passt.top
 help / color / mirror / Atom feed
* Re: Connecting back to the host through a dummy veth interface
       [not found] <176606116131.2775.3279769610610037541@maja>
@ 2025-12-20 14:12 ` Stefano Brivio
  2025-12-20 14:28   ` Felix Rubio
  0 siblings, 1 reply; 3+ messages in thread
From: Stefano Brivio @ 2025-12-20 14:12 UTC (permalink / raw)
  To: Felix Rubio; +Cc: passt-user

Hi Felix,

On Thu, 18 Dec 2025 13:32:36 +0100
Felix Rubio <felix@kngnt.org> wrote:

> Hi everybody,
> 
> I am trying to run a number of rootless podman pods and containers by different 
> users, while still being able to talk to each other. To this end I am creating 
> a dummy veth interface and publishing all the exposed ports there (this works: 
> I can communicate from other host services with those containers), and I am 
> also trying to set that dummy veth interface as the default gateway for the 
> pods/containers (with the expectation that then they will be able to reach 
> each other). However, this is not working... and I am pretty lost.
> 
> For example, I am running the following command, trying to connect a ldap 
> client container to a ldap server container, unsuccessfully.
> 
> podman run --rm --dns=10.255.255.1 --network=pasta:--outbound-
> if4=cluster_dns0,--gateway=10.255.255.1 --add-host=ldap.host.internal:host-gateway sh -c "ip add && ip route && ldapwhoami -H ldaps://
> ldap.host.internal:1636"
> 
> Is this something impossible to do, or am I doing something wrong?

Sorry, I'm a bit swamped at the moment, and I plan to get back to you
in a bit, but meanwhile, I think the dummy veth trick is unnecessarily
complicated.

I think you could simply connect "to the host" and redirect from there
to the containers by means of mapped ports. See:

  https://blog.podman.io/2024/10/podman-5-3-changes-for-improved-networking-experience-with-pasta/

for a couple of details. But I'll try to come up with a full example
next.

-- 
Stefano


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Connecting back to the host through a dummy veth interface
  2025-12-20 14:12 ` Connecting back to the host through a dummy veth interface Stefano Brivio
@ 2025-12-20 14:28   ` Felix Rubio
  0 siblings, 0 replies; 3+ messages in thread
From: Felix Rubio @ 2025-12-20 14:28 UTC (permalink / raw)
  To: Stefano Brivio; +Cc: passt-user

Hey Stefano,

Thank you for your answer! I know I can run rootful containers, and that then 
I can access the host's network ns. However, this exposes a number of 
potential issues:
* In case the an attacker manages to break out of the container, gets root
* That enables connecting back to the host loopback, but then from that 
container any service listening to the loopback can be reached as well.

The reason for looking for a way of binding those services to 10.255.255.1 (so 
that only exposed services will be in that interface) and running fully 
rootless, if works, provides a more secure system... in general.

About the mapped ports, I am a bit lost: for what I have tested, running 
rootless disables the possibility to connect back to the host, right?

Regards, and thank you!
Felix

On Saturday, 20 December 2025 15:12:24 Central European Standard Time Stefano 
Brivio wrote:
> Hi Felix,
> 
> On Thu, 18 Dec 2025 13:32:36 +0100
> 
> Felix Rubio <felix@kngnt.org> wrote:
> > Hi everybody,
> > 
> > I am trying to run a number of rootless podman pods and containers by 
different
> > users, while still being able to talk to each other. To this end I am 
creating
> > a dummy veth interface and publishing all the exposed ports there (this 
works:
> > I can communicate from other host services with those containers), and I 
am
> > also trying to set that dummy veth interface as the default gateway for 
the
> > pods/containers (with the expectation that then they will be able to reach
> > each other). However, this is not working... and I am pretty lost.
> > 
> > For example, I am running the following command, trying to connect a ldap
> > client container to a ldap server container, unsuccessfully.
> > 
> > podman run --rm --dns=10.255.255.1 --network=pasta:--outbound-
> > if4=cluster_dns0,--gateway=10.255.255.1 --add-
host=ldap.host.internal:host-gateway sh -c "ip add && ip route &&
> > ldapwhoami -H ldaps:// ldap.host.internal:1636"
> > 
> > Is this something impossible to do, or am I doing something wrong?
> 
> Sorry, I'm a bit swamped at the moment, and I plan to get back to you
> in a bit, but meanwhile, I think the dummy veth trick is unnecessarily
> complicated.
> 
> I think you could simply connect "to the host" and redirect from there
> to the containers by means of mapped ports. See:
> 
>   https://blog.podman.io/2024/10/podman-5-3-changes-for-improved-networking-experience-with-pasta/
> 
> for a couple of details. But I'll try to come up with a full example
> next.


-- 
Felix Rubio



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Connecting back to the host through a dummy veth interface
@ 2025-12-18 12:32 Felix Rubio
  0 siblings, 0 replies; 3+ messages in thread
From: Felix Rubio @ 2025-12-18 12:32 UTC (permalink / raw)
  To: passt-user

Hi everybody,

I am trying to run a number of rootless podman pods and containers by different 
users, while still being able to talk to each other. To this end I am creating 
a dummy veth interface and publishing all the exposed ports there (this works: 
I can communicate from other host services with those containers), and I am 
also trying to set that dummy veth interface as the default gateway for the 
pods/containers (with the expectation that then they will be able to reach 
each other). However, this is not working... and I am pretty lost.

For example, I am running the following command, trying to connect a ldap 
client container to a ldap server container, unsuccessfully.

podman run --rm --dns=10.255.255.1 --network=pasta:--outbound-
if4=cluster_dns0,--gateway=10.255.255.1 --add-host=ldap.host.internal:host-gateway sh -c "ip add && ip route && ldapwhoami -H ldaps://
ldap.host.internal:1636"

Is this something impossible to do, or am I doing something wrong?

Thank you very much for any help you can provide!

-- 
Felix
Felix Rubio

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-12-21  8:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <176606116131.2775.3279769610610037541@maja>
2025-12-20 14:12 ` Connecting back to the host through a dummy veth interface Stefano Brivio
2025-12-20 14:28   ` Felix Rubio
2025-12-18 12:32 Felix Rubio

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