r/linuxadmin • • 7d ago

Enabling DNSSEC on AD-integrated DNS

Hey everyone, we have an audit requirement to enable DNSSEC on our internal AD-integrated DNS hosted in domain controllers and I’ve never set this up before. Every guide I find only covers the Windows side (like configuring NRPT), and I have zero clue what needs to be done on Linux.

Could anyone help me know what exact config is needed on our Linux machines so they work properly with AD DNSSEC?

Here is our current setup:

• Linux clients are joined to the AD domain they use Winbind for authentication. And those are suse

They talk directly to our AD DNS servers over a ipsec tunnel backed by palo Alto (no separate resolvers in between).this is basic client and AD communication. And I wonder where this validation can happen since no resolver exists. Kindly help

3 Upvotes

5 comments sorted by

2

u/Faye-Vozora 6d ago

If you go the unbound route, don't pin the DNSKEY with a plain trust-anchor: line. Windows rolls the keys on its own (defaults are ZSK every 90 days, KSK every 755), and when the KSK rolls a static anchor goes stale and everything in the zone starts coming back SERVFAIL. Use auto-trust-anchor-file: so unbound follows the RFC 5011 rollover, and on the key master tick the options to distribute trust anchors and auto update them on rollover.

Then a forward-zone: for the AD domain pointing at the DCs, and resolv.conf on the SUSE boxes pointing at 127.0.0.1. Set that through NETCONFIG_DNS_STATIC_SERVERS in /etc/sysconfig/network/config or netconfig will just overwrite it.

1

u/ETDucky 6d ago

Ask the auditor whether the requirement is to sign the zone or to have clients validate, because those need different work on Linux. Signing the AD-integrated zone on the DCs needs no change on the SUSE clients. The glibc resolver doesn't validate DNSSEC, so Winbind and the SRV lookups keep resolving the signed zone the same way. Client-side validation needs a validating resolver on each Linux box, such as unbound. An internal AD zone usually has no chain of trust from the public root, so export the zone's DNSKEY from a DC with Resolve-DnsName <zone> -Type DNSKEY -Server <dc> and configure it as a trust anchor in that resolver. Also confirm the Palo Alto policy on the tunnel allows DNS over TCP 53 for the larger signed responses.

1

u/Steerable-Octopus 6d ago

You're right, Suse doesn't have support for it by default. Install systemd-resolved. Then you add trust anchors for the DNSSEC as Digests in /etc/dnssec-trust-anchors.d/*.positive and set DNSSEC=yes in /etc/systemd/resolved.conf. systemd should be able to verify your dnssec servers through resolvectl query XYZ afterward.

1

u/hortimech 6d ago

Good luck with the Linux clients, Samba does not have a clue about DNSSEC.

0

u/michaelpaoli 7d ago

enable DNSSEC

Generally a (quite) good thing! It well helps close a significant vulnerability with DNS, while remaining exceedingly backwards compatible. I'd almost say it's a "no brainer", but as with DNS matters, most notably serving DNS, operating DNS servers, etc. some due attention to proper operations is quite important, as DNS is, in most contexts, part of critical infrastructure, and DNSSEC, despite all its many advantages, does also give oneself one more way one can thoroughly screw up one's DNS - so due attention and care with DNS administration remains quite important.

internal

For internal DNS, I always highly recommend, at least as feasible (or migration towards!) using domain(s) that are subdomain(s) of Internet DNS names that one owns/controls. E.g. int.example.com. One can then serve some rather to quite slight bits of that to public Internet DNS, while retaining almost all of it as restricted to internal, but as a sub(sub...)domain of public Internet DNS, it has several advantages (and negligible disadvantages), most notably:

  • DNSSEC - easy peasy, as trust naturally is delegated on down from root (.), so then very easily all clients using proper server configurations, will trust the DNSSEC. No need to set up internal alternative trust of root (.) or other domain(s) and (re)configure all clients to be aware of such - in fact generally zero need to reconfigure clients at all (other than possibly configuring what DNS server(s) they use).
  • Likewise lots of Internet/domain related validation, e.g. letsencrypt.org. TLS(/"SSL") certs for use, even entirely internally, can be easily obtained by only exposing very little DNS data (e.g. a record or two per domain for validation - and need only be out there temporarily - can even be as short as minutes or less). And then essentially all clients trust the certs - no need to reconfigure clients to trust some internal CA. And yes, that does mean at least temporarily exposing some DNS data - but it's not like one will be able to generally fully hide that anyway. E.g. transparency logging, the recognized public CA certs issued will be publicly logged anyway - transparency logging (and it's also a security feature!). That's the slight tradeoff for essentially all clients to by default trust the recognized CA issued certs, avoiding need to reconfigure (most) all the clients to trust some internal CA(s).
  • There are additional advantages, but the above are at least two highly to quite key advantages. Another is avoiding potential naming conflicts with Internet DNS. If it's domain(s) one owns, one gets to fully control what one uses internally and externally, so one doesn't have risk of potential conflicts with external Internet DNS that one doesn't control (though that can also be done by very careful selection of internal domain(s), notably using some suitable reserved one(s) such that they'll never conflict - but doing only that and not ones one can also make (partly) available externally misses the many other potential advantages.)

what needs to be done on Linux

Easy peasy on the Linux side. And most especially the client/resolver side of things. These days most will by default, fully utilize and trust DNSSEC that's properly set up - most notably at least if it properly chains down from Internet DNS root (.). Hence I also mention key advantage of internal (sub)domain(s) that are sub(sub...)domain(s) of public Internet DNS domain(s) one owns/controls. If they're not such subdomain(s), then it becomes significantly more challenging, as one need generally reconfigure the clients/resolvers to trust one's internal DNSSEC that doesn't chain down from Internet root (.) DNSSEC. Alternative would be to disable enforcement of DNSSEC on clients/resolvers, but that would generally be a bad idea, as that would essentially negate all the advantages and benefits of DNSSEC (and likely also majorly fail your DNSSEC audit). So, highly recommended to do relevant (sub)domain(s) if at all feasible (or at lest start working on migration plan to eventually get there - your future self and future employees and peers will thank you).

On the server side for Linux, there is various DNS server software available. As for secondaries, that's highly easy peasy. Secondaries really just carry along and store cached copies of DNS zone data. They really don't care if it's got DNSSEC or not, or even if DNSSEC is set up properly. For the most part they just serve up that data, and it mostly falls upon clients/resolvers to validate it. DS record present for the zone, DNSEC will be enforced, no DS record, no DNSSEC and things proceed per usual without. As for setting up authoritative zones with DNSSEC, these days with most DNS software, it's relatively easy. And sure, does take some additional steps to set it up and get it going, but set that up properly, verify it, activate it - and typically after that it's rather to quite easy to maintain. Of course due care is always advised, as one can of course majorly f*ck it up too - but that applies rather generally to DNS servers and especially authoritative DNS servers, etc. As I said, DNSSEC just also gives one one more way to very much screw that up - so yeah, don't screw it up - reasonable attention, etc, and all is fine.

And Linux and Linux software typically tends to be highly well documented - notably Open Source and all that, and "community", etc. I'm not going to attempt to point out all the various DNS server software, and its available packages for various distros, but here's at least one quite excellent example:
https://wiki.debian.org/BIND9#DNSSEC
Above is URL and with anchor tag within, that takes one straight to the DNSSEC section for BIND 9 on Debian. I wrote/overhauled a lot of the material on that wiki page (and mostly continue to maintain it). Though it is specifically oriented for Debian, much of the material would apply to most other LInux distros, and even more generally to BIND 9 on *nix. Very early on that same wiki page:
https://wiki.debian.org/BIND9#Introduction
also gives some information on how to get listing of most any and all DNS server software that Debian makes available. As for other distros, etc., likely Wikipedia.org. and/or other sources/listings may have more generally comprehensive lists of such software, and possibly also including both Open Source and software that isn't Open Source.

so they work properly with AD

Sorry, not AD nor Microsoft expert, and this also probably isn't best subreddit to ask about AD nor Microsoft. Subreddit mentioned further below and/or some more specific to Microsoft (or AD within) may be significantly more suitable to ask about that.

talk directly to our AD DNS servers over a ipsec tunnel

Unfortunately I've not yet done IPSEC, but you can probably find lots of quite good resources and information about IPESC on Linux. And if no more adjustments are needed for DNS infrastructure in that regard, other than specifying what IP(s) they listen on, and which they use for DNS server(s), then should be quite straightforward. If for any reason configuration of the DNS servers/clients need be more detailed than that (e.g. they need be IPSEC aware - but I kind of doubt that's needed), then one would also need deal with DNS software that's appropriately aware of IPSEC - but I'm guessing that's probably a non-issue, and if you're already dealing with IPSEC, guessing you already know the answer on that, or soon will.

no resolver exists

Linux will have resolver(s) by default, and may, even by default (or easily with bit of software) also do some relevant caching thereof. So that's probably mostly a non-issue, other than possibly paying wee bit of attention, and maybe slight bit of client configuration thereof. Also, many Linux distros, if one installs DNS server, for many, and their default configurations, they'll often start with a base that is mostly a caching recursive server - if nothing else, that commonly significantly improves DNS performance for the relevant clients (and typically also including the host itself as a client too).

See also:

r/dns