You are not logged in.

#1 2018-04-19 17:13:12

helloadam
Member
Registered: 2018-04-19
Posts: 3
Website

Disable systemd (v235) "_gateway" hostname for A/AAAA

In systemd version 235 a feature was added to create an invalid hostname of

_gateway

with A and AAAA record for the gateway IP. https://github.com/systemd/systemd/blob … /NEWS#L672

The changelog says this can be disabled at build time, however I have been unable to find resources on what flags/options this includes.

My questions:

  • May someone provide me a link on what those flags/options are to disable systemd from creating a _gateway entry?

  • Can this be disabled via a runtime flag or change to a config file?

Thanks,
-Adam

Offline

#2 2018-04-19 17:53:42

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,524
Website

Re: Disable systemd (v235) "_gateway" hostname for A/AAAA

The changelog does not say that adding an invalid the gateway hostname can be disabled.  It says that it had previous used "gateway", now it uses "_gateway", but you can restore the old behavior at build time.

Why would you want it to create "gateway" instead of "_gateway"?

Last edited by Trilby (2018-04-19 18:06:43)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2018-04-19 17:54:58

HalosGhost
Forum Moderator
From: Twin Cities, MN
Registered: 2012-06-22
Posts: 2,092
Website

Re: Disable systemd (v235) "_gateway" hostname for A/AAAA

I am not aware of a way to disable this at runtime. But it should be noted that the changelog that you link to suggests that what you can do at build-time is just revert to the old behavior (which binds to ``gateway`` rather than ``_gateway``) not fully disable it.

Is there a reason you prefer the old behavior?

Edit: Trilby beat me to the punch.

All the best,

-HG

Last edited by HalosGhost (2018-04-19 17:55:26)

Offline

#4 2018-04-19 19:51:50

rsmarples
Member
Registered: 2009-05-12
Posts: 287

Re: Disable systemd (v235) "_gateway" hostname for A/AAAA

Adding _gateway as an A or AAAA record *is* invalid and is a clear violation of RFC 952 (and 1123).
A and AAAA records are for hostnames and a hostname cannot begin with _

_ prefixes are allows for other types of DNS record such as SRV or TXT records as these are not hostnames.

EDIT: I'd like to know what the behaviour is when your have many routers present. Exactly which one is _gateway?

Last edited by rsmarples (2018-04-19 19:54:50)

Offline

#5 2018-04-19 20:57:38

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,524
Website

Re: Disable systemd (v235) "_gateway" hostname for A/AAAA

man systemd-resolved wrote:

The hostname "_gateway" is resolved to all current default routing gateway addresses, ordered by their metric. This assigns a stable hostname to the current gateway, useful for referencing it independently of the current network configuration state.

As for what's valid for an A or AAAA record, the RFCs on those would be more relevant than RFCs on internet hosts which doesn't really apply in this case.  In contrast, RFC 1035 is what would apply to A records:

RFC 1035 wrote:

Although labels can contain any 8 bit values in octets that make up a label, it is strongly recommended that labels follow the preferred syntax described elsewhere in this memo, which is compatible with existing host naming conventions.

An underscore is an 8 bit value.  Avoiding the underscore is, indeed, strongly recommended by the relevant RFC, but not required.

Last edited by Trilby (2018-04-19 21:21:54)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

Board footer

Powered by FluxBB