-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1649 from openWB/master
Merge master into Release
- Loading branch information
Showing
605 changed files
with
6,673 additions
and
5,885 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ | |
.DS_Store | ||
.ftp* | ||
.vite | ||
.vimrc | ||
.vscode/* | ||
__pycache__/ | ||
node_modules/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Security Policy | ||
|
||
## Supported Versions | ||
|
||
The following versions are maintained and supported: | ||
|
||
| Version | Supported | | ||
| ------- | ------------------ | | ||
| 2.1.x | :white_check_mark: | | ||
| 2.0.x | :x: | | ||
| <2.0 | :x: | | ||
|
||
## Reporting a Vulnerability | ||
|
||
Please use the contact form at openwb.de for reporting a found vulnerability: | ||
https://openwb.de/main/?page_id=484 |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# openwb-version:2 | ||
# allow publishing set topics | ||
topic write openWB/set/# | ||
# allow clearing system messages | ||
topic write openWB/system/messages/# | ||
# allow clearing client messages | ||
pattern write openWB/command/%c/messages/# | ||
# allow global read access | ||
topic read openWB/# | ||
# allow read access for remote support topics | ||
topic read openWB-remote/# | ||
# allow brach "others" for devices other than openWB | ||
topic readwrite others/# |
4 changes: 2 additions & 2 deletions
4
data/config/mosquitto.conf → data/config/mosquitto/mosquitto.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
# openwb-version:1 | ||
# openwb-version:2 | ||
persistence true | ||
persistence_location /var/lib/mosquitto/ | ||
log_type error | ||
log_type warning | ||
log_dest file /var/log/mosquitto/mosquitto.log | ||
# timestamp format currently not supported in stretch or buster with mosquitto 1.5 | ||
# only enable on bullseye and newer | ||
# log_timestamp_format %Y-%m-%dT%H:%M:%S | ||
log_timestamp_format %Y-%m-%dT%H:%M:%S | ||
|
||
include_dir /etc/mosquitto/conf.d |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
32 changes: 24 additions & 8 deletions
32
data/config/openwb.conf → data/config/mosquitto/openwb.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,44 @@ | ||
# openwb-version:2 | ||
listener 9001 | ||
# openwb-version:3 | ||
|
||
# required to restrict access per listener | ||
per_listener_settings true | ||
|
||
# prevent too many inactive connections from buggy clients | ||
# closes inactive connections after 4 hours | ||
persistent_client_expiration 4h | ||
|
||
# this websocket is used by local apache | ||
# todo: restrict access: | ||
# listener 9001 localhost | ||
listener 9001 | ||
protocol websockets | ||
allow_anonymous true | ||
acl_file /etc/mosquitto/mosquitto.acl | ||
|
||
# public secure websocket listener | ||
listener 9002 | ||
protocol websockets | ||
allow_anonymous true | ||
certfile /etc/mosquitto/certs/openwb.pem | ||
keyfile /etc/mosquitto/certs/openwb.key | ||
acl_file /etc/mosquitto/mosquitto.acl | ||
|
||
# local bridge listener | ||
listener 1884 localhost | ||
protocol mqtt | ||
allow_anonymous true | ||
|
||
# public unsecure mqtt listener | ||
# todo: remove unsecure listeners | ||
listener 1883 | ||
# todo: restrict access: | ||
# listener 1883 localhost | ||
protocol mqtt | ||
allow_anonymous true | ||
acl_file /etc/mosquitto/mosquitto.acl | ||
|
||
# public secure mqtt listener | ||
listener 8883 | ||
protocol mqtt | ||
allow_anonymous true | ||
certfile /etc/mosquitto/certs/openwb.pem | ||
keyfile /etc/mosquitto/certs/openwb.key | ||
|
||
# prevent too many inactive connections from buggy clients | ||
# closes inactive connections after 4 hours | ||
persistent_client_expiration 4h | ||
acl_file /etc/mosquitto/mosquitto.acl |
4 changes: 2 additions & 2 deletions
4
data/config/openwb_local.conf → data/config/mosquitto/openwb_local.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,88 @@ | ||
Zunächst einen neuen Ordner erstellen/auswählen, in den die Sicherungen hochgeladen werden sollen. | ||
|
||
Nachfolgende Schritte müssen auf dem Bereitstellenden system geamcht werden | ||
Nachfolgende Schritte müssen auf dem Bereitstellenden system gemacht werden | ||
1. SMB Freigabe erstellen (Auf NAS etc.) | ||
2. User einrichten und berechtigen - R/W | ||
|
||
Nachfolgende Schritte müssen in openwb gemachte werden. | ||
Nachfolgende Schritte müssen in openWB gemacht werden. | ||
|
||
1. IP Adresse oder Name (Am besten FQDN) im Feld Server hinterlegen | ||
* IP: z.B 192.168.178.1 | ||
* Name z.B. mein-server | ||
* FQDN z.B mein-server.fritz.box | ||
2. Share angeben in dem das Backup gespeicher werden soll | ||
2. Share angeben in dem das Backup gespeichert werden soll | ||
3. Optional können ein bis n Unterordner angegeben werden. Diese müssen immer mit / getrennt werden und auch am Ende muss ein / stehen | ||
* Beispiel: test/ oder aber test1/test2/test/ | ||
4. Benutzer und Passwort in die jeweilegen Felder eintragen | ||
|
||
![Samba nutzen](Samba.png) | ||
|
||
Ergänzungen: | ||
Bei manchen Systemen kann es notwendig sein das Mindest-SMB-Protokoll auf SMB2 zu setzen. | ||
|
||
Anleitung für Samba Server auf einem Raspberry Pi (z.B.: Stand alone) | ||
|
||
1. Installieren von Samba | ||
sudo apt-get update | ||
sudo apt-get install samba samba-common smbclient | ||
2. Prüfen ob Samba läuft | ||
sudo service smbd status | ||
sudo service nmbd status | ||
3. Samba User anlegen | ||
sudo useradd testsmb | ||
Optional: | ||
4. Falls users nicht vorhanden: sudo groupadd users | ||
check mit getent group | ||
5. Hinzufügen des Samba Users zur Gruppe users | ||
sudo usermod -aG users testsmb | ||
6. Ordner anlegen in /home | ||
sudo mkdir smb | ||
sudo mkdir smb/testsmb | ||
sudo mkdir smb/testsmb/test | ||
7. Besitzer ändern | ||
sudo chown testsmb /home/smb/testsmb | ||
sudo chown testsmb /home/smb/testsmb/test | ||
8. Konfigurationsdatei von Samba sichern | ||
sudo cp /etc/samba/smb.conf /etc/samba/smb.conf_backup | ||
Konfigurationsdatei smb.conf anpassen | ||
sudo nano /etc/samba/smb.conf | ||
[global] | ||
workgroup = WORKGROUP | ||
security = user | ||
encrypt passwords = yes | ||
client min protocol = SMB2 | ||
client max protocol = SMB3 | ||
bis zum Ende der Datei scrollen und folgende Eintragungen vornehmen: | ||
[testsmb] | ||
comment = Samba-Test-Share | ||
valid users = testsmb | ||
path = /home/smb/testsmb | ||
read only = no | ||
|
||
9. Testen ob die smb.conf noch funktioniert | ||
testparm | ||
10. Benutzer aktivieren | ||
sudo smbpasswd -a testsmb | ||
New SMB password: testSMB | ||
Retype new SMB password: testSMB | ||
Optional | ||
11. Sichergehen, dass Benutzer aktiviert ist | ||
sudo smbpasswd -e testsmb | ||
12. IP-Adresse des Raspberry Pis notieren | ||
ifconfig -> z.B.: 192.168.43.81 | ||
13. Neustart von Samba nach Änderung der Konfiguration | ||
sudo service smbd restart | ||
sudo service nmbd restart | ||
|
||
Der Samba Dienst ist nun eingerichtet und konfiguriert. Alternativ können auch andere Benutzergruppen mit anderen Berechtigungen konfiguriert werden. | ||
|
||
In openWB unter System -> Datenverwaltung -> Sicherung / Wiederherstellung unter Automatische Sicherung in einen Cloud-Dienst als Backup-Cloud Samba auswählen und folgende Einstellungen für Backup-Cloud Modul "Samba" eintragen: | ||
Server: IP_Adresse des Raspberry Pis z.B.: 192.168.43.81 | ||
Freigabe: testsmb | ||
Unterordner: test/ | ||
Benutzer: testsmb | ||
Kennwort: testSMB | ||
|
||
Speichern drücken und testen durch klicken auf Sicherung erstellen und hochladen | ||
|
||
Stand 08. April 2024 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.