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..
Category: Console
Bug: virt-manager NO Keyboard input on VM
If you use Debian as Host System for Virtual Servers the “virt-manager” Package is broken! no keymap input no VM Console Control no VT-Switch possible Fix: run sudo virsh edit "vm-name" remove all “spice” display + audio entrys !! open sudo virt-manager go details and and ADD Display VGA + VGA-Adapter select VNC!! save + exit settings.. reboot VM now you should be able to enter the login commands
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): blocker.sh # www.linuxonlinehelp.eu 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 […]
Ubuntu 18.04 Backlight Control Command Line
By default the xbacklight command does not work on Intel HD Graphics: Workaround: sudo nano /usr/share/X11/xorg.conf.d/10-intel.conf: insert: Section "Device" Identifier "Card0" Driver "intel" Option "Backlight" "/sys/class/backlight/intel_backlight" EndSection now add to startup / autostart (lxde) : xbacklight -set 30
mj12bot hammer mediawiki
Here some IP’s of some Botnet Servers of mj12bot.com: the Botnet ignores robots.txt and hammers on Mediawiki’s! A sorted output of a Log done with : cat /var/log/apache2/other*.log|grep MJ | awk '{ print $2 }' | sort | uniq -c | sort -n Output for ufw Firewalls: 162.210.196.97 144.76.3.131 148.251.195.14 5.9.158.195 173.208.157.186 176.31.255.65 178.63.34.189 69.30.198.186 144.76.60.198 40.121.210.108 5.189.152.91 5.9.66.153 69.30.198.242 69.30.205.218 81.109.126.245 192.99.10.47 If this doesn’t help the use “Apache AUTH Basic” to block unwanted access!! It’s easy to setup.
Website Speed Test with Linux
If you own a Blog and want to check the Speed with your local Linux Computer use a commandline tool called curl. Open a Terminal and enter: curl -o /dev/null -s -w 'Connect: %{time_connect}\nStart Transfer: %{time_starttransfer}\nTotal: %{time_total}\n' https://www.yourdomain.de System Echos: Connect: 0,084774 Start Transfer: 0,173280 Total: 0,228651 Advantage? You will see the Website Load Time of Users at your Location (Country Area) You can check “high performance Clouds” vs. “bare metal Servers” or “virtual Hosting” You see that mostly expensive Hosting is wasted money cause “shared” IO V-Host is SLOWER! You get the real “felt” IO for Users who […]
Linux: Systemd ignore console-setup settings
If you work on older Laptops and you use a Console only System Setup like on Debian there is a Bug on systemd and the console-setup package since years. After reboot all Font Settings seems gone. But the Settings are not real gone, cause systemd does not pull the settings on boot! How to fix? edit the crontab of root by sudo su – crontab -e insert the /bin/setupcon command on “@reboot” means on every boot! @reboot /bin/setupcon > /dev/null 2>&1 save and exit, reboot now now the PC should echo big Fonts for old eyes “Terminus 20×12 Frambuffermode”
Linux Console: SSH Echo Last User LOGIN Info
If you use SSH Logins to your Systems, you perhaps want to know, who logged in last days and from which IP Address. Screenshot SSH Login Echo LAST Info: Howto: Open the .profile File at your Home with a Editor and enter: clear last -n 4 This will echo after login the last 4 Logins including the used IP’s To prevent Hackers to purge the lines set the .profile File “readonly” sudo chmod 444 .profile sudo chown root:root .profile
Apache: Count Visits on Console
If you use a Webserver like Apache, you can use a small script to Analyse your Logs. Create a analyse-web.sh Script with: $sudo nano /home/user/analyse-web.sh insert: #!/bin/bash cat /var/log/apache2/access.log | awk '{ print $1 }' | sort | uniq -c exit 0 System Output: 1573 www.domain2.de 3568 www.domain3.de .. If you change the “$1” to other value like “$8” you will get the count of touched files or folders! This shows you attacks on single Files by abnormal high counts! You can use cron to run it every 15Minutes and send it to mailbox of a user. And this way […]
FreeBSD: Monitor svn Updates
If you use the svn subversion tool to update source tree or ports tree, you want to have a possibility to look back what was pulled, pushed and droped you can use a Log File to monitor the update scripts. This helps if you temporarily log out the Terminal Sessions for a Coffee break. Howto: Login to FreeBSD via SSH Use a tmux program like screen or tmux, if not installed, then install it. This allows ongoing operations on disconnects Run on the Terminal $tmux Run $sudo svn update /usr/src > /home/updates/svn.log #exit STRG+B then press "d" detach The svn […]
FreeBSD: Current Version port upgrade fails with “portsnap extract” bug
If you use the current “head” Version (Release 12) of FreeBSD with a svn updated /usr/src path you could run into errors after updating the OS via buildworld from sources. There’s a bug ahead Revision “r314099” at the “portsnap” lib that will stop on extracting the ports.tgz to /usr/ports! Solution: Pull again sources to /usr/src with $svn update /usr/src $make buildworld $make buildkernel $make installkernel $reboot $mergemaster -p $make installworld $mergemaster -FiU $reboot $portsnap fetch update #again.. to update ports tree $portupgrade -a $reboot This should work now, the failed portsnap extract function was a known bug. If you dont […]
WordPress: Move Blog to new URL Domain HTTP HTTPS on the MYSQL Console
Info: Today most Search Engines prefer Blogs who are offering “HTTPS” at the URL for secure direct connects to the Websites but this results a lot of headaches to the Website Developers. To be effective you should know: You have to offer HTTPS beside HTTP You should use a validated Domain Certificate, most Domain Resellers offer them for FREE You should know that NOT every FREE Certificate is TRUSTED by every Browser (green closed lock symbol at the adressbar) You have to Develop Websites WITH variable Format output ( PC, Tablet, Smartphone, Smart-TV, Infoboxes,) Design Websites and test 3:2, 4:3, […]
Debian: Auto Update System Daily without special Tools
If you want to have a full automatic Update on your System then open a Gnome Terminal / Linux Console run (# Comments): $sudo nano /root/update.sh enter: #/!bin/bash apt-get update #pull updates apt-get dist-upgrade -y # install updates apt-get clean #clean update database for next pull to have clean source urls exit 0 save with CTRL+X # save+Exit $sudo chmod 755 /root/update.sh # make able to run Setup Timeplan: $sudo su – # change to root users console with environment $crontab -e # open root timer enter: @daily sh /root/update.sh > /dev/null 2>&1 save with CTRL+X and be happy the […]
Backup your PC with Linux Full Disk Snapshot Free Tool with Diskdump
Today a User is forced to Update daily his System or change anything to try new Software. But here mostly the Users run into very BAD PROBLEMS. I got often Calls that Users lose the control of the PC after Updates, Software Setups, Software Removal’s .. For this Linux offers a default Backup Tool, called Diskdump (“dd” command) which is on every Setup/Recover CD and Installation. Before any Changes do allways a Backup to USB Drives, Sticks or Second SATA Disk! This will save you TIME, Money, DATA and Nerves! Backup : Mount the Disk 2 on Path /mnt as […]
Linux Tip: Split Console Screen on Widescreen Laptop / PCs with “screen” and “terminator”
Current Laptops / PCs uses 16:9 Widescreen Displays and if you dont want to use Xorg (Gnome,unity,Openbox Desktops) you can use on Linux Console the program called “screen” it offers: – Split Consoles horizontally and vertically – disconnect the screen and let the scripts/commands active on remote Systems – reconnect if the remote Session was broken cause network problems On Gnome or unity you can use “terminator” see: – manpage of screen – http://unix.stackexchange.com/questions/7453/how-to-split-the-terminal-into-more-than-one-view