If you want to free space on Backups you can use find to select a special month: find -newerct "1 Sep 2023" ! -newerct "1 DEC 2023" -delete This command removes files created from 01.Sep.2023 to 01.Dec.2023. ..very useful..
A must “USE” in these insecure days: nmap Portscan Tool use nmap -PN IP-Address to check failed Firewall Settings! arp-scan Network Scan to find active devices iftop to detect traffic and used Ports on a physical network Interface! ps aux show active processes on a Linux System htop more human friendly Process Monitor iotop human friendly traffic monitor from CPU/RAM to Drives Daily check Error Logs! Use always Firewalls and Disk/File Encryption! Don’t trust Hardware Protection (TPM) Chips most do communicate by clean signals on copper which can be read out by hardware hacking or magnetic fields! NEVER leave Hardware […]
If you tested pihole, you perhaps look for a smaller Command Line version? Install dnsmasq by: sudo apt-get install dnsmasq Here DNS Rule Injector Script (copy & paste): blocker.sh # www.linuxonlinehelp.com 2019 # DNS Blocker for Small Linux with dnsmasq # #!/bin/bash # goto tmp (tmpfs) cd /tmp/ # get URL-Blocklists wget -O blocklist.txt https://v.firebog.net/hosts/Kowabit.txt # get Templates #SET Variables txt='blocklist.txt' IP='0.0.0.0' # set to 0.0.0.0 or to a Webserver with "white Page" showing Text "URL-blocked!! #merge URLs and redirect to wanted IP – Rule creation n=1; while read line; do echo 'address=/'$line'/$IP '>> 02-blocked1.conf ; n=$((n+1)); done < $txt […]
If you run a embedded Linux PC like raspi often some Linux Commands fail without error messages, cause the hardware performance is low tech. Same i have seen on the split command.. to split a 50GB Photos-Archive File to 4Gb on a USB Drive i found out that: sudo split -b 4096m -d -u Photos.tgz Photos-Archive_ fix the job.. Cause option -u disable IO-Caching over the 2.0 USB Port to the RAM of the raspi that the Data of the Output Stream is written direct to the Drive.
If you use a Toshiba Canvio 3tb Drive at a raspi then smartmontools will not see the usb drive. Try: sudo smartctl -t long -d sat -s on /dev/sdb -t test long or short -d drive protocol sata = sat -s enforce smart which is off by the usb drive firmware wait XXX Minutes then: sudo smartctl -H -d sat -s on /dev/sdb get status..
If you use a Mail Server with Postfix you got daily Spam Attacks by Scripts: How to fix? Install ufw Firewall Run a Scanner Script as cronjob On Debian/Ubuntu: Install ufw: sudo apt-get update && sudo apt-get install ufw && sudo ufw enable && sudo ufw logging off Scan Script: sudo nano /home/user/firewall-update.sh: #!/bin/bash # scan rejected cat /var/log/mail.log | grep rejected | cut -d"[" -f3 | cut -d"]" -f1|grep -v '^$' > /tmp/firewall.txt # insert to Firewall while read line; do sudo ufw insert 1 deny from $line to any; done < /tmp/firewall.txt # scan "denied" cat /var/log/mail.log | […]