Add labs
This commit is contained in:
40
04-mosquitto/lab06/lab.txt
Normal file
40
04-mosquitto/lab06/lab.txt
Normal file
@ -0,0 +1,40 @@
|
||||
= Verwendung ACME TLS Zertifikat
|
||||
|
||||
|
||||
Nutzen Sie z.B. acme.sh um ein Zertifikat für den öffentlichen Hostnamen / IP Adresse
|
||||
Ihrer Maschine ein Zertifikat zu erstellen.
|
||||
Dies Lab ist nur möglich auf öffentlich erreichbaren Maschinen.
|
||||
|
||||
|
||||
|
||||
Für DNS Namen (Hostnamen passend wählen)
|
||||
|
||||
$ mkdir out
|
||||
$ docker run --rm -it -v "$(pwd)/out":/acme.sh -p 80:80 -p 443:443 neilpang/acme.sh \
|
||||
--register-account -m zerossl@example.com
|
||||
$ docker run --rm -it -v "$(pwd)/out":/acme.sh -p 80:80 -p 443:443 neilpang/acme.sh \
|
||||
--issue -d mqtt.trion.dev --server zerossl --standalone
|
||||
|
||||
Oder für die IP
|
||||
|
||||
$ mkdir out
|
||||
$ docker run --rm -it -v "$(pwd)/out":/acme.sh -p 80:80 -p 443:443 neilpang/acme.sh \
|
||||
--issue --alpn -d 217.231.222.7 --server letsencrypt --certificate-profile shortlived --days 5
|
||||
|
||||
|
||||
Konfigurieren Sie das erhaltene Zertifikat.
|
||||
|
||||
|
||||
certfile /mosquitto/config/mqtt.trion.dev.fullchain
|
||||
keyfile /mosquitto/config/mqtt.trion.dev.key
|
||||
|
||||
|
||||
$ docker run --rm -it --init --net host -v $PWD:/mosquitto/config eclipse-mosquitto
|
||||
|
||||
|
||||
Verbinden Sie sich über den passenden Weg (Hostnamen / IP) unter Verwendung von TLS
|
||||
auf den Broker
|
||||
|
||||
$ docker run --rm -it --init --net host eclipse-mosquitto \
|
||||
mosquitto_pub --host mqtt.trion.dev --port 8883 -V 5 --qos 1 \
|
||||
--topic freeforall --message "this is secure" --debug
|
||||
Reference in New Issue
Block a user