Encrypting on the Wild Side
Charly's Column – Wildcards
The pleasure of owning a nice domain like sensorenresidenz.de is clouded by the requirement of an X.509 certificate for every subdomain that the admin wants or has. Columnist Charly can help boost the webmaster's spirits.
Certificates from Let's Encrypt [1] are free and popular – supposedly half of all digital certificates used on the web originate there. However, anyone running web servers with many subdomains has had the displeasure of having to manage a bag full of certificates. A single wildcard certificate from one of the usual certification bodies solves the problem in principle, but it is expensive.
This changed in March 2018: All those who have access to their domain name's DNS server can now also obtain wildcard certificates from Let's Encrypt.
If you have not yet installed the Let's Encrypt client, you can load it as follows:
git clone https://github.com/letsencrypt/letsencrypt
After that, web admins usually have to add some Python packages. That's easily taken care of with
letsencrypt/letsencrypt-auto --help
which will ask you for your sudo
password when launched. Let's Encrypt uses a DNS-based challenge-response method for authentication.
Let's Dance
The following command lets me request a certificate for the namespace *.sensorenresidenz.de
(just don't ask why I registered the domain):
sudo /usr/local/letsencrypt/letsencrypt-auto certonly --manual --preferred-challenges dns --server https://acme-v02.api.letsencrypt.org/directory --email charly@kuehnast.com --domains *.sensorenresidenz.de
After a second of recollection, the Let's Encrypt client answers. It wants me to create a TXT record named _acme-challenge.sensorenresidenz.de
in the DNS with a given random string as content:
Please deploy a DNS TXT record under the name _acme-challenge.sensorenresidenz.de with the following value: ST8ehm-bKS6wRAxZk5vYDzUO9-OEr3NeIpClFyaq-kA Before continuing, verify the record is deployed.
After I have created the entry and checked that it is available, I press Enter. Let's Encrypt retrieves my request and verifies it. Then it creates a certificate (fullchain.pem
) and key (privkey.pem
) and stores both under /etc/letsencrypt/live/Name
– applause (Listing 1).
Listing 1
I did it!
Congratulations! Your certificate and chain have been saved at: /etc/letsencrypt/live/sensorenresidenz.de/fullchain.pem Your key file has been saved at: /etc/letsencrypt/live/sensorenresidenz.de/privkey.pem Your cert will expire on 2018-08-07. To obtain a new or tweaked version of this certificate in the future, simply run letsencrypt-auto again. To non-interactively renew *all* of your certificates, run "letsencrypt-auto renew".
Integrating the certificate with the web server follows the usual steps. The browser is happy with the certificate that my servers now deliver (Figure 1).
Wildcard certificates from Let's Encrypt expire after 90 days like all other certificates from the issuer. To renew them, you simply call letsencrypt-auto renew
.
Infos
- Let's Encrypt: https://letsencrypt.org
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
Canonical Bumps LTS Support to 12 years
If you're worried that your Ubuntu LTS release won't be supported long enough to last, Canonical has a surprise for you in the form of 12 years of security coverage.
-
Fedora 40 Beta Released Soon
With the official release of Fedora 40 coming in April, it's almost time to download the beta and see what's new.
-
New Pentesting Distribution to Compete with Kali Linux
SnoopGod is now available for your testing needs
-
Juno Computers Launches Another Linux Laptop
If you're looking for a powerhouse laptop that runs Ubuntu, the Juno Computers Neptune 17 v6 should be on your radar.
-
ZorinOS 17.1 Released, Includes Improved Windows App Support
If you need or desire to run Windows applications on Linux, there's one distribution intent on making that easier for you and its new release further improves that feature.
-
Linux Market Share Surpasses 4% for the First Time
Look out Windows and macOS, Linux is on the rise and has even topped ChromeOS to become the fourth most widely used OS around the globe.
-
KDE’s Plasma 6 Officially Available
KDE’s Plasma 6.0 "Megarelease" has happened, and it's brimming with new features, polish, and performance.
-
Latest Version of Tails Unleashed
Tails 6.0 is based on Debian 12 and includes GNOME 43.
-
KDE Announces New Slimbook V with Plenty of Power and KDE’s Plasma 6
If you're a fan of KDE Plasma, you'll be thrilled to hear they've announced a new Slimbook with an AMD CPU and the latest version of KDE Plasma desktop.
-
Monthly Sponsorship Includes Early Access to elementary OS 8
If you want to get a glimpse of what's in the pipeline for elementary OS 8, just set up a monthly sponsorship to help fund its continued existence.