Channel Apps
[BBcode] 

Linux: Linux Befehle

Konsolenverlauf löschen cat /dev/null > ~/.bash_history && history -c && exit

Anzeige Foldergröße: du -h --max-depth=1 /

UFW, sshguard:
If UFW is installed and enabled, it must be given the ability to pass along DROP control to sshguard. This is accomplished by modifying /etc/ufw/before.rules to contain the following lines which should be inserted just after the section for loopback devices. Note: Users running sshd on a non-standard port should substitute that in the final line above (where 22 is the standard)

nano /etc/ufw/before.rules
# allow all on loopback
-A ufw-before-input -i lo -j ACCEPT -A ufw-before-output -o lo -j ACCEPT
# hand off control for sshd to sshguard
:sshguard - [0:0] -A ufw-before-input -p tcp --dport 22 -j sshguard



gparted VM, falls reboot lange braucht
Wenn eine VM vergrößert wird, müssen evtl. noch angepasst werden:
blkid UUIDs der Partitionen anzeigen
nano /etc/fstab
Die richtige SWAP UUID eintragen
nano /etc/initramfs-tools/conf.d/resume
In dieser Datei ebenfalls die neue UUID eintragen und
update-initramfs -u ausführen.
Jetzt noch einen schönen reboot und alles ist wieder gut.




Debian Version upgrade (hier: bullseye):
apt dist-upgrade
sed -i 's/buster/bullseye/g' /etc/apt/sources.list
nano /etc/apt/sources.list
# Security anpassen zu
deb https://deb.debian.org/debian-security bullseye-security main contrib
deb-src https://deb.debian.org/debian-security bullseye-security main contrib
apt update
apt upgrade --without-new-pkgs
apt full-upgrade




Jitsi Meet "Unfortunately, something went wrong/Leider ist etwas schiefgelaufen":
apt purge jigasi jitsi-meet jitsi-meet-web-config jitsi-meet-prosody jitsi-meet-turnserver jitsi-meet-web jicofo jitsi-videobridge2
apt autoremove
apt install jitsi-meet -y




sendxmpp crontab:
nano /root/.sendxmpprc
Hier den Benutzernamen und das Passwort des XMPP Absenders eintragen, also z. B.
sender@xmpp.com supertolleskennwort
Die Datei absichern:
chmod 600 /root/.sendxmpprc
Dann, mittels crontab -e eintragen:
*/30 * * * * tail -n20 /var/log/auth.log | grep 'refused connect' | /usr/bin/sendxmpp --tls-ca-path="/etc/ssl/certs" -t empfänger@domain.com
Mit diesem Befehl wird alle 30 Minuten das logfile auth.log bei den letzten 20 Einträgen nach "refused connect" gesucht und das Ergebnis an den Empfänger geschickt.