Skip to content

docs: document what VPNs should do to systemd-resolved.service - #17678

Merged
keszybz merged 1 commit into
systemd:masterfrom
poettering:resolved-vpn-doc
Nov 25, 2020
Merged

keszybz merged 1 commit into
systemd:masterfrom
poettering:resolved-vpn-doc

Conversation

@poettering

@poettering poettering commented Nov 20, 2020 •

Copy link
Copy Markdown
Member

Fixes #17588.
Fixes #17512.

Prompted-by: #17529

(Also relevant: #6076)

@DemiMarie DemiMarie left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Grammar nits
  • Use an IP block reserved for documentation
  • Note the security risks of using search domains from an untrusted source.

Comment thread docs/RESOLVED-VPNS.md Outdated

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
parent domain of all domains, but itself.) When used on an interface any DNS
parent domain of all domains, by itself.) When used on an interface any DNS

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually intended to say "but" here. i.e. the "." domain is the transitive parent of all domains, except for one: the "." domain itself, since domains are not parent of themselves. does that make sense?

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In that case, the word “except” might be clearer.

Comment thread docs/RESOLVED-VPNS.md Resolved
Comment thread docs/RESOLVED-VPNS.md Resolved
Comment thread docs/RESOLVED-VPNS.md Resolved
Comment thread docs/RESOLVED-VPNS.md Resolved
Comment thread docs/RESOLVED-VPNS.md Resolved
Comment thread docs/RESOLVED-VPNS.md Resolved
Comment thread docs/RESOLVED-VPNS.md Resolved
Comment thread docs/RESOLVED-VPNS.md Outdated
Comment on lines 198 to 208

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice to have a convenience utility that handles all of this in one command. For example resolvectl vpn corporate corporate0 '~corp.company.example' 192.0.2.0/24.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please file a separate RFE issue about that.

Comment thread docs/RESOLVED-VPNS.md Resolved
@poettering

Copy link
Copy Markdown
Member Author

Force pushed a new version, with most of the comments above addressed, for the others see above.

I added a whole section at the end about downgrading server-supplied search domains to routing domains, or suppressing them altogether.

@keszybz keszybz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's still some typos and a few places could use a bit of copyediting, but let's do that in follow-up PRs.

Comment thread docs/RESOLVED-VPNS.md
these (or sub-domains thereof) defined as routing domains, will be preferably
used for doing reverse IP to domain name lookups. e.g. declaring
`~168.192.in-addr.arpa` on an interface means that all lookups to find the
domain names for IPv4 addresses 192.168.x.y are preferable routed to it.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

preferably

Comment thread docs/RESOLVED-VPNS.md
And one more note: the domain routing logic implemented is a tiny bit more
complex that what described above: if there two interfaces have search domains
that are suffix of each other, and a name is looked up that matches both, the
interface with the longer match will win and get the lookup routed to is DNS

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

its

Comment thread docs/RESOLVED-VPNS.md
is particularly relevant if you have one interface with the `~.` routing domain
and another one with `~corp.company.example` — both suffixes match a lookup for
`foo.corp.company.example`, but the latter interface wins, since the match is
for four labels, while the other is for zero labels.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

three labels, not four

Comment thread docs/RESOLVED-VPNS.md
available a bunch of servers, all in the domain `corp.company.example`.

2. One VPN interface of the *privacy* kind, maybe called `privacy0`. When it is
up all DNS traffic shall preferably routed to its DNS servers.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

be

Comment thread docs/RESOLVED-VPNS.md

With this configuration if only `wifi0` is up, all DNS traffic goes to its DNS
server, since there are no other interfaces with better matching DNS
configuration. If `privacy0` is then upped, all DNS traffic will exclusively go

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

upped → brought up?

@keszybz
keszybz merged commit 5695ee5 into systemd:master Nov 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

3 participants