From: Felix Rubio <felix@kngnt.org>
To: Stefano Brivio <sbrivio@redhat.com>
Cc: passt-user@passt.top
Subject: Re: Connecting back to the host through a dummy veth interface
Date: Tue, 23 Dec 2025 08:34:50 +0100 [thread overview]
Message-ID: <4701571.LvFx2qVVIh@altair> (raw)
In-Reply-To: <20251222235117.2264ae71@elisabeth>
Damn... I knew I had to get rid of that chair... xD
My setup is a bit complex: I am running a k3s cluster with some services
outside it, but running on the same host. The purpose is to have some central
services common to all the applications I am running (e.g., authentication)
running on these rootless containers. This way I can take down the whole
cluster without loosing services that are required by other parties... at the
expense of properly protecting them.
The reason for using a dummy interface is because then I can implement simple,
wide rules, stating that this interface can only receive connections from the
k3s cluster or to specific ports, and that connections from that interface can
only be established to the cluster or to specific ports. I am doing this
because, should a malicious actor manage to run code on those services or
break outside of the container, they would be able to establish connections
outside anywhere.
I know I can use an existing interface for all this, but then I would have to
be way more careful about how these firewall rules are implemented... whereas
using this dummy interface I can deny by default and only allow as required.
Stefano, thank you very much for your answers. I really appreciate the time
you took writting them.
Regards!
Felix
On Monday, 22 December 2025 23:51:17 Central European Standard Time Stefano
Brivio wrote:
> On Mon, 22 Dec 2025 13:48:03 +0100
>
> Felix Rubio <felix@kngnt.org> wrote:
> > Ok, things are starting to get clear. The problem was, I think, between
the
> > desk and the keyboard.
>
> The chair! I think it was the chair. :)
>
> > * I have everything on a VM that I configure with Ansible. I have just
taken
> > everything down and started from scratch
> >
> > * I still have my containers without any ad-hoc network. They are binding
only
> > to network interface 10.255.255.1, which is a dummy ethernet.
> >
> > * My error was that I am running an LDAP server in one of these
containers,
> > and I was checking if it was working with a ldapwhoami. The client was
> > replying that could not reach the server, which triggered all subsequent
> > investigation, but the real cause was that the certificate offered by the
server
> > was not trusted by the client, and the latter broke the connection
(without
> > giving a more proper message - facepalm).
> >
> > Once fixed the problem with the certificates, everything seems to work. This
> >
> > means that:
> > * I have a dns server in 10.255.255.1 that resolves ldap.host.internal to
> >
> > 10.255.255.1
> >
> > * ldap server rootless container is listening to 10.255.255.1:1636
> > * ldap client is in another rootless container, and can reach directly
> >
> > ldap.host.internal:1636.
> >
> > ... Is this last point expected? the ldap server is started through podman
as
> > a regular user, without any network options... nothing fancy.
>
> Yes, it's expected, because 10.255.255.1 is not a loopback address.
>
> > The reason for me asking is that all I have read points in the direction
that
> > from a rootless container I should not be able to loopback to the host...
but
> > maybe this dummy interface is not identified as "the host" and therefore I
can
>
> It's rather not identified as "loopback".
>
> > connect to services bound to it? On the LDAP side, the logs show that
these
> > connections are coming from the same 10.255.255.1. That would be actually
> > convenient, because then I can put firewall rules in place that prevent
> > connecting from that dummy ethernet back to the host at all.
>
> You don't need a whole new interface for that, by the way. You could
> just add that address to an existing interface, assuming that the LDAP
> server lets you bind to a specific address and not just a specific
> interface.
--
Felix Rubio
next prev parent reply other threads:[~2025-12-23 7:34 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <176606116131.2775.3279769610610037541@maja>
2025-12-20 14:12 ` Stefano Brivio
2025-12-20 14:28 ` Felix Rubio
2025-12-21 10:47 ` Stefano Brivio
2025-12-21 15:32 ` Felix Rubio
2025-12-22 22:51 ` Stefano Brivio
2025-12-22 12:48 ` Felix Rubio
2025-12-22 22:51 ` Stefano Brivio
2025-12-23 7:34 ` Felix Rubio [this message]
[not found] ` <3627291.QJadu78ljV@altair>
2025-12-22 22:51 ` Stefano Brivio
2025-12-18 12:32 Felix Rubio
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=4701571.LvFx2qVVIh@altair \
--to=felix@kngnt.org \
--cc=passt-user@passt.top \
--cc=sbrivio@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.
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).