MQTT Mosquitto Broker: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
| (Eine dazwischenliegende Version desselben Benutzers wird nicht angezeigt) | |||
| Zeile 3: | Zeile 3: | ||
*apt install mosquitto | *apt install mosquitto | ||
*apt install mosquitto-clients | *apt install mosquitto-clients | ||
| + | = Handleling= | ||
| + | *systemctl start mosquitto.service | ||
| + | *systemctl restart mosquitto.service | ||
| + | *systemctl stop mosquitto.service | ||
| + | *systemctl status mosquitto.service | ||
| + | *journalctl -fu mosquitto.service | ||
=Die Konfiguration erfolgt in der Datei '''/etc/mosquitto/conf.d/defaults.conf'''= | =Die Konfiguration erfolgt in der Datei '''/etc/mosquitto/conf.d/defaults.conf'''= | ||
==Unsicher ohne Passwort== | ==Unsicher ohne Passwort== | ||
| − | listener 1883 0.0.0.0 | + | listener 1883 0.0.0.0 |
| − | allow_anonymous true | + | allow_anonymous true |
| − | log_type all | + | log_type all |
| − | connection_messages true | + | connection_messages true |
==Unverschlüsselt mit Passwort== | ==Unverschlüsselt mit Passwort== | ||
| − | listener 1883 0.0.0.0 | + | listener 1883 0.0.0.0 |
| − | allow_anonymous false | + | allow_anonymous false |
| − | log_type all | + | log_type all |
| − | connection_messages true | + | connection_messages true |
| − | password_file /etc/mosquitto/passwd | + | password_file /etc/mosquitto/passwd |
==Verschlüsselt mit Passwort== | ==Verschlüsselt mit Passwort== | ||
| − | listener 8883 0.0.0.0 | + | listener 8883 0.0.0.0 |
| − | allow_anonymous false | + | allow_anonymous false |
| − | log_type all | + | log_type all |
| − | connection_messages true | + | connection_messages true |
| − | password_file /etc/mosquitto/passwd | + | password_file /etc/mosquitto/passwd |
| − | certfilev /etc/mosquitto/conf.d/FQDN.crt | + | certfilev /etc/mosquitto/conf.d/FQDN.crt |
| − | cafile /etc/mosquitto/conf.d/ca.crt | + | cafile /etc/mosquitto/conf.d/ca.crt |
| − | keyfile /etc/mosquitto/conf.d/FQDN.key | + | keyfile /etc/mosquitto/conf.d/FQDN.key |
| − | |||
| − | |||
==Verschlüsselt mit Passwort und Client Identifikation== | ==Verschlüsselt mit Passwort und Client Identifikation== | ||
| − | listener 8883 0.0.0.0 | + | listener 8883 0.0.0.0 |
| − | allow_anonymous false | + | allow_anonymous false |
| − | log_type all | + | log_type all |
| − | connection_messages true | + | connection_messages true |
| − | password_file /etc/mosquitto/passwd | + | password_file /etc/mosquitto/passwd |
| − | certfilev /etc/mosquitto/conf.d/FQDN.crt | + | certfilev /etc/mosquitto/conf.d/FQDN.crt |
| − | cafile /etc/mosquitto/conf.d/ca.crt | + | cafile /etc/mosquitto/conf.d/ca.crt |
| − | keyfile /etc/mosquitto/conf.d/FQDN.key | + | keyfile /etc/mosquitto/conf.d/FQDN.key |
| − | require_certificate true | + | require_certificate true |
| − | use_identity_as_username true | + | use_identity_as_username true |
Aktuelle Version vom 30. Oktober 2024, 10:27 Uhr
Installiere den Broker
- apt update && apt-get upgrade
- apt install mosquitto
- apt install mosquitto-clients
Handleling
- systemctl start mosquitto.service
- systemctl restart mosquitto.service
- systemctl stop mosquitto.service
- systemctl status mosquitto.service
- journalctl -fu mosquitto.service
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