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: David Gibson <david@gibson.dropbear.id.au>, passt-dev@passt.top
Subject: Re: [PATCH v2 2/2] fwd: Broaden what we consider for DNS specific forwarding rules
Date: Wed, 24 Jul 2024 16:30:50 +0200	[thread overview]
Message-ID: <20240724163050.006103bf@elisabeth> (raw)
In-Reply-To: <9c98f64f-9c71-4f98-8d37-8456c85e89f6@redhat.com>

On Wed, 24 Jul 2024 11:41:44 +0200
Paul Holzinger <pholzing@redhat.com> wrote:

> Hi,
> 
> On 24/07/2024 09:51, David Gibson wrote:
> > passt/pasta has options to redirect DNS requests from the guest to a
> > different server address on the host side.  Currently, however, only UDP
> > packets to port 53 are considered "DNS requests".  This ignores DNS
> > requests over TCP - less common, but certainly possible.  It also ignores
> > encrypted DNS requests on port 853.
> >
> > Extend the DNS forwarding logic to handle both of those cases.  
>
> The question here is if it handles DoT should it handle DoH as well, 
> i.e. https (443)?

We don't have a flexible interface, yet, to finely configure outbound
traffic redirections, so the user couldn't enable or disable this at
will. So I'm wondering if there's any use case that we risk breaking
with that.

The most confusing case I can think of is a host with a local resolver
with a loopback address (for example, the usual 127.0.0.53 from
systemd-resolved). Without --no-map-gw (or with Podman's --map-gw), we
will, by default, use the address of the default gateway (which maps to
the host) as implied --dns-forward option.

If we now match on HTTPS as well, HTTPS traffic that's supposed to
reach the host (because there's an HTTPS server there) will anyway reach
the host, even if we mishandle it as DNS traffic somehow.

So I don't actually see an issue with that, but given that users can't
disable just HTTPS (this should be easier to implement with the flow
table, but it will surely be a while before we get to that), we should
think quite hard if there's any possibility of breakage before going
ahead with it.

> > Link: https://github.com/containers/podman/issues/23239
> >
> > Signed-off-by: David Gibson <david@gibson.dropbear.id.au>  
> 
> Tested-by: Paul Holzinger <pholzing@redhat.com>
> 
> I tested both dns over tcp and dns over tls with dig.

Thanks!

-- 
Stefano


  reply	other threads:[~2024-07-24 14:31 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-24  7:51 [PATCH v2 0/2] Broaden DNS forwarding David Gibson
2024-07-24  7:51 ` [PATCH v2 1/2] fwd: Refactor tests in fwd_nat_from_tap() for clarity David Gibson
2024-07-24  7:51 ` [PATCH v2 2/2] fwd: Broaden what we consider for DNS specific forwarding rules David Gibson
2024-07-24  9:41   ` Paul Holzinger
2024-07-24 14:30     ` Stefano Brivio [this message]
2024-07-25  4:44       ` David Gibson
2024-07-25  8:39         ` Paul Holzinger
2024-07-25 11:27 ` [PATCH v2 0/2] Broaden DNS forwarding Stefano Brivio

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=20240724163050.006103bf@elisabeth \
    --to=sbrivio@redhat.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=passt-dev@passt.top \
    --cc=pholzing@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).