Unattended Upgrades on my Raspberry Pi’s

I can never quite remember how I like my unattended upgrades configured on my Raspberry Pi’s so I’m just popping it here. It should work for all versions! nano /etc/apt/apt.conf.d/50unattended-upgrades Unattended-Upgrade::Origins-Pattern { "origin=Raspbian,codename=${distro_codename},label=Raspbian"; "origin=Raspberry Pi Foundation,codename=${distro_codename},label=Raspberry Pi Foundation"; }; Unattended-Upgrade::Automatic-Reboot "true"; Unattended-Upgrade::Automatic-Reboot-Time "02:00"; To check it: unattended-upgrade --dry-run Logs can be found at: /var/log/unattended-upgrades/unattended-upgrades.log and /var/log/unattended-upgrades/unattended-upgrades-dpkg.log

August 23, 2018

Capture the Flag Resources

This is really just a place for me to remind myself of useful resources I’ve used when undertaking CTF challenges 🙂 Cryptography Resources: Dcode – the essential site for deciphering and decoding messages Cryptii – Modular online encoding, encryption and conversion tool quipqiup – a fast and automated cryptogram solver Network Resources: netcat (nc) -a feature-rich network debugging and investigation tool

June 10, 2018

Pi-hole in a Docker Container on a Raspberry Pi

Logos Property of Pi-hole & Docker. While I was disappearing down a rabbit hole investigating unbound as a DNS Privacy server, I came across Pi-hole – A black hole for Internet advertisements. I’ve always used uBlock Origin for ad blocking but that is a per client thing which is a bit of a hassle. Pi-hole provides ad blocking for all clients on the network, seamlessly. I just configure DNS on each client, via DHCP, to point towards the Pi-Hole server....

April 23, 2018

Raspberry Pi Docker Container to send all LAN DNS requests to Cloudflare’s 1.1.1.1 DNS over TLS

I wanted to implement this on a Raspberry Pi that I have running Docker. However, I wasn’t able to find an image in Docker Hub for the ARM architecture that the Raspberry Pi uses so I made my own based on the x86-64 image, here. Place the Dockerfile and unbound.conf in the same directory. Docker file: FROM arm32v6/alpine:3.7 EXPOSE 53/udp RUN apk add --update --no-cache -q --progress unbound && \ rm -rf /etc/unbound/unbound....

April 21, 2018

EDUP 802.11n Mini Wi-Fi Adapter Sleeping

I bought some EDUP 802.11 N Mini Wi-Fi Adapters from China. They’re cheap and do a fine job plugged into my Raspberry Pi’s. However, by default, they always go to sleep which makes it difficult to connect to them via ssh etc. To fix this, here’s what I did: To identify the USB WLAN Adapter I did the following: $ lsusb Bus 001 Device 004: ID 0bda:8176 Realtek Semiconductor Corp. RTL8188CUS 802....

March 26, 2018

Deploy Portainer in a Docker Container

Portainer is an Open-Source lightweight Management UI which allows you to easily manage your Docker Hosts or Swarm Clusters Port 9000 of the container is published to the host A 16 megabyte limit is set on the container, in this instance. Data is persisted in a named volume called ‘portainer_data’ docker run -d \ --name portainer \ --restart=unless-stopped \ --memory=16m \ -p 9000:9000 \ -v /var/run/docker.sock:/var/run/docker.sock \ -v portainer_data:/data \ portainer/portainer The container can also be deployed using the more explicit –mount flag which became available for standalone containers in Docker 17....

March 5, 2018

Deploy Watchtower in a Docker Container

Watchtower is an application that will monitor your running Docker containers and watch for changes to the images that those containers were originally started from. If watchtower detects that an image has changed, it will automatically restart the container using the new image. A 16 megabyte limit is set on the container, in this instance. I’ve added a hostname for this container because Watchtower sends emails with the hostname of the Watchtower Docker container in the subject line....

March 5, 2018

Install Docker and Compose on Ubuntu 16.04 LTS

#!/bin/bash apt-get update apt-get install \ apt-transport-https \ ca-certificates \ curl \ software-properties-common curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - add-apt-repository \ "deb [arch=amd64] https://download.docker.com/linux/ubuntu \ $(lsb_release -cs) \ stable" apt-get update apt-get install -y \ docker-ce \ docker-compose If you plan on using the –memory flag when creating containers, you may need to enable memory and swap accounting in the Kernel. Log into the Ubuntu host as a user with sudo privileges....

March 5, 2018

Sonic Pi Coding Class 004

It was agreed to give a small prize to the student who worked the hardest during the class and who also worked the hardest in producing their final piece/s of music based on a brief. I’ve created links here to the more obscure parts of the prize so that the recipient has a starting point to work out what they can be used for! Arduino code for the Ultrasonic Ruler that was worked on in class can be found in my GitHub repository, here....

November 27, 2017

Install pip on OS X via Terminal

sudo easy_install pip QuickTip: How Do I Install pip on macOS or OS X?

November 13, 2017