Category: raspian

Major Tools for your IT Systems

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 […]

Script DNS Blocker DNSMASQ

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): # 2019 # DNS Blocker for Small Linux with dnsmasq # #!/bin/bash # goto tmp (tmpfs) cd /tmp/ # get URL-Blocklists wget -O blocklist.txt # get Templates #SET Variables txt='blocklist.txt' IP='' # set to 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 […]

Split Files on embedded Linux Systems

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.

Postfix: Automatic UFW Firewall Updates

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/ #!/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 | […]

Design copyright - Linux PC & Server Support