From 3613219f24397a48ca8b0ef3fb31bd893889e185 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Mon, 23 Jun 2025 07:55:29 +0300 Subject: Update content for gemtext --- gemfeed/atom.xml | 2972 +++++++++++++++++++++++++++--------------------------- 1 file changed, 1486 insertions(+), 1486 deletions(-) (limited to 'gemfeed') diff --git a/gemfeed/atom.xml b/gemfeed/atom.xml index dc5b32eb..65d4da0f 100644 --- a/gemfeed/atom.xml +++ b/gemfeed/atom.xml @@ -1,6 +1,6 @@ - 2025-06-23T01:00:42+03:00 + 2025-06-23T07:54:22+03:00 foo.zone feed To be in the .zone! @@ -387,14 +387,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:
@@ -403,19 +403,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.
@@ -426,23 +426,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.
@@ -455,8 +455,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:
@@ -465,12 +465,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:
@@ -479,23 +479,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:
@@ -504,9 +504,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
@@ -519,14 +519,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.
@@ -537,19 +537,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


@@ -674,10 +674,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.
@@ -813,39 +813,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.
+    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
 

And we also have a Rakefile:
@@ -854,19 +854,19 @@ http://www.gnu.org/software/src-highlite --> by Lorenzo Bettini http://www.lorenzobettini.it http://www.gnu.org/software/src-highlite --> -
task :generate do
-  ruby 'wireguardmeshgenerator.rb', '--generate'
-end
+
task :generate do
+  ruby 'wireguardmeshgenerator.rb', '--generate'
+end
 
-task :clean do
-  ruby 'wireguardmeshgenerator.rb', '--clean'
-end
+task :clean do
+  ruby 'wireguardmeshgenerator.rb', '--clean'
+end
 
-task :install do
-  ruby 'wireguardmeshgenerator.rb', '--install'
-end
+task :install do
+  ruby 'wireguardmeshgenerator.rb', '--install'
+end
 
-task default: :generate
+task default: :generate
 


@@ -880,16 +880,16 @@ http://www.gnu.org/software/src-highlite --> by Lorenzo Bettini http://www.lorenzobettini.it http://www.gnu.org/software/src-highlite --> -
> rake generate
-/usr/bin/ruby wireguardmeshgenerator.rb --generate
-Generating dist/f0/etc/wireguard/wg0.conf
-Generating dist/f1/etc/wireguard/wg0.conf
-Generating dist/f2/etc/wireguard/wg0.conf
-Generating dist/r0/etc/wireguard/wg0.conf
-Generating dist/r1/etc/wireguard/wg0.conf
-Generating dist/r2/etc/wireguard/wg0.conf
-Generating dist/blowfish/etc/wireguard/wg0.conf
-Generating dist/fishfinger/etc/wireguard/wg0.conf
+
> rake generate
+/usr/bin/ruby wireguardmeshgenerator.rb --generate
+Generating dist/f0/etc/wireguard/wg0.conf
+Generating dist/f1/etc/wireguard/wg0.conf
+Generating dist/f2/etc/wireguard/wg0.conf
+Generating dist/r0/etc/wireguard/wg0.conf
+Generating dist/r1/etc/wireguard/wg0.conf
+Generating dist/r2/etc/wireguard/wg0.conf
+Generating dist/blowfish/etc/wireguard/wg0.conf
+Generating dist/fishfinger/etc/wireguard/wg0.conf
 

It generated all the wg0.conf files listed in the output, plus those keys:
@@ -898,51 +898,51 @@ http://www.gnu.org/software/src-highlite --> by Lorenzo Bettini http://www.lorenzobettini.it http://www.gnu.org/software/src-highlite --> -
> find keys/ -type f
-keys/f0/priv.key
-keys/f0/pub.key
-keys/psk/f0_f1.key
-keys/psk/f0_f2.key
-keys/psk/f0_r0.key
-keys/psk/f0_r1.key
-keys/psk/f0_r2.key
-keys/psk/blowfish_f0.key
-keys/psk/f0_fishfinger.key
-keys/psk/f1_f2.key
-keys/psk/f1_r0.key
-keys/psk/f1_r1.key
-keys/psk/f1_r2.key
-keys/psk/blowfish_f1.key
-keys/psk/f1_fishfinger.key
-keys/psk/f2_r0.key
-keys/psk/f2_r1.key
-keys/psk/f2_r2.key
-keys/psk/blowfish_f2.key
-keys/psk/f2_fishfinger.key
-keys/psk/r0_r1.key
-keys/psk/r0_r2.key
-keys/psk/blowfish_r0.key
-keys/psk/fishfinger_r0.key
-keys/psk/r1_r2.key
-keys/psk/blowfish_r1.key
-keys/psk/fishfinger_r1.key
-keys/psk/blowfish_r2.key
-keys/psk/fishfinger_r2.key
-keys/psk/blowfish_fishfinger.key
-keys/f1/priv.key
-keys/f1/pub.key
-keys/f2/priv.key
-keys/f2/pub.key
-keys/r0/priv.key
-keys/r0/pub.key
-keys/r1/priv.key
-keys/r1/pub.key
-keys/r2/priv.key
-keys/r2/pub.key
-keys/blowfish/priv.key
-keys/blowfish/pub.key
-keys/fishfinger/priv.key
-keys/fishfinger/pub.key
+
> find keys/ -type f
+keys/f0/priv.key
+keys/f0/pub.key
+keys/psk/f0_f1.key
+keys/psk/f0_f2.key
+keys/psk/f0_r0.key
+keys/psk/f0_r1.key
+keys/psk/f0_r2.key
+keys/psk/blowfish_f0.key
+keys/psk/f0_fishfinger.key
+keys/psk/f1_f2.key
+keys/psk/f1_r0.key
+keys/psk/f1_r1.key
+keys/psk/f1_r2.key
+keys/psk/blowfish_f1.key
+keys/psk/f1_fishfinger.key
+keys/psk/f2_r0.key
+keys/psk/f2_r1.key
+keys/psk/f2_r2.key
+keys/psk/blowfish_f2.key
+keys/psk/f2_fishfinger.key
+keys/psk/r0_r1.key
+keys/psk/r0_r2.key
+keys/psk/blowfish_r0.key
+keys/psk/fishfinger_r0.key
+keys/psk/r1_r2.key
+keys/psk/blowfish_r1.key
+keys/psk/fishfinger_r1.key
+keys/psk/blowfish_r2.key
+keys/psk/fishfinger_r2.key
+keys/psk/blowfish_fishfinger.key
+keys/f1/priv.key
+keys/f1/pub.key
+keys/f2/priv.key
+keys/f2/pub.key
+keys/r0/priv.key
+keys/r0/pub.key
+keys/r1/priv.key
+keys/r1/pub.key
+keys/r2/priv.key
+keys/r2/pub.key
+keys/blowfish/priv.key
+keys/blowfish/pub.key
+keys/fishfinger/priv.key
+keys/fishfinger/pub.key
 

Those keys are embedded in the resulting wg0.conf, so later, we only need to install the wg0.conf files and not all the keys individually.
@@ -955,112 +955,112 @@ http://www.gnu.org/software/src-highlite --> by Lorenzo Bettini http://www.lorenzobettini.it http://www.gnu.org/software/src-highlite --> -
> rake install
-/usr/bin/ruby wireguardmeshgenerator.rb --install
-Uploading dist/f0/etc/wireguard/wg0.conf to f0.lan.buetow.org:.
-Installing Wireguard config on f0
-Uploading cmd.sh to f0.lan.buetow.org:.
-+ [ ! -d /usr/local/etc/wireguard ]
-+ doas chmod 700 /usr/local/etc/wireguard
-+ doas mv -v wg0.conf /usr/local/etc/wireguard
-wg0.conf -> /usr/local/etc/wireguard/wg0.conf
-+ doas chmod 644 /usr/local/etc/wireguard/wg0.conf
-+ rm cmd.sh
-Reloading Wireguard on f0
-Uploading cmd.sh to f0.lan.buetow.org:.
-+ doas service wireguard reload
-+ rm cmd.sh
-Uploading dist/f1/etc/wireguard/wg0.conf to f1.lan.buetow.org:.
-Installing Wireguard config on f1
-Uploading cmd.sh to f1.lan.buetow.org:.
-+ [ ! -d /usr/local/etc/wireguard ]
-+ doas chmod 700 /usr/local/etc/wireguard
-+ doas mv -v wg0.conf /usr/local/etc/wireguard
-wg0.conf -> /usr/local/etc/wireguard/wg0.conf
-+ doas chmod 644 /usr/local/etc/wireguard/wg0.conf
-+ rm cmd.sh
-Reloading Wireguard on f1
-Uploading cmd.sh to f1.lan.buetow.org:.
-+ doas service wireguard reload
-+ rm cmd.sh
-Uploading dist/f2/etc/wireguard/wg0.conf to f2.lan.buetow.org:.
-