Skip to content

Commit

Permalink
Update explanations in "Setting up a Let's Encrypt certificate on clo…
Browse files Browse the repository at this point in the history
…ud Load Balancers with external domain" (#817)
  • Loading branch information
svenja11 authored Apr 11, 2024
1 parent 64599f6 commit 48fb162
Show file tree
Hide file tree
Showing 8 changed files with 46 additions and 31 deletions.
27 changes: 17 additions & 10 deletions tutorials/configure-lb-cert-with-external-domain/01.de.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ header_img: "header-8"
cta: "loadbalancer"
---

## Einleitung
## Einführung

In diesem Beitrag geht es darum auf Cloud Load Balancern die automatische Zertifikatsvergabe auch mit extern bereitgestellten Domains zu nutzen.

Expand All @@ -28,7 +28,7 @@ In diesem Beitrag geht es darum auf Cloud Load Balancern die automatische Zertif

## Schritt 1 - Anlegen der Hetzner DNS Zone

In diesem Schritt wird im Hetzner DNS Management eine DNS Zone für die Domnain `example.com` angelegt, diese wird später vom Load Balancer verwendet um die `_acme-challenge` zu verarbeiten.
In diesem Schritt wird im Hetzner DNS Console eine DNS Zone für die Domain `example.com` angelegt, diese wird später vom Load Balancer verwendet um die `_acme-challenge` zu verarbeiten.

