From 87b4bee5642312b93e6a5ef01bfbfe003165e99e Mon Sep 17 00:00:00 2001
From: Matt Birkholz abbey-
prefix on their names. These roles are applied after
the generic institutional roles (again, documented here).
A Small Institute makes security and privacy top priorities but @@ -64,7 +64,7 @@ map is very similar, with differences mainly in terminology, philosophy, attitude.
-+| = _|||_ @@ -103,8 +103,8 @@ philosophy, attitude.
The abbey's public particulars are included below. They are the
@@ -134,18 +134,18 @@ into private_ex/vars-abbey.yml
.
Birchwood Abbey's front door is a Digital Ocean Droplet configured as A Small Institute Front. Thus it is already serving a public web site with Apache2, spooling email with Postfix and serving it with -Dovecot-IMAPd, and hosting a VPN with OpenVPN. +Dovecot-IMAPd, and hosting a VPN with WireGuardâ¢.
The monks of the abbey are masters of the staff (bo) and Emacs. @@ -160,8 +160,8 @@ The monks of the abbey are masters of the staff (bo) and Emacs.
The abbey uses several additional email aliases. These are the public
@@ -200,8 +200,8 @@ from there, forwarding sysadm
to a real person.
The abbey publishes member Git repositories with git-daemon
. If
@@ -276,7 +276,7 @@ like git-tasks
and git-handlers
.
git-tasks
- name: Install git daemon.
+git-tasks
- name: Install git daemon.
become: yes
apt: pkg=git-daemon-sysvinit
@@ -314,7 +314,7 @@ like git-tasks
and git-handlers
.
git-handlers
+git-handlers
- name: Restart git daemon.
become: yes
command: systemctl restart git-daemon
@@ -322,8 +322,8 @@ like git-tasks
and git-handlers
.
The abbey provides an HTML interface to members' public Git
@@ -350,7 +350,7 @@ lists the repositories found in /var/www/git/
.
apache-gitweb
+apache-gitweb
Alias /gitweb-static/ /usr/share/gitweb/static/
<Directory "/usr/share/gitweb/static/">
Options MultiViews
@@ -408,7 +408,7 @@ web site /favicon.ico
.
-apache-gitweb-tasks
- name: Enable Apache2 rewrite module for Gitweb.
+apache-gitweb-tasks
- name: Enable Apache2 rewrite module for Gitweb.
become: yes
apache2_module: name=rewrite
notify: Restart Apache2.
@@ -445,7 +445,7 @@ web site /favicon.ico
.
-apache-gitweb-handlers
- name: Restart Apache2.
+apache-gitweb-handlers
- name: Restart Apache2.
become: yes
systemd:
service: apache2
@@ -454,8 +454,8 @@ web site /favicon.ico
.
Some of the directives added to the -vhost.conf
file are needed by
@@ -473,7 +473,7 @@ filename suffixes.
apache-abbey
<Directory {{ docroot }}/Abbey/>
+apache-abbey
<Directory {{ docroot }}/Abbey/>
AllowOverride Indexes FileInfo
Options +Indexes +FollowSymLinks
</Directory>
@@ -496,8 +496,8 @@ AddType text/plain private pub public_vpn req rev sample txt yml
Some of the directives added to the -vhost.conf
file map the abbey's
@@ -509,7 +509,7 @@ matching configurations for accurate previews and tests.
apache-photos
+apache-photos
RedirectMatch /Photos$ /Photos/
RedirectMatch /Photos/(20[0-9][0-9])_([0-9][0-9])_([0-9][0-9])$ \
/Photos/$1_$2_$3/
@@ -522,8 +522,8 @@ AliasMatch /Photos/$ {{ docroot }}/Photos/index.html
The abbey needs to add some Apache2 configuration directives to the
@@ -534,11 +534,11 @@ The abbey simply creates a birchwood-abbey.net-vhost.conf
file in
-The following task adds the apache-abbey
, apache-photos
, and
-apache-gitweb
directives described above to the -vhost.conf
file,
+The following task adds the apache-abbey
, apache-photos
, and
+apache-gitweb
directives described above to the -vhost.conf
file,
and includes options-ssl-apache.conf
from /etc/letsencrypt/
. The
rest of the Let's Encrypt configuration is discussed in the following
-Install Let's Encrypt section.
+Install Let's Encrypt section.
These tasks hack Apache's logrotate(8)
configuration to rotate
@@ -701,8 +701,8 @@ encrypting and sending to sendmail
.
The abbey uses a Let's Encrypt certificate to authenticate its public @@ -711,7 +711,7 @@ certificate is a terminal session affair (with prompts and lines entered as shown below).
-+$ sudo apt install python3-certbot-apache $ sudo certbot --apache -d birchwood-abbey.net ... @@ -821,8 +821,8 @@ restarted manually.
The following task arranges to rotate Certbot's logs files. @@ -850,8 +850,8 @@ The following task arranges to rotate Certbot's logs files.
A backup copy of Let's Encrypt's data (/etc/letsencrypt/
) is sent to
@@ -930,8 +930,8 @@ imported into root@front
's GnuPG key file.
Birchwood Abbey's core is a mini-PC (System76 Meerkat) configured as A @@ -941,8 +941,8 @@ with Postfix and Dovecot, and providing essential localnet services: NTP, DNS and DHCP.
In this abbey specific document, most abbey particulars are not
@@ -961,8 +961,8 @@ directory, playbooks/
.
The scripts that maintain the abbey's web site use a number of @@ -980,8 +980,8 @@ The house task list uses JQuery.
The abbey uses several additional email aliases. These are the campus
@@ -1021,13 +1021,13 @@ e.g. mythtv@mythtv.birchwood.private
, locally.)
These tasks are identical to those executed on Front, for similar Git -services on Front and Core. See 3.3 and -Configure Gitweb on Front for more information. +services on Front and Core. See 3.3 and +Configure Gitweb on Front for more information.
The Apache2 configuration on Core specifies three web sites (live,
test, and campus). The live and test sites must operate just like the
-site on Front. Their configurations include the same apache-abbey
,
-apache-photos
, and apache-gitweb
used on Front.
+site on Front. Their configurations include the same apache-abbey
,
+apache-photos
, and apache-gitweb
used on Front.
The institute serves its /usr/share/doc/
on the house (campus) web
site. This is a debugging convenience, making some HTML documentation
more accessible, especially the documentation of software installed on
Core and not on typical desktop clients. Also included: the Apache2
-directives that enable user Git publishing with Gitweb (defined here).
+directives that enable user Git publishing with Gitweb (defined here).
The abbey uses the Apt-Cacher:TNG package cache on Core. The @@ -1138,8 +1138,8 @@ The abbey uses the Apt-Cacher:TNG package cache on Core. The
Core itself will benefit from using the package cache, but should @@ -1163,8 +1163,8 @@ so caching their packages is not a priority.)
A small institute uses nagios4
to monitor the health of its network,
@@ -1178,8 +1178,8 @@ customized check_sensors
plugin (abbey_pisensors
) in
The abbey adds monitoring of the space remaining on the volume at @@ -1215,8 +1215,8 @@ remaining on roots.)
abbey_pisensors
abbey_pisensors
The check_sensors
plugin is included in the package
@@ -1311,8 +1311,8 @@ recognizable temperature in the sensors
output.
The abbey adds monitoring for more servers: Kamino, Kessel, and Ord
@@ -1329,8 +1329,8 @@ Kessel is a wireless host while Kamino is wired. Ord Mantell, the
Raspberry Pi OS (ARM64) machine, uses the abbey_pisensors
monitor.
The IP addresses of all three hosts are nice to use in the NAGIOS @@ -1347,8 +1347,8 @@ ord_mantell_addr: 10.84.138.10
The following task installs each host's NAGIOS configuration. Note @@ -1369,8 +1369,8 @@ rarely powered up.
roles_t/abbey-core/templates/nagios-ord-mantell.cfg
define host {
@@ -1424,8 +1424,8 @@ rarely powered up.
roles_t/abbey-core/templates/nagios-kamino.cfg
define host {
@@ -1479,8 +1479,8 @@ rarely powered up.
roles_t/abbey-core/templates/nagios-kessel.cfg
define host {
@@ -1535,8 +1535,8 @@ rarely powered up.
The abbey is experimenting with Munin. NAGIOS is all about notifying
@@ -1623,8 +1623,8 @@ next task configures libsensors
to ignore them.
The abbey's public web site's access and error logs are emailed
@@ -1678,8 +1678,8 @@ the campus as http://www/analog.html
.
Monkey needs to be in www-data
so that it can run
@@ -1701,8 +1701,8 @@ user cloud accounts, found in files owned by www-data
, files like
Monkey's photo processing scripts use netpbm
commands like
@@ -1718,8 +1718,8 @@ Monkey's photo processing scripts use netpbm
commands like
The abbey core provides NAS (Network Attached Storage) service to the @@ -1797,8 +1797,8 @@ permissions.
Birchwood Abbey's gate is a $110 µPC configured as A Small Institute @@ -1809,8 +1809,8 @@ of its gate, so there is no additional Ansible configuration in this chapter (yet).
The abbey gate's lan
interface is the PC's built-in Ethernet
@@ -1831,8 +1831,8 @@ The MAC address of each interface is set in private/vars.yml
(see
The abbey connects to Starlink via Ethernet, and disables Starlink's @@ -1880,8 +1880,8 @@ at least our local network traffic out of view of our ISPs.
The abbey used to use a cell phone on a USB tether to get Internet
@@ -1926,8 +1926,8 @@ service, using a 60-isp.yaml
file similar to the lines below.
Birchwood Abbey's cloister is a small institute campus. The campus
@@ -1942,7 +1942,7 @@ tasks, namely configuration required on Raspberry Pi OS machines.
Wireless clients are issued keys for the cloister VPN by the ./abbey
client
command which is currently identical to the ./inst client
-command (described in The Client Command). The wireless, cloistered
+command (described in The Client Command). The wireless, cloistered
hosts never roam, are not associated with a member, and so are
"campus" clients, issued keys with commands like this:
The Apt-Cacher:TNG program does not work well on the frontier, so is @@ -1986,13 +1986,13 @@ local host.
Each cloistered host is a small institute campus host and thus is
already running an NRPE server (a NAGIOS Remote Plugin Executor
-server) with a custom inst_sensors
monitor (described in Configure
+server) with a custom inst_sensors
monitor (described in Configure
NRPE of A Small Institute). The abbey adds one complication: yet
another check_sensors
variant, abbey_pisensors
, installed on
Raspberry Pis (architecture aarch64
) only.
@@ -2030,8 +2030,8 @@ Raspberry Pis (architecture aarch64
) only.
Each cloistered host is a Munin node. @@ -2074,8 +2074,8 @@ them.
The monks of the abbey are masters of the staff and Emacs. @@ -2091,8 +2091,8 @@ The monks of the abbey are masters of the staff and Emacs.
Birchwood Abbey now uses Home Assistant to record and display weather @@ -2119,16 +2119,16 @@ entities. These were labeled and organized on an "Abbey" dashboard.
The abbey uses AgentDVR to record video from PoE IP HD security cameras. It is installed and configured as described here.
AgentDVR is installed at the abbey according to the iSpy web site's @@ -2151,8 +2151,8 @@ bash <(curl -s "https://raw.githubusercontent.com/\< preparations.
AgentDVR runs in the abbey as a system user, agentdvr
, which
@@ -2187,8 +2187,8 @@ sudo mv ~/01agentdvr /etc/sudoers.d/
With the above preparations, the system administrator can get a shell @@ -2209,8 +2209,8 @@ Ansible is run again.
When Ansible is run a second time, after the installation script, it @@ -2233,8 +2233,8 @@ sudo rm /etc/sudoers.d/01agentdvr
agentdvr
agentdvr
AgentDVR runs as the system user agentdvr
, which is created here.
@@ -2271,8 +2271,8 @@ AgentDVR runs as the system user agentdvr
, which is created here.
AgentDVR/
AgentDVR/
The following task probes for the /home/agentdvr/AgentDVR/
@@ -2295,8 +2295,8 @@ remaining installation steps are skipped unless
This service definition came from the template downloaded (from here)
@@ -2346,8 +2346,8 @@ by install.sh
.
The abbey uses a separate volume to store surveillance recordings, @@ -2381,11 +2381,11 @@ location do not fail.
-A new security camera is setup as described in Cloistering, after
+A new security camera is setup as described in Cloistering, after
which the camera should be accessible by name on the abbey networks.
Assuming ping -c1 new
works, the camera's web interface will be
accessible at http://new/
.
@@ -2404,8 +2404,8 @@ long duration logs, thus fewer frames per second.
After Ansible has configured and started the AgentDVR service, its web @@ -2442,8 +2442,8 @@ AgentDVR's Live View.
AgentDVR's web interface is also used to configure a default storage @@ -2455,8 +2455,8 @@ pressed before the task is complete.
After a default storage location has been configured, AgentDVR's @@ -2488,8 +2488,8 @@ parameters are set (in the Recording and Storage tabs).
The abbey has a few TV tuners and a subscription to Schedules Direct
@@ -2504,8 +2504,8 @@ interface on the master server. It configures the Apache web server
to serve MythWeb pages at e.g. http://new/mythweb/
.
Neither Debian nor the MythTV project provide binary packages of @@ -2536,19 +2536,19 @@ video source and capture card, after which the backend can be started.
-A new TVR machine needs only Cloistering to prepare it for
+A new TVR machine needs only Cloistering to prepare it for
Ansible. As part of that process, it should be added to the tvrs
group in the hosts
file. An existing server can become a TVR
machine simply by adding it to the tvrs
group.
Private variables in private/vars-abbey.yml
are needed, as in the
@@ -2564,8 +2564,8 @@ directory, playbooks/
.
A number of developer packages are needed to build MythTV. The wiki @@ -2651,8 +2651,8 @@ MythTV is built and installed.
After a successful "first" run of e.g. ./abbey config new
, the
@@ -2700,8 +2700,8 @@ Several of the remaining installation steps are skipped unless
MythTV Backend needs to run as its own user: mythtv
.
@@ -2718,8 +2718,8 @@ MythTV Backend needs to run as its own user: mythtv
.
MythTV's MariaDB database is created by the following task, when the
@@ -2746,8 +2746,8 @@ privileged DB user, the mythconverg
database is created manually
The DB user's password is taken from the mythtv_dbpass
variable,
@@ -2779,8 +2779,8 @@ created above.
The MythTV database and database user are created manually with the @@ -2805,8 +2805,8 @@ exit;
Starting with MythTV version 0.26, the time zone tables must be loaded
@@ -2830,8 +2830,8 @@ e.g. 2022-09-13 20:15:41
.
This task installs the mythtv-backend.service
file.
@@ -2875,8 +2875,8 @@ This task installs the mythtv-backend.service
file.
This task checks PHP's timezone. If unset, MythTV's backend logs @@ -2917,8 +2917,8 @@ bitter complaints.
The backend does not have a default storage area for its recordings. @@ -2942,8 +2942,8 @@ creates that directory and ensures it has appropriate permissions.
With MythTV built and installed, and the post-installation tasks
@@ -2983,12 +2983,12 @@ directory: /home/mythtv/Recordings
.
The abbey has a Silicon Dust Homerun HDTV Duo (with two tuners). It
-is setup as described in Cloistering, after which the tuner is
+is setup as described in Cloistering, after which the tuner is
accessible by name (e.g. new
) on the cloister network. Assuming
ping -c1 new
works, the tuner should be accessible via the
hdhomerun_config_gui
command, a graphical interface contributed to
@@ -2999,8 +2999,8 @@ tuner's domain name or IP address can also be entered.
In MythTV Setup:
@@ -3043,8 +3043,8 @@ any case, do not run mythfilldatabase
.
In MythTV Setup: @@ -3065,8 +3065,8 @@ channels is presented. Delete All unused transports.
The xmltv
package, specifically its tv_grab_zz_sdjson
program, is
@@ -3101,7 +3101,7 @@ the list of "inputs" available in a postal code typically ends with
the OTA (over the air) broadcasts.
+$ tv_grab_zz_sdjson --configure --config-file .mythtv/Mr.Antenna.xml Cache file for lineups, schedules and programs. Cache file: [/home/mythtv/.xmltv/tv_grab_zz_sdjson.cache] @@ -3151,8 +3151,8 @@ backend is running, so it is not run until then.
If the mythfilldatabase
command fails or expected listings do not
@@ -3191,8 +3191,8 @@ Running a similar command (without --quiet
) might be more revealing
The abbey directs MythTV log messages to /var/log/mythtv.log
(and
@@ -3229,8 +3229,8 @@ away from /var/log/syslog
) and rotates the log file.
After configuring with mythtv-setup
as discussed above, start and
@@ -3246,8 +3246,8 @@ sudo -u mythtv mythfilldatabase
MythWeb, like MythTV, is installed from a Git repository. The @@ -3363,14 +3363,14 @@ The following tasks take care of the rest of the installation.
The abbey changes location almost weekly, so its HDTV broadcast area changes frequently. At the start of a long stay the administrator uses the MythTV Setup program to scan for the new area's channels, as -described in Scan for New Channels. +described in Scan for New Channels.
@@ -3388,7 +3388,7 @@ program as user mythtv
.
The program will prompt for the zip code and offer a list of "inputs" -available in that area, as described in Configure XMLTV. +available in that area, as described in Configure XMLTV.
@@ -3411,8 +3411,8 @@ And the mythtv
account can run mythfilldatabase
.
The abbey's Ansible configuration, like that of A Small Institute, is @@ -3439,7 +3439,7 @@ specific versions.
-NOTE: if you have not read at least the Overview of A Small Institute +NOTE: if you have not read at least the Overview of A Small Institute you are lost.
@@ -3469,8 +3469,8 @@ rest are built up piecemeal by (tangled from) this document,README.org, and
Institute/README.org.
ansible.cfg
ansible.cfg
This is much like the example (test) institutional configuration file,
@@ -3487,11 +3487,11 @@ except the roles are found in Institute/roles/
as well as roles/
.
hosts
hosts
playbooks/site.yml
playbooks/site.yml
This playbook provisions the entire network by applying first the @@ -3604,17 +3604,17 @@ institutional roles, then the liturgical roles.
The ./abbey
script encodes the abbey's canonical procedures. It
-includes The Institute Commands and adds a few abbey-specific
+includes The Institute Commands and adds a few abbey-specific
sub-commands.
Institutional sub-commands: @@ -3625,8 +3625,7 @@ Institutional sub-commands:
.ovpn) file for a -member's device.
@@ -3643,8 +3642,8 @@ and _architecture
for all hosts.
The script begins with the following prefix and trampolines.
@@ -3667,7 +3666,7 @@ The script begins with the following prefix and trampolines.
The small institute's ./inst
command expects to be running in
Institute/
, not ./
, but it only references public/
, private/
,
Secret/
and playbooks/check-inst-vars.yml
, and will find the abbey
-specific versions of these. The roles_path
setting in ansible.cfg
+specific versions of these. The roles_path
setting in ansible.cfg
effectively merges the institutional roles into the distinctly named
abbey specific roles. The roles likewise reference files with
relative names, and will find the abbey specific private/
@@ -3686,8 +3685,8 @@ code block "duplicates" the action of the institute's
The script implements an upgrade
sub-command that runs apt update
@@ -3752,8 +3751,8 @@ a limit pattern. For example:
The script implements a reboots
sub-command that looks for
@@ -3784,8 +3783,8 @@ The script implements a reboots
sub-command that looks for
The script implements a versions
sub-command that reports the
@@ -3812,8 +3811,8 @@ operating system version of all abbey managed machines.
The abbey changes location almost weekly, so its timezone changes @@ -3911,8 +3910,8 @@ last host in the previous play.
abbey
my $ops = "config,new,old,pass,client,upgrade,reboots,versions,tz";
@@ -3922,8 +3921,8 @@ last host in the previous play.
This is how a new machine is brought into the cloister. The process @@ -3932,13 +3931,13 @@ narrows down to the common preparation of all machines administered by Ansible.
A wireless IoT device (smart TV, Blu-ray deck, etc.) cannot install -Debian nor even an OpenVPN app from F-Droid. And it shouldn't. As an -untrustworthy bit of kit, it should have no access to the cloister, +Debian nor even the WireGuard⢠For Android app. And it shouldn't. As +an untrustworthy bit of kit, it should have no access to the cloister, merely the Internet. It need not appear in the Ansible inventory.
@@ -3949,8 +3948,8 @@ given a private domain name as described in the following steps.@@ -3960,12 +3959,12 @@ last step:
The abbey's Raspberry Pi runs the Raspberry Pi OS desktop off an @@ -3984,8 +3983,8 @@ Ethernet, and power up.
sysadm
on the console.sudo raspi-config
and use the following menu items.
@@ -4004,14 +4003,14 @@ steps are taken.
Most of the abbey's machines, like Core and Gate, are general-purpose @@ -4031,18 +4030,18 @@ Ethernet, and power up. Choose to boot from the USB drive.
sysadm
on the console.Install OpenSSH. Plain Debian does not come with OpenSSH installed.
sudo apt install openssh-server
@@ -4051,14 +4050,14 @@ steps are taken.
When a new machine is connected to the cloister Ethernet, its MAC
@@ -4119,12 +4118,12 @@ reporting 1 packets transmitted, 1 received, 0% packet loss...
.
A wired device is assigned an IP address when it is added to Core's
-DHCP configuration (as in Add to Core DHCP). A private domain name is
+DHCP configuration (as in Add to Core DHCP). A private domain name is
then associated with this address. If the device is intended to
operate wirelessly, the name for its address is modified with a -w
suffix. Thus new-w.small.private
would be the name of the new
@@ -4167,8 +4166,8 @@ resolvectl query 192.168.56.4
sysadm
on the console.
To remotely administer new-w
, Ansible must be authorized to login as
@@ -4226,11 +4225,11 @@ key.
-With remote administration authorized and tested (as in Authorize
+With remote administration authorized and tested (as in Authorize
Remote Administration), and the machine connected to the cloister
Ethernet, the configuration of new-w
can be completed by Ansible.
Note that if the machine is staying on the cloister Ethernet, its
@@ -4238,7 +4237,7 @@ domain name will be new
(having had no -w
suffix added
-First new-w
is added to Ansible's inventory in hosts
. A new-w
+First new-w
is added to Ansible's inventory in hosts
. A new-w
section is added to the list of all hosts, and an empty section of the
same name is added to the list of campus
hosts. If the machine uses
the usual privileged account name, sysadm
, the ansible_user
key in
@@ -4286,8 +4285,8 @@ configuration files.
On an IoT device, or a Debian or Android "desktop", the cloister Wi-Fi
@@ -4328,8 +4327,8 @@ desktop connected to the Wi-Fi using the following ping
command.
Wireless devices (with the cloister Wi-Fi password) can get an IP @@ -4341,173 +4340,192 @@ however, are not accessible except via the cloister VPN.
-Connections to the cloister VPN are authorized by OpenVPN
-configuration (.ovpn
) files generated by the ./abbey client...
-command (aka The Client Command). These are secret files, kept
-readable only by their owners and are deleted after use. They are
-copied to new OpenVPN clients using secure (ssh
) connections.
+Connections to the cloister VPN are authorized by the ./abbey
+client...
command (aka The Client Command), which registers a new
+client's public key and installs new WireGuard⢠configurations on the
+servers. Private keys are kept on the clients (e.g. in
+/etc/wireguard/private-key
).
-Wireless Debian servers (without NetworkManager) are connected to the
-cloister VPN via the following process.
+Wireless Debian desktops (with NetworkManager) as well as servers
+(without NetworkManager) are configured to automatically connect to
+the cloister Wi-Fi and VPN, and so can be used much like a wired
+desktop machine. They are typically connected to a large TV and
+auto-login to an unprivileged account named house
, i.e. anyone in
+the house. Our campus desktops include an 8GB Core i3 NUC (Intel®'s
+Next Unit of Computing) and an 8GB Raspberry Pi 4 with SSD storage
+running Pop!_OS and Raspberry Pi OS desktops, respectively. They are
+authorized to connect to the campus VPN via the following process.
campus.ovpnfile to the new machine.
openvpn-systemd-resolved
package.campus.ovpnto
/etc/openvpn/cloister.conf.
ping -c1 core
.
+The administrator first creates a wifi
file like the following
+(in which the wireless network device is named wlan0
).
+
auto wlan0
+iface wlan0 inet dhcp
+ wpa-ssid "Birchwood Abbey"
+ wpa-psk "PASSWORD"
+
+-And these are the commands: +
+Then the wifi
file is installed and the network interface
+brought up.
sudo cp wifi /etc/network/interfaces.d/
+sudo ifup wlan0
+
++Next, the administrator generates a pair of WireGuard⢠keys. +
./abbey client campus new
-scp campus.ovpn sysadm@new-w:
-ssh sysadm@new-w
-sudo apt install openvpn-systemd-resolved
-sudo cp campus.ovpn /etc/openvpn/cloister.conf
-sudo systemctl start openvpn@cloister
-systemctl status openvpn@cloister
-ping -c1 core
-sudo systemctl enable openvpn@cloister
-rm campus.ovpn
-logout
-rm campus.ovpn
+sudo apt install wireguard
+wg genkey | sudo tee /etc/wireguard/private-key >/dev/null
+sudo cat /etc/wireguard/private-key | wg pubkey >server.pub
-
-It may be necessary to reboot before the final tests. +
+The client's name and public key are then registered via the
+./abbey client
command, and the resulting details are copied to
+the client.
scp sysadm@new-w:server.pub ./
+./abbey client campus new `cat server.pub`
+scp campus.conf sysadm@new-w:
+
+
+The details are copied to /etc/wireguard/wg0.conf
on the client
+and the service started.
+
sudo cp campus.conf /etc/wireguard/wg0.conf
+sudo systemctl start wg-quick@wg0
+systemctl status wg-quick@wg0
+
++Finally the connection to the VPN is tested and, if OK, is +"enabled" (to start at boot time). +
+ping -c1 core
+sudo wg show
+sudo systemctl enable wg-quick@wg0
+
+-Wireless Debian desktops (with NetworkManager) include our 8GB Core i3 -NUC (Intel®'s Next Unit of Computing) and our 8GB Raspberry Pi 4. -They run the Pop!_OS and Raspberry Pi OS desktops respectively. They -are connected to the cloister VPN via the following process. +Member notebooks are private machines not remotely administered by the +abbey. These machines roam, and so are authorized to connect both to +the cloister VPN or to the public VPN. They are authorized to do so +via the following process.
campus.ovpnfile.
-Create a wifi
file that looks like this (assuming the wireless
-network device is named wlan0
).
+The owner thus begins by generating a pair of WireGuard⢠keys on
+the client, sending the public key to the administrator.
sudo apt install wireguard
+wg genkey | sudo tee /etc/wireguard/private-key >/dev/null
+sudo cat /etc/wireguard/private-key | wg pubkey >dick.pub
+( echo "Subject: new client named dick"
+ echo
+ cat dick.pub ) | sendmail sysadm@small.example.org
+
+-auto wlan0 -iface wlan0 inet dhcp - wpa-ssid "Birchwood Abbey" - wpa-psk "PASSWORD" -- -
wifiand
campus.ovpnfiles to the new machine.
openvpn-systemd-resolved
package.wifito
/etc/network/interfaces.d/.
campus.ovpnto
/etc/openvpn/cloister.conf.
ping -c1 core
.
+The administrator runs the ./abbey client
command and replies
+with the generated configurations.
+
./abbey client debian dick dick `cat dick.pub`
+( echo "Subject: dick now authorized"
+ echo
+ cat campus.conf
+ echo --------
+ cat public.conf
+ ) | sendmail dick
+
+-And these are the commands: +
+The owner saves the configuration details in campus.conf
and
+public.conf
, then installs them and starts the campus VPN
+service.
sudo cp campus.conf /etc/wireguard/wg0.conf
+sudo vp public.conf /etc/wireguard/wg1.conf
+sudo systemctl start wg-quick@wg0
+systemctl status wg-quick@wg0
+
++Finally the owner checks that the client has successfully +connected to the campus VPN and, if it has, enables the service. +
./abbey client campus new
-scp wifi campus.ovpn sysadm@new-w:
-ssh sysadm@new-w
-sudo apt install openvpn-systemd-resolved
-sudo cp wifi /etc/network/interfaces.d/
-sudo ifup wlan0
-sudo cp campus.ovpn /etc/openvpn/cloister.conf
-sudo systemctl start openvpn@cloister
-systemctl status openvpn@cloister
+systemctl status wg-quick@wg0
ping -c1 core
-sudo systemctl enable openvpn@cloister
-rm wifi campus.ovpn
-logout
-rm wifi campus.ovpn
+sudo systemctl enable wg-quick@wg0
-
-It may be necessary to reboot before the final tests. +The owner will want to test the public VPN connection as well by +taking the Debian desktop off the campus Wi-Fi and getting it Internet +access some other way (perhaps tethered to a cell phone). Then the +following commands will switch to the public VPN and test it.
-
-As configured above, the wireless Debian desktops make automatic,
-persistent connections to the cloister Wi-Fi and VPN, and so can be
-used much like a wired desktop machine. They are typically connected
-to a large TV and auto-login to an unprivileged account named house
,
-i.e. anyone in the house.
-
sudo systemctl stop wg-quick@wg0
+sudo systemctl start wg-quick@wg1
+ping -c1 core
+
-Member notebooks are private machines not remotely administered by the -abbey. These machines roam, and so are authorized to connect to the -cloister VPN or the public VPN. This is how they are connected to the -VPNs: -
- -campus.ovpnand
public.ovnpfiles.
campus.ovpnand
public.ovpnfiles to the new machine.
openvpn-systemd-resolved
and
-network-manager-openvpn-gnome
packages.~/campus.ovpn.
~/public.ovpnfile.
ping -c1 core
.~/campus.ovpnand -
~/public.ovpnfiles.
-We assume the desktop is running NetworkManager, which is the case in
-all our Debian desktops from Pop!_OS and Ubuntu to Mint and Raspberry
-Pi OS.
+This leaves wg-quick@wg0
enabled. The campus VPN is re-connected if
+the machine reboots.
Note that a new member's notebook does not need to be patched to the
cloister Ethernet nor connected to the cloister Wi-Fi. It can be
-authorized "remotely" simply by copying the .ovpn
files securely,
-e.g. using ssh
to any "known host" on the Internet.
+authorized "remotely" simply by copying the .conf
text files to the
+machine by whatever means is available.
@@ -4529,61 +4547,55 @@ password is included in Secret/become.yml
.
-Android phones and tablets are connected to the cloister VPN via the
-following process. Note that they do not appear in the set of
-campus
hosts, are not configured by Ansible, and do not appear in
-the host inventory.
+Android phones and tablets are authorized to connect to the cloister
+and public VPNs via the following process. Note that they do not
+appear in the set of campus
hosts, are not configured by Ansible,
+and do not appear in the host inventory.
campus.ovpnand
public.ovpnfiles to a USB drive.
campus.ovpnfile. The file should be opened with -the OpenVPN app, which will appear to ask for confirmation before -creating the new VPN.
public.ovpnfile and create a second VPN.
-The .ovpn
files must be transferred to the Android via a secure
-medium: the scp
command, a USB drive, a cloud download, or perhaps
-an encrypted email. In the following commands, the files are copied
-to a USB drive labeled Transfers
. After insertion into the Android,
-its "storage" is viewed with the Files app, which should launch
-OpenVPN when a .ovpn
file is opened.
+
+The administrator runs the ./abbey client
command and replies
+with the generated configurations.
./abbey client android dicks-tablet dick
-cp campus.ovpn public.ovpn /media/sysadm/Transfers/
-rm campus.ovpn public.ovpn
+./abbey client android dicks-razr dick <client public key>
+( echo "Subject: dicks-razr now authorized"
+ echo
+ cat campus.conf
+ echo --------
+ cat public.conf
+ ) | sendmail owner
+
A wireless machine is assigned a Wi-Fi address when it connects to the
-cloister Wi-Fi, and a "VPN address" when it connects to Gate's OpenVPN
-server. The VPN address can be discovered by running ip addr show
-dev ovpn
on the machine, or inspecting /etc/openvpn/ipp.txt
on
-Gate. Once discovered, a private domain name,
-e.g. new.small.private
, can be associated with the VPN address, e.g
-10.84.138.7
. The administrator adds a line like the following to
-private/db.domain
and increments the serial number at the top of the
-file.
+cloister Wi-Fi, and a host number when it is registered. Given the
+host number (e.g. 7), a private domain name
+(e.g. new.small.private
) can be associated with that host number on
+the cloister VPN subnet, e.g 10.84.138.7
. The administrator adds a
+line like the following to private/db.domain
and increments the
+serial number at the top of the file.
-A wireless device with no Ethernet interface and unable to run OpenVPN
-gets just a Wi-Fi address. It can be given a private domain name
-(e.g. new.small.private
) associated with the Wi-Fi address
-(e.g. 192.168.10.225
), but a reverse lookup on a machine connected
-to the Wi-Fi may yield a name like new.lan
(provided by the access
-point) while elsewhere (e.g. on the cloister Ethernet) the IP address
-will not resolve at all. (There is no "reverse mapping" to be added
-to private/db.campus_vpn
.)
+A wireless device with no Ethernet interface and unable to run
+WireGuard⢠gets just a Wi-Fi address. It can be given a private
+domain name (e.g. thing.small.private
) associated with its Wi-Fi
+address (e.g. 192.168.10.225
), but a reverse lookup on a machine
+connected to the Wi-Fi may yield a name like thing.lan
(provided by
+the access point) while elsewhere (e.g. on the cloister Ethernet) the
+IP address will not resolve at all. (There is no "reverse mapping" to
+be added to private/db.campus_vpn
.)
private/db.campus_vpn.)