From 48b655d70899a9e91a401ee8d34912fcfca5cedc Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sun, 22 Jun 2025 23:04:03 +0300 Subject: Update content for gemtext --- gemfeed/atom.xml | 2964 +++++++++++++++++++++++++++--------------------------- 1 file changed, 1482 insertions(+), 1482 deletions(-) (limited to 'gemfeed') diff --git a/gemfeed/atom.xml b/gemfeed/atom.xml index f8ba70f4..f1d42901 100644 --- a/gemfeed/atom.xml +++ b/gemfeed/atom.xml @@ -1,6 +1,6 @@ - 2025-06-22T22:34:04+03:00 + 2025-06-22T23:02:51+03:00 foo.zone feed To be in the .zone! @@ -390,14 +390,14 @@ by Lorenzo Bettini http://www.lorenzobettini.it http://www.gnu.org/software/src-highlite --> -
paul@f0:~ % doas freebsd-update fetch
-paul@f0:~ % doas freebsd-update install
-paul@f0:~ % doas shutdown -r now
-..
-..
-paul@f0:~ % doas pkg update
-paul@f0:~ % doas pkg upgrade
-paul@f0:~ % reboot
+
paul@f0:~ % doas freebsd-update fetch
+paul@f0:~ % doas freebsd-update install
+paul@f0:~ % doas shutdown -r now
+..
+..
+paul@f0:~ % doas pkg update
+paul@f0:~ % doas pkg upgrade
+paul@f0:~ % reboot
 

Next, we install wireguard-tools and configure the WireGuard service:
@@ -406,19 +406,19 @@ http://www.gnu.org/software/src-highlite --> by Lorenzo Bettini http://www.lorenzobettini.it http://www.gnu.org/software/src-highlite --> -
paul@f0:~ % doas pkg install wireguard-tools
-paul@f0:~ % doas sysrc wireguard_interfaces=wg0
-wireguard_interfaces:  -> wg0
-paul@f0:~ % doas sysrc wireguard_enable=YES
-wireguard_enable:  -> YES
-paul@f0:~ % doas mkdir -p /usr/local/etc/wireguard
-paul@f0:~ % doas touch /usr/local/etc/wireguard/wg0.conf
-paul@f0:~ % doas service wireguard start
-paul@f0:~ % doas wg show
-interface: wg0
-  public key: L+V9o0fNYkMVKNqsX7spBzD/9oSvxM/C7ZCZX1jLO3Q=
-  private key: (hidden)
-  listening port: 20246
+
paul@f0:~ % doas pkg install wireguard-tools
+paul@f0:~ % doas sysrc wireguard_interfaces=wg0
+wireguard_interfaces:  -> wg0
+paul@f0:~ % doas sysrc wireguard_enable=YES
+wireguard_enable:  -> YES
+paul@f0:~ % doas mkdir -p /usr/local/etc/wireguard
+paul@f0:~ % doas touch /usr/local/etc/wireguard/wg0.conf
+paul@f0:~ % doas service wireguard start
+paul@f0:~ % doas wg show
+interface: wg0
+  public key: L+V9o0fNYkMVKNqsX7spBzD/9oSvxM/C7ZCZX1jLO3Q=
+  private key: (hidden)
+  listening port: 20246
 

We now have the WireGuard up and running, but it is not yet in any functional configuration. We will come back to that later.
@@ -429,23 +429,23 @@ http://www.gnu.org/software/src-highlite --> by Lorenzo Bettini http://www.lorenzobettini.it http://www.gnu.org/software/src-highlite --> -
paul@f0:~ % cat <<END | doas tee -a /etc/hosts
+
paul@f0:~ % cat <<END | doas tee -a /etc/hosts
 
-192.168.1.120 r0 r0.lan r0.lan.buetow.org
-192.168.1.121 r1 r1.lan r1.lan.buetow.org
-192.168.1.122 r2 r2.lan r2.lan.buetow.org
+192.168.1.120 r0 r0.lan r0.lan.buetow.org
+192.168.1.121 r1 r1.lan r1.lan.buetow.org
+192.168.1.122 r2 r2.lan r2.lan.buetow.org
 
-192.168.2.130 f0.wg0 f0.wg0.wan.buetow.org
-192.168.2.131 f1.wg0 f1.wg0.wan.buetow.org
-192.168.2.132 f2.wg0 f2.wg0.wan.buetow.org
+192.168.2.130 f0.wg0 f0.wg0.wan.buetow.org
+192.168.2.131 f1.wg0 f1.wg0.wan.buetow.org
+192.168.2.132 f2.wg0 f2.wg0.wan.buetow.org
 
-192.168.2.120 r0.wg0 r0.wg0.wan.buetow.org
-192.168.2.121 r1.wg0 r1.wg0.wan.buetow.org
-192.168.2.122 r2.wg0 r2.wg0.wan.buetow.org
+192.168.2.120 r0.wg0 r0.wg0.wan.buetow.org
+192.168.2.121 r1.wg0 r1.wg0.wan.buetow.org
+192.168.2.122 r2.wg0 r2.wg0.wan.buetow.org
 
-192.168.2.110 blowfish.wg0 blowfish.wg0.wan.buetow.org
-192.168.2.111 fishfinger.wg0 fishfinger.wg0.wan.buetow.org
-END
+192.168.2.110 blowfish.wg0 blowfish.wg0.wan.buetow.org
+192.168.2.111 fishfinger.wg0 fishfinger.wg0.wan.buetow.org
+END
 

As you can see, 192.168.1.0/24 is the network used in my LAN (with the fN and rN hosts) and 192.168.2.0/24 is the network used for the WireGuard mesh network. The wg0 interface will be used for all WireGuard traffic.
@@ -458,8 +458,8 @@ http://www.gnu.org/software/src-highlite --> by Lorenzo Bettini http://www.lorenzobettini.it http://www.gnu.org/software/src-highlite --> -
[root@r0 ~] dnf update -y
-[root@r0 ~] reboot
+
[root@r0 ~] dnf update -y
+[root@r0 ~] reboot
 

Next, we prepare WireGuard on them. Same as on the FreeBSD hosts, we will only prepare WireGuard without any useful configuration yet:
@@ -468,12 +468,12 @@ http://www.gnu.org/software/src-highlite --> by Lorenzo Bettini http://www.lorenzobettini.it http://www.gnu.org/software/src-highlite --> -
[root@r0 ~] dnf install -y wireguard-tools
-[root@r0 ~] mkdir -p /etc/wireguard
-[root@r0 ~] touch /etc/wireguard/wg0.conf
-[root@r0 ~] systemctl enable wg-quick@wg0.service
-[root@r0 ~] systemctl start wg-quick@wg0.service
-[root@r0 ~] systemctl disable firewalld
+
[root@r0 ~] dnf install -y wireguard-tools
+[root@r0 ~] mkdir -p /etc/wireguard
+[root@r0 ~] touch /etc/wireguard/wg0.conf
+[root@r0 ~] systemctl enable wg-quick@wg0.service
+[root@r0 ~] systemctl start wg-quick@wg0.service
+[root@r0 ~] systemctl disable firewalld
 

We also update the hosts file accordingly:
@@ -482,23 +482,23 @@ http://www.gnu.org/software/src-highlite --> by Lorenzo Bettini http://www.lorenzobettini.it http://www.gnu.org/software/src-highlite --> -
[root@r0 ~] cat <<END >>/etc/hosts
+
[root@r0 ~] cat <<END >>/etc/hosts
 
-192.168.1.130 f0 f0.lan f0.lan.buetow.org
-192.168.1.131 f1 f1.lan f1.lan.buetow.org
-192.168.1.132 f2 f2.lan f2.lan.buetow.org
+192.168.1.130 f0 f0.lan f0.lan.buetow.org
+192.168.1.131 f1 f1.lan f1.lan.buetow.org
+192.168.1.132 f2 f2.lan f2.lan.buetow.org
 
-192.168.2.130 f0.wg0 f0.wg0.wan.buetow.org
-192.168.2.131 f1.wg0 f1.wg0.wan.buetow.org
-192.168.2.132 f2.wg0 f2.wg0.wan.buetow.org
+192.168.2.130 f0.wg0 f0.wg0.wan.buetow.org
+192.168.2.131 f1.wg0 f1.wg0.wan.buetow.org
+192.168.2.132 f2.wg0 f2.wg0.wan.buetow.org
 
-192.168.2.120 r0.wg0 r0.wg0.wan.buetow.org
-192.168.2.121 r1.wg0 r1.wg0.wan.buetow.org
-192.168.2.122 r2.wg0 r2.wg0.wan.buetow.org
+192.168.2.120 r0.wg0 r0.wg0.wan.buetow.org
+192.168.2.121 r1.wg0 r1.wg0.wan.buetow.org
+192.168.2.122 r2.wg0 r2.wg0.wan.buetow.org
 
-192.168.2.110 blowfish.wg0 blowfish.wg0.wan.buetow.org
-192.168.2.111 fishfinger.wg0 fishfinger.wg0.wan.buetow.org
-END
+192.168.2.110 blowfish.wg0 blowfish.wg0.wan.buetow.org
+192.168.2.111 fishfinger.wg0 fishfinger.wg0.wan.buetow.org
+END
 

Unfortunately, the SELinux policy on Rocky Linux blocks WireGuard's operation. By making the wireguard_t domain permissive using semanage permissive -a wireguard_t, SELinux will no longer enforce restrictions for WireGuard, allowing it to work as intended:
@@ -507,9 +507,9 @@ http://www.gnu.org/software/src-highlite --> by Lorenzo Bettini http://www.lorenzobettini.it http://www.gnu.org/software/src-highlite --> -
[root@r0 ~] dnf install -y policycoreutils-python-utils
-[root@r0 ~] semanage permissive -a wireguard_t
-[root@r0 ~] reboot
+
[root@r0 ~] dnf install -y policycoreutils-python-utils
+[root@r0 ~] semanage permissive -a wireguard_t
+[root@r0 ~] reboot
 

https://github.com/angristan/wireguard-install/discussions/499
@@ -522,14 +522,14 @@ http://www.gnu.org/software/src-highlite --> by Lorenzo Bettini http://www.lorenzobettini.it http://www.gnu.org/software/src-highlite --> -
blowfish$ doas pkg_add wireguard-tools
-blowfish$ doas mkdir /etc/wireguard
-blowfish$ doas touch /etc/wireguard/wg0.conf
-blowsish$ cat <<END | doas tee /etc/hostname.wg0
-inet 192.168.2.110 255.255.255.0 NONE
-up
-!/usr/local/bin/wg setconf wg0 /etc/wireguard/wg0.conf
-END
+
blowfish$ doas pkg_add wireguard-tools
+blowfish$ doas mkdir /etc/wireguard
+blowfish$ doas touch /etc/wireguard/wg0.conf
+blowsish$ cat <<END | doas tee /etc/hostname.wg0
+inet 192.168.2.110 255.255.255.0 NONE
+up
+!/usr/local/bin/wg setconf wg0 /etc/wireguard/wg0.conf
+END
 

Note that on blowfish, we configure 192.168.2.110 here in the hostname.wg, and on fishfinger, we configure 192.168.2.111. Those are the IP addresses of the WireGuard interfaces on those hosts.
@@ -540,19 +540,19 @@ http://www.gnu.org/software/src-highlite --> by Lorenzo Bettini http://www.lorenzobettini.it http://www.gnu.org/software/src-highlite --> -
blowfish$ cat <<END | doas tee -a /etc/hosts
+
blowfish$ cat <<END | doas tee -a /etc/hosts
 
-192.168.2.130 f0.wg0 f0.wg0.wan.buetow.org
-192.168.2.131 f1.wg0 f1.wg0.wan.buetow.org
-192.168.2.132 f2.wg0 f2.wg0.wan.buetow.org
+192.168.2.130 f0.wg0 f0.wg0.wan.buetow.org
+192.168.2.131 f1.wg0 f1.wg0.wan.buetow.org
+192.168.2.132 f2.wg0 f2.wg0.wan.buetow.org
 
-192.168.2.120 r0.wg0 r0.wg0.wan.buetow.org
-192.168.2.121 r1.wg0 r1.wg0.wan.buetow.org
-192.168.2.122 r2.wg0 r2.wg0.wan.buetow.org
+192.168.2.120 r0.wg0 r0.wg0.wan.buetow.org
+192.168.2.121 r1.wg0 r1.wg0.wan.buetow.org
+192.168.2.122 r2.wg0 r2.wg0.wan.buetow.org
 
-192.168.2.110 blowfish.wg0 blowfish.wg0.wan.buetow.org
-192.168.2.111 fishfinger.wg0 fishfinger.wg0.wan.buetow.org
-END
+192.168.2.110 blowfish.wg0 blowfish.wg0.wan.buetow.org
+192.168.2.111 fishfinger.wg0 fishfinger.wg0.wan.buetow.org
+END
 

WireGuard configuration


@@ -677,10 +677,10 @@ PersistentKeepalive = 25 by Lorenzo Bettini http://www.lorenzobettini.it http://www.gnu.org/software/src-highlite --> -
> git clone https://codeberg.org/snonux/wireguardmeshgenerator
-> cd ./wireguardmeshgenerator
-> bundle install
-> sudo dnf install -y wireguard-tools
+
> git clone https://codeberg.org/snonux/wireguardmeshgenerator
+> cd ./wireguardmeshgenerator
+> bundle install
+> sudo dnf install -y wireguard-tools
 

This assumes that Ruby and the bundler gem are already installed. If not, refer to the docs of your distribution.
@@ -816,39 +816,39 @@ hosts: by Lorenzo Bettini http://www.lorenzobettini.it http://www.gnu.org/software/src-highlite --> -
begin
-  options = { hosts: [] }
-  OptionParser.new do |opts|
-    opts.banner = 'Usage: wireguardmeshgenerator.rb [options]'
-    opts.on('--generate', 'Generate Wireguard configs') do
-      options[:generate] = true
-    end
-    opts.on('--install', 'Install Wireguard configs') do
-      options[:install] = true
-    end
-    opts.on('--clean', 'Clean Wireguard configs') do
-      options[:clean] = true
-    end
-    opts.on('--hosts=HOSTS', 'Comma separated hosts to configure') do |hosts|
-      options[:hosts] = hosts.split(',')
-    end
-  end.parse!
-
-  conf = YAML.load_file('wireguardmeshgenerator.yaml').freeze
-  conf['hosts'].keys.select { options[:hosts].empty? || options[:hosts].include?(_1) }
-               .each do |host|
-    # Generate Wireguard configuration for the host reload!
-    WireguardConfig.new(host, conf['hosts']).generate! if options[:generate]
-    # Install Wireguard configuration for the host.
-    InstallConfig.new(host, conf['hosts']).upload!.install!.reload! if options[:install]
-    # Clean Wireguard configuration for the host.
-    WireguardConfig.new(host, conf['hosts']).clean! if options[:clean]
-  end
-rescue StandardError => e
-  puts "Error: #{e.message}"
-  puts e.backtrace.join("\n")
-  exit 2
-end
+
begin
+  options = { hosts: [] }
+  OptionParser.new do |opts|
+    opts.banner = 'Usage: wireguardmeshgenerator.rb [options]'
+    opts.on('--generate', 'Generate Wireguard configs') do
+      options[:generate] = true
+    end
+    opts.on('--install', 'Install Wireguard configs') do
+      options[:install] = true
+    end
+    opts.on('--clean', 'Clean Wireguard configs') do
+      options[:clean] = true
+    end
+    opts.on('--hosts=HOSTS', 'Comma separated hosts to configure') do |hosts|
+      options[:hosts] = hosts.split(',')
+    end
+  end.parse!
+
+  conf = YAML.load_file('wireguardmeshgenerator.yaml').freeze
+  conf['hosts'].keys.select { options[:hosts].empty? || options[:hosts].include?(_1) }
+               .each do |host|
+    # Generate Wireguard configuration for the host reload!
+    WireguardConfig.new(host, conf['hosts']).generate! if options[:generate]
+    # Install Wireguard configuration for the host