Eine neue DNS Zone kann unter [dns.hetzner.com](https://dns.hetzner.com) angelegt werden.

Expand Down Expand Up @@ -66,26 +66,33 @@ Bei Cloudflare sieht die Konfiguration in etwa so aus:

Im Load Balancer muss nun ein `TLS-Termination` Service eingerichtet werden.

![](images/termination.png)
In der Hetzner [Cloud Console](https://console.hetzner.cloud/) muss dazu der Load Balancer ausgewählt und anschließend zu "Services" navigiert werden. Klicke dort auf `Service hinzufügen` » `TLS-Termination`.

![](images/load-balancer.de.png)

> Zu beachten ist hier, wie der Traffic vom Load Balancer weiter zum Cloud Server gelangt. Die Standardeinstellung ist die **unverschlüsselte** Übertragung über `HTTP` und das öffentliche Interface des Servers. Hier würde es sich dringend anbieten auf dem Service ein Self-Signed Zertifikat zu hinterlegen und den Load Balancer auf `HTTPS` zu `HTTPS` zu konfigurieren. Zusätzlich kann der Traffic auch über ein privates Netzwerk geleitet werden, was zuvor aber konfiguriert werden muss.
Hier kann dann unter `Zertifikat` --> `Zertifikat erstellen`
ein Name und eine DNS Zone angegeben werden. Hier wird dann die oben erstellte DNS Zone ausgewählt.
Wähle beim Erstellen des Services `Zertifikat` » `+ Zertifikat hinzufügen` aus und klicke auf `Zertifikat erstellen`. Weitere Information bezüglich des Unterschiedes zwischen `Zertifikat erstellen` und `Zertifikat hochladen`, können in diesem [FAQ-Eintrag](https://docs.hetzner.com/de/cloud/load-balancers/faq/#wie-kann-ich-meine-zertifikate-verwalten) nachgelesen werden.

Es können ein Name und eine DNS Zone angegeben werden. Hier wird dann die oben erstellte DNS Zone ausgewählt.

![](images/create-cert.de.png)

![](images/createCert.png)
> In der Auswahl können entweder einzele Sub-Domains (`ssl.example.com`) oder Wildcard Zertifikate (`*.example.com`) ausgestellt werden. Im oben gezeigen Beispiel ist es ein Wildcard Zertifikat.
> In der Auswahl können entweder einzele Sub-Domains oder Wildcard Zertifikate ausgestellt werden. Im oben gezeigen Beispiel ist es ein Wildcard Zertifikat.
Danach ist die Einrichtung des Zertifikats abgeschlossen. Nun können die DNS-Einträge, die für den jeweiligen Service benötigt werden, in der Hetzner [DNS Console](https://dns.hetzner.com/) angelegt werden. Dafür muss schlicht ein `A` Record hinzugefügt werden, in welchem die (Sub-)Domain auf den Load Balancer zeigt. Beispiel:

Danach ist die Einrichtung des Zertifikats abgeschlossen. Nun können die DNS Einträge die für den jeweiligen Service benötigt werden mit Ziel auf den Load Balancer angelegt werden.
| Typ | Name | Wert |
| ---- | --------------- | ------------------ |
| A | ssl.example.com | <kbd>\<load-balancer-ip></kbd> |

Danach läuft der Service dann unter dem TLS Zertifikat.

![](images/https.png)

## Zusammenfassung
## Ergebnis

In diesem Beitrag wurde gezeigt wie man trotz einer externen Domain das Lets Encrypt Feature der Load Balancer verwenden kann, ohne die Domain komplett umziehen zu müssen.
In diesem Beitrag wurde gezeigt wie man trotz einer externen Domain das Let's Encrypt Feature der Load Balancer verwenden kann, ohne die Domain komplett umziehen zu müssen.

##### License: MIT

Expand Down
50 changes: 29 additions & 21 deletions tutorials/configure-lb-cert-with-external-domain/01.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ SPDX-License-Identifier: MIT
path: "/tutorials/configure-lb-cert-with-external-domain"
slug: "configure-lb-cert-with-external-domain"
date: "2021-05-14"
title: "Setting up a Let's Encrypt certificate on cloud load balancers with external domain"
short_description: "Set up a Let's Encrypt certificate on cloud load balancers without changing the DNS hoster."
title: "Setting up a Let's Encrypt certificate on cloud Load Balancers with external domain"
short_description: "Set up a Let's Encrypt certificate on cloud Load Balancers without changing the DNS hoster."
tags: ["DNS", "Cloud", "Load Balancer", "Lets-Encrypt"]
author: "Markus"
author_link: "https://github.com/BackInBash"
Expand All @@ -18,19 +18,19 @@ cta: "loadbalancer"

## Introduction

This article is about using automatic certificate allocation on cloud load balancers with externally provided domains.
This article is about using automatic certificate allocation on cloud Load Balancers with externally provided domains.

**Requirements**
**Prerequisites**

+ A top-level domain, e.g. `example.com`
+ DNS hoster with the possibility to create `NS` records
+ A cloud load balancer
+ A cloud Load Balancer

## Step 1 - Creating the Hetzner DNS zone

In this step a DNS zone for the domain `example.com` is created in the Hetzner DNS management. This zone will later be used by the load balancer to process the `_acme-challenge`.
This step explains how to create a DNS zone for the domain `example.com` in the Hetzner DNS Console. Later, the Load Balancer will use this zone to process the `_acme-challenge`.

A new DNS zone can be created at [dns.hetzner.com](https://dns.hetzner.com).
You can create a new DNS zone at [dns.hetzner.com](https://dns.hetzner.com).

![](images/createDNSZone.png)

Expand All @@ -40,51 +40,59 @@ The created DNS zone should now look like this:

![](images/beforeDelete.png)

The marked entries are not needed and should therefore be deleted.
You do not need the marked entries and should therefore delete them.

## Step 2 - External DNS configuration

Now we have to redirect the DNS zone `_acme-challenge.example.com` of the external domain to the Hetzner DNS zone.

To do this, several `NS` entries have to be created at the respective DNS hoster.
To do this, you need to create several `NS` entries at the respective DNS hoster.

These are structured as follows:

```Console
_acme-challenge.example.com IN NS hydrogen.ns.hetzner.com.
```

> The DNS servers can be taken from the Hetzner DNS zone.
> You can take the DNS servers from the Hetzner DNS zone.
A `NS` record should be created for each DNS server at the external DNS hoster.
You should create a `NS` record for each DNS server at the external DNS hoster.

For Cloudflare, the configuration would look something like this:

![](images/cloudflare.png)

## Step 3 - Setting up the load balancer
## Step 3 - Setting up the Load Balancer

A `TLS termination` service must now be set up in the load balancer.
You must now set up a `TLS termination` service in the Load Balancer.

![](images/termination.png)
Open the Hetzner [Cloud Console](https://console.hetzner.cloud/), navigate to your Load Balancer and select "Services". Next, click on `Add service` » `TLS Termination`.

> Note here how the traffic from the load balancer continues to the cloud server. The default setting here is **unencrypted** transmission via `HTTP` and the public interface of the server. Here it would be urgently advisable to deposit a self-signed certificate on the service and to configure the load balancer to `HTTPS` to `HTTPS`. In addition, the traffic can also be routed over a private network, which must be configured first.
![](images/load-balancer.png)

Here you can enter a name and a DNS zone under `Certificate` --> `Create certificate`. The DNS zone created above is then specified here.
> Note how the traffic is forwarded from the Load Balancer to the cloud server. The default setting here is **unencrypted** transmission via `HTTP` and the public interface of the server. Here it would be urgently advisable to deposit a self-signed certificate on the service and to configure the Load Balancer to `HTTPS` to `HTTPS`. In addition, you can also route the traffic over a private network, which must be configured first.
![](images/createCert.png)
During service creation, select `CERTIFICATES` » `+ Add certificates` and click on `Create certificate`. For more information about the difference between `Create certificate` and `Upload cerificate`, you can see this [FAQ entry](https://docs.hetzner.com/cloud/load-balancers/faq#how-can-i-manage-my-certificates).

> In the selection either single sub-domains or wildcard certificates can be issued. In the example shown above it is a wildcard certificate.
Next, enter a name and select your DNS zone. Select the DNS zone created above.

After that, the certificate setup is complete. Now the DNS entries required for the respective service can be created with target on the load balancer.
![](images/create-cert.png)

> You can issue either single sub-domains (`ssl.example.com`) or wildcard certificates (`*.example.com`). In the example above, it is a wildcard certificate.
After that, the certificate setup is complete. Now, you can go back to the Hetzner [DNS Console](https://dns.hetzner.com/) and create the DNS entries required for the respective service. To do this, simply create a new `A` record that points your (sub-)domain at the Load Balancer. For example:

| Type | Name | Value |
| ---- | --------------- | ------------------ |
| A | ssl.example.com | <kbd>\<load-balancer-ip></kbd> |

After that, the service will run under the TLS certificate.

![](images/https.png)

## Summary
## Conclusion

In this article we showed how to use the Lets Encrypt feature of the load balancers, despite an external domain, without having to move the domain completely.
This article showed how to use the Let's Encrypt feature of the Load Balancers with an external domain, without having to move the domain completely.

##### License: MIT

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.

0 comments on commit 48fb162

Please sign in to comment.