there are quite a lot of tools out there to generate dane records.
I like hash-slinger - the only downside is that if you are using SNI or something like smtp with STARTTLS, you have to specify the cert on the command-line. but as most other generators will completely fail this task in the case of SNI, this might be a good idea anyways.
if you have a few services that share the same cert, you can make it short:
echo -n 25,587,143,993,443 | xargs -n1 -I{} -d, tlsa --create --output rfc --usage 3 --selector 1 --mtype 1 --port {} --certificate /path/to/your/cert.crt example.com
one thing to remember:
for port 443, you will want to create additional records for subdomains you might be using (www?)
warning: if you add a www. TLSA record, you have to create a specific A record for www. too! a wildcard record does not seem to work any more at that point.
also: if you are using SNI, you should specify the cert of the domain you enter in the browser, not the default apache certificate. many validators currently fail on SNI.
this validator will fail on SNI: [https://www.had-pilot.com/dane/danelaw.html]
this one works with SNI: [https://check.sidnlabs.nl/dane/]
this one can validate smtp: [https://dane.sys4.de/]