Important to understand Rules are read from top to bottom As soon as a rule is found that covers whatever is happeneing at the firewall, it is used and anything below ignored. So, for instance, a DROP deny all rule (sudo iptables -A INPUT -j DROP) must be last because everything after it in that […]
All posts by
Install Apache and PHP
These instructions should be good for installing on Raspberry Pi OS too. NOTE – THESE INSTRUCTIONS ARE FOR THE RASPBERRY PI ARM PLATFORMSome of these commands will be different for Ubuntu running on Intel. Ensure all packages are updated before you start Install apache2 Install PHP Apache 2 config etc See the ubuntu documentation here. […]
Security admin tips
A few important bits to look at as an Ubuntu server sysadmin Some useful sysadmin commands Display all current connections, listening services, and processes Really useful Ubuntu sysadmin utility: If its not present, use this to install it: sudo apt install net-tools To only see the runnign services, use: Check for Rootkits The “rkhunter” package […]
Update server
Manual get all updates
Monitoring processes & resource usage
Command line processes and CPU + memory usage Open a terminal window and type this command:
.Using camera
Command line List connected cameras Preview camera image Use Ctrl+C in the terminal or the close button on the preview window to close preview.
IO pins and input & outputs
GPIO Zero makes you access pins as if they are devices, but you can use them like normal inputs and outputs too. https://gpiozero.readthedocs.io/en/stable/api_input.html#inputdevice https://gpiozero.readthedocs.io/en/stable/api_output.html#gpiozero.OutputDevice
.GPIO Zero General
Seems to be the library to switch to as it supports the RPi5 https://gpiozero.readthedocs.io/en/stable/index.html#
RPi.GPIO no longer working from RPi5
RPi.GPIO no longer works due to the change to the new RP1 southbridge chip. Full explanation here. GPIO Zero offers a good migration guide here.
Using the SPI Interface
Enabling The SPI Port The SPI port needs to be enabled in Raspberry Pi OS before it can be used. See here. Test the SPI Port Test the SPI port is working on the command line by typing: You should see the following: There are 2 spidev devices shown (or more on newer Pi’s). The first […]