I have a few bare metal servers that sometimes need a console hookup. Since they are in a closet, this causes a problem. Enter TinyPilot. Using a normal KVM and a Raspberry Pi, now I can remotely manage the servers via nginx.
PiHole HA Sync
Script to run on a primary PiHole server to sync blocklist database and custom local DNS entries to a secondary server.
Make sure to setup sshkeys to allow user on primary server to login to secondary server.
Then run this script in the cron every 15-30 minutes.
# HA Sync from PiHolePri to PiHoleSec */15 * * * * /root/pi-ha-sync.sh >> /var/log/pi-ha-sync.log 2>&1
#!/usr/bin/env bash sshuser=pi pisecondary=10.10.10.10 sshkey=/root/.ssh/id.pi filelist="gravity.db custom.list" piping=$(timeout 0.2 ping -c1 ${pisecondary} &> /dev/null && echo "0" || echo "1") if [ "${piping}" -eq 0 ]; then cd /etc/pihole/ ssh -i ${sshkey} ${sshuser}@${pisecondary} 'if [ ! -d ~/piholepri ]; then mkdir ~/piholepri; fi' scp -q -i ${sshkey} ${filelist} ${sshuser}@${pisecondary}:~/piholepri ssh -i ${sshkey} ${sshuser}@${pisecondary} "sudo cp ~/piholepri/* /etc/pihole" ssh -i ${sshkey} ${sshuser}@${pisecondary} "pihole restartdns reload-lists" else echo "${pisecondary} is not available." fi
BlueIris Server
Network Caller ID
Who uses a land line phone now-a-days. Well I do, but I added a digital touch to it by connecting a USB modem to a Raspberry Pi and running NCID. This allow me to push CallerID notifications using Pushover to my phone/laptop/desktop. Now I know when a telemarketer calls even when I’m out of the house.
Entryway Calendar / DakBoard (formerly PiMagicMirror)
The PiMagicMirror software left something to be desired, plus administration was a bit difficult. I also didn’t like the amount of heat that the screen I had previously built was generating. So I purchased a large Digital Picture Frame that had an HDMI input. I recessed the electrical box on the wall to hide the raspberry pi, and switched the software to Dakboard.com.
Gitea
This is my main code repository in my house. While I maintain good coding practices and keep credentials out of the code, I also keep the code local so I can make changes offline. I really like that Gitea is developed in GoLang. I also installed a Dark Theme and changed the link colors too.
Home Inventory
I wanted something to keep track of all the devices I had on my network. While installing Zabbix, I had to install MariaDB (MySQL), so I used that database to house the inventory of devices. This also uses PHP, jQuery and DataTables on the front end and Bash, Python and GO on the backend.
The scripts connect to and parse the data from my routers DHCP server logs. Then match that to DNS (running on 2 PiHoles), looks up the OUI of the MAC address for manufacturer and scans it’s ports looking for SSH, HTTP or HTTPS.
PiZabbix
https://linuxhint.com/install_zabbix_raspberry_pi/
While investigating the use of Zabbix for my department to use, I found a lot of uses for it in my house. I have it monitoring many of my IOT devices found on my Hardware Projects page. At first I was going to install it in a VM on my FreeNAS server, but I found installing it on a Raspberry Pi easier and would take the iops away from my main storage array. I’m currently in the process of updating to a Raspberry Pi 4 and better USB 3.0 storage.
Pi Cellular 2.0
I’ve started upgrading all the Raspberry PIs in the house to Pi4. The Electron connected Pi was the first. This time around I soldered the Electron to a GPIO Proto board hat to make changing the hardware easier in the future. I also added this nice case and a fan inside. Unfortunately, I tried to run the Pi on POE but that caused issues with the GPIO pins that I couldn’t figure out.
Unifi
I had been looking at the Unifi Wifi and Unifi Network gear for a while and I finally thought it was the time to rip out the old networking equipment. We rely so heavily on the internet that it only makes sense to have the most robust and configurable network you can manage. Lucky for me, I have a lot of friends that can help when I get lost in show commands.