As more traditional daily home work kicked in, I recently started to use a Chromebook and a Windows desktop so the Raspberry Pi 4 has lost its place on my desk. In order to keep all my Linux hosts updated with ansible apt even on the go, I installed ZeroTier on all my Linux hosts. To use hostnames instead of IP address in my ZeroTier network I maintain local DNS entries in .zt domain on my pi.hole running on my good old Raspberry Pi 1b. In order to use this DNS server on Crostini for .zt domain I installed dnsmasq on it and configured the IP address of Raspberry Pi 1b on the ZeroTier network as follows:
jordana@penguin:~$ sudo nano /etc/dnsmasq.conf
server=/zt/192.168.193.1
To make sure this is used every time Crostini boots I uncommented this line from dhclient:
jordana@penguin:~$ sudo nano /etc/dhcp/dhclient.conf
prepend domain-name-servers 127.0.0.1;
To access admin interface on pi.hole I installed Firefox ESR from apt on Crostini as the integration into the desktop is amazing. Installing RealVNC Viewer was also reasonably straightforward on Chromebook. After downloading the deb package an Install with Linux has popped up for right-click in the Files application. This makes signing into RealVNC with the servers running on all my Raspberry Pi somewhat redundant and the limit of 5 computers coming with RealVNC Home license easily expandable.
UPDATE
Finally I moved away from double administration of names by using zeronsd based on this quick guide:
As I have only found x86/amd64 releases in the official repo I have used a t2.micro on AWS for this service as it is eligible in the Free Tier.
Please note that in order for dnsmasq and zeronsd to coexist on this AWS machine we need the following configurations:
admin@ip-172-31-8-100:~$ sudo nano /etc/dhcp/dhclient.confprepend domain-name-servers 127.0.0.1;
admin@ip-172-31-8-100:~$ sudo nano /etc/dnsmasq.conf
server=/zeronsd/192.168.193.10
interface=lo
bind-interfaces
Please note that such configuration achieves per interface DNS setting. This is what zerotier-systemd-manager from the above ZeroNSD quick install suppose to do but usually fails due to most hosts are not using systemd-networkd and resolvconf for all other interfaces. Hence the installation of zerotier-systemd-manager can be skipped from the above quick guide with such configuration.
UPDATE 2
It turned out that after one year AWS charges even for a t2.micro so I moved zeronsd to my chromebook as I only use it for ansible. While this is not ideal as my chromebook is sleeping most of the time, I could not compile zeronsd on my good old Raspberry Pi 1b whatever I tried. I was so desparate that I tried tailscale instead and with that Magic DNS works out of the platform without the need to install extra components. This made me thinking hard about migrating to tailscale which BTW available on my Synology NAS Package Center and installed on latest quadra image by default.
UPDATE 3
Just for the record it realised that tailscale free plan limits the number of subnets to one while Zerotier poses no limit on subnets only on 25 nodes in its free plan so I stick to Zerotier.
UPDATE 4
On Coronation Day 6 May 2023, I have successfully built latest zeronsd 0.5.2 from git on Raspberry Pi 4 running Raspberry Pi OS 64 bit using the latest cargo 1.69.0 with these 3 commands:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
sudo apt install librust-openssl-dev
cargo install --git https://github.com/zerotier/zeronsd --branch main
Unfortunately with default config zeronsd service could start successfully at first attempt because could not reach my.zerotier.com. I had to add a longer restart timeout to come up properly.
jordana@pi4g:~ $ sudo nano /lib/systemd/system/zeronsd-xxxxxxxxxxxxxxxxx.service
[Service]
RestartSec=10
UPDATE 5
Finally I could successfully build on Raspberry Pi 1 Model B with 512M RAM by increasing swap memory to 512M based on this article:
https://pimylifeup.com/raspberry-pi-swap-file/
Not sure if this is needed but I also added install option to run only 1 job at a time:
cargo install --git https://github.com/zerotier/zeronsd --branch main --jobs 1
Please note the install takes nearly 10 hours on an otherwise quite system so plan carefully ahead.
As it turned out there is no need for changing the swap size in case Raspberry Pi OS lite is used.
UPDATE 6
In order to run pi-hole with zeronsd on the same host you have to limit pi-hole to bind on physical interface only.
UPDATE 7
As this post is originally started off due to me moving to ARM based Chromebook let me keep here a link for Raspberry Pi Imager that can be installed on it.
No comments:
Post a Comment