Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Beide Seiten der vorigen RevisionVorhergehende Überarbeitung | Letzte ÜberarbeitungBeide Seiten der Revision | ||
syncthing [2022/05/11 15:16] – mb1591 | syncthing [2022/05/11 15:16] – alte Version wiederhergestellt (2022/05/10 11:47) mb1591 | ||
---|---|---|---|
Zeile 1: | Zeile 1: | ||
- | ====== | + | ====== |
- | Virtual machine hosted | + | ===== Access GUI on vm-syncthing-lin ===== |
- | FQDN: vm-syncthing-lin.physik.privat | + | __Location: Terminal__ |
- | IP: 10.4.78.68 | + | |
- | MAC: 00: | + | |
- | ===== Administration ===== | + | |
- | + | ||
- | ** Access Syncthing GUI in Browser ** | + | |
ssh -l root vm-syncthing-lin -X firefox http:// | ssh -l root vm-syncthing-lin -X firefox http:// | ||
- | ** Synced Folders ** | + | __Location: Firefox__ |
- | | + | |
- | The synced folder syncthing-osx on vm-syncthing-lin is set to **Send Only**.\\ The synced folders on the client devices are set to **Recieve Only**.\\ | ||
- | This means that changes are only synced from vm-syncthing-osx top-down to the clients. | ||
+ | ===== Access GUI on MacOS Clients ===== | ||
+ | | ||
+ | __Location: Terminal__ | ||
- | ** Show logs on vm-syncthing-lin ** | + | # tunnel port 8384 via ssh |
+ | ssh -N -L 8384: | ||
- | Log files for the syncthing service and the disovery services are availiable via systemd' | + | __Location: Local browser__ |
- | | + | |
- | | + | |
- | ** IDs und URLs ** | ||
- | Device ID: GD42MSP-F4LDLEK-WZLRDAN-VAKCLCA-CQG7VWI-LFFYS2S-6ACHZ6U-XTS55QZ | + | ===== GUI Configuration |
- | Server Device ID: CGEGPGG-CDYSKXM-2GJ66WV-TWI5QIB-Y556QOB-KLBD4YR-ZRQC4TT-WF2TDA2 | + | |
- | Server URL: https:// | + | |
- | + | ||
- | ===== FAQ ===== | + | |
- | + | ||
- | * What happens if nfs share disappears from / | + | |
+ | __Location: Syncthing WebInterface__ | ||
+ | | ||
+ | Actions | Advanced | Options | | ||
+ | Always Local Nets: 10.0.0.0/8 | ||
+ | Global Announce Enabled: [+] | ||
+ | Global Announce Servers: https:// | ||
+ | Listen Addresses: tcp4://: | ||
+ | | ||
+ | ==== Server (vm-syncthing-lin) ==== | ||
+ | | ||
+ | Folders | syncthing-osx | Edit | | ||
+ | General | ||
+ | Folder ID: synchting-osx | ||
+ | Folder Path: / | ||
+ | GUI | ||
+ | [+] Use HTTPS for GUI | ||
+ | Advanced | ||
+ | Full Rescan Interval (s): 20 | ||
+ | Folder Type: Recieve Only | ||
+ | ==== Clients (MacOS) ==== | ||
+ | | ||
+ | Folders | syncthing-osx | Edit | | ||
+ | General | ||
+ | Folder ID: synchting-osx | ||
+ | Folder Path: / | ||
+ | GUI | ||
+ | [+] Use HTTPS for GUI | ||
+ | | ||
+ | Full Rescan Interval (s): 2600 | ||
+ | Folder Type: Send Only | ||
+ | | ||
- | ===== Setup ===== | + | ===== Macos ===== |
- | + | ||
- | ==== Syncthing | + | |
< | < | ||
- | aptitude install | + | cp / |
+ | cp / | ||
+ | launchctl load / | ||
+ | launchctl unload / | ||
+ | </ | ||
- | groupadd -g 44834 sw-it | ||
- | groupadd -g 46202 syncthing | ||
- | adduser -uid 46202 --gid 44834 syncthing | ||
- | systemctl enable syncthing@syncthing.service | + | < |
- | systemctl start syncthing@syncthing.service | + | __Location: WebInterface on Syncthing client__ |
</ | </ | ||
- | ==== Discovery Server ==== | + | < |
+ | Always Local nets: 10.0.0.0/ | ||
- | aptitude install syncthing-discosrv | + | Global Announce Enabled: + |
- | + | ||
- | systemctl enable stdiscosrv.service | + | |
- | systemctl start stdiscosrv.service | + | |
- | + | ||
- | ** Auto generated certificate and key files: ** | + | |
- | If no certificate and key is given, stdiscosrv automatically genereate cert.pem and key.pem in **/ | + | GlobalAnnounce Servers: https://vm-syncthing:8443/?id=FJHL5W6-BX2SXUB-JPV5FRY-SBZ2MFZ-QIGC6KJ-TIIDP56-K7FCAXC-BA5OVAH |
- | + | ||
- | :!: if the certificate and key under /var/lib/syncthing/disosrv changes then the DEVICE ID of the discovery server changes also | + | |
- | + | ||
- | + | ||
- | ==== NFS ==== | + | |
- | aptitude install nfs-common | + | Listen Addresses: tcp4://: |
+ | </ | ||
- | cat <<EOS >>/ | ||
- | fs.physik.privat:/ | ||
- | EOS | ||
- | mount / | + | ===== Path ===== |
- | ==== Debian Bullseye | + | |
- | __Location: VMWare Webconsole__ | ||
< | < | ||
- | Debian Bullseye Basisinstallation | + | launchctl unload / |
- | | + | rm / |
- | vm-synchting-lin.physik.privat | + | rm -r / |
- | 4GB Swap, 23GB root (ext4) | + | rm / |
- | | + | |
+ | rm -r /var/root/ | ||
</ | </ | ||
+ | | ||
+ | ===== CheckMK ===== | ||
- | __Location: Terminal__ | ||
< | < | ||
- | # SSH: enable root login | + | mkdir -p / |
- | ssh -l install vm-syncthing-lin | + | cd / |
- | | + | ln -s /var/root/syncthing-osx/ |
- | sed -i '/PermitRootLogin.*/ a\PermitRootLogin yes' | + | cd /etc |
- | systemctl restart sshd | + | ln -s /var/root/syncthing-osx/etc/mrpe.cfg mrpe.cfg |
- | exit | + | ln -s /var/root/syncthing-osx/etc/ |
- | exit | + | |
- | # remove user: install | ||
- | ssh -l root vm-syncthing-lin | ||
- | deluser --remove-all-files install | ||
- | # enable login via ssh-key | + | </code> |
- | mkdir -p / | + | |
- | scp root@ltspmaster.physik.privat: | + | |
- | apt install aptitude | + | ===== Docs ===== |
- | cat<< EOS >>/ | + | * Global Discovery: https://docs.syncthing.net/users/security.html |
- | deb http://ftp.uni-stuttgart.de/debian/ bullseye main | + | |
- | deb-src http://ftp.uni-stuttgart.de/ | + | |
- | # bullseye-updates, | ||
- | # see https:// | ||
- | # bullseye-updates, | ||
- | deb http:// | ||
- | deb-src http:// | ||
- | EOS | ||
- | |||
- | aptitude install vim ufw | ||
- | |||
- | ufw allow from 10.4.78.0/ | ||
- | ufw allow from 10.5.81.0/ | ||
- | ufw enable | ||
- | </ |