MQTT Mosquitto Broker: Unterschied zwischen den Versionen
(Die Seite wurde neu angelegt: „= Installiere den Broker = *apt update && apt-get upgrade *apt install mosquitto *apt install mosquitto-clients“) |
|||
| Zeile 3: | Zeile 3: | ||
*apt install mosquitto | *apt install mosquitto | ||
*apt install mosquitto-clients | *apt install mosquitto-clients | ||
| + | |||
| + | =Die Konfiguration erfolgt in der Datei '''/etc/mosquitto/conf.d/defaults.conf''' | ||
| + | |||
| + | ==Unsicher ohne Passwort== | ||
| + | listener 1883 0.0.0.0 | ||
| + | allow_anonymous true | ||
| + | log_type all | ||
| + | connection_messages true | ||
| + | ==Unverschlüsselt mit Passwort== | ||
| + | listener 1883 0.0.0.0 | ||
| + | allow_anonymous false | ||
| + | log_type all | ||
| + | connection_messages true | ||
| + | password_file /etc/mosquitto/passwd | ||
| + | ==Verschlüsselt mit Passwort== | ||
| + | listener 8883 0.0.0.0 | ||
| + | allow_anonymous false | ||
| + | log_type all | ||
| + | connection_messages true | ||
| + | password_file /etc/mosquitto/passwd | ||
| + | certfilev /etc/mosquitto/conf.d/FQDN.crt | ||
| + | cafile /etc/mosquitto/conf.d/ca.crt | ||
| + | keyfile /etc/mosquitto/conf.d/FQDN.key | ||
| + | |||
| + | |||
| + | ==Verschlüsselt mit Passwort und Client Identifikation== | ||
| + | listener 8883 0.0.0.0 | ||
| + | allow_anonymous false | ||
| + | log_type all | ||
| + | connection_messages true | ||
| + | password_file /etc/mosquitto/passwd | ||
| + | certfilev /etc/mosquitto/conf.d/FQDN.crt | ||
| + | cafile /etc/mosquitto/conf.d/ca.crt | ||
| + | keyfile /etc/mosquitto/conf.d/FQDN.key | ||
| + | require_certificate true | ||
| + | use_identity_as_username true | ||
Version vom 30. Oktober 2024, 10:25 Uhr
Installiere den Broker
- apt update && apt-get upgrade
- apt install mosquitto
- apt install mosquitto-clients
=Die Konfiguration erfolgt in der Datei /etc/mosquitto/conf.d/defaults.conf
Unsicher ohne Passwort
listener 1883 0.0.0.0 allow_anonymous true log_type all connection_messages true
Unverschlüsselt mit Passwort
listener 1883 0.0.0.0 allow_anonymous false log_type all connection_messages true password_file /etc/mosquitto/passwd
Verschlüsselt mit Passwort
listener 8883 0.0.0.0 allow_anonymous false log_type all connection_messages true password_file /etc/mosquitto/passwd certfilev /etc/mosquitto/conf.d/FQDN.crt cafile /etc/mosquitto/conf.d/ca.crt keyfile /etc/mosquitto/conf.d/FQDN.key
Verschlüsselt mit Passwort und Client Identifikation
listener 8883 0.0.0.0 allow_anonymous false log_type all connection_messages true password_file /etc/mosquitto/passwd certfilev /etc/mosquitto/conf.d/FQDN.crt cafile /etc/mosquitto/conf.d/ca.crt keyfile /etc/mosquitto/conf.d/FQDN.key require_certificate true use_identity_as_username true