diff options
| -rw-r--r-- | about/resources.html | 194 | ||||
| -rw-r--r-- | gemfeed/.ruby-lsp/Gemfile | 6 | ||||
| -rw-r--r-- | gemfeed/.ruby-lsp/Gemfile.lock | 41 | ||||
| -rw-r--r-- | gemfeed/2016-04-09-jails-and-zfs-on-freebsd-with-puppet.html | 1 | ||||
| -rw-r--r-- | gemfeed/2022-07-30-lets-encrypt-with-openbsd-and-rex.html | 1 | ||||
| -rw-r--r-- | gemfeed/2024-01-13-one-reason-why-i-love-openbsd.html | 1 | ||||
| -rw-r--r-- | gemfeed/2024-04-01-KISS-high-availability-with-OpenBSD.html | 1 | ||||
| -rw-r--r-- | gemfeed/2024-11-17-f3s-kubernetes-with-freebsd-part-1.html | 4 | ||||
| -rw-r--r-- | gemfeed/2024-12-03-f3s-kubernetes-with-freebsd-part-2.html | 4 | ||||
| -rw-r--r-- | gemfeed/2025-02-01-f3s-kubernetes-with-freebsd-part-3.html | 2 | ||||
| -rw-r--r-- | gemfeed/2025-04-05-f3s-kubernetes-with-freebsd-part-4.html | 4 | ||||
| -rw-r--r-- | gemfeed/2025-05-11-f3s-kubernetes-with-freebsd-part-5.html | 1029 | ||||
| -rw-r--r-- | gemfeed/DRAFT-kubernetes-with-freebsd-part-5.html | 104 | ||||
| -rw-r--r-- | gemfeed/atom.xml | 1210 | ||||
| -rw-r--r-- | gemfeed/f3s-kubernetes-with-freebsd-part-5/wireguard.svg | 2 | ||||
| -rw-r--r-- | gemfeed/index.html | 1 | ||||
| -rw-r--r-- | index.html | 3 | ||||
| -rw-r--r-- | uptime-stats.html | 52 |
18 files changed, 2255 insertions, 405 deletions
diff --git a/about/resources.html b/about/resources.html index 26ff6b6d..7fefd6ba 100644 --- a/about/resources.html +++ b/about/resources.html @@ -51,105 +51,105 @@ <span>In random order:</span><br /> <br /> <ul> -<li>97 things every SRE should know; Emil Stolarsky, Jaime Woo; O'Reilly</li> -<li>Java ist auch eine Insel; Christian Ullenboom; </li> -<li>Distributed Systems: Principles and Paradigms; Andrew S. Tanenbaum; Pearson</li> -<li>Perl New Features; Joshua McAdams, brian d foy; Perl School</li> -<li>Ultimate Go Notebook; Bill Kennedy</li> -<li>Programming Ruby 3.3 (5th Edition); Noel Rappin, with Dave Thomas; The Pragmatic Bookshelf</li> <li>Amazon Web Services in Action; Michael Wittig and Andreas Wittig; Manning Publications</li> <li>Learn You Some Erlang for Great Good; Fred Herbert; No Starch Press</li> -<li>The Docker Book; James Turnbull; Kindle</li> -<li>Pro Puppet; James Turnbull, Jeffrey McCune; Apress</li> -<li>DNS and BIND; Cricket Liu; O'Reilly</li> -<li>Developing Games in Java; David Brackeen and others...; New Riders</li> -<li>Raku Recipes; J.J. Merelo; Apress</li> -<li>Polished Ruby Programming; Jeremy Evans; Packt Publishing</li> -<li>Effective Java; Joshua Bloch; Addison-Wesley Professional</li> -<li>Programming Perl aka "The Camel Book"; Tom Christiansen, brian d foy, Larry Wall & Jon Orwant; O'Reilly</li> -<li>Tmux 2: Productive Mouse-free Development; Brain P. Hogan; The Pragmatic Programmers </li> -<li>Terraform Cookbook; Mikael Krief; Packt Publishing</li> +<li>Object-Oriented Programming with ANSI-C; Axel-Tobias Schreiner</li> +<li>Site Reliability Engineering; How Google runs production systems; O'Reilly</li> +<li>Effective awk programming; Arnold Robbins; O'Reilly</li> +<li>DevOps And Site Reliability Engineering Handbook; Stephen Fleming; Audible</li> +<li>Systemprogrammierung in Go; Frank Müller; dpunkt</li> +<li>100 Go Mistakes and How to Avoid Them; Teiva Harsanyi; Manning Publications</li> +<li>21st Century C: C Tips from the New School; Ben Klemens; O'Reilly</li> +<li>Ultimate Go Notebook; Bill Kennedy</li> +<li>Java ist auch eine Insel; Christian Ullenboom; </li> +<li>Distributed Systems: Principles and Paradigms; Andrew S. Tanenbaum; Pearson</li> +<li>Clusterbau mit Linux-HA; Michael Schwartzkopff; O'Reilly</li> <li>Learn You a Haskell for Great Good!; Miran Lipovaca; No Starch Press</li> -<li>Leanring eBPF; Liz Rice; O'Reilly</li> -<li>Systems Performance Tuning; Gian-Paolo D. Musumeci and others...; O'Reilly</li> +<li>Think Raku (aka Think Perl 6); Laurent Rosenfeld, Allen B. Downey; O'Reilly</li> +<li>Effective Java; Joshua Bloch; Addison-Wesley Professional</li> <li>The Kubernetes Book; Nigel Poulton; Unabridged Audiobook</li> -<li>Higher Order Perl; Mark Dominus; Morgan Kaufmann</li> -<li>The Practise of System and Network Administration; Thomas A. Limoncelli, Christina J. Hogan, Strata R. Chalup; Addison-Wesley Professional Pro Git; Scott Chacon, Ben Straub; Apress</li> <li>Modern Perl; Chromatic ; Onyx Neon Press</li> -<li>Raku Fundamentals; Moritz Lenz; Apress</li> -<li>Data Science at the Command Line; Jeroen Janssens; O'Reilly</li> -<li>Clusterbau mit Linux-HA; Michael Schwartzkopff; O'Reilly</li> -<li>The KCNA (Kubernetes and Cloud Native Associate) Book; Nigel Poulton</li> <li>Concurrency in Go; Katherine Cox-Buday; O'Reilly</li> -<li>100 Go Mistakes and How to Avoid Them; Teiva Harsanyi; Manning Publications</li> -<li>C++ Programming Language; Bjarne Stroustrup;</li> -<li>The DevOps Handbook; Gene Kim, Jez Humble, Patrick Debois, John Willis; Audible</li> -<li>Think Raku (aka Think Perl 6); Laurent Rosenfeld, Allen B. Downey; O'Reilly</li> -<li>Systemprogrammierung in Go; Frank Müller; dpunkt</li> -<li>Go Brain Teasers - Exercise Your Mind; Miki Tebeka; The Pragmatic Programmers</li> -<li>Object-Oriented Programming with ANSI-C; Axel-Tobias Schreiner</li> <li>The Pragmatic Programmer; David Thomas; Addison-Wesley</li> -<li>Effective awk programming; Arnold Robbins; O'Reilly</li> -<li>DevOps And Site Reliability Engineering Handbook; Stephen Fleming; Audible</li> +<li>Kubernetes Cookbook; Sameer Naik, Sébastien Goasguen, Jonathan Michaux; O'Reilly</li> +<li>C++ Programming Language; Bjarne Stroustrup;</li> +<li>Developing Games in Java; David Brackeen and others...; New Riders</li> +<li>Raku Recipes; J.J. Merelo; Apress</li> +<li>The KCNA (Kubernetes and Cloud Native Associate) Book; Nigel Poulton</li> +<li>DNS and BIND; Cricket Liu; O'Reilly</li> <li>Hands-on Infrastructure Monitoring with Prometheus; Joel Bastos, Pedro Araujo; Packt </li> +<li>Higher Order Perl; Mark Dominus; Morgan Kaufmann</li> +<li>The Practise of System and Network Administration; Thomas A. Limoncelli, Christina J. Hogan, Strata R. Chalup; Addison-Wesley Professional Pro Git; Scott Chacon, Ben Straub; Apress</li> <li>The Go Programming Language; Alan A. A. Donovan; Addison-Wesley Professional</li> +<li>Terraform Cookbook; Mikael Krief; Packt Publishing</li> +<li>The DevOps Handbook; Gene Kim, Jez Humble, Patrick Debois, John Willis; Audible</li> +<li>Programming Ruby 3.3 (5th Edition); Noel Rappin, with Dave Thomas; The Pragmatic Bookshelf</li> +<li>Raku Fundamentals; Moritz Lenz; Apress</li> +<li>Systems Performance Tuning; Gian-Paolo D. Musumeci and others...; O'Reilly</li> +<li>Programming Perl aka "The Camel Book"; Tom Christiansen, brian d foy, Larry Wall & Jon Orwant; O'Reilly</li> +<li>Polished Ruby Programming; Jeremy Evans; Packt Publishing</li> +<li>Pro Puppet; James Turnbull, Jeffrey McCune; Apress</li> +<li>Leanring eBPF; Liz Rice; O'Reilly</li> +<li>97 things every SRE should know; Emil Stolarsky, Jaime Woo; O'Reilly</li> +<li>Data Science at the Command Line; Jeroen Janssens; O'Reilly</li> +<li>Tmux 2: Productive Mouse-free Development; Brain P. Hogan; The Pragmatic Programmers </li> <li>Funktionale Programmierung; Peter Pepper; Springer</li> -<li>21st Century C: C Tips from the New School; Ben Klemens; O'Reilly</li> -<li>Site Reliability Engineering; How Google runs production systems; O'Reilly</li> -<li>Kubernetes Cookbook; Sameer Naik, Sébastien Goasguen, Jonathan Michaux; O'Reilly</li> +<li>The Docker Book; James Turnbull; Kindle</li> +<li>Perl New Features; Joshua McAdams, brian d foy; Perl School</li> +<li>Go Brain Teasers - Exercise Your Mind; Miki Tebeka; The Pragmatic Programmers</li> </ul><br /> <h2 style='display: inline' id='technical-references'>Technical references</h2><br /> <br /> <span>I didn't read them from the beginning to the end, but I am using them to look up things. The books are in random order:</span><br /> <br /> <ul> +<li>The Linux Programming Interface; Michael Kerrisk; No Starch Press </li> +<li>Relayd and Httpd Mastery; Michael W Lucas</li> +<li>Groovy Kurz & Gut; Joerg Staudemeier; O'Reilly</li> +<li>BPF Performance Tools - Linux System and Application Observability, Brendan Gregg; Addison Wesley</li> <li>Algorithms; Robert Sedgewick, Kevin Wayne; Addison Wesley</li> -<li>Go: Design Patterns for Real-World Projects; Mat Ryer; Packt</li> <li>Implementing Service Level Objectives; Alex Hidalgo; O'Reilly</li> +<li>Go: Design Patterns for Real-World Projects; Mat Ryer; Packt</li> <li>Understanding the Linux Kernel; Daniel P. Bovet, Marco Cesati; O'Reilly</li> -<li>BPF Performance Tools - Linux System and Application Observability, Brendan Gregg; Addison Wesley</li> -<li>Groovy Kurz & Gut; Joerg Staudemeier; O'Reilly</li> -<li>Relayd and Httpd Mastery; Michael W Lucas</li> -<li>The Linux Programming Interface; Michael Kerrisk; No Starch Press </li> </ul><br /> <h2 style='display: inline' id='self-development-and-soft-skills-books'>Self-development and soft-skills books</h2><br /> <br /> <span>In random order:</span><br /> <br /> <ul> -<li>Slow Productivity; Cal Newport; Penguin Random House</li> -<li>Consciousness: A Very Short Introduction; Susan Blackmore; Oxford Uiversity Press</li> -<li>The Obstacle Is The Way; Ryan Holiday; Profile Books Ltd</li> +<li>The Phoenix Project - A Novel About IT, DevOps, and Helping your Business Win; Gene Kim and Kevin Behr; Trade Select</li> +<li>Deep Work; Cal Newport; Piatkus</li> <li>Eat That Frog!; Brian Tracy; Hodder Paperbacks</li> -<li>Atomic Habits; James Clear; Random House Business</li> +<li>Consciousness: A Very Short Introduction; Susan Blackmore; Oxford Uiversity Press</li> +<li>The Daily Stoic; Ryan Holiday, Stephen Hanselman; Profile Books</li> +<li>The Bullet Journal Method; Ryder Carroll; Fourth Estate</li> <li>Time Management for System Administrators; Thomas A. Limoncelli; O'Reilly</li> -<li>Ultralearning; Anna Laurent; Self-published via Amazon</li> +<li>Ultralearning; Scott Young; Thorsons</li> +<li>The Power of Now; Eckhard Tolle; Yellow Kite</li> <li>Psycho-Cybernetics; Maxwell Maltz; Perigee Books</li> -<li>So Good They Can't Ignore You; Cal Newport; Business Plus</li> -<li>The Daily Stoic; Ryan Holiday, Stephen Hanselman; Profile Books</li> -<li>Search Inside Yourself - The Unexpected path to Achieving Success, Happiness (and World Peace); Chade-Meng Tan, Daniel Goleman, Jon Kabat-Zinn; HarperOne</li> -<li>The Good Enough Job; Simone Stolzoff; Ebury Edge</li> -<li>Deep Work; Cal Newport; Piatkus</li> <li>Buddah and Einstein walk into a Bar; Guy Joseph Ale, Claire Bloom; Blackstone Publishing</li> +<li>The Obstacle Is The Way; Ryan Holiday; Profile Books Ltd</li> +<li>101 Essays that change the way you think; Brianna Wiest; Audible</li> <li>The Joy of Missing Out; Christina Crook; New Society Publishers</li> -<li>Solve for Happy; Mo Gawdat (RE-READ 1ST TIME)</li> <li>The Off Switch; Mark Cropley; Virgin Books (RE-READ 1ST TIME)</li> +<li>The Good Enough Job; Simone Stolzoff; Ebury Edge</li> <li>The Complete Software Developer's Career Guide; John Sonmez; Unabridged Audiobook</li> -<li>The Bullet Journal Method; Ryder Carroll; Fourth Estate</li> -<li>The 7 Habits Of Highly Effective People; Stephen R. Covey; Simon & Schuster UK</li> -<li>Ultralearning; Scott Young; Thorsons</li> +<li>Stop starting, start finishing; Arne Roock; Lean-Kanban University </li> +<li>Eat That Frog; Brian Tracy</li> +<li>Solve for Happy; Mo Gawdat (RE-READ 1ST TIME)</li> +<li>Ultralearning; Anna Laurent; Self-published via Amazon</li> +<li>Atomic Habits; James Clear; Random House Business</li> +<li>Slow Productivity; Cal Newport; Penguin Random House</li> +<li>Search Inside Yourself - The Unexpected path to Achieving Success, Happiness (and World Peace); Chade-Meng Tan, Daniel Goleman, Jon Kabat-Zinn; HarperOne</li> +<li>Who Moved My Cheese?; Dr. Spencer Johnson; Vermilion </li> <li>Digital Minimalism; Cal Newport; Portofolio Penguin</li> +<li>Getting Things Done; David Allen</li> <li>Soft Skills; John Sommez; Manning Publications</li> -<li>Who Moved My Cheese?; Dr. Spencer Johnson; Vermilion </li> -<li>The Power of Now; Eckhard Tolle; Yellow Kite</li> +<li>So Good They Can't Ignore You; Cal Newport; Business Plus</li> <li>Staff Engineer: Leadership beyond the management track; Will Larson; Audible</li> -<li>101 Essays that change the way you think; Brianna Wiest; Audible</li> -<li>The Phoenix Project - A Novel About IT, DevOps, and Helping your Business Win; Gene Kim and Kevin Behr; Trade Select</li> -<li>Stop starting, start finishing; Arne Roock; Lean-Kanban University </li> <li>Never Split the Difference; Chris Voss, Tahl Raz; Random House Business</li> <li>Influence without Authority; A. Cohen, D. Bradford; Wiley</li> -<li>Getting Things Done; David Allen</li> -<li>Eat That Frog; Brian Tracy</li> +<li>The 7 Habits Of Highly Effective People; Stephen R. Covey; Simon & Schuster UK</li> </ul><br /> <a class='textlink' href='../notes/index.html'>Here are notes of mine for some of the books</a><br /> <br /> @@ -158,31 +158,31 @@ <span>Some of these were in-person with exams; others were online learning lectures only. In random order:</span><br /> <br /> <ul> -<li>The Well-Grounded Rubyist Video Edition; David. A. Black; O'Reilly Online</li> -<li>Protocol buffers; O'Reilly Online</li> -<li>Linux Security and Isolation APIs Training; Michael Kerrisk; 3-day on-site training</li> -<li>Developing IaC with Terraform (with Live Lessons); O'Reilly Online</li> -<li>Apache Tomcat Best Practises; 3-day on-site training</li> -<li>Ultimate Go Programming; Bill Kennedy; O'Reilly Online</li> <li>F5 Loadbalancers Training; 2-day on-site training; F5, Inc. </li> -<li>MySQL Deep Dive Workshop; 2-day on-site training</li> -<li>AWS Immersion Day; Amazon; 1-day interactive online training </li> +<li>Functional programming lecture; Remote University of Hagen</li> <li>Red Hat Certified System Administrator; Course + certification (Although I had the option, I decided not to take the next course as it is more effective to self learn what I need)</li> <li>Algorithms Video Lectures; Robert Sedgewick; O'Reilly Online</li> -<li>Functional programming lecture; Remote University of Hagen</li> -<li>Cloud Operations on AWS - Learn how to configure, deploy, maintain, and troubleshoot your AWS environments; 3-day online live training with labs; Amazon</li> -<li>Structure and Interpretation of Computer Programs; Harold Abelson and more...; </li> <li>The Ultimate Kubernetes Bootcamp; School of Devops; O'Reilly Online</li> +<li>Structure and Interpretation of Computer Programs; Harold Abelson and more...; </li> +<li>AWS Immersion Day; Amazon; 1-day interactive online training </li> +<li>MySQL Deep Dive Workshop; 2-day on-site training</li> +<li>Cloud Operations on AWS - Learn how to configure, deploy, maintain, and troubleshoot your AWS environments; 3-day online live training with labs; Amazon</li> +<li>Apache Tomcat Best Practises; 3-day on-site training</li> +<li>Protocol buffers; O'Reilly Online</li> +<li>Ultimate Go Programming; Bill Kennedy; O'Reilly Online</li> <li>Scripting Vim; Damian Conway; O'Reilly Online</li> +<li>Linux Security and Isolation APIs Training; Michael Kerrisk; 3-day on-site training</li> +<li>Developing IaC with Terraform (with Live Lessons); O'Reilly Online</li> +<li>The Well-Grounded Rubyist Video Edition; David. A. Black; O'Reilly Online</li> </ul><br /> <h2 style='display: inline' id='technical-guides'>Technical guides</h2><br /> <br /> <span>These are not whole books, but guides (smaller or larger) which I found very useful. in random order:</span><br /> <br /> <ul> -<li>Raku Guide at https://raku.guide </li> <li>How CPUs work at https://cpu.land</li> <li>Advanced Bash-Scripting Guide </li> +<li>Raku Guide at https://raku.guide </li> </ul><br /> <h2 style='display: inline' id='podcasts'>Podcasts</h2><br /> <br /> @@ -191,59 +191,59 @@ <span>In random order:</span><br /> <br /> <ul> -<li>Modern Mentor</li> +<li>Maintainable</li> <li>The Changelog Podcast(s)</li> -<li>Deep Questions with Cal Newport</li> -<li>Hidden Brain</li> -<li>Fork Around And Find Out</li> -<li>Cup o' Go [Golang]</li> <li>Backend Banter</li> -<li>Maintainable</li> -<li>Fallthrough [Golang]</li> -<li>BSD Now [BSD]</li> -<li>The Pragmatic Engineer Podcast</li> <li>Dev Interrupted</li> +<li>Hidden Brain</li> +<li>BSD Now [BSD]</li> +<li>Modern Mentor</li> +<li>Fallthrough [Golang]</li> <li>The ProdCast (Google SRE Podcast)</li> +<li>Cup o' Go [Golang]</li> +<li>Fork Around And Find Out</li> +<li>The Pragmatic Engineer Podcast</li> +<li>Deep Questions with Cal Newport</li> </ul><br /> <h3 style='display: inline' id='podcasts-i-liked'>Podcasts I liked</h3><br /> <br /> <span>I liked them but am not listening to them anymore. The podcasts have either "finished" (no more episodes) or I stopped listening to them due to time constraints or a shift in my interests.</span><br /> <br /> <ul> -<li>CRE: Chaosradio Express [german]</li> <li>Ship It (predecessor of Fork Around And Find Out)</li> -<li>Modern Mentor</li> -<li>FLOSS weekly</li> -<li>Go Time (predecessor of fallthrough)</li> <li>Java Pub House</li> +<li>Go Time (predecessor of fallthrough)</li> +<li>FLOSS weekly</li> +<li>CRE: Chaosradio Express [german]</li> +<li>Modern Mentor</li> </ul><br /> <h2 style='display: inline' id='newsletters-i-like'>Newsletters I like</h2><br /> <br /> <span>This is a mix of tech and non-tech newsletters I am subscribed to. In random order:</span><br /> <br /> <ul> -<li>Monospace Mentor</li> -<li>Ruby Weekly</li> -<li>The Imperfectionist</li> +<li>Golang Weekly</li> +<li>Changelog News</li> <li>Register Spill</li> <li>The Valuable Dev</li> -<li>Applied Go Weekly Newsletter</li> -<li>byteSizeGo</li> +<li>The Pragmatic Engineer</li> <li>Andreas Brandhorst Newsletter (Sci-Fi author)</li> +<li>byteSizeGo</li> +<li>Applied Go Weekly Newsletter</li> +<li>Monospace Mentor</li> +<li>The Imperfectionist</li> <li>VK Newsletter</li> -<li>Changelog News</li> -<li>Golang Weekly</li> -<li>The Pragmatic Engineer</li> +<li>Ruby Weekly</li> </ul><br /> <h2 style='display: inline' id='magazines-i-liked'>Magazines I like(d)</h2><br /> <br /> <span>This is a mix of tech I like(d). I may not be a current subscriber, but now and then, I buy an issue. In random order:</span><br /> <br /> <ul> -<li>Linux Magazine</li> <li>freeX (not published anymore)</li> -<li>LWN (online only)</li> +<li>Linux Magazine</li> <li>Linux User</li> +<li>LWN (online only)</li> </ul><br /> <h1 style='display: inline' id='formal-education'>Formal education</h1><br /> <br /> diff --git a/gemfeed/.ruby-lsp/Gemfile b/gemfeed/.ruby-lsp/Gemfile new file mode 100644 index 00000000..1ebf7b78 --- /dev/null +++ b/gemfeed/.ruby-lsp/Gemfile @@ -0,0 +1,6 @@ +source "https://rubygems.org" +# This custom gemfile is automatically generated by the Ruby LSP. +# It should be automatically git ignored, but in any case: do not commit it to your repository. + +gem "ruby-lsp", require: false, group: :development +gem "debug", require: false, group: :development, platforms: :mri
\ No newline at end of file diff --git a/gemfeed/.ruby-lsp/Gemfile.lock b/gemfeed/.ruby-lsp/Gemfile.lock new file mode 100644 index 00000000..ba1e1f31 --- /dev/null +++ b/gemfeed/.ruby-lsp/Gemfile.lock @@ -0,0 +1,41 @@ +GEM + remote: https://rubygems.org/ + specs: + date (3.4.1) + debug (1.10.0) + irb (~> 1.10) + reline (>= 0.3.8) + io-console (0.8.0) + irb (1.14.3) + rdoc (>= 4.0.0) + reline (>= 0.4.2) + language_server-protocol (3.17.0.4) + logger (1.7.0) + prism (1.4.0) + psych (5.2.2) + date + stringio + rbs (3.9.3) + logger + rdoc (6.10.0) + psych (>= 4.0.0) + reline (0.6.1) + io-console (~> 0.5) + ruby-lsp (0.23.17) + language_server-protocol (~> 3.17.0) + prism (>= 1.2, < 2.0) + rbs (>= 3, < 4) + sorbet-runtime (>= 0.5.10782) + sorbet-runtime (0.5.12087) + stringio (3.1.7) + +PLATFORMS + ruby + x86_64-linux + +DEPENDENCIES + debug + ruby-lsp + +BUNDLED WITH + 2.6.2 diff --git a/gemfeed/2016-04-09-jails-and-zfs-on-freebsd-with-puppet.html b/gemfeed/2016-04-09-jails-and-zfs-on-freebsd-with-puppet.html index d5f81d05..42edf3f1 100644 --- a/gemfeed/2016-04-09-jails-and-zfs-on-freebsd-with-puppet.html +++ b/gemfeed/2016-04-09-jails-and-zfs-on-freebsd-with-puppet.html @@ -413,6 +413,7 @@ Notice: Finished catalog run in 206.09 seconds <br /> <span>Other *BSD related posts are:</span><br /> <br /> +<a class='textlink' href='./2025-05-11-f3s-kubernetes-with-freebsd-part-5.html'>2025-05-11 f3s: Kubernetes with FreeBSD - Part 5: WireGuard mesh network</a><br /> <a class='textlink' href='./2025-04-05-f3s-kubernetes-with-freebsd-part-4.html'>2025-04-05 f3s: Kubernetes with FreeBSD - Part 4: Rocky Linux Bhyve VMs</a><br /> <a class='textlink' href='./2025-02-01-f3s-kubernetes-with-freebsd-part-3.html'>2025-02-01 f3s: Kubernetes with FreeBSD - Part 3: Protecting from power cuts</a><br /> <a class='textlink' href='./2024-12-03-f3s-kubernetes-with-freebsd-part-2.html'>2024-12-03 f3s: Kubernetes with FreeBSD - Part 2: Hardware and base installation</a><br /> diff --git a/gemfeed/2022-07-30-lets-encrypt-with-openbsd-and-rex.html b/gemfeed/2022-07-30-lets-encrypt-with-openbsd-and-rex.html index 2e8782f8..c1b6b68d 100644 --- a/gemfeed/2022-07-30-lets-encrypt-with-openbsd-and-rex.html +++ b/gemfeed/2022-07-30-lets-encrypt-with-openbsd-and-rex.html @@ -692,6 +692,7 @@ rex commons <br /> <span>Other *BSD related posts are:</span><br /> <br /> +<a class='textlink' href='./2025-05-11-f3s-kubernetes-with-freebsd-part-5.html'>2025-05-11 f3s: Kubernetes with FreeBSD - Part 5: WireGuard mesh network</a><br /> <a class='textlink' href='./2025-04-05-f3s-kubernetes-with-freebsd-part-4.html'>2025-04-05 f3s: Kubernetes with FreeBSD - Part 4: Rocky Linux Bhyve VMs</a><br /> <a class='textlink' href='./2025-02-01-f3s-kubernetes-with-freebsd-part-3.html'>2025-02-01 f3s: Kubernetes with FreeBSD - Part 3: Protecting from power cuts</a><br /> <a class='textlink' href='./2024-12-03-f3s-kubernetes-with-freebsd-part-2.html'>2024-12-03 f3s: Kubernetes with FreeBSD - Part 2: Hardware and base installation</a><br /> diff --git a/gemfeed/2024-01-13-one-reason-why-i-love-openbsd.html b/gemfeed/2024-01-13-one-reason-why-i-love-openbsd.html index 78a1d5d5..ebd1e99d 100644 --- a/gemfeed/2024-01-13-one-reason-why-i-love-openbsd.html +++ b/gemfeed/2024-01-13-one-reason-why-i-love-openbsd.html @@ -70,6 +70,7 @@ $ doas reboot <i><font color="silver"># Just in case, reboot one more time</font <br /> <span>Other *BSD related posts are:</span><br /> <br /> +<a class='textlink' href='./2025-05-11-f3s-kubernetes-with-freebsd-part-5.html'>2025-05-11 f3s: Kubernetes with FreeBSD - Part 5: WireGuard mesh network</a><br /> <a class='textlink' href='./2025-04-05-f3s-kubernetes-with-freebsd-part-4.html'>2025-04-05 f3s: Kubernetes with FreeBSD - Part 4: Rocky Linux Bhyve VMs</a><br /> <a class='textlink' href='./2025-02-01-f3s-kubernetes-with-freebsd-part-3.html'>2025-02-01 f3s: Kubernetes with FreeBSD - Part 3: Protecting from power cuts</a><br /> <a class='textlink' href='./2024-12-03-f3s-kubernetes-with-freebsd-part-2.html'>2024-12-03 f3s: Kubernetes with FreeBSD - Part 2: Hardware and base installation</a><br /> diff --git a/gemfeed/2024-04-01-KISS-high-availability-with-OpenBSD.html b/gemfeed/2024-04-01-KISS-high-availability-with-OpenBSD.html index 5840974c..26ae0590 100644 --- a/gemfeed/2024-04-01-KISS-high-availability-with-OpenBSD.html +++ b/gemfeed/2024-04-01-KISS-high-availability-with-OpenBSD.html @@ -331,6 +331,7 @@ http://www.gnu.org/software/src-highlite --> <br /> <span>Other *BSD and KISS related posts are:</span><br /> <br /> +<a class='textlink' href='./2025-05-11-f3s-kubernetes-with-freebsd-part-5.html'>2025-05-11 f3s: Kubernetes with FreeBSD - Part 5: WireGuard mesh network</a><br /> <a class='textlink' href='./2025-04-05-f3s-kubernetes-with-freebsd-part-4.html'>2025-04-05 f3s: Kubernetes with FreeBSD - Part 4: Rocky Linux Bhyve VMs</a><br /> <a class='textlink' href='./2025-02-01-f3s-kubernetes-with-freebsd-part-3.html'>2025-02-01 f3s: Kubernetes with FreeBSD - Part 3: Protecting from power cuts</a><br /> <a class='textlink' href='./2024-12-03-f3s-kubernetes-with-freebsd-part-2.html'>2024-12-03 f3s: Kubernetes with FreeBSD - Part 2: Hardware and base installation</a><br /> diff --git a/gemfeed/2024-11-17-f3s-kubernetes-with-freebsd-part-1.html b/gemfeed/2024-11-17-f3s-kubernetes-with-freebsd-part-1.html index 056a9891..27f58263 100644 --- a/gemfeed/2024-11-17-f3s-kubernetes-with-freebsd-part-1.html +++ b/gemfeed/2024-11-17-f3s-kubernetes-with-freebsd-part-1.html @@ -25,10 +25,11 @@ <a class='textlink' href='./2024-12-03-f3s-kubernetes-with-freebsd-part-2.html'>2024-12-03 f3s: Kubernetes with FreeBSD - Part 2: Hardware and base installation</a><br /> <a class='textlink' href='./2025-02-01-f3s-kubernetes-with-freebsd-part-3.html'>2025-02-01 f3s: Kubernetes with FreeBSD - Part 3: Protecting from power cuts</a><br /> <a class='textlink' href='./2025-04-05-f3s-kubernetes-with-freebsd-part-4.html'>2025-04-05 f3s: Kubernetes with FreeBSD - Part 4: Rocky Linux Bhyve VMs</a><br /> +<a class='textlink' href='./2025-05-11-f3s-kubernetes-with-freebsd-part-5.html'>2025-05-11 f3s: Kubernetes with FreeBSD - Part 5: WireGuard mesh network</a><br /> <br /> <a href='./f3s-kubernetes-with-freebsd-part-1/f3slogo.png'><img alt='f3s logo' title='f3s logo' src='./f3s-kubernetes-with-freebsd-part-1/f3slogo.png' /></a><br /> <br /> -<span class='quote'>Logo was generated by ChatGPT.</span><br /> +<span class='quote'>ChatGPT generated logo..</span><br /> <br /> <span>Let's begin...</span><br /> <br /> @@ -176,6 +177,7 @@ <br /> <span>Other *BSD-related posts:</span><br /> <br /> +<a class='textlink' href='./2025-05-11-f3s-kubernetes-with-freebsd-part-5.html'>2025-05-11 f3s: Kubernetes with FreeBSD - Part 5: WireGuard mesh network</a><br /> <a class='textlink' href='./2025-04-05-f3s-kubernetes-with-freebsd-part-4.html'>2025-04-05 f3s: Kubernetes with FreeBSD - Part 4: Rocky Linux Bhyve VMs</a><br /> <a class='textlink' href='./2025-02-01-f3s-kubernetes-with-freebsd-part-3.html'>2025-02-01 f3s: Kubernetes with FreeBSD - Part 3: Protecting from power cuts</a><br /> <a class='textlink' href='./2024-12-03-f3s-kubernetes-with-freebsd-part-2.html'>2024-12-03 f3s: Kubernetes with FreeBSD - Part 2: Hardware and base installation</a><br /> diff --git a/gemfeed/2024-12-03-f3s-kubernetes-with-freebsd-part-2.html b/gemfeed/2024-12-03-f3s-kubernetes-with-freebsd-part-2.html index b7ff9e38..8aa50e18 100644 --- a/gemfeed/2024-12-03-f3s-kubernetes-with-freebsd-part-2.html +++ b/gemfeed/2024-12-03-f3s-kubernetes-with-freebsd-part-2.html @@ -25,10 +25,11 @@ <a class='textlink' href='./2024-12-03-f3s-kubernetes-with-freebsd-part-2.html'>2024-12-03 f3s: Kubernetes with FreeBSD - Part 2: Hardware and base installation (You are currently reading this)</a><br /> <a class='textlink' href='./2025-02-01-f3s-kubernetes-with-freebsd-part-3.html'>2025-02-01 f3s: Kubernetes with FreeBSD - Part 3: Protecting from power cuts</a><br /> <a class='textlink' href='./2025-04-05-f3s-kubernetes-with-freebsd-part-4.html'>2025-04-05 f3s: Kubernetes with FreeBSD - Part 4: Rocky Linux Bhyve VMs</a><br /> +<a class='textlink' href='./2025-05-11-f3s-kubernetes-with-freebsd-part-5.html'>2025-05-11 f3s: Kubernetes with FreeBSD - Part 5: WireGuard mesh network</a><br /> <br /> <a href='./f3s-kubernetes-with-freebsd-part-1/f3slogo.png'><img alt='f3s logo' title='f3s logo' src='./f3s-kubernetes-with-freebsd-part-1/f3slogo.png' /></a><br /> <br /> -<span class='quote'>Logo was generated by ChatGPT.</span><br /> +<span class='quote'>ChatGPT generated logo..</span><br /> <br /> <span>Let's continue...</span><br /> <br /> @@ -355,6 +356,7 @@ dev.cpu.<font color="#000000">0</font>.freq: <font color="#000000">2922</font> <br /> <span>Other *BSD-related posts:</span><br /> <br /> +<a class='textlink' href='./2025-05-11-f3s-kubernetes-with-freebsd-part-5.html'>2025-05-11 f3s: Kubernetes with FreeBSD - Part 5: WireGuard mesh network</a><br /> <a class='textlink' href='./2025-04-05-f3s-kubernetes-with-freebsd-part-4.html'>2025-04-05 f3s: Kubernetes with FreeBSD - Part 4: Rocky Linux Bhyve VMs</a><br /> <a class='textlink' href='./2025-02-01-f3s-kubernetes-with-freebsd-part-3.html'>2025-02-01 f3s: Kubernetes with FreeBSD - Part 3: Protecting from power cuts</a><br /> <a class='textlink' href='./2024-12-03-f3s-kubernetes-with-freebsd-part-2.html'>2024-12-03 f3s: Kubernetes with FreeBSD - Part 2: Hardware and base installation (You are currently reading this)</a><br /> diff --git a/gemfeed/2025-02-01-f3s-kubernetes-with-freebsd-part-3.html b/gemfeed/2025-02-01-f3s-kubernetes-with-freebsd-part-3.html index 45841713..612aaed3 100644 --- a/gemfeed/2025-02-01-f3s-kubernetes-with-freebsd-part-3.html +++ b/gemfeed/2025-02-01-f3s-kubernetes-with-freebsd-part-3.html @@ -21,6 +21,7 @@ <a class='textlink' href='./2024-12-03-f3s-kubernetes-with-freebsd-part-2.html'>2024-12-03 f3s: Kubernetes with FreeBSD - Part 2: Hardware and base installation</a><br /> <a class='textlink' href='./2025-02-01-f3s-kubernetes-with-freebsd-part-3.html'>2025-02-01 f3s: Kubernetes with FreeBSD - Part 3: Protecting from power cuts (You are currently reading this)</a><br /> <a class='textlink' href='./2025-04-05-f3s-kubernetes-with-freebsd-part-4.html'>2025-04-05 f3s: Kubernetes with FreeBSD - Part 4: Rocky Linux Bhyve VMs</a><br /> +<a class='textlink' href='./2025-05-11-f3s-kubernetes-with-freebsd-part-5.html'>2025-05-11 f3s: Kubernetes with FreeBSD - Part 5: WireGuard mesh network</a><br /> <br /> <a href='./f3s-kubernetes-with-freebsd-part-1/f3slogo.png'><img alt='f3s logo' title='f3s logo' src='./f3s-kubernetes-with-freebsd-part-1/f3slogo.png' /></a><br /> <br /> @@ -414,6 +415,7 @@ Jan 26 17:36:32 f2 apcupsd[2159]: apcupsd shutdown succeeded <br /> <span>Other BSD related posts are:</span><br /> <br /> +<a class='textlink' href='./2025-05-11-f3s-kubernetes-with-freebsd-part-5.html'>2025-05-11 f3s: Kubernetes with FreeBSD - Part 5: WireGuard mesh network</a><br /> <a class='textlink' href='./2025-04-05-f3s-kubernetes-with-freebsd-part-4.html'>2025-04-05 f3s: Kubernetes with FreeBSD - Part 4: Rocky Linux Bhyve VMs</a><br /> <a class='textlink' href='./2025-02-01-f3s-kubernetes-with-freebsd-part-3.html'>2025-02-01 f3s: Kubernetes with FreeBSD - Part 3: Protecting from power cuts (You are currently reading this)</a><br /> <a class='textlink' href='./2024-12-03-f3s-kubernetes-with-freebsd-part-2.html'>2024-12-03 f3s: Kubernetes with FreeBSD - Part 2: Hardware and base installation</a><br /> diff --git a/gemfeed/2025-04-05-f3s-kubernetes-with-freebsd-part-4.html b/gemfeed/2025-04-05-f3s-kubernetes-with-freebsd-part-4.html index 021a9b17..d4cd75fe 100644 --- a/gemfeed/2025-04-05-f3s-kubernetes-with-freebsd-part-4.html +++ b/gemfeed/2025-04-05-f3s-kubernetes-with-freebsd-part-4.html @@ -21,6 +21,7 @@ <a class='textlink' href='./2024-12-03-f3s-kubernetes-with-freebsd-part-2.html'>2024-12-03 f3s: Kubernetes with FreeBSD - Part 2: Hardware and base installation</a><br /> <a class='textlink' href='./2025-02-01-f3s-kubernetes-with-freebsd-part-3.html'>2025-02-01 f3s: Kubernetes with FreeBSD - Part 3: Protecting from power cuts</a><br /> <a class='textlink' href='./2025-04-05-f3s-kubernetes-with-freebsd-part-4.html'>2025-04-05 f3s: Kubernetes with FreeBSD - Part 4: Rocky Linux Bhyve VMs (You are currently reading this)</a><br /> +<a class='textlink' href='./2025-05-11-f3s-kubernetes-with-freebsd-part-5.html'>2025-05-11 f3s: Kubernetes with FreeBSD - Part 5: WireGuard mesh network</a><br /> <br /> <a href='./f3s-kubernetes-with-freebsd-part-1/f3slogo.png'><img alt='f3s logo' title='f3s logo' src='./f3s-kubernetes-with-freebsd-part-1/f3slogo.png' /></a><br /> <br /> @@ -591,10 +592,11 @@ Apr <font color="#000000">4</font> <font color="#000000">23</font>:<font color= <br /> <span>This flexibility is great for keeping options open and managing different workloads without overcomplicating things. Overall, it's a nice setup for getting the most out of my hardware and keeping things running smoothly.</span><br /> <br /> -<span>See you in the next blog post of this series. Maybe we will be installing highly available storage with HAST or we start setting up k3s on the Rocky Linux VMs.</span><br /> +<span>See you in the next post of this series!</span><br /> <br /> <span>Other *BSD-related posts:</span><br /> <br /> +<a class='textlink' href='./2025-05-11-f3s-kubernetes-with-freebsd-part-5.html'>2025-05-11 f3s: Kubernetes with FreeBSD - Part 5: WireGuard mesh network</a><br /> <a class='textlink' href='./2025-04-05-f3s-kubernetes-with-freebsd-part-4.html'>2025-04-05 f3s: Kubernetes with FreeBSD - Part 4: Rocky Linux Bhyve VMs (You are currently reading this)</a><br /> <a class='textlink' href='./2025-02-01-f3s-kubernetes-with-freebsd-part-3.html'>2025-02-01 f3s: Kubernetes with FreeBSD - Part 3: Protecting from power cuts</a><br /> <a class='textlink' href='./2024-12-03-f3s-kubernetes-with-freebsd-part-2.html'>2024-12-03 f3s: Kubernetes with FreeBSD - Part 2: Hardware and base installation</a><br /> diff --git a/gemfeed/2025-05-11-f3s-kubernetes-with-freebsd-part-5.html b/gemfeed/2025-05-11-f3s-kubernetes-with-freebsd-part-5.html new file mode 100644 index 00000000..510bb857 --- /dev/null +++ b/gemfeed/2025-05-11-f3s-kubernetes-with-freebsd-part-5.html @@ -0,0 +1,1029 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> +<title>f3s: Kubernetes with FreeBSD - Part 5: WireGuard mesh network</title> +<link rel="shortcut icon" type="image/gif" href="/favicon.ico" /> +<link rel="stylesheet" href="../style.css" /> +<link rel="stylesheet" href="style-override.css" /> +</head> +<body> +<p class="header"> +<a href="https://foo.zone">Home</a> | <a href="https://codeberg.org/snonux/foo.zone/src/branch/content-md/gemfeed/2025-05-11-f3s-kubernetes-with-freebsd-part-5.md">Markdown</a> | <a href="gemini://foo.zone/gemfeed/2025-05-11-f3s-kubernetes-with-freebsd-part-5.gmi">Gemini</a> +</p> +<h1 style='display: inline' id='f3s-kubernetes-with-freebsd---part-5-wireguard-mesh-network'>f3s: Kubernetes with FreeBSD - Part 5: WireGuard mesh network</h1><br /> +<br /> +<span class='quote'>Published at 2025-05-11T11:35:57+03:00</span><br /> +<br /> +<span>This is the fifth blog post about my f3s series for my self-hosting demands in my home lab. f3s? The "f" stands for FreeBSD, and the "3s" stands for k3s, the Kubernetes distribution I will use on FreeBSD-based physical machines.</span><br /> +<br /> +<span>I will post a new entry every month or so (there are too many other side projects for more frequent updates — I bet you can understand).</span><br /> +<br /> +<span>These are all the posts so far:</span><br /> +<br /> +<a class='textlink' href='./2024-11-17-f3s-kubernetes-with-freebsd-part-1.html'>2024-11-17 f3s: Kubernetes with FreeBSD - Part 1: Setting the stage</a><br /> +<a class='textlink' href='./2024-12-03-f3s-kubernetes-with-freebsd-part-2.html'>2024-12-03 f3s: Kubernetes with FreeBSD - Part 2: Hardware and base installation</a><br /> +<a class='textlink' href='./2025-02-01-f3s-kubernetes-with-freebsd-part-3.html'>2025-02-01 f3s: Kubernetes with FreeBSD - Part 3: Protecting from power cuts</a><br /> +<a class='textlink' href='./2025-04-05-f3s-kubernetes-with-freebsd-part-4.html'>2025-04-05 f3s: Kubernetes with FreeBSD - Part 4: Rocky Linux Bhyve VMs</a><br /> +<a class='textlink' href='./2025-05-11-f3s-kubernetes-with-freebsd-part-5.html'>2025-05-11 f3s: Kubernetes with FreeBSD - Part 5: WireGuard mesh network (You are currently reading this)</a><br /> +<br /> +<a href='./f3s-kubernetes-with-freebsd-part-1/f3slogo.png'><img alt='f3s logo' title='f3s logo' src='./f3s-kubernetes-with-freebsd-part-1/f3slogo.png' /></a><br /> +<br /> +<span class='quote'>ChatGPT generated logo.</span><br /> +<br /> +<span>Let's begin...</span><br /> +<br /> +<h2 style='display: inline' id='table-of-contents'>Table of Contents</h2><br /> +<br /> +<ul> +<li><a href='#f3s-kubernetes-with-freebsd---part-5-wireguard-mesh-network'>f3s: Kubernetes with FreeBSD - Part 5: WireGuard mesh network</a></li> +<li>⇢ <a href='#introduction'>Introduction</a></li> +<li>⇢ ⇢ <a href='#expected-traffic-flow'>Expected traffic flow</a></li> +<li>⇢ <a href='#deciding-on-wireguard'>Deciding on WireGuard</a></li> +<li>⇢ <a href='#base-configuration'>Base configuration</a></li> +<li>⇢ ⇢ <a href='#freebsd'>FreeBSD</a></li> +<li>⇢ ⇢ <a href='#rocky-linux'>Rocky Linux</a></li> +<li>⇢ ⇢ <a href='#openbsd'>OpenBSD</a></li> +<li>⇢ <a href='#wireguard-configuration'>WireGuard configuration</a></li> +<li>⇢ ⇢ <a href='#example-wg0conf'>Example <span class='inlinecode'>wg0.conf</span></a></li> +<li>⇢ ⇢ <a href='#nat-traversal-and-keepalive'>NAT traversal and keepalive</a></li> +<li>⇢ ⇢ <a href='#preshared-key'>Preshared key</a></li> +<li>⇢ <a href='#mesh-network-generator'>Mesh network generator</a></li> +<li>⇢ ⇢ <a href='#wireguardmeshgeneratoryaml'><span class='inlinecode'>wireguardmeshgenerator.yaml</span></a></li> +<li>⇢ ⇢ <a href='#wireguardmeshgeneratorrb-overview'><span class='inlinecode'>wireguardmeshgenerator.rb</span> overview</a></li> +<li>⇢ <a href='#invoking-the-mesh-network-generator'>Invoking the mesh network generator</a></li> +<li>⇢ ⇢ <a href='#generating-the-wg0conf-files-and-keys'>Generating the <span class='inlinecode'>wg0.conf</span> files and keys</a></li> +<li>⇢ ⇢ <a href='#installing-the-wg0conf-files'>Installing the <span class='inlinecode'>wg0.conf</span> files</a></li> +<li>⇢ ⇢ <a href='#re-generating-mesh-and-installing-the-wg0conf-files-again'>Re-generating mesh and installing the <span class='inlinecode'>wg0.conf</span> files again</a></li> +<li>⇢ <a href='#happy-wireguard-ing'>Happy WireGuard-ing</a></li> +<li>⇢ <a href='#conclusion'>Conclusion</a></li> +</ul><br /> +<h2 style='display: inline' id='introduction'>Introduction</h2><br /> +<br /> +<span>By default, traffic within my home LAN, including traffic inside a k3s cluster, is not encrypted. While it resides in the "secure" home LAN, adopting a zero-trust policy means encryption is still preferable to ensure confidentiality and security. So we decide to secure all the traffic of all f3s participating hosts by building a mesh network of all participating hosts:</span><br /> +<br /> +<a href='./f3s-kubernetes-with-freebsd-part-5/wireguard-full-mesh.svg'><img alt='Full mesh network' title='Full mesh network' src='./f3s-kubernetes-with-freebsd-part-5/wireguard-full-mesh.svg' /></a><br /> +<br /> +<span>Whereas <span class='inlinecode'>f0</span>, <span class='inlinecode'>f1</span>, and <span class='inlinecode'>f2</span> are the FreeBSD base hosts, <span class='inlinecode'>r0</span>, <span class='inlinecode'>r1</span>, and <span class='inlinecode'>r2</span> are the Rocky Linux Bhyve VMs, and <span class='inlinecode'>blowfish</span> and <span class='inlinecode'>fishfinger</span> are two OpenBSD systems running on the internet (as mentioned in the first blog of this series—these systems are already built; in fact, this very blog is served by those OpenBSD systems).</span><br /> +<br /> +<span>As we can see from the graph, it is a true full-mesh network, where every host has a VPN tunnel to every other host. The benefit is that we do not need to route traffic through intermediate hosts (significantly simplifying the routing configuration). However, the downside is that there is some overhead in configuring and managing all the tunnels.</span><br /> +<br /> +<span>For simplicity, we also establish VPN tunnels between <span class='inlinecode'>f0 <-> r0</span>, <span class='inlinecode'>f1 <-> r1</span>, and <span class='inlinecode'>f2 <-> r2</span>. Technically, this wouldn't be strictly required since the VMs <span class='inlinecode'>rN</span> are running on the hosts <span class='inlinecode'>fN</span>, and no network traffic is leaving the box. However, it simplifies the configuration as we don't have to account for exceptions, and we are going to automate the mesh network configuration anyway (read on).</span><br /> +<br /> +<h3 style='display: inline' id='expected-traffic-flow'>Expected traffic flow</h3><br /> +<br /> +<span>The traffic is expected to flow between the host groups through the mesh network as follows: </span><br /> +<br /> +<ul> +<li><span class='inlinecode'>fN <-> rN</span>: The traffic between the FreeBSD hosts and the Rocky Linux VMs will be routed through the VPN tunnels for persistent storage. In a later post in this series, we will set up an NFS server on the <span class='inlinecode'>fN</span> hosts. </li> +<li><span class='inlinecode'>fN <-> blowfish,fishfinger</span>: The traffic between the FreeBSD hosts and the OpenBSD host <span class='inlinecode'>blowfish,fishfinger</span> will be routed through the VPN tunnels for management. We may want to log in via the internet to set it up remotely. The VPN tunnel will also be used for monitoring purposes.</li> +<li><span class='inlinecode'>rN <-> blowfish,fishfinger</span>: The traffic between the Rocky Linux VMs and the OpenBSD host <span class='inlinecode'>blowfish,fishfinger</span> will be routed through the VPN tunnels for usage traffic. Since <span class='inlinecode'>k3s</span> will be running on the <span class='inlinecode'>rN</span> hosts, the OpenBSD servers will route the traffic through <span class='inlinecode'>relayd</span> to the services running in Kubernetes.</li> +<li><span class='inlinecode'>fN <-> fM</span>: The traffic between the FreeBSD hosts may be later used for data replication for the NFS storage.</li> +<li><span class='inlinecode'>rN <-> rM</span>: The traffic between the Rocky Linux VMs will later be used by the <span class='inlinecode'>k3s</span> cluster itself, as every <span class='inlinecode'>rN</span> will be a Kubernetes worker node.</li> +<li><span class='inlinecode'>blowfish <-> fishfinger</span>: The traffic between the OpenBSD hosts isn't strictly required for this setup, but I set it up anyway for future use cases.</li> +</ul><br /> +<span>We won't cover all the details in this blog post, as we only focus on setting up the Mesh network in this blog post. Subsequent posts in this series will cover the other details.</span><br /> +<br /> +<h2 style='display: inline' id='deciding-on-wireguard'>Deciding on WireGuard</h2><br /> +<br /> +<span>I have decided to use WireGuard as the VPN technology for this purpose.</span><br /> +<br /> +<span>WireGuard is a lightweight, modern, and secure VPN protocol designed for simplicity, speed, and strong cryptography. It is an excellent choice due to its minimal codebase, ease of configuration, high performance, and robust security, utilizing state-of-the-art encryption standards. WireGuard is supported on various operating systems, and its implementations are compatible with each other. Therefore, establishing WireGuard VPN tunnels between FreeBSD, Linux, and OpenBSD is seamless. This cross-platform availability makes it suitable for setups like the one described in this blog series.</span><br /> +<br /> +<span>We could have used Tailscale for an easy to set up and manage the WireGuard network, but the benefits of creating our own mesh network are:</span><br /> +<br /> +<ul> +<li>Learning about WireGuard configuration details</li> +<li>Have full control over the setup</li> +<li>Don't rely on an external provider like Tailscale (even if some of the components are open-source)</li> +<li>Have even more fun along the way</li> +<li>WireGuard is easy to configure on my target operating systems and, therefore, easier to maintain in the long run.</li> +<li>There are no official Tailscale packages available for OpenBSD and FreeBSD. However, getting Tailscale running on these systems is still possible, though some tinkering would be required. Instead, we use that tinkering time to set up WireGuard tunnels ourselves.</li> +</ul><br /> +<a class='textlink' href='https://en.wikipedia.org/wiki/WireGuard'>https://en.wikipedia.org/wiki/WireGuard</a><br /> +<a class='textlink' href='https://www.wireguard.com/'>https://www.wireguard.com/</a><br /> +<a class='textlink' href='https://tailscale.com/'>https://tailscale.com/</a><br /> +<br /> +<a href='./f3s-kubernetes-with-freebsd-part-5/wireguard.svg'><img alt='WireGuard Logo' title='WireGuard Logo' src='./f3s-kubernetes-with-freebsd-part-5/wireguard.svg' /></a><br /> +<br /> +<h2 style='display: inline' id='base-configuration'>Base configuration</h2><br /> +<br /> +<span>In the following, we prepare the base configuration for the WireGuard mesh network. We will use a similar configuration on all participating hosts, with the exception of the host IP addresses and the private keys.</span><br /> +<br /> +<h3 style='display: inline' id='freebsd'>FreeBSD</h3><br /> +<br /> +<span>On the FreeBSD hosts <span class='inlinecode'>f0</span>, <span class='inlinecode'>f1</span> and <span class='inlinecode'>f2</span>, similar as last time, first, we bring the system up to date:</span><br /> +<br /> +<!-- Generator: GNU source-highlight 3.1.9 +by Lorenzo Bettini +http://www.lorenzobettini.it +http://www.gnu.org/software/src-highlite --> +<pre>paul@f0:~ % doas freebsd-update fetch +paul@f0:~ % doas freebsd-update install +paul@f0:~ % doas freebsd-update -r <font color="#000000">14.2</font>-RELEASE upgrade +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 +</pre> +<br /> +<span>Next, we install <span class='inlinecode'>wireguard-tools</span> and configure the WireGuard service:</span><br /> +<br /> +<!-- Generator: GNU source-highlight 3.1.9 +by Lorenzo Bettini +http://www.lorenzobettini.it +http://www.gnu.org/software/src-highlite --> +<pre>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/wg<font color="#000000">0</font>.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: <font color="#000000">20246</font> +</pre> +<br /> +<span>We now have the WireGuard up and running, but it is not yet in any functional configuration. We will come back to that later.</span><br /> +<br /> +<span>Next, we add all the participating WireGuard IPs to the <span class='inlinecode'>hosts</span> file. This is only convenience, so we don't have to manage an external DNS server for this:</span><br /> +<br /> +<!-- Generator: GNU source-highlight 3.1.9 +by Lorenzo Bettini +http://www.lorenzobettini.it +http://www.gnu.org/software/src-highlite --> +<pre>paul@f0:~ % cat <<END | doas tee -a /etc/hosts + +<font color="#000000">192.168</font>.<font color="#000000">1.120</font> r0 r0.lan r0.lan.buetow.org +<font color="#000000">192.168</font>.<font color="#000000">1.121</font> r1 r1.lan r1.lan.buetow.org +<font color="#000000">192.168</font>.<font color="#000000">1.122</font> r2 r2.lan r2.lan.buetow.org + +<font color="#000000">192.168</font>.<font color="#000000">2.130</font> f0.wg0 f0.wg0.wan.buetow.org +<font color="#000000">192.168</font>.<font color="#000000">2.131</font> f1.wg0 f1.wg0.wan.buetow.org +<font color="#000000">192.168</font>.<font color="#000000">2.132</font> f2.wg0 f2.wg0.wan.buetow.org + +<font color="#000000">192.168</font>.<font color="#000000">2.120</font> r0.wg0 r0.wg0.wan.buetow.org +<font color="#000000">192.168</font>.<font color="#000000">2.121</font> r1.wg0 r1.wg0.wan.buetow.org +<font color="#000000">192.168</font>.<font color="#000000">2.122</font> r2.wg0 r2.wg0.wan.buetow.org + +<font color="#000000">192.168</font>.<font color="#000000">2.110</font> blowfish.wg0 blowfish.wg0.wan.buetow.org +<font color="#000000">192.168</font>.<font color="#000000">2.111</font> fishfinger.wg0 fishfinger.wg0.wan.buetow.org +END +</pre> +<br /> +<span>As you can see, <span class='inlinecode'>192.168.1.0/24</span> is the network used in my LAN (with the <span class='inlinecode'>fN</span> and <span class='inlinecode'>rN</span> hosts) and <span class='inlinecode'>192.168.2.0/24</span> is the network used for the WireGuard mesh network. The <span class='inlinecode'>wg0</span> interface will be used for all WireGuard traffic.</span><br /> +<br /> +<h3 style='display: inline' id='rocky-linux'>Rocky Linux</h3><br /> +<br /> +<span>We bring the Rocky Linux VMs up to date as well with the following:</span><br /> +<br /> +<!-- Generator: GNU source-highlight 3.1.9 +by Lorenzo Bettini +http://www.lorenzobettini.it +http://www.gnu.org/software/src-highlite --> +<pre>[root@r0 ~] dnf update -y +[root@r0 ~] reboot +</pre> +<br /> +<span>Next, we prepare WireGuard on them. Same as on the FreeBSD hosts, we will only prepare WireGuard without any useful configuration yet:</span><br /> +<span> </span><br /> +<!-- Generator: GNU source-highlight 3.1.9 +by Lorenzo Bettini +http://www.lorenzobettini.it +http://www.gnu.org/software/src-highlite --> +<pre>[root@r0 ~] dnf install -y wireguard-tools +[root@r0 ~] mkdir -p /etc/wireguard +[root@r0 ~] touch /etc/wireguard/wg<font color="#000000">0</font>.conf +[root@r0 ~] systemctl <b><u><font color="#000000">enable</font></u></b> wg-quick@wg0.service +[root@r0 ~] systemctl start wg-quick@wg0.service +[root@r0 ~] systemctl disable firewalld +</pre> +<br /> +<span>We also update the <span class='inlinecode'>hosts</span> file accordingly:</span><br /> +<br /> +<!-- Generator: GNU source-highlight 3.1.9 +by Lorenzo Bettini +http://www.lorenzobettini.it +http://www.gnu.org/software/src-highlite --> +<pre>[root@r0 ~] cat <<END >>/etc/hosts + +<font color="#000000">192.168</font>.<font color="#000000">1.130</font> f0 f0.lan f0.lan.buetow.org +<font color="#000000">192.168</font>.<font color="#000000">1.131</font> f1 f1.lan f1.lan.buetow.org +<font color="#000000">192.168</font>.<font color="#000000">1.132</font> f2 f2.lan f2.lan.buetow.org + +<font color="#000000">192.168</font>.<font color="#000000">2.130</font> f0.wg0 f0.wg0.wan.buetow.org +<font color="#000000">192.168</font>.<font color="#000000">2.131</font> f1.wg0 f1.wg0.wan.buetow.org +<font color="#000000">192.168</font>.<font color="#000000">2.132</font> f2.wg0 f2.wg0.wan.buetow.org + +<font color="#000000">192.168</font>.<font color="#000000">2.120</font> r0.wg0 r0.wg0.wan.buetow.org +<font color="#000000">192.168</font>.<font color="#000000">2.121</font> r1.wg0 r1.wg0.wan.buetow.org +<font color="#000000">192.168</font>.<font color="#000000">2.122</font> r2.wg0 r2.wg0.wan.buetow.org + +<font color="#000000">192.168</font>.<font color="#000000">2.110</font> blowfish.wg0 blowfish.wg0.wan.buetow.org +<font color="#000000">192.168</font>.<font color="#000000">2.111</font> fishfinger.wg0 fishfinger.wg0.wan.buetow.org +END +</pre> +<br /> +<span>Unfortunately, the SELinux policy on Rocky Linux blocks WireGuard's operation. By making the <span class='inlinecode'>wireguard_t</span> domain permissive using <span class='inlinecode'>semanage permissive -a wireguard_t</span>, SELinux will no longer enforce restrictions for WireGuard, allowing it to work as intended:</span><br /> +<br /> +<!-- Generator: GNU source-highlight 3.1.9 +by Lorenzo Bettini +http://www.lorenzobettini.it +http://www.gnu.org/software/src-highlite --> +<pre>[root@r0 ~] dnf install -y policycoreutils-python-utils +[root@r0 ~] semanage permissive -a wireguard_t +[root@r0 ~] reboot +</pre> +<br /> +<a class='textlink' href='https://github.com/angristan/wireguard-install/discussions/499'>https://github.com/angristan/wireguard-install/discussions/499</a><br /> +<br /> +<h3 style='display: inline' id='openbsd'>OpenBSD</h3><br /> +<br /> +<span>Other than the FreeBSD and Rocky Linux hosts involved, my OpenBSD hosts (<span class='inlinecode'>blowfish</span> and <span class='inlinecode'>fishfinger</span>, which are running at OpenBSD Amsterdam and Hetzner on the internet) have been running already for longer, so I can't provide you with the "from scratch" installation details here. In the following, we will only focus on the additional configuration needed to set up WireGuard:</span><br /> +<br /> +<!-- Generator: GNU source-highlight 3.1.9 +by Lorenzo Bettini +http://www.lorenzobettini.it +http://www.gnu.org/software/src-highlite --> +<pre>blowfish$ doas pkg_add wireguard-tools +blowfish$ doas mkdir /etc/wireguard +blowfish$ doas touch /etc/wireguard/wg<font color="#000000">0</font>.conf +blowsish$ cat <<END | doas tee /etc/hostname.wg0 +inet <font color="#000000">192.168</font>.<font color="#000000">2.110</font> <font color="#000000">255.255</font>.<font color="#000000">255.0</font> NONE +up +!/usr/local/bin/wg setconf wg0 /etc/wireguard/wg<font color="#000000">0</font>.conf +END +</pre> +<br /> +<span>Note that on <span class='inlinecode'>blowfish</span>, we configure <span class='inlinecode'>192.168.2.110</span> here in the <span class='inlinecode'>hostname.wg</span>, and on <span class='inlinecode'>fishfinger</span>, we configure <span class='inlinecode'>192.168.2.111</span>. Those are the IP addresses of the WireGuard interfaces on those hosts.</span><br /> +<br /> +<span>And here, we also update the <span class='inlinecode'>hosts</span> file accordingly:</span><br /> +<br /> +<!-- Generator: GNU source-highlight 3.1.9 +by Lorenzo Bettini +http://www.lorenzobettini.it +http://www.gnu.org/software/src-highlite --> +<pre>blowfish$ cat <<END | doas tee -a /etc/hosts + +<font color="#000000">192.168</font>.<font color="#000000">2.130</font> f0.wg0 f0.wg0.wan.buetow.org +<font color="#000000">192.168</font>.<font color="#000000">2.131</font> f1.wg0 f1.wg0.wan.buetow.org +<font color="#000000">192.168</font>.<font color="#000000">2.132</font> f2.wg0 f2.wg0.wan.buetow.org + +<font color="#000000">192.168</font>.<font color="#000000">2.120</font> r0.wg0 r0.wg0.wan.buetow.org +<font color="#000000">192.168</font>.<font color="#000000">2.121</font> r1.wg0 r1.wg0.wan.buetow.org +<font color="#000000">192.168</font>.<font color="#000000">2.122</font> r2.wg0 r2.wg0.wan.buetow.org + +<font color="#000000">192.168</font>.<font color="#000000">2.110</font> blowfish.wg0 blowfish.wg0.wan.buetow.org +<font color="#000000">192.168</font>.<font color="#000000">2.111</font> fishfinger.wg0 fishfinger.wg0.wan.buetow.org +END +</pre> +<br /> +<h2 style='display: inline' id='wireguard-configuration'>WireGuard configuration</h2><br /> +<br /> +<span>So far, we have only started WireGuard on all participating hosts without any useful configuration. This means that no VPN tunnel has been established yet between any of the hosts.</span><br /> +<br /> +<h3 style='display: inline' id='example-wg0conf'>Example <span class='inlinecode'>wg0.conf</span></h3><br /> +<br /> +<span>Generally speaking, a <span class='inlinecode'>wg0.conf</span> looks like this (example from <span class='inlinecode'>f0</span> host):</span><br /> +<br /> +<pre> +[Interface] +# f0.wg0.wan.buetow.org +Address = 192.168.2.130 +PrivateKey = ************************** +ListenPort = 56709 + +[Peer] +# f1.lan.buetow.org as f1.wg0.wan.buetow.org +PublicKey = ************************** +PresharedKey = ************************** +AllowedIPs = 192.168.2.131/32 +Endpoint = 192.168.1.131:56709 +# No KeepAlive configured + +[Peer] +# f2.lan.buetow.org as f2.wg0.wan.buetow.org +PublicKey = ************************** +PresharedKey = ************************** +AllowedIPs = 192.168.2.132/32 +Endpoint = 192.168.1.132:56709 +# No KeepAlive configured + +[Peer] +# r0.lan.buetow.org as r0.wg0.wan.buetow.org +PublicKey = ************************** +PresharedKey = ************************** +AllowedIPs = 192.168.2.120/32 +Endpoint = 192.168.1.120:56709 +# No KeepAlive configured + +[Peer] +# r1.lan.buetow.org as r1.wg0.wan.buetow.org +PublicKey = ************************** +PresharedKey = ************************** +AllowedIPs = 192.168.2.121/32 +Endpoint = 192.168.1.121:56709 +# No KeepAlive configured + +[Peer] +# r2.lan.buetow.org as r2.wg0.wan.buetow.org +PublicKey = ************************** +PresharedKey = ************************** +AllowedIPs = 192.168.2.122/32 +Endpoint = 192.168.1.122:56709 +# No KeepAlive configured + +[Peer] +# blowfish.buetow.org as blowfish.wg0.wan.buetow.org +PublicKey = ************************** +PresharedKey = ************************** +AllowedIPs = 192.168.2.110/32 +Endpoint = 23.88.35.144:56709 +PersistentKeepalive = 25 + +[Peer] +# fishfinger.buetow.org as fishfinger.wg0.wan.buetow.org +PublicKey = ************************** +PresharedKey = ************************** +AllowedIPs = 192.168.2.111/32 +Endpoint = 46.23.94.99:56709 +PersistentKeepalive = 25 +</pre> +<br /> +<span>Whereas there are two main sections. One is <span class='inlinecode'>[Interface]</span>, which configures the current host (here: <span class='inlinecode'>f0</span>):</span><br /> +<br /> +<ul> +<li><span class='inlinecode'>Address</span>: Local virtual IP address on the WireGuard interface.</li> +<li><span class='inlinecode'>PrivateKey</span>: Private key for this node.</li> +<li><span class='inlinecode'>ListenPort</span>: Port on which this WireGuard interface listens for incoming connections.</li> +</ul><br /> +<span>And in the following, there is one <span class='inlinecode'>[Peer]</span> section for every peer node on the mesh network:</span><br /> +<br /> +<ul> +<li><span class='inlinecode'>PublicKey</span>: The public key of the remote peer is used to authenticate their identity.</li> +<li><span class='inlinecode'>PresharedKey</span>: An optional symmetric key is used to enhance security (used in addition to PublicKey).</li> +<li><span class='inlinecode'>AllowedIPs</span>: IPs or subnets routed through this peer (traffic is allowed to/from these IPs).</li> +<li><span class='inlinecode'>Endpoint</span>: The public IP:port combination of the remote peer for connection.</li> +<li><span class='inlinecode'>PersistentKeepalive</span>: Keeps the tunnel alive by sending periodic packets; used for NAT traversal.</li> +</ul><br /> +<h3 style='display: inline' id='nat-traversal-and-keepalive'>NAT traversal and keepalive</h3><br /> +<br /> +<span>As all participating hosts, except for <span class='inlinecode'>blowfish</span> and <span class='inlinecode'>fishfinger</span> (which are on the internet), are behind a NAT gateway (my home router), we need to use <span class='inlinecode'>PersistentKeepalive</span> to establish and maintain the VPN tunnel from the LAN to the internet because:</span><br /> +<br /> +<span class='quote'>By default, WireGuard tries to be as silent as possible when not being used; it is not a chatty protocol. For the most part, it only transmits data when a peer wishes to send packets. When it's not being asked to send packets, it stops sending packets until it is asked again. In the majority of configurations, this works well. However, when a peer is behind NAT or a firewall, it might wish to be able to receive incoming packets even when it is not sending any packets. Because NAT and stateful firewalls keep track of "connections", if a peer behind NAT or a firewall wishes to receive incoming packets, he must keep the NAT/firewall mapping valid, by periodically sending keepalive packets. This is called persistent keepalives. When this option is enabled, a keepalive packet is sent to the server endpoint once every interval seconds. A sensible interval that works with a wide variety of firewalls is 25 seconds. Setting it to 0 turns the feature off, which is the default, since most users will not need this, and it makes WireGuard slightly more chatty. This feature may be specified by adding the PersistentKeepalive = field to a peer in the configuration file, or setting persistent-keepalive at the command line. If you don't need this feature, don't enable it. But if you're behind NAT or a firewall and you want to receive incoming connections long after network traffic has gone silent, this option will keep the "connection" open in the eyes of NAT.</span><br /> +<br /> +<span>That's why you see <span class='inlinecode'>PersistentKeepAlive = 25</span> in the <span class='inlinecode'>blowfish</span> and <span class='inlinecode'>fishfinger</span> peer configurations. This means that every 25 seconds, a keep-alive signal is sent over the tunnel to maintain its connection. If the tunnel is not yet established, it will be created within 25 seconds latest.</span><br /> +<br /> +<span>Without this, we might never have a VPN tunnel open, as the systems in the LAN may not actively attempt to contact <span class='inlinecode'>blowfish</span> and <span class='inlinecode'>fishfinger</span> on their own. In fact, the opposite would likely occur, with the traffic flowing inward instead of outward (this is beyond the scope of this blog post but will be covered in a later post in this series!).</span><br /> +<br /> +<h3 style='display: inline' id='preshared-key'>Preshared key</h3><br /> +<br /> +<span>In a WireGuard configuration, the PSK (preshared key) is an optional additional layer of symmetric encryption used alongside the standard public key cryptography. It is a shared secret known to both peers that enhances security by requiring an attacker to compromise both the private keys and the PSK to decrypt communication. While optional, using a PSK is better as it strengthens the cryptographic security, mitigating risks of potential vulnerabilities in the key exchange process.</span><br /> +<br /> +<span>So, because it's better, we are using it.</span><br /> +<br /> +<h2 style='display: inline' id='mesh-network-generator'>Mesh network generator</h2><br /> +<br /> +<span>Manually generating <span class='inlinecode'>wg0.conf</span> files for every peer in a mesh network setup is cumbersome because each peer requires its own unique public/private key pair and a preshared key for each VPN tunnel (resulting in 29 preshared keys for 8 hosts). This complexity scales exponentially with the number of peers as the relationships between all peers must be explicitly defined, including their unique configurations such as <span class='inlinecode'>AllowedIPs</span> and <span class='inlinecode'>Endpoint</span> and optional settings like <span class='inlinecode'>PersistentKeepalive</span>. Automating the process ensures consistency, reduces human error, saves considerable time, and allows for centralized management of configuration files.</span><br /> +<br /> +<span>Instead, a script can handle key generation, coordinate relationships, and generate all necessary configuration files simultaneously, making it scalable and far less error-prone.</span><br /> +<br /> +<span>I have written a Ruby script <span class='inlinecode'>wireguardmeshgenerator.rb</span> to do this for our purposes:</span><br /> +<br /> +<a class='textlink' href='https://codeberg.org/snonux/wireguardmeshgenerator'>https://codeberg.org/snonux/wireguardmeshgenerator</a><br /> +<br /> +<span>I use Fedora Linux as my main driver on my personal Laptop, so the script was developed and tested only on Fedora Linux. However, it should also work on other Linux and Unix-like systems.</span><br /> +<br /> +<span>To set up the mesh generator on Fedora Linux, we run the following:</span><br /> +<br /> +<!-- Generator: GNU source-highlight 3.1.9 +by Lorenzo Bettini +http://www.lorenzobettini.it +http://www.gnu.org/software/src-highlite --> +<pre>> git clone https://codeberg.org/snonux/wireguardmeshgenerator +> cd ./wireguardmeshgenerator +> bundle install +> sudo dnf install -y wireguard-tools +</pre> +<br /> +<span>This assumes that Ruby and the <span class='inlinecode'>bundler</span> gem are already installed. If not, refer to the docs of your distribution.</span><br /> +<br /> +<h3 style='display: inline' id='wireguardmeshgeneratoryaml'><span class='inlinecode'>wireguardmeshgenerator.yaml</span></h3><br /> +<br /> +<span>The file <span class='inlinecode'>wireguardmeshgenerator.yaml</span> configures the mesh generator script.</span><br /> +<br /> +<pre> +--- +hosts: + f0: + os: FreeBSD + ssh: + user: paul + conf_dir: /usr/local/etc/wireguard + sudo_cmd: doas + reload_cmd: service wireguard reload + lan: + domain: 'lan.buetow.org' + ip: '192.168.1.130' + wg0: + domain: 'wg0.wan.buetow.org' + ip: '192.168.2.130' + f1: + os: FreeBSD + ssh: + user: paul + conf_dir: /usr/local/etc/wireguard + sudo_cmd: doas + reload_cmd: service wireguard reload + lan: + domain: 'lan.buetow.org' + ip: '192.168.1.131' + wg0: + domain: 'wg0.wan.buetow.org' + ip: '192.168.2.131' + f2: + os: FreeBSD + ssh: + user: paul + conf_dir: /usr/local/etc/wireguard + sudo_cmd: doas + reload_cmd: service wireguard reload + lan: + domain: 'lan.buetow.org' + ip: '192.168.1.132' + wg0: + domain: 'wg0.wan.buetow.org' + ip: '192.168.2.132' + r0: + os: Linux + ssh: + user: root + conf_dir: /etc/wireguard + sudo_cmd: + reload_cmd: systemctl reload wg-quick@wg0.service + lan: + domain: 'lan.buetow.org' + ip: '192.168.1.120' + wg0: + domain: 'wg0.wan.buetow.org' + ip: '192.168.2.120' + r1: + os: Linux + ssh: + user: root + conf_dir: /etc/wireguard + sudo_cmd: + reload_cmd: systemctl reload wg-quick@wg0.service + lan: + domain: 'lan.buetow.org' + ip: '192.168.1.121' + wg0: + domain: 'wg0.wan.buetow.org' + ip: '192.168.2.121' + r2: + os: Linux + ssh: + user: root + conf_dir: /etc/wireguard + sudo_cmd: + reload_cmd: systemctl reload wg-quick@wg0.service + lan: + domain: 'lan.buetow.org' + ip: '192.168.1.122' + wg0: + domain: 'wg0.wan.buetow.org' + ip: '192.168.2.122' + blowfish: + os: OpenBSD + ssh: + user: rex + conf_dir: /etc/wireguard + sudo_cmd: doas + reload_cmd: sh /etc/netstart wg0 + internet: + domain: 'buetow.org' + ip: '23.88.35.144' + wg0: + domain: 'wg0.wan.buetow.org' + ip: '192.168.2.110' + fishfinger: + os: OpenBSD + ssh: + user: rex + conf_dir: /etc/wireguard + sudo_cmd: doas + reload_cmd: sh /etc/netstart wg0 + internet: + domain: 'buetow.org' + ip: '46.23.94.99' + wg0: + domain: 'wg0.wan.buetow.org' + ip: '192.168.2.111' +</pre> +<br /> +<span>The file specifies details such as SSH user settings, configuration directories, sudo or reload commands, and IP/domain assignments for both internal LAN-facing interfaces and WireGuard (<span class='inlinecode'>wg0</span>) interfaces. Each host is assigned specific roles, including internal participants and publicly accessible nodes with internet-facing IPs, enabling the creation of a fully connected mesh VPN.</span><br /> +<br /> +<h3 style='display: inline' id='wireguardmeshgeneratorrb-overview'><span class='inlinecode'>wireguardmeshgenerator.rb</span> overview</h3><br /> +<br /> +<span>The <span class='inlinecode'>wireguardmeshgenerator.rb</span> script consists of the following base classes:</span><br /> +<br /> +<ul> +<li><span class='inlinecode'>KeyTool</span>: Manages WireGuard key generation and retrieval. It ensures the presence of public/private key pairs and preshared keys (PSKs). If keys are missing, it generates them using the <span class='inlinecode'>wg</span> tool. It provides methods to read the public/private keys and retrieve or generate a PSK for communication with a peer. The keys are stored in a temp directory on the system from where the generator is run.</li> +<li><span class='inlinecode'>PeerSnippet</span>: A <span class='inlinecode'>Struct</span> representing the configuration for a single WireGuard peer in the mesh. Based on the provided attributes and configuration, it generates the peer's WireGuard configuration, including public key, PSK, allowed IPs, endpoint, and keepalive settings.</li> +<li><span class='inlinecode'>WireguardConfig</span>: This function generates WireGuard configuration files for the specified host in the mesh network. It includes the <span class='inlinecode'>[Interface]</span> section for the host itself and the <span class='inlinecode'>[Peer]</span> sections for all other peers. It can also clean up generated files and directories and create the required directory structure for storing configuration files locally on the system from which the script is run.</li> +<li><span class='inlinecode'>InstallConfig</span>: Handles uploading, installing, and restarting the WireGuard service on remote hosts using SSH and SCP. It ensures the configuration file is uploaded to the remote machine, the necessary directories are present and correctly configured, and the WireGuard service reloads with the new configuration.</li> +</ul><br /> +<span>At the end (if you want to see the code for the stuff listed above, go to the Git repo and have a look), we glue it all together in this block:</span><br /> +<br /> +<!-- Generator: GNU source-highlight 3.1.9 +by Lorenzo Bettini +http://www.lorenzobettini.it +http://www.gnu.org/software/src-highlite --> +<pre><b><u><font color="#000000">begin</font></u></b> + options = { hosts: [] } + OptionParser.new <b><u><font color="#000000">do</font></u></b> |opts| + opts.banner = <font color="#808080">'Usage: wireguardmeshgenerator.rb [options]'</font> + opts.on(<font color="#808080">'--generate'</font>, <font color="#808080">'Generate Wireguard configs'</font>) <b><u><font color="#000000">do</font></u></b> + options[:generate] = <b><u><font color="#000000">true</font></u></b> + <b><u><font color="#000000">end</font></u></b> + opts.on(<font color="#808080">'--install'</font>, <font color="#808080">'Install Wireguard configs'</font>) <b><u><font color="#000000">do</font></u></b> + options[:install] = <b><u><font color="#000000">true</font></u></b> + <b><u><font color="#000000">end</font></u></b> + opts.on(<font color="#808080">'--clean'</font>, <font color="#808080">'Clean Wireguard configs'</font>) <b><u><font color="#000000">do</font></u></b> + options[:clean] = <b><u><font color="#000000">true</font></u></b> + <b><u><font color="#000000">end</font></u></b> + opts.on(<font color="#808080">'--hosts=HOSTS'</font>, <font color="#808080">'Comma separated hosts to configure'</font>) <b><u><font color="#000000">do</font></u></b> |hosts| + options[:hosts] = hosts.split(<font color="#808080">','</font>) + <b><u><font color="#000000">end</font></u></b> + <b><u><font color="#000000">end</font></u></b>.parse! + + conf = YAML.load_file(<font color="#808080">'wireguardmeshgenerator.yaml'</font>).freeze + conf[<font color="#808080">'hosts'</font>].keys.select { options[:hosts].empty? || options[:hosts].<b><u><font color="#000000">include</font></u></b>?(_1) } + .each <b><u><font color="#000000">do</font></u></b> |host| + <i><font color="silver"># Generate Wireguard configuration for the host reload!</font></i> + WireguardConfig.new(host, conf[<font color="#808080">'hosts'</font>]).generate! <b><u><font color="#000000">if</font></u></b> options[:generate] + <i><font color="silver"># Install Wireguard configuration for the host.</font></i> + InstallConfig.new(host, conf[<font color="#808080">'hosts'</font>]).upload!.install!.reload! <b><u><font color="#000000">if</font></u></b> options[:install] + <i><font color="silver"># Clean Wireguard configuration for the host.</font></i> + WireguardConfig.new(host, conf[<font color="#808080">'hosts'</font>]).clean! <b><u><font color="#000000">if</font></u></b> options[:clean] + <b><u><font color="#000000">end</font></u></b> +<b><u><font color="#000000">rescue</font></u></b> StandardError => e + puts <font color="#808080">"Error: #{e.message}"</font> + puts e.backtrace.join(<font color="#808080">"\n"</font>) + exit <font color="#000000">2</font> +<b><u><font color="#000000">end</font></u></b> +</pre> +<br /> +<span>And we also have a <span class='inlinecode'>Rakefile</span>:</span><br /> +<br /> +<!-- Generator: GNU source-highlight 3.1.9 +by Lorenzo Bettini +http://www.lorenzobettini.it +http://www.gnu.org/software/src-highlite --> +<pre>task :generate <b><u><font color="#000000">do</font></u></b> + ruby <font color="#808080">'wireguardmeshgenerator.rb'</font>, <font color="#808080">'--generate'</font> +<b><u><font color="#000000">end</font></u></b> + +task :clean <b><u><font color="#000000">do</font></u></b> + ruby <font color="#808080">'wireguardmeshgenerator.rb'</font>, <font color="#808080">'--clean'</font> +<b><u><font color="#000000">end</font></u></b> + +task :install <b><u><font color="#000000">do</font></u></b> + ruby <font color="#808080">'wireguardmeshgenerator.rb'</font>, <font color="#808080">'--install'</font> +<b><u><font color="#000000">end</font></u></b> + +task default: :generate +</pre> +<br /> +<br /> +<h2 style='display: inline' id='invoking-the-mesh-network-generator'>Invoking the mesh network generator</h2><br /> +<br /> +<h3 style='display: inline' id='generating-the-wg0conf-files-and-keys'>Generating the <span class='inlinecode'>wg0.conf</span> files and keys</h3><br /> +<br /> +<span>To generate everything (the <span class='inlinecode'>wg0.conf</span> of all participating hosts, including all keys involved), we run the following:</span><br /> +<br /> +<!-- Generator: GNU source-highlight 3.1.9 +by Lorenzo Bettini +http://www.lorenzobettini.it +http://www.gnu.org/software/src-highlite --> +<pre>> rake generate +/usr/bin/ruby wireguardmeshgenerator.rb --generate +Generating dist/f<font color="#000000">0</font>/etc/wireguard/wg<font color="#000000">0</font>.conf +Generating dist/f<font color="#000000">1</font>/etc/wireguard/wg<font color="#000000">0</font>.conf +Generating dist/f<font color="#000000">2</font>/etc/wireguard/wg<font color="#000000">0</font>.conf +Generating dist/r<font color="#000000">0</font>/etc/wireguard/wg<font color="#000000">0</font>.conf +Generating dist/r<font color="#000000">1</font>/etc/wireguard/wg<font color="#000000">0</font>.conf +Generating dist/r<font color="#000000">2</font>/etc/wireguard/wg<font color="#000000">0</font>.conf +Generating dist/blowfish/etc/wireguard/wg<font color="#000000">0</font>.conf +Generating dist/fishfinger/etc/wireguard/wg<font color="#000000">0</font>.conf +</pre> +<br /> +<span>It generated all the <span class='inlinecode'>wg0.conf</span> files listed in the output, plus those keys:</span><br /> +<br /> +<!-- Generator: GNU source-highlight 3.1.9 +by Lorenzo Bettini +http://www.lorenzobettini.it +http://www.gnu.org/software/src-highlite --> +<pre>> find keys/ -type f +keys/f<font color="#000000">0</font>/priv.key +keys/f<font color="#000000">0</font>/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/f<font color="#000000">1</font>/priv.key +keys/f<font color="#000000">1</font>/pub.key +keys/f<font color="#000000">2</font>/priv.key +keys/f<font color="#000000">2</font>/pub.key +keys/r<font color="#000000">0</font>/priv.key +keys/r<font color="#000000">0</font>/pub.key +keys/r<font color="#000000">1</font>/priv.key +keys/r<font color="#000000">1</font>/pub.key +keys/r<font color="#000000">2</font>/priv.key +keys/r<font color="#000000">2</font>/pub.key +keys/blowfish/priv.key +keys/blowfish/pub.key +keys/fishfinger/priv.key +keys/fishfinger/pub.key +</pre> +<br /> +<span>Those keys are embedded in the resulting <span class='inlinecode'>wg0.conf</span>, so later, we only need to install the <span class='inlinecode'>wg0.conf</span> files and not all the keys individually.</span><br /> +<br /> +<h3 style='display: inline' id='installing-the-wg0conf-files'>Installing the <span class='inlinecode'>wg0.conf</span> files</h3><br /> +<br /> +<span>Uploading the <span class='inlinecode'>wg0.conf</span> files to the participating hosts and reloading WireGuard on them is then just a matter of executing (this expects, that all participating hosts are up and running):</span><br /> +<br /> +<!-- Generator: GNU source-highlight 3.1.9 +by Lorenzo Bettini +http://www.lorenzobettini.it +http://www.gnu.org/software/src-highlite --> +<pre>> rake install +/usr/bin/ruby wireguardmeshgenerator.rb --install +Uploading dist/f<font color="#000000">0</font>/etc/wireguard/wg<font color="#000000">0</font>.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 <font color="#000000">700</font> /usr/local/etc/wireguard ++ doas mv -v wg0.conf /usr/local/etc/wireguard +wg0.conf -> /usr/local/etc/wireguard/wg<font color="#000000">0</font>.conf ++ doas chmod <font color="#000000">644</font> /usr/local/etc/wireguard/wg<font color="#000000">0</font>.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/f<font color="#000000">1</font>/etc/wireguard/wg<font color="#000000">0</font>.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 <font color="#000000">700</font> /usr/local/etc/wireguard ++ doas mv -v wg0.conf /usr/local/etc/wireguard +wg0.conf -> /usr/local/etc/wireguard/wg<font color="#000000">0</font>.conf ++ doas chmod <font color="#000000">644</font> /usr/local/etc/wireguard/wg<font color="#000000">0</font>.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/f<font color="#000000">2</font>/etc/wireguard/wg<font color="#000000">0</font>.conf to f2.lan.buetow.org:. +Installing Wireguard config on f2 +Uploading cmd.sh to f2.lan.buetow.org:. ++ [ ! -d /usr/local/etc/wireguard ] ++ doas chmod <font color="#000000">700</font> /usr/local/etc/wireguard ++ doas mv -v wg0.conf /usr/local/etc/wireguard +wg0.conf -> /usr/local/etc/wireguard/wg<font color="#000000">0</font>.conf ++ doas chmod <font color="#000000">644</font> /usr/local/etc/wireguard/wg<font color="#000000">0</font>.conf ++ rm cmd.sh +Reloading Wireguard on f2 +Uploading cmd.sh to f2.lan.buetow.org:. ++ doas service wireguard reload ++ rm cmd.sh +Uploading dist/r<font color="#000000">0</font>/etc/wireguard/wg<font color="#000000">0</font>.conf to r0.lan.buetow.org:. +Installing Wireguard config on r0 +Uploading cmd.sh to r0.lan.buetow.org:. ++ <font color="#808080">'['</font> <font color="#808080">'!'</font> -d /etc/wireguard <font color="#808080">']'</font> ++ chmod <font color="#000000">700</font> /etc/wireguard ++ mv -v wg0.conf /etc/wireguard +renamed <font color="#808080">'wg0.conf'</font> -> <font color="#808080">'/etc/wireguard/wg0.conf'</font> ++ chmod <font color="#000000">644</font> /etc/wireguard/wg<font color="#000000">0</font>.conf ++ rm cmd.sh +Reloading Wireguard on r0 +Uploading cmd.sh to r0.lan.buetow.org:. ++ systemctl reload wg-quick@wg0.service ++ rm cmd.sh +Uploading dist/r<font color="#000000">1</font>/etc/wireguard/wg<font color="#000000">0</font>.conf to r1.lan.buetow.org:. +Installing Wireguard config on r1 +Uploading cmd.sh to r1.lan.buetow.org:. ++ <font color="#808080">'['</font> <font color="#808080">'!'</font> -d /etc/wireguard <font color="#808080">']'</font> ++ chmod <font color="#000000">700</font> /etc/wireguard ++ mv -v wg0.conf /etc/wireguard +renamed <font color="#808080">'wg0.conf'</font> -> <font color="#808080">'/etc/wireguard/wg0.conf'</font> ++ chmod <font color="#000000">644</font> /etc/wireguard/wg<font color="#000000">0</font>.conf ++ rm cmd.sh +Reloading Wireguard on r1 +Uploading cmd.sh to r1.lan.buetow.org:. ++ systemctl reload wg-quick@wg0.service ++ rm cmd.sh +Uploading dist/r<font color="#000000">2</font>/etc/wireguard/wg<font color="#000000">0</font>.conf to r2.lan.buetow.org:. +Installing Wireguard config on r2 +Uploading cmd.sh to r2.lan.buetow.org:. ++ <font color="#808080">'['</font> <font color="#808080">'!'</font> -d /etc/wireguard <font color="#808080">']'</font> ++ chmod <font color="#000000">700</font> /etc/wireguard ++ mv -v wg0.conf /etc/wireguard +renamed <font color="#808080">'wg0.conf'</font> -> <font color="#808080">'/etc/wireguard/wg0.conf'</font> ++ chmod <font color="#000000">644</font> /etc/wireguard/wg<font color="#000000">0</font>.conf ++ rm cmd.sh +Reloading Wireguard on r2 +Uploading cmd.sh to r2.lan.buetow.org:. ++ systemctl reload wg-quick@wg0.service ++ rm cmd.sh +Uploading dist/blowfish/etc/wireguard/wg<font color="#000000">0</font>.conf to blowfish.buetow.org:. +Installing Wireguard config on blowfish +Uploading cmd.sh to blowfish.buetow.org:. ++ [ ! -d /etc/wireguard ] ++ doas chmod <font color="#000000">700</font> /etc/wireguard ++ doas mv -v wg0.conf /etc/wireguard +wg0.conf -> /etc/wireguard/wg<font color="#000000">0</font>.conf ++ doas chmod <font color="#000000">644</font> /etc/wireguard/wg<font color="#000000">0</font>.conf ++ rm cmd.sh +Reloading Wireguard on blowfish +Uploading cmd.sh to blowfish.buetow.org:. ++ doas sh /etc/netstart wg0 ++ rm cmd.sh +Uploading dist/fishfinger/etc/wireguard/wg<font color="#000000">0</font>.conf to fishfinger.buetow.org:. +Installing Wireguard config on fishfinger +Uploading cmd.sh to fishfinger.buetow.org:. ++ [ ! -d /etc/wireguard ] ++ doas chmod <font color="#000000">700</font> /etc/wireguard ++ doas mv -v wg0.conf /etc/wireguard +wg0.conf -> /etc/wireguard/wg<font color="#000000">0</font>.conf ++ doas chmod <font color="#000000">644</font> /etc/wireguard/wg<font color="#000000">0</font>.conf ++ rm cmd.sh +Reloading Wireguard on fishfinger +Uploading cmd.sh to fishfinger.buetow.org:. ++ doas sh /etc/netstart wg0 ++ rm cmd.sh +</pre> +<br /> +<h3 style='display: inline' id='re-generating-mesh-and-installing-the-wg0conf-files-again'>Re-generating mesh and installing the <span class='inlinecode'>wg0.conf</span> files again</h3><br /> +<br /> +<span>The mesh network can be re-generated and re-installed as follows:</span><br /> +<br /> +<!-- Generator: GNU source-highlight 3.1.9 +by Lorenzo Bettini +http://www.lorenzobettini.it +http://www.gnu.org/software/src-highlite --> +<pre>> rake clean +> rake generate +> rake install +</pre> +<br /> +<span>That would also delete and re-generate all the keys involved.</span><br /> +<br /> +<h2 style='display: inline' id='happy-wireguard-ing'>Happy WireGuard-ing</h2><br /> +<br /> +<span>All is set up now. E.g. on <span class='inlinecode'>f0</span>:</span><br /> +<br /> +<!-- Generator: GNU source-highlight 3.1.9 +by Lorenzo Bettini +http://www.lorenzobettini.it +http://www.gnu.org/software/src-highlite --> +<pre>paul@f0:~ % doas wg show +interface: wg0 + public key: Jm6YItMt94++dIeOyVi1I9AhNt2qQcryxCZezoX7X2Y= + private key: (hidden) + listening port: <font color="#000000">56709</font> + +peer: 8PvGZH1NohHpZPVJyjhctBX9xblsNvYBhpg68FsFcns= + preshared key: (hidden) + endpoint: <font color="#000000">46.23</font>.<font color="#000000">94.99</font>:<font color="#000000">56709</font> + allowed ips: <font color="#000000">192.168</font>.<font color="#000000">2.111</font>/<font color="#000000">32</font> + latest handshake: <font color="#000000">1</font> minute, <font color="#000000">46</font> seconds ago + transfer: <font color="#000000">124</font> B received, <font color="#000000">1.75</font> KiB sent + persistent keepalive: every <font color="#000000">25</font> seconds + +peer: Xow+d3qVXgUMk4pcRSQ6Fe+vhYBa3VDyHX/4jrGoKns= + preshared key: (hidden) + endpoint: <font color="#000000">23.88</font>.<font color="#000000">35.144</font>:<font color="#000000">56709</font> + allowed ips: <font color="#000000">192.168</font>.<font color="#000000">2.110</font>/<font color="#000000">32</font> + latest handshake: <font color="#000000">1</font> minute, <font color="#000000">52</font> seconds ago + transfer: <font color="#000000">124</font> B received, <font color="#000000">1.60</font> KiB sent + persistent keepalive: every <font color="#000000">25</font> seconds + +peer: s3e93XoY7dPUQgLiVO4d8x/SRCFgEew+/wP<font color="#000000">7</font>+zwgehI= + preshared key: (hidden) + endpoint: <font color="#000000">192.168</font>.<font color="#000000">1.120</font>:<font color="#000000">56709</font> + allowed ips: <font color="#000000">192.168</font>.<font color="#000000">2.120</font>/<font color="#000000">32</font> + +peer: 2htXdNcxzpI2FdPDJy4T4VGtm1wpMEQu1AkQHjNY6F8= + preshared key: (hidden) + endpoint: <font color="#000000">192.168</font>.<font color="#000000">1.131</font>:<font color="#000000">56709</font> + allowed ips: <font color="#000000">192.168</font>.<font color="#000000">2.131</font>/<font color="#000000">32</font> + +peer: 0Y/H20W8YIbF7DA1sMwMacLI8WS9yG+<font color="#000000">1</font>/QO7m2oyllg= + preshared key: (hidden) + endpoint: <font color="#000000">192.168</font>.<font color="#000000">1.122</font>:<font color="#000000">56709</font> + allowed ips: <font color="#000000">192.168</font>.<font color="#000000">2.122</font>/<font color="#000000">32</font> + +peer: Hhy9kMPOOjChXV2RA5WeCGs+J0FE3rcNPDw/TLSn7i8= + preshared key: (hidden) + endpoint: <font color="#000000">192.168</font>.<font color="#000000">1.121</font>:<font color="#000000">56709</font> + allowed ips: <font color="#000000">192.168</font>.<font color="#000000">2.121</font>/<font color="#000000">32</font> + +peer: SlGVsACE1wiaRoGvCR3f7AuHfRS+1jjhS+YwEJ2HvF0= + preshared key: (hidden) + endpoint: <font color="#000000">192.168</font>.<font color="#000000">1.132</font>:<font color="#000000">56709</font> + allowed ips: <font color="#000000">192.168</font>.<font color="#000000">2.132</font>/<font color="#000000">32</font> +</pre> +<br /> +<span>All the hosts are pingable as well, e.g.:</span><br /> +<br /> +<!-- Generator: GNU source-highlight 3.1.9 +by Lorenzo Bettini +http://www.lorenzobettini.it +http://www.gnu.org/software/src-highlite --> +<pre>paul@f0:~ % foreach peer ( f1 f2 r0 r1 r2 blowfish fishfinger ) +foreach? ping -c<font color="#000000">2</font> $peer.wg0 +foreach? echo +foreach? end +PING f1.wg0 (<font color="#000000">192.168</font>.<font color="#000000">2.131</font>): <font color="#000000">56</font> data bytes +<font color="#000000">64</font> bytes from <font color="#000000">192.168</font>.<font color="#000000">2.131</font>: icmp_seq=<font color="#000000">0</font> ttl=<font color="#000000">64</font> time=<font color="#000000">0.334</font> ms +<font color="#000000">64</font> bytes from <font color="#000000">192.168</font>.<font color="#000000">2.131</font>: icmp_seq=<font color="#000000">1</font> ttl=<font color="#000000">64</font> time=<font color="#000000">0.260</font> ms + +--- f1.wg0 ping statistics --- +<font color="#000000">2</font> packets transmitted, <font color="#000000">2</font> packets received, <font color="#000000">0.0</font>% packet loss +round-trip min/avg/max/stddev = <font color="#000000">0.260</font>/<font color="#000000">0.297</font>/<font color="#000000">0.334</font>/<font color="#000000">0.037</font> ms + +PING f2.wg0 (<font color="#000000">192.168</font>.<font color="#000000">2.132</font>): <font color="#000000">56</font> data bytes +<font color="#000000">64</font> bytes from <font color="#000000">192.168</font>.<font color="#000000">2.132</font>: icmp_seq=<font color="#000000">0</font> ttl=<font color="#000000">64</font> time=<font color="#000000">0.323</font> ms +<font color="#000000">64</font> bytes from <font color="#000000">192.168</font>.<font color="#000000">2.132</font>: icmp_seq=<font color="#000000">1</font> ttl=<font color="#000000">64</font> time=<font color="#000000">0.303</font> ms + +--- f2.wg0 ping statistics --- +<font color="#000000">2</font> packets transmitted, <font color="#000000">2</font> packets received, <font color="#000000">0.0</font>% packet loss +round-trip min/avg/max/stddev = <font color="#000000">0.303</font>/<font color="#000000">0.313</font>/<font color="#000000">0.323</font>/<font color="#000000">0.010</font> ms + +PING r0.wg0 (<font color="#000000">192.168</font>.<font color="#000000">2.120</font>): <font color="#000000">56</font> data bytes +<font color="#000000">64</font> bytes from <font color="#000000">192.168</font>.<font color="#000000">2.120</font>: icmp_seq=<font color="#000000">0</font> ttl=<font color="#000000">64</font> time=<font color="#000000">0.716</font> ms +<font color="#000000">64</font> bytes from <font color="#000000">192.168</font>.<font color="#000000">2.120</font>: icmp_seq=<font color="#000000">1</font> ttl=<font color="#000000">64</font> time=<font color="#000000">0.406</font> ms + +--- r0.wg0 ping statistics --- +<font color="#000000">2</font> packets transmitted, <font color="#000000">2</font> packets received, <font color="#000000">0.0</font>% packet loss +round-trip min/avg/max/stddev = <font color="#000000">0.406</font>/<font color="#000000">0.561</font>/<font color="#000000">0.716</font>/<font color="#000000">0.155</font> ms + +PING r1.wg0 (<font color="#000000">192.168</font>.<font color="#000000">2.121</font>): <font color="#000000">56</font> data bytes +<font color="#000000">64</font> bytes from <font color="#000000">192.168</font>.<font color="#000000">2.121</font>: icmp_seq=<font color="#000000">0</font> ttl=<font color="#000000">64</font> time=<font color="#000000">0.639</font> ms +<font color="#000000">64</font> bytes from <font color="#000000">192.168</font>.<font color="#000000">2.121</font>: icmp_seq=<font color="#000000">1</font> ttl=<font color="#000000">64</font> time=<font color="#000000">0.629</font> ms + +--- r1.wg0 ping statistics --- +<font color="#000000">2</font> packets transmitted, <font color="#000000">2</font> packets received, <font color="#000000">0.0</font>% packet loss +round-trip min/avg/max/stddev = <font color="#000000">0.629</font>/<font color="#000000">0.634</font>/<font color="#000000">0.639</font>/<font color="#000000">0.005</font> ms + +PING r2.wg0 (<font color="#000000">192.168</font>.<font color="#000000">2.122</font>): <font color="#000000">56</font> data bytes +<font color="#000000">64</font> bytes from <font color="#000000">192.168</font>.<font color="#000000">2.122</font>: icmp_seq=<font color="#000000">0</font> ttl=<font color="#000000">64</font> time=<font color="#000000">0.569</font> ms +<font color="#000000">64</font> bytes from <font color="#000000">192.168</font>.<font color="#000000">2.122</font>: icmp_seq=<font color="#000000">1</font> ttl=<font color="#000000">64</font> time=<font color="#000000">0.479</font> ms + +--- r2.wg0 ping statistics --- +<font color="#000000">2</font> packets transmitted, <font color="#000000">2</font> packets received, <font color="#000000">0.0</font>% packet loss +round-trip min/avg/max/stddev = <font color="#000000">0.479</font>/<font color="#000000">0.524</font>/<font color="#000000">0.569</font>/<font color="#000000">0.045</font> ms + +PING blowfish.wg0 (<font color="#000000">192.168</font>.<font color="#000000">2.110</font>): <font color="#000000">56</font> data bytes +<font color="#000000">64</font> bytes from <font color="#000000">192.168</font>.<font color="#000000">2.110</font>: icmp_seq=<font color="#000000">0</font> ttl=<font color="#000000">255</font> time=<font color="#000000">35.745</font> ms +<font color="#000000">64</font> bytes from <font color="#000000">192.168</font>.<font color="#000000">2.110</font>: icmp_seq=<font color="#000000">1</font> ttl=<font color="#000000">255</font> time=<font color="#000000">35.481</font> ms + +--- blowfish.wg0 ping statistics --- +<font color="#000000">2</font> packets transmitted, <font color="#000000">2</font> packets received, <font color="#000000">0.0</font>% packet loss +round-trip min/avg/max/stddev = <font color="#000000">35.481</font>/<font color="#000000">35.613</font>/<font color="#000000">35.745</font>/<font color="#000000">0.132</font> ms + +PING fishfinger.wg0 (<font color="#000000">192.168</font>.<font color="#000000">2.111</font>): <font color="#000000">56</font> data bytes +<font color="#000000">64</font> bytes from <font color="#000000">192.168</font>.<font color="#000000">2.111</font>: icmp_seq=<font color="#000000">0</font> ttl=<font color="#000000">255</font> time=<font color="#000000">33.992</font> ms +<font color="#000000">64</font> bytes from <font color="#000000">192.168</font>.<font color="#000000">2.111</font>: icmp_seq=<font color="#000000">1</font> ttl=<font color="#000000">255</font> time=<font color="#000000">33.751</font> ms + +--- fishfinger.wg0 ping statistics --- +<font color="#000000">2</font> packets transmitted, <font color="#000000">2</font> packets received, <font color="#000000">0.0</font>% packet loss +round-trip min/avg/max/stddev = <font color="#000000">33.751</font>/<font color="#000000">33.872</font>/<font color="#000000">33.992</font>/<font color="#000000">0.120</font> ms +</pre> +<br /> +<span>Note that the loop above is a <span class='inlinecode'>tcsh</span> loop, the default shell used in FreeBSD. Of course, all other peers can ping their peers as well!</span><br /> +<br /> +<span>After the first ping, VPN tunnels now also show handshakes and the amount of data transferred through them:</span><br /> +<br /> +<!-- Generator: GNU source-highlight 3.1.9 +by Lorenzo Bettini +http://www.lorenzobettini.it +http://www.gnu.org/software/src-highlite --> +<pre>paul@f0:~ % doas wg show +interface: wg0 + public key: Jm6YItMt94++dIeOyVi1I9AhNt2qQcryxCZezoX7X2Y= + private key: (hidden) + listening port: <font color="#000000">56709</font> + +peer: 0Y/H20W8YIbF7DA1sMwMacLI8WS9yG+<font color="#000000">1</font>/QO7m2oyllg= + preshared key: (hidden) + endpoint: <font color="#000000">192.168</font>.<font color="#000000">1.122</font>:<font color="#000000">56709</font> + allowed ips: <font color="#000000">192.168</font>.<font color="#000000">2.122</font>/<font color="#000000">32</font> + latest handshake: <font color="#000000">10</font> seconds ago + transfer: <font color="#000000">440</font> B received, <font color="#000000">532</font> B sent + +peer: Hhy9kMPOOjChXV2RA5WeCGs+J0FE3rcNPDw/TLSn7i8= + preshared key: (hidden) + endpoint: <font color="#000000">192.168</font>.<font color="#000000">1.121</font>:<font color="#000000">56709</font> + allowed ips: <font color="#000000">192.168</font>.<font color="#000000">2.121</font>/<font color="#000000">32</font> + latest handshake: <font color="#000000">12</font> seconds ago + transfer: <font color="#000000">440</font> B received, <font color="#000000">564</font> B sent + +peer: s3e93XoY7dPUQgLiVO4d8x/SRCFgEew+/wP<font color="#000000">7</font>+zwgehI= + preshared key: (hidden) + endpoint: <font color="#000000">192.168</font>.<font color="#000000">1.120</font>:<font color="#000000">56709</font> + allowed ips: <font color="#000000">192.168</font>.<font color="#000000">2.120</font>/<font color="#000000">32</font> + latest handshake: <font color="#000000">14</font> seconds ago + transfer: <font color="#000000">440</font> B received, <font color="#000000">564</font> B sent + +peer: SlGVsACE1wiaRoGvCR3f7AuHfRS+1jjhS+YwEJ2HvF0= + preshared key: (hidden) + endpoint: <font color="#000000">192.168</font>.<font color="#000000">1.132</font>:<font color="#000000">56709</font> + allowed ips: <font color="#000000">192.168</font>.<font color="#000000">2.132</font>/<font color="#000000">32</font> + latest handshake: <font color="#000000">17</font> seconds ago + transfer: <font color="#000000">472</font> B received, <font color="#000000">564</font> B sent + +peer: Xow+d3qVXgUMk4pcRSQ6Fe+vhYBa3VDyHX/4jrGoKns= + preshared key: (hidden) + endpoint: <font color="#000000">23.88</font>.<font color="#000000">35.144</font>:<font color="#000000">56709</font> + allowed ips: <font color="#000000">192.168</font>.<font color="#000000">2.110</font>/<font color="#000000">32</font> + latest handshake: <font color="#000000">55</font> seconds ago + transfer: <font color="#000000">472</font> B received, <font color="#000000">596</font> B sent + persistent keepalive: every <font color="#000000">25</font> seconds + +peer: 8PvGZH1NohHpZPVJyjhctBX9xblsNvYBhpg68FsFcns= + preshared key: (hidden) + endpoint: <font color="#000000">46.23</font>.<font color="#000000">94.99</font>:<font color="#000000">56709</font> + allowed ips: <font color="#000000">192.168</font>.<font color="#000000">2.111</font>/<font color="#000000">32</font> + latest handshake: <font color="#000000">55</font> seconds ago + transfer: <font color="#000000">472</font> B received, <font color="#000000">596</font> B sent + persistent keepalive: every <font color="#000000">25</font> seconds + +peer: 2htXdNcxzpI2FdPDJy4T4VGtm1wpMEQu1AkQHjNY6F8= + preshared key: (hidden) + endpoint: <font color="#000000">192.168</font>.<font color="#000000">1.131</font>:<font color="#000000">56709</font> + allowed ips: <font color="#000000">192.168</font>.<font color="#000000">2.131</font>/<font color="#000000">32</font> +</pre> +<br /> +<h2 style='display: inline' id='conclusion'>Conclusion</h2><br /> +<br /> +<span>Having a mesh network on our hosts is great for securing all the traffic between them for our future <span class='inlinecode'>k3s</span> setup. A self-managed WireGuard mesh network is better than Tailscale as it eliminates reliance on a third party and provides full control over the configuration. It reduces unnecessary abstraction and "magic," enabling easier debugging and ensuring full ownership of our network.</span><br /> +<br /> +<span>I look forward to the next blog post in this series. We may start setting up <span class='inlinecode'>k3s</span> or take a first look at the NFS server (for persistent storage) side of things. I hope you liked all the posts so far in this series.</span><br /> +<br /> +<span>Other *BSD-related posts:</span><br /> +<br /> +<a class='textlink' href='./2025-05-11-f3s-kubernetes-with-freebsd-part-5.html'>2025-05-11 f3s: Kubernetes with FreeBSD - Part 5: WireGuard mesh network (You are currently reading this)</a><br /> +<a class='textlink' href='./2025-04-05-f3s-kubernetes-with-freebsd-part-4.html'>2025-04-05 f3s: Kubernetes with FreeBSD - Part 4: Rocky Linux Bhyve VMs</a><br /> +<a class='textlink' href='./2025-02-01-f3s-kubernetes-with-freebsd-part-3.html'>2025-02-01 f3s: Kubernetes with FreeBSD - Part 3: Protecting from power cuts</a><br /> +<a class='textlink' href='./2024-12-03-f3s-kubernetes-with-freebsd-part-2.html'>2024-12-03 f3s: Kubernetes with FreeBSD - Part 2: Hardware and base installation</a><br /> +<a class='textlink' href='./2024-11-17-f3s-kubernetes-with-freebsd-part-1.html'>2024-11-17 f3s: Kubernetes with FreeBSD - Part 1: Setting the stage</a><br /> +<a class='textlink' href='./2024-04-01-KISS-high-availability-with-OpenBSD.html'>2024-04-01 KISS high-availability with OpenBSD</a><br /> +<a class='textlink' href='./2024-01-13-one-reason-why-i-love-openbsd.html'>2024-01-13 One reason why I love OpenBSD</a><br /> +<a class='textlink' href='./2022-10-30-installing-dtail-on-openbsd.html'>2022-10-30 Installing DTail on OpenBSD</a><br /> +<a class='textlink' href='./2022-07-30-lets-encrypt-with-openbsd-and-rex.html'>2022-07-30 Let's Encrypt with OpenBSD and Rex</a><br /> +<a class='textlink' href='./2016-04-09-jails-and-zfs-on-freebsd-with-puppet.html'>2016-04-09 Jails and ZFS with Puppet on FreeBSD</a><br /> +<br /> +<span>E-Mail your comments to <span class='inlinecode'>paul@nospam.buetow.org</span></span><br /> +<br /> +<a class='textlink' href='../'>Back to the main site</a><br /> +<p class="footer"> +Generated with <a href="https://codeberg.org/snonux/gemtexter">Gemtexter 3.0.1-develop</a> | +served by <a href="https://www.OpenBSD.org">OpenBSD</a>/<a href="https://man.openbsd.org/relayd.8">relayd(8)</a>+<a href="https://man.openbsd.org/httpd.8">httpd(8)</a> | +<a href="https://foo.zone/site-mirrors.html">Site Mirrors</a> +</p> +</body> +</html> diff --git a/gemfeed/DRAFT-kubernetes-with-freebsd-part-5.html b/gemfeed/DRAFT-kubernetes-with-freebsd-part-5.html deleted file mode 100644 index df837a01..00000000 --- a/gemfeed/DRAFT-kubernetes-with-freebsd-part-5.html +++ /dev/null @@ -1,104 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> -<head> -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>f3s: Kubernetes with FreeBSD - Part 5: WireGuard mesh network</title> -<link rel="shortcut icon" type="image/gif" href="/favicon.ico" /> -<link rel="stylesheet" href="../style.css" /> -<link rel="stylesheet" href="style-override.css" /> -</head> -<body> -<p class="header"> -<a href="https://foo.zone">Home</a> | <a href="https://codeberg.org/snonux/foo.zone/src/branch/content-md/gemfeed/DRAFT-kubernetes-with-freebsd-part-5.md">Markdown</a> | <a href="gemini://foo.zone/gemfeed/DRAFT-kubernetes-with-freebsd-part-5.gmi">Gemini</a> -</p> -<h1 style='display: inline' id='f3s-kubernetes-with-freebsd---part-5-wireguard-mesh-network'>f3s: Kubernetes with FreeBSD - Part 5: WireGuard mesh network</h1><br /> -<br /> -<span>This is the fith blog post about my f3s series for my self-hosting demands in my home lab. f3s? The "f" stands for FreeBSD, and the "3s" stands for k3s, the Kubernetes distribution I will use on FreeBSD-based physical machines.</span><br /> -<br /> -<span>I will post a new entry every month or so (there are too many other side projects for more frequent updates — I bet you can understand).</span><br /> -<br /> -<span>These are all the posts so far:</span><br /> -<br /> -<a class='textlink' href='./2024-11-17-f3s-kubernetes-with-freebsd-part-1.html'>2024-11-17 f3s: Kubernetes with FreeBSD - Part 1: Setting the stage</a><br /> -<a class='textlink' href='./2024-12-03-f3s-kubernetes-with-freebsd-part-2.html'>2024-12-03 f3s: Kubernetes with FreeBSD - Part 2: Hardware and base installation</a><br /> -<a class='textlink' href='./2025-02-01-f3s-kubernetes-with-freebsd-part-3.html'>2025-02-01 f3s: Kubernetes with FreeBSD - Part 3: Protecting from power cuts</a><br /> -<a class='textlink' href='./2025-04-05-f3s-kubernetes-with-freebsd-part-4.html'>2025-04-05 f3s: Kubernetes with FreeBSD - Part 4: Rocky Linux Bhyve VMs</a><br /> -<br /> -<a href='./f3s-kubernetes-with-freebsd-part-1/f3slogo.png'><img alt='f3s logo' title='f3s logo' src='./f3s-kubernetes-with-freebsd-part-1/f3slogo.png' /></a><br /> -<br /> -<span class='quote'>Logo was generated by ChatGPT.</span><br /> -<br /> -<span>Let's begin...</span><br /> -<br /> -<h2 style='display: inline' id='table-of-contents'>Table of Contents</h2><br /> -<br /> -<ul> -<li><a href='#f3s-kubernetes-with-freebsd---part-5-wireguard-mesh-network'>f3s: Kubernetes with FreeBSD - Part 5: WireGuard mesh network</a></li> -<li>⇢ <a href='#introduction'>Introduction</a></li> -<li>⇢ <a href='#deciding-on-wireguard'>Deciding on WireGuard</a></li> -</ul><br /> -<h2 style='display: inline' id='introduction'>Introduction</h2><br /> -<br /> -<span>By default, traffic within my home LAN, including traffic inside a k3s cluster, is not encrypted. While it resides in the "secure" home LAN, adopting a zero-trust policy means encryption is still preferable to ensure confidentiality and security. So we decide to secure all the traffic of all f3s participating hosts by building a mesh network of all participating hosts as shown in this graph:</span><br /> -<br /> -<a href='./f3s-kubernetes-with-freebsd-part-5/wireguard-full-mesh.svg'><img alt='Full Mesh network' title='Full Mesh network' src='./f3s-kubernetes-with-freebsd-part-5/wireguard-full-mesh.svg' /></a><br /> -<br /> -<span>Whereas <span class='inlinecode'>f0</span>, <span class='inlinecode'>f1</span>, and <span class='inlinecode'>f2</span> are the FreeBSD base hosts, <span class='inlinecode'>r0</span>, <span class='inlinecode'>r1</span>, and <span class='inlinecode'>r2</span> are the Rocky Linux Bhyve VMs, and <span class='inlinecode'>blowfish</span> and <span class='inlinecode'>fishfinger</span> are two OpenBSD systems running on the internet (as mentioned in the first blog of this series—these systems are already built; in fact, this very blog is served by those OpenBSD systems).</span><br /> -<br /> -<span>As we can see from the graph, it is a true full-mesh network, where every host has a VPN tunnel to every other host. The benefit is that we do not need to route traffic through intermediate hosts (significantly simplifying the routing configuration). However, the downside is that there is some overhead in configuring and managing all the tunnels.</span><br /> -<br /> -<span>For simplicity, we also establish VPN tunnels between <span class='inlinecode'>f0 <-> r0</span>, <span class='inlinecode'>f1 <-> r1</span>, and <span class='inlinecode'>f2 <-> r2</span>. Technically, this wouldn't be strictly required since the VMs <span class='inlinecode'>rN</span> are running on the hosts <span class='inlinecode'>fN</span>, and there is no network traffic leaving the box. However, it simplifies the configuration as we don't have to account for exceptions, and we are going to automate the mesh network configuration anyway (read on).</span><br /> -<br /> -<h2 style='display: inline' id='deciding-on-wireguard'>Deciding on WireGuard</h2><br /> -<br /> -<span>I have decided on using WireGuard as the VPN technology for this purpose.</span><br /> -<br /> -<span>WireGuard is a lightweight, modern, and secure VPN protocol designed for simplicity, speed, and strong cryptography. It is an excellent choice due to its minimal codebase, ease of configuration, high performance, and robust security, utilizing state-of-the-art encryption standards. WireGuard is supported on various operating systems, and its implementations are compatible with each other. Therefore, establishing WireGuard VPN tunnels between FreeBSD, Linux, and OpenBSD is seamless. This cross-platform availability makes it suitable for setups like the one described in this blog series.</span><br /> -<br /> -<span>We could have used Tailscale for an easy to setup and manage a WireGuard network, but the benefits of creating our own mesh network are:</span><br /> -<br /> -<ul> -<li>Learning about WireGuard configurationd details</li> -<li>Have full control over the setup</li> -<li>Don't rely on an external provider like Tailscale (even if some of the components are open-source)</li> -<li>Have even more fun along the way</li> -</ul><br /> -<a class='textlink' href='https://en.wikipedia.org/wiki/WireGuard'>https://en.wikipedia.org/wiki/WireGuard</a><br /> -<a class='textlink' href='https://www.wireguard.com/'>https://www.wireguard.com/</a><br /> -<a class='textlink' href='https://tailscale.com/'>https://tailscale.com/</a><br /> -<br /> -<ul> -<li>k3s by default traffic not encrypted</li> -</ul><br /> -<ul> -<li>maybe connect other boxes off-site via wireguard vpn tunnel</li> -</ul><br /> -<ul> -<li>Why not Tailscale</li> -</ul><br /> -<span> * Learning / Curiosity (this is the 2nd whole point why I am doing this series, besides of self-hosting privacy)</span><br /> -<span> * Part of OS packages</span><br /> -<span> * Easier to maintain in the longer run as there are no ready to use packages for the BSDs..?</span><br /> -<br /> -<span>Other *BSD-related posts:</span><br /> -<br /> -<a class='textlink' href='./2025-04-05-f3s-kubernetes-with-freebsd-part-4.html'>2025-04-05 f3s: Kubernetes with FreeBSD - Part 4: Rocky Linux Bhyve VMs</a><br /> -<a class='textlink' href='./2025-02-01-f3s-kubernetes-with-freebsd-part-3.html'>2025-02-01 f3s: Kubernetes with FreeBSD - Part 3: Protecting from power cuts</a><br /> -<a class='textlink' href='./2024-12-03-f3s-kubernetes-with-freebsd-part-2.html'>2024-12-03 f3s: Kubernetes with FreeBSD - Part 2: Hardware and base installation</a><br /> -<a class='textlink' href='./2024-11-17-f3s-kubernetes-with-freebsd-part-1.html'>2024-11-17 f3s: Kubernetes with FreeBSD - Part 1: Setting the stage</a><br /> -<a class='textlink' href='./2024-04-01-KISS-high-availability-with-OpenBSD.html'>2024-04-01 KISS high-availability with OpenBSD</a><br /> -<a class='textlink' href='./2024-01-13-one-reason-why-i-love-openbsd.html'>2024-01-13 One reason why I love OpenBSD</a><br /> -<a class='textlink' href='./2022-10-30-installing-dtail-on-openbsd.html'>2022-10-30 Installing DTail on OpenBSD</a><br /> -<a class='textlink' href='./2022-07-30-lets-encrypt-with-openbsd-and-rex.html'>2022-07-30 Let's Encrypt with OpenBSD and Rex</a><br /> -<a class='textlink' href='./2016-04-09-jails-and-zfs-on-freebsd-with-puppet.html'>2016-04-09 Jails and ZFS with Puppet on FreeBSD</a><br /> -<br /> -<span>E-Mail your comments to <span class='inlinecode'>paul@nospam.buetow.org</span></span><br /> -<br /> -<a class='textlink' href='../'>Back to the main site</a><br /> -<p class="footer"> -Generated with <a href="https://codeberg.org/snonux/gemtexter">Gemtexter 3.0.1-develop</a> | -served by <a href="https://www.OpenBSD.org">OpenBSD</a>/<a href="https://man.openbsd.org/relayd.8">relayd(8)</a>+<a href="https://man.openbsd.org/httpd.8">httpd(8)</a> | -<a href="https://foo.zone/site-mirrors.html">Site Mirrors</a> -</p> -</body> -</html> diff --git a/gemfeed/atom.xml b/gemfeed/atom.xml index 890a69c2..01299f67 100644 --- a/gemfeed/atom.xml +++ b/gemfeed/atom.xml @@ -1,12 +1,1034 @@ <?xml version="1.0" encoding="utf-8"?> <feed xmlns="http://www.w3.org/2005/Atom"> - <updated>2025-05-05T22:21:05+03:00</updated> + <updated>2025-05-11T11:35:57+03:00</updated> <title>foo.zone feed</title> <subtitle>To be in the .zone!</subtitle> <link href="https://foo.zone/gemfeed/atom.xml" rel="self" /> <link href="https://foo.zone/" /> <id>https://foo.zone/</id> <entry> + <title>f3s: Kubernetes with FreeBSD - Part 5: WireGuard mesh network</title> + <link href="https://foo.zone/gemfeed/2025-05-11-f3s-kubernetes-with-freebsd-part-5.html" /> + <id>https://foo.zone/gemfeed/2025-05-11-f3s-kubernetes-with-freebsd-part-5.html</id> + <updated>2025-05-11T11:35:57+03:00</updated> + <author> + <name>Paul Buetow aka snonux</name> + <email>paul@dev.buetow.org</email> + </author> + <summary>This is the fifth blog post about my f3s series for my self-hosting demands in my home lab. f3s? The 'f' stands for FreeBSD, and the '3s' stands for k3s, the Kubernetes distribution I will use on FreeBSD-based physical machines.</summary> + <content type="xhtml"> + <div xmlns="http://www.w3.org/1999/xhtml"> + <h1 style='display: inline' id='f3s-kubernetes-with-freebsd---part-5-wireguard-mesh-network'>f3s: Kubernetes with FreeBSD - Part 5: WireGuard mesh network</h1><br /> +<br /> +<span>This is the fifth blog post about my f3s series for my self-hosting demands in my home lab. f3s? The "f" stands for FreeBSD, and the "3s" stands for k3s, the Kubernetes distribution I will use on FreeBSD-based physical machines.</span><br /> +<br /> +<span>I will post a new entry every month or so (there are too many other side projects for more frequent updates — I bet you can understand).</span><br /> +<br /> +<span>These are all the posts so far:</span><br /> +<br /> +<a class='textlink' href='./2024-11-17-f3s-kubernetes-with-freebsd-part-1.html'>2024-11-17 f3s: Kubernetes with FreeBSD - Part 1: Setting the stage</a><br /> +<a class='textlink' href='./2024-12-03-f3s-kubernetes-with-freebsd-part-2.html'>2024-12-03 f3s: Kubernetes with FreeBSD - Part 2: Hardware and base installation</a><br /> +<a class='textlink' href='./2025-02-01-f3s-kubernetes-with-freebsd-part-3.html'>2025-02-01 f3s: Kubernetes with FreeBSD - Part 3: Protecting from power cuts</a><br /> +<a class='textlink' href='./2025-04-05-f3s-kubernetes-with-freebsd-part-4.html'>2025-04-05 f3s: Kubernetes with FreeBSD - Part 4: Rocky Linux Bhyve VMs</a><br /> +<a class='textlink' href='./2025-05-11-f3s-kubernetes-with-freebsd-part-5.html'>2025-05-11 f3s: Kubernetes with FreeBSD - Part 5: WireGuard mesh network (You are currently reading this)</a><br /> +<br /> +<a href='./f3s-kubernetes-with-freebsd-part-1/f3slogo.png'><img alt='f3s logo' title='f3s logo' src='./f3s-kubernetes-with-freebsd-part-1/f3slogo.png' /></a><br /> +<br /> +<span class='quote'>ChatGPT generated logo.</span><br /> +<br /> +<span>Let's begin...</span><br /> +<br /> +<h2 style='display: inline' id='table-of-contents'>Table of Contents</h2><br /> +<br /> +<ul> +<li><a href='#f3s-kubernetes-with-freebsd---part-5-wireguard-mesh-network'>f3s: Kubernetes with FreeBSD - Part 5: WireGuard mesh network</a></li> +<li>⇢ <a href='#introduction'>Introduction</a></li> +<li>⇢ ⇢ <a href='#expected-traffic-flow'>Expected traffic flow</a></li> +<li>⇢ <a href='#deciding-on-wireguard'>Deciding on WireGuard</a></li> +<li>⇢ <a href='#base-configuration'>Base configuration</a></li> +<li>⇢ ⇢ <a href='#freebsd'>FreeBSD</a></li> +<li>⇢ ⇢ <a href='#rocky-linux'>Rocky Linux</a></li> +<li>⇢ ⇢ <a href='#openbsd'>OpenBSD</a></li> +<li>⇢ <a href='#wireguard-configuration'>WireGuard configuration</a></li> +<li>⇢ ⇢ <a href='#example-wg0conf'>Example <span class='inlinecode'>wg0.conf</span></a></li> +<li>⇢ ⇢ <a href='#nat-traversal-and-keepalive'>NAT traversal and keepalive</a></li> +<li>⇢ ⇢ <a href='#preshared-key'>Preshared key</a></li> +<li>⇢ <a href='#mesh-network-generator'>Mesh network generator</a></li> +<li>⇢ ⇢ <a href='#wireguardmeshgeneratoryaml'><span class='inlinecode'>wireguardmeshgenerator.yaml</span></a></li> +<li>⇢ ⇢ <a href='#wireguardmeshgeneratorrb-overview'><span class='inlinecode'>wireguardmeshgenerator.rb</span> overview</a></li> +<li>⇢ <a href='#invoking-the-mesh-network-generator'>Invoking the mesh network generator</a></li> +<li>⇢ ⇢ <a href='#generating-the-wg0conf-files-and-keys'>Generating the <span class='inlinecode'>wg0.conf</span> files and keys</a></li> +<li>⇢ ⇢ <a href='#installing-the-wg0conf-files'>Installing the <span class='inlinecode'>wg0.conf</span> files</a></li> +<li>⇢ ⇢ <a href='#re-generating-mesh-and-installing-the-wg0conf-files-again'>Re-generating mesh and installing the <span class='inlinecode'>wg0.conf</span> files again</a></li> +<li>⇢ <a href='#happy-wireguard-ing'>Happy WireGuard-ing</a></li> +<li>⇢ <a href='#conclusion'>Conclusion</a></li> +</ul><br /> +<h2 style='display: inline' id='introduction'>Introduction</h2><br /> +<br /> +<span>By default, traffic within my home LAN, including traffic inside a k3s cluster, is not encrypted. While it resides in the "secure" home LAN, adopting a zero-trust policy means encryption is still preferable to ensure confidentiality and security. So we decide to secure all the traffic of all f3s participating hosts by building a mesh network of all participating hosts:</span><br /> +<br /> +<a href='./f3s-kubernetes-with-freebsd-part-5/wireguard-full-mesh.svg'><img alt='Full mesh network' title='Full mesh network' src='./f3s-kubernetes-with-freebsd-part-5/wireguard-full-mesh.svg' /></a><br /> +<br /> +<span>Whereas <span class='inlinecode'>f0</span>, <span class='inlinecode'>f1</span>, and <span class='inlinecode'>f2</span> are the FreeBSD base hosts, <span class='inlinecode'>r0</span>, <span class='inlinecode'>r1</span>, and <span class='inlinecode'>r2</span> are the Rocky Linux Bhyve VMs, and <span class='inlinecode'>blowfish</span> and <span class='inlinecode'>fishfinger</span> are two OpenBSD systems running on the internet (as mentioned in the first blog of this series—these systems are already built; in fact, this very blog is served by those OpenBSD systems).</span><br /> +<br /> +<span>As we can see from the graph, it is a true full-mesh network, where every host has a VPN tunnel to every other host. The benefit is that we do not need to route traffic through intermediate hosts (significantly simplifying the routing configuration). However, the downside is that there is some overhead in configuring and managing all the tunnels.</span><br /> +<br /> +<span>For simplicity, we also establish VPN tunnels between <span class='inlinecode'>f0 <-> r0</span>, <span class='inlinecode'>f1 <-> r1</span>, and <span class='inlinecode'>f2 <-> r2</span>. Technically, this wouldn't be strictly required since the VMs <span class='inlinecode'>rN</span> are running on the hosts <span class='inlinecode'>fN</span>, and no network traffic is leaving the box. However, it simplifies the configuration as we don't have to account for exceptions, and we are going to automate the mesh network configuration anyway (read on).</span><br /> +<br /> +<h3 style='display: inline' id='expected-traffic-flow'>Expected traffic flow</h3><br /> +<br /> +<span>The traffic is expected to flow between the host groups through the mesh network as follows: </span><br /> +<br /> +<ul> +<li><span class='inlinecode'>fN <-> rN</span>: The traffic between the FreeBSD hosts and the Rocky Linux VMs will be routed through the VPN tunnels for persistent storage. In a later post in this series, we will set up an NFS server on the <span class='inlinecode'>fN</span> hosts. </li> +<li><span class='inlinecode'>fN <-> blowfish,fishfinger</span>: The traffic between the FreeBSD hosts and the OpenBSD host <span class='inlinecode'>blowfish,fishfinger</span> will be routed through the VPN tunnels for management. We may want to log in via the internet to set it up remotely. The VPN tunnel will also be used for monitoring purposes.</li> +<li><span class='inlinecode'>rN <-> blowfish,fishfinger</span>: The traffic between the Rocky Linux VMs and the OpenBSD host <span class='inlinecode'>blowfish,fishfinger</span> will be routed through the VPN tunnels for usage traffic. Since <span class='inlinecode'>k3s</span> will be running on the <span class='inlinecode'>rN</span> hosts, the OpenBSD servers will route the traffic through <span class='inlinecode'>relayd</span> to the services running in Kubernetes.</li> +<li><span class='inlinecode'>fN <-> fM</span>: The traffic between the FreeBSD hosts may be later used for data replication for the NFS storage.</li> +<li><span class='inlinecode'>rN <-> rM</span>: The traffic between the Rocky Linux VMs will later be used by the <span class='inlinecode'>k3s</span> cluster itself, as every <span class='inlinecode'>rN</span> will be a Kubernetes worker node.</li> +<li><span class='inlinecode'>blowfish <-> fishfinger</span>: The traffic between the OpenBSD hosts isn't strictly required for this setup, but I set it up anyway for future use cases.</li> +</ul><br /> +<span>We won't cover all the details in this blog post, as we only focus on setting up the Mesh network in this blog post. Subsequent posts in this series will cover the other details.</span><br /> +<br /> +<h2 style='display: inline' id='deciding-on-wireguard'>Deciding on WireGuard</h2><br /> +<br /> +<span>I have decided to use WireGuard as the VPN technology for this purpose.</span><br /> +<br /> +<span>WireGuard is a lightweight, modern, and secure VPN protocol designed for simplicity, speed, and strong cryptography. It is an excellent choice due to its minimal codebase, ease of configuration, high performance, and robust security, utilizing state-of-the-art encryption standards. WireGuard is supported on various operating systems, and its implementations are compatible with each other. Therefore, establishing WireGuard VPN tunnels between FreeBSD, Linux, and OpenBSD is seamless. This cross-platform availability makes it suitable for setups like the one described in this blog series.</span><br /> +<br /> +<span>We could have used Tailscale for an easy to set up and manage the WireGuard network, but the benefits of creating our own mesh network are:</span><br /> +<br /> +<ul> +<li>Learning about WireGuard configuration details</li> +<li>Have full control over the setup</li> +<li>Don't rely on an external provider like Tailscale (even if some of the components are open-source)</li> +<li>Have even more fun along the way</li> +<li>WireGuard is easy to configure on my target operating systems and, therefore, easier to maintain in the long run.</li> +<li>There are no official Tailscale packages available for OpenBSD and FreeBSD. However, getting Tailscale running on these systems is still possible, though some tinkering would be required. Instead, we use that tinkering time to set up WireGuard tunnels ourselves.</li> +</ul><br /> +<a class='textlink' href='https://en.wikipedia.org/wiki/WireGuard'>https://en.wikipedia.org/wiki/WireGuard</a><br /> +<a class='textlink' href='https://www.wireguard.com/'>https://www.wireguard.com/</a><br /> +<a class='textlink' href='https://tailscale.com/'>https://tailscale.com/</a><br /> +<br /> +<a href='./f3s-kubernetes-with-freebsd-part-5/wireguard.svg'><img alt='WireGuard Logo' title='WireGuard Logo' src='./f3s-kubernetes-with-freebsd-part-5/wireguard.svg' /></a><br /> +<br /> +<h2 style='display: inline' id='base-configuration'>Base configuration</h2><br /> +<br /> +<span>In the following, we prepare the base configuration for the WireGuard mesh network. We will use a similar configuration on all participating hosts, with the exception of the host IP addresses and the private keys.</span><br /> +<br /> +<h3 style='display: inline' id='freebsd'>FreeBSD</h3><br /> +<br /> +<span>On the FreeBSD hosts <span class='inlinecode'>f0</span>, <span class='inlinecode'>f1</span> and <span class='inlinecode'>f2</span>, similar as last time, first, we bring the system up to date:</span><br /> +<br /> +<!-- Generator: GNU source-highlight 3.1.9 +by Lorenzo Bettini +http://www.lorenzobettini.it +http://www.gnu.org/software/src-highlite --> +<pre>paul@f0:~ % doas freebsd-update fetch +paul@f0:~ % doas freebsd-update install +paul@f0:~ % doas freebsd-update -r <font color="#000000">14.2</font>-RELEASE upgrade +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 +</pre> +<br /> +<span>Next, we install <span class='inlinecode'>wireguard-tools</span> and configure the WireGuard service:</span><br /> +<br /> +<!-- Generator: GNU source-highlight 3.1.9 +by Lorenzo Bettini +http://www.lorenzobettini.it +http://www.gnu.org/software/src-highlite --> +<pre>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/wg<font color="#000000">0</font>.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: <font color="#000000">20246</font> +</pre> +<br /> +<span>We now have the WireGuard up and running, but it is not yet in any functional configuration. We will come back to that later.</span><br /> +<br /> +<span>Next, we add all the participating WireGuard IPs to the <span class='inlinecode'>hosts</span> file. This is only convenience, so we don't have to manage an external DNS server for this:</span><br /> +<br /> +<!-- Generator: GNU source-highlight 3.1.9 +by Lorenzo Bettini +http://www.lorenzobettini.it +http://www.gnu.org/software/src-highlite --> +<pre>paul@f0:~ % cat <<END | doas tee -a /etc/hosts + +<font color="#000000">192.168</font>.<font color="#000000">1.120</font> r0 r0.lan r0.lan.buetow.org +<font color="#000000">192.168</font>.<font color="#000000">1.121</font> r1 r1.lan r1.lan.buetow.org +<font color="#000000">192.168</font>.<font color="#000000">1.122</font> r2 r2.lan r2.lan.buetow.org + +<font color="#000000">192.168</font>.<font color="#000000">2.130</font> f0.wg0 f0.wg0.wan.buetow.org +<font color="#000000">192.168</font>.<font color="#000000">2.131</font> f1.wg0 f1.wg0.wan.buetow.org +<font color="#000000">192.168</font>.<font color="#000000">2.132</font> f2.wg0 f2.wg0.wan.buetow.org + +<font color="#000000">192.168</font>.<font color="#000000">2.120</font> r0.wg0 r0.wg0.wan.buetow.org +<font color="#000000">192.168</font>.<font color="#000000">2.121</font> r1.wg0 r1.wg0.wan.buetow.org +<font color="#000000">192.168</font>.<font color="#000000">2.122</font> r2.wg0 r2.wg0.wan.buetow.org + +<font color="#000000">192.168</font>.<font color="#000000">2.110</font> blowfish.wg0 blowfish.wg0.wan.buetow.org +<font color="#000000">192.168</font>.<font color="#000000">2.111</font> fishfinger.wg0 fishfinger.wg0.wan.buetow.org +END +</pre> +<br /> +<span>As you can see, <span class='inlinecode'>192.168.1.0/24</span> is the network used in my LAN (with the <span class='inlinecode'>fN</span> and <span class='inlinecode'>rN</span> hosts) and <span class='inlinecode'>192.168.2.0/24</span> is the network used for the WireGuard mesh network. The <span class='inlinecode'>wg0</span> interface will be used for all WireGuard traffic.</span><br /> +<br /> +<h3 style='display: inline' id='rocky-linux'>Rocky Linux</h3><br /> +<br /> +<span>We bring the Rocky Linux VMs up to date as well with the following:</span><br /> +<br /> +<!-- Generator: GNU source-highlight 3.1.9 +by Lorenzo Bettini +http://www.lorenzobettini.it +http://www.gnu.org/software/src-highlite --> +<pre>[root@r0 ~] dnf update -y +[root@r0 ~] reboot +</pre> +<br /> +<span>Next, we prepare WireGuard on them. Same as on the FreeBSD hosts, we will only prepare WireGuard without any useful configuration yet:</span><br /> +<span> </span><br /> +<!-- Generator: GNU source-highlight 3.1.9 +by Lorenzo Bettini +http://www.lorenzobettini.it +http://www.gnu.org/software/src-highlite --> +<pre>[root@r0 ~] dnf install -y wireguard-tools +[root@r0 ~] mkdir -p /etc/wireguard +[root@r0 ~] touch /etc/wireguard/wg<font color="#000000">0</font>.conf +[root@r0 ~] systemctl <b><u><font color="#000000">enable</font></u></b> wg-quick@wg0.service +[root@r0 ~] systemctl start wg-quick@wg0.service +[root@r0 ~] systemctl disable firewalld +</pre> +<br /> +<span>We also update the <span class='inlinecode'>hosts</span> file accordingly:</span><br /> +<br /> +<!-- Generator: GNU source-highlight 3.1.9 +by Lorenzo Bettini +http://www.lorenzobettini.it +http://www.gnu.org/software/src-highlite --> +<pre>[root@r0 ~] cat <<END >>/etc/hosts + +<font color="#000000">192.168</font>.<font color="#000000">1.130</font> f0 f0.lan f0.lan.buetow.org +<font color="#000000">192.168</font>.<font color="#000000">1.131</font> f1 f1.lan f1.lan.buetow.org +<font color="#000000">192.168</font>.<font color="#000000">1.132</font> f2 f2.lan f2.lan.buetow.org + +<font color="#000000">192.168</font>.<font color="#000000">2.130</font> f0.wg0 f0.wg0.wan.buetow.org +<font color="#000000">192.168</font>.<font color="#000000">2.131</font> f1.wg0 f1.wg0.wan.buetow.org +<font color="#000000">192.168</font>.<font color="#000000">2.132</font> f2.wg0 f2.wg0.wan.buetow.org + +<font color="#000000">192.168</font>.<font color="#000000">2.120</font> r0.wg0 r0.wg0.wan.buetow.org +<font color="#000000">192.168</font>.<font color="#000000">2.121</font> r1.wg0 r1.wg0.wan.buetow.org +<font color="#000000">192.168</font>.<font color="#000000">2.122</font> r2.wg0 r2.wg0.wan.buetow.org + +<font color="#000000">192.168</font>.<font color="#000000">2.110</font> blowfish.wg0 blowfish.wg0.wan.buetow.org +<font color="#000000">192.168</font>.<font color="#000000">2.111</font> fishfinger.wg0 fishfinger.wg0.wan.buetow.org +END +</pre> +<br /> +<span>Unfortunately, the SELinux policy on Rocky Linux blocks WireGuard's operation. By making the <span class='inlinecode'>wireguard_t</span> domain permissive using <span class='inlinecode'>semanage permissive -a wireguard_t</span>, SELinux will no longer enforce restrictions for WireGuard, allowing it to work as intended:</span><br /> +<br /> +<!-- Generator: GNU source-highlight 3.1.9 +by Lorenzo Bettini +http://www.lorenzobettini.it +http://www.gnu.org/software/src-highlite --> +<pre>[root@r0 ~] dnf install -y policycoreutils-python-utils +[root@r0 ~] semanage permissive -a wireguard_t +[root@r0 ~] reboot +</pre> +<br /> +<a class='textlink' href='https://github.com/angristan/wireguard-install/discussions/499'>https://github.com/angristan/wireguard-install/discussions/499</a><br /> +<br /> +<h3 style='display: inline' id='openbsd'>OpenBSD</h3><br /> +<br /> +<span>Other than the FreeBSD and Rocky Linux hosts involved, my OpenBSD hosts (<span class='inlinecode'>blowfish</span> and <span class='inlinecode'>fishfinger</span>, which are running at OpenBSD Amsterdam and Hetzner on the internet) have been running already for longer, so I can't provide you with the "from scratch" installation details here. In the following, we will only focus on the additional configuration needed to set up WireGuard:</span><br /> +<br /> +<!-- Generator: GNU source-highlight 3.1.9 +by Lorenzo Bettini +http://www.lorenzobettini.it +http://www.gnu.org/software/src-highlite --> +<pre>blowfish$ doas pkg_add wireguard-tools +blowfish$ doas mkdir /etc/wireguard +blowfish$ doas touch /etc/wireguard/wg<font color="#000000">0</font>.conf +blowsish$ cat <<END | doas tee /etc/hostname.wg0 +inet <font color="#000000">192.168</font>.<font color="#000000">2.110</font> <font color="#000000">255.255</font>.<font color="#000000">255.0</font> NONE +up +!/usr/local/bin/wg setconf wg0 /etc/wireguard/wg<font color="#000000">0</font>.conf +END +</pre> +<br /> +<span>Note that on <span class='inlinecode'>blowfish</span>, we configure <span class='inlinecode'>192.168.2.110</span> here in the <span class='inlinecode'>hostname.wg</span>, and on <span class='inlinecode'>fishfinger</span>, we configure <span class='inlinecode'>192.168.2.111</span>. Those are the IP addresses of the WireGuard interfaces on those hosts.</span><br /> +<br /> +<span>And here, we also update the <span class='inlinecode'>hosts</span> file accordingly:</span><br /> +<br /> +<!-- Generator: GNU source-highlight 3.1.9 +by Lorenzo Bettini +http://www.lorenzobettini.it +http://www.gnu.org/software/src-highlite --> +<pre>blowfish$ cat <<END | doas tee -a /etc/hosts + +<font color="#000000">192.168</font>.<font color="#000000">2.130</font> f0.wg0 f0.wg0.wan.buetow.org +<font color="#000000">192.168</font>.<font color="#000000">2.131</font> f1.wg0 f1.wg0.wan.buetow.org +<font color="#000000">192.168</font>.<font color="#000000">2.132</font> f2.wg0 f2.wg0.wan.buetow.org + +<font color="#000000">192.168</font>.<font color="#000000">2.120</font> r0.wg0 r0.wg0.wan.buetow.org +<font color="#000000">192.168</font>.<font color="#000000">2.121</font> r1.wg0 r1.wg0.wan.buetow.org +<font color="#000000">192.168</font>.<font color="#000000">2.122</font> r2.wg0 r2.wg0.wan.buetow.org + +<font color="#000000">192.168</font>.<font color="#000000">2.110</font> blowfish.wg0 blowfish.wg0.wan.buetow.org +<font color="#000000">192.168</font>.<font color="#000000">2.111</font> fishfinger.wg0 fishfinger.wg0.wan.buetow.org +END +</pre> +<br /> +<h2 style='display: inline' id='wireguard-configuration'>WireGuard configuration</h2><br /> +<br /> +<span>So far, we have only started WireGuard on all participating hosts without any useful configuration. This means that no VPN tunnel has been established yet between any of the hosts.</span><br /> +<br /> +<h3 style='display: inline' id='example-wg0conf'>Example <span class='inlinecode'>wg0.conf</span></h3><br /> +<br /> +<span>Generally speaking, a <span class='inlinecode'>wg0.conf</span> looks like this (example from <span class='inlinecode'>f0</span> host):</span><br /> +<br /> +<pre> +[Interface] +# f0.wg0.wan.buetow.org +Address = 192.168.2.130 +PrivateKey = ************************** +ListenPort = 56709 + +[Peer] +# f1.lan.buetow.org as f1.wg0.wan.buetow.org +PublicKey = ************************** +PresharedKey = ************************** +AllowedIPs = 192.168.2.131/32 +Endpoint = 192.168.1.131:56709 +# No KeepAlive configured + +[Peer] +# f2.lan.buetow.org as f2.wg0.wan.buetow.org +PublicKey = ************************** +PresharedKey = ************************** +AllowedIPs = 192.168.2.132/32 +Endpoint = 192.168.1.132:56709 +# No KeepAlive configured + +[Peer] +# r0.lan.buetow.org as r0.wg0.wan.buetow.org +PublicKey = ************************** +PresharedKey = ************************** +AllowedIPs = 192.168.2.120/32 +Endpoint = 192.168.1.120:56709 +# No KeepAlive configured + +[Peer] +# r1.lan.buetow.org as r1.wg0.wan.buetow.org +PublicKey = ************************** +PresharedKey = ************************** +AllowedIPs = 192.168.2.121/32 +Endpoint = 192.168.1.121:56709 +# No KeepAlive configured + +[Peer] +# r2.lan.buetow.org as r2.wg0.wan.buetow.org +PublicKey = ************************** +PresharedKey = ************************** +AllowedIPs = 192.168.2.122/32 +Endpoint = 192.168.1.122:56709 +# No KeepAlive configured + +[Peer] +# blowfish.buetow.org as blowfish.wg0.wan.buetow.org +PublicKey = ************************** +PresharedKey = ************************** +AllowedIPs = 192.168.2.110/32 +Endpoint = 23.88.35.144:56709 +PersistentKeepalive = 25 + +[Peer] +# fishfinger.buetow.org as fishfinger.wg0.wan.buetow.org +PublicKey = ************************** +PresharedKey = ************************** +AllowedIPs = 192.168.2.111/32 +Endpoint = 46.23.94.99:56709 +PersistentKeepalive = 25 +</pre> +<br /> +<span>Whereas there are two main sections. One is <span class='inlinecode'>[Interface]</span>, which configures the current host (here: <span class='inlinecode'>f0</span>):</span><br /> +<br /> +<ul> +<li><span class='inlinecode'>Address</span>: Local virtual IP address on the WireGuard interface.</li> +<li><span class='inlinecode'>PrivateKey</span>: Private key for this node.</li> +<li><span class='inlinecode'>ListenPort</span>: Port on which this WireGuard interface listens for incoming connections.</li> +</ul><br /> +<span>And in the following, there is one <span class='inlinecode'>[Peer]</span> section for every peer node on the mesh network:</span><br /> +<br /> +<ul> +<li><span class='inlinecode'>PublicKey</span>: The public key of the remote peer is used to authenticate their identity.</li> +<li><span class='inlinecode'>PresharedKey</span>: An optional symmetric key is used to enhance security (used in addition to PublicKey).</li> +<li><span class='inlinecode'>AllowedIPs</span>: IPs or subnets routed through this peer (traffic is allowed to/from these IPs).</li> +<li><span class='inlinecode'>Endpoint</span>: The public IP:port combination of the remote peer for connection.</li> +<li><span class='inlinecode'>PersistentKeepalive</span>: Keeps the tunnel alive by sending periodic packets; used for NAT traversal.</li> +</ul><br /> +<h3 style='display: inline' id='nat-traversal-and-keepalive'>NAT traversal and keepalive</h3><br /> +<br /> +<span>As all participating hosts, except for <span class='inlinecode'>blowfish</span> and <span class='inlinecode'>fishfinger</span> (which are on the internet), are behind a NAT gateway (my home router), we need to use <span class='inlinecode'>PersistentKeepalive</span> to establish and maintain the VPN tunnel from the LAN to the internet because:</span><br /> +<br /> +<span class='quote'>By default, WireGuard tries to be as silent as possible when not being used; it is not a chatty protocol. For the most part, it only transmits data when a peer wishes to send packets. When it's not being asked to send packets, it stops sending packets until it is asked again. In the majority of configurations, this works well. However, when a peer is behind NAT or a firewall, it might wish to be able to receive incoming packets even when it is not sending any packets. Because NAT and stateful firewalls keep track of "connections", if a peer behind NAT or a firewall wishes to receive incoming packets, he must keep the NAT/firewall mapping valid, by periodically sending keepalive packets. This is called persistent keepalives. When this option is enabled, a keepalive packet is sent to the server endpoint once every interval seconds. A sensible interval that works with a wide variety of firewalls is 25 seconds. Setting it to 0 turns the feature off, which is the default, since most users will not need this, and it makes WireGuard slightly more chatty. This feature may be specified by adding the PersistentKeepalive = field to a peer in the configuration file, or setting persistent-keepalive at the command line. If you don't need this feature, don't enable it. But if you're behind NAT or a firewall and you want to receive incoming connections long after network traffic has gone silent, this option will keep the "connection" open in the eyes of NAT.</span><br /> +<br /> +<span>That's why you see <span class='inlinecode'>PersistentKeepAlive = 25</span> in the <span class='inlinecode'>blowfish</span> and <span class='inlinecode'>fishfinger</span> peer configurations. This means that every 25 seconds, a keep-alive signal is sent over the tunnel to maintain its connection. If the tunnel is not yet established, it will be created within 25 seconds latest.</span><br /> +<br /> +<span>Without this, we might never have a VPN tunnel open, as the systems in the LAN may not actively attempt to contact <span class='inlinecode'>blowfish</span> and <span class='inlinecode'>fishfinger</span> on their own. In fact, the opposite would likely occur, with the traffic flowing inward instead of outward (this is beyond the scope of this blog post but will be covered in a later post in this series!).</span><br /> +<br /> +<h3 style='display: inline' id='preshared-key'>Preshared key</h3><br /> +<br /> +<span>In a WireGuard configuration, the PSK (preshared key) is an optional additional layer of symmetric encryption used alongside the standard public key cryptography. It is a shared secret known to both peers that enhances security by requiring an attacker to compromise both the private keys and the PSK to decrypt communication. While optional, using a PSK is better as it strengthens the cryptographic security, mitigating risks of potential vulnerabilities in the key exchange process.</span><br /> +<br /> +<span>So, because it's better, we are using it.</span><br /> +<br /> +<h2 style='display: inline' id='mesh-network-generator'>Mesh network generator</h2><br /> +<br /> +<span>Manually generating <span class='inlinecode'>wg0.conf</span> files for every peer in a mesh network setup is cumbersome because each peer requires its own unique public/private key pair and a preshared key for each VPN tunnel (resulting in 29 preshared keys for 8 hosts). This complexity scales exponentially with the number of peers as the relationships between all peers must be explicitly defined, including their unique configurations such as <span class='inlinecode'>AllowedIPs</span> and <span class='inlinecode'>Endpoint</span> and optional settings like <span class='inlinecode'>PersistentKeepalive</span>. Automating the process ensures consistency, reduces human error, saves considerable time, and allows for centralized management of configuration files.</span><br /> +<br /> +<span>Instead, a script can handle key generation, coordinate relationships, and generate all necessary configuration files simultaneously, making it scalable and far less error-prone.</span><br /> +<br /> +<span>I have written a Ruby script <span class='inlinecode'>wireguardmeshgenerator.rb</span> to do this for our purposes:</span><br /> +<br /> +<a class='textlink' href='https://codeberg.org/snonux/wireguardmeshgenerator'>https://codeberg.org/snonux/wireguardmeshgenerator</a><br /> +<br /> +<span>I use Fedora Linux as my main driver on my personal Laptop, so the script was developed and tested only on Fedora Linux. However, it should also work on other Linux and Unix-like systems.</span><br /> +<br /> +<span>To set up the mesh generator on Fedora Linux, we run the following:</span><br /> +<br /> +<!-- Generator: GNU source-highlight 3.1.9 +by Lorenzo Bettini +http://www.lorenzobettini.it +http://www.gnu.org/software/src-highlite --> +<pre>> git clone https://codeberg.org/snonux/wireguardmeshgenerator +> cd ./wireguardmeshgenerator +> bundle install +> sudo dnf install -y wireguard-tools +</pre> +<br /> +<span>This assumes that Ruby and the <span class='inlinecode'>bundler</span> gem are already installed. If not, refer to the docs of your distribution.</span><br /> +<br /> +<h3 style='display: inline' id='wireguardmeshgeneratoryaml'><span class='inlinecode'>wireguardmeshgenerator.yaml</span></h3><br /> +<br /> +<span>The file <span class='inlinecode'>wireguardmeshgenerator.yaml</span> configures the mesh generator script.</span><br /> +<br /> +<pre> +--- +hosts: + f0: + os: FreeBSD + ssh: + user: paul + conf_dir: /usr/local/etc/wireguard + sudo_cmd: doas + reload_cmd: service wireguard reload + lan: + domain: 'lan.buetow.org' + ip: '192.168.1.130' + wg0: + domain: 'wg0.wan.buetow.org' + ip: '192.168.2.130' + f1: + os: FreeBSD + ssh: + user: paul + conf_dir: /usr/local/etc/wireguard + sudo_cmd: doas + reload_cmd: service wireguard reload + lan: + domain: 'lan.buetow.org' + ip: '192.168.1.131' + wg0: + domain: 'wg0.wan.buetow.org' + ip: '192.168.2.131' + f2: + os: FreeBSD + ssh: + user: paul + conf_dir: /usr/local/etc/wireguard + sudo_cmd: doas + reload_cmd: service wireguard reload + lan: + domain: 'lan.buetow.org' + ip: '192.168.1.132' + wg0: + domain: 'wg0.wan.buetow.org' + ip: '192.168.2.132' + r0: + os: Linux + ssh: + user: root + conf_dir: /etc/wireguard + sudo_cmd: + reload_cmd: systemctl reload wg-quick@wg0.service + lan: + domain: 'lan.buetow.org' + ip: '192.168.1.120' + wg0: + domain: 'wg0.wan.buetow.org' + ip: '192.168.2.120' + r1: + os: Linux + ssh: + user: root + conf_dir: /etc/wireguard + sudo_cmd: + reload_cmd: systemctl reload wg-quick@wg0.service + lan: + domain: 'lan.buetow.org' + ip: '192.168.1.121' + wg0: + domain: 'wg0.wan.buetow.org' + ip: '192.168.2.121' + r2: + os: Linux + ssh: + user: root + conf_dir: /etc/wireguard + sudo_cmd: + reload_cmd: systemctl reload wg-quick@wg0.service + lan: + domain: 'lan.buetow.org' + ip: '192.168.1.122' + wg0: + domain: 'wg0.wan.buetow.org' + ip: '192.168.2.122' + blowfish: + os: OpenBSD + ssh: + user: rex + conf_dir: /etc/wireguard + sudo_cmd: doas + reload_cmd: sh /etc/netstart wg0 + internet: + domain: 'buetow.org' + ip: '23.88.35.144' + wg0: + domain: 'wg0.wan.buetow.org' + ip: '192.168.2.110' + fishfinger: + os: OpenBSD + ssh: + user: rex + conf_dir: /etc/wireguard + sudo_cmd: doas + reload_cmd: sh /etc/netstart wg0 + internet: + domain: 'buetow.org' + ip: '46.23.94.99' + wg0: + domain: 'wg0.wan.buetow.org' + ip: '192.168.2.111' +</pre> +<br /> +<span>The file specifies details such as SSH user settings, configuration directories, sudo or reload commands, and IP/domain assignments for both internal LAN-facing interfaces and WireGuard (<span class='inlinecode'>wg0</span>) interfaces. Each host is assigned specific roles, including internal participants and publicly accessible nodes with internet-facing IPs, enabling the creation of a fully connected mesh VPN.</span><br /> +<br /> +<h3 style='display: inline' id='wireguardmeshgeneratorrb-overview'><span class='inlinecode'>wireguardmeshgenerator.rb</span> overview</h3><br /> +<br /> +<span>The <span class='inlinecode'>wireguardmeshgenerator.rb</span> script consists of the following base classes:</span><br /> +<br /> +<ul> +<li><span class='inlinecode'>KeyTool</span>: Manages WireGuard key generation and retrieval. It ensures the presence of public/private key pairs and preshared keys (PSKs). If keys are missing, it generates them using the <span class='inlinecode'>wg</span> tool. It provides methods to read the public/private keys and retrieve or generate a PSK for communication with a peer. The keys are stored in a temp directory on the system from where the generator is run.</li> +<li><span class='inlinecode'>PeerSnippet</span>: A <span class='inlinecode'>Struct</span> representing the configuration for a single WireGuard peer in the mesh. Based on the provided attributes and configuration, it generates the peer's WireGuard configuration, including public key, PSK, allowed IPs, endpoint, and keepalive settings.</li> +<li><span class='inlinecode'>WireguardConfig</span>: This function generates WireGuard configuration files for the specified host in the mesh network. It includes the <span class='inlinecode'>[Interface]</span> section for the host itself and the <span class='inlinecode'>[Peer]</span> sections for all other peers. It can also clean up generated files and directories and create the required directory structure for storing configuration files locally on the system from which the script is run.</li> +<li><span class='inlinecode'>InstallConfig</span>: Handles uploading, installing, and restarting the WireGuard service on remote hosts using SSH and SCP. It ensures the configuration file is uploaded to the remote machine, the necessary directories are present and correctly configured, and the WireGuard service reloads with the new configuration.</li> +</ul><br /> +<span>At the end (if you want to see the code for the stuff listed above, go to the Git repo and have a look), we glue it all together in this block:</span><br /> +<br /> +<!-- Generator: GNU source-highlight 3.1.9 +by Lorenzo Bettini +http://www.lorenzobettini.it +http://www.gnu.org/software/src-highlite --> +<pre><b><u><font color="#000000">begin</font></u></b> + options = { hosts: [] } + OptionParser.new <b><u><font color="#000000">do</font></u></b> |opts| + opts.banner = <font color="#808080">'Usage: wireguardmeshgenerator.rb [options]'</font> + opts.on(<font color="#808080">'--generate'</font>, <font color="#808080">'Generate Wireguard configs'</font>) <b><u><font color="#000000">do</font></u></b> + options[:generate] = <b><u><font color="#000000">true</font></u></b> + <b><u><font color="#000000">end</font></u></b> + opts.on(<font color="#808080">'--install'</font>, <font color="#808080">'Install Wireguard configs'</font>) <b><u><font color="#000000">do</font></u></b> + options[:install] = <b><u><font color="#000000">true</font></u></b> + <b><u><font color="#000000">end</font></u></b> + opts.on(<font color="#808080">'--clean'</font>, <font color="#808080">'Clean Wireguard configs'</font>) <b><u><font color="#000000">do</font></u></b> + options[:clean] = <b><u><font color="#000000">true</font></u></b> + <b><u><font color="#000000">end</font></u></b> + opts.on(<font color="#808080">'--hosts=HOSTS'</font>, <font color="#808080">'Comma separated hosts to configure'</font>) <b><u><font color="#000000">do</font></u></b> |hosts| + options[:hosts] = hosts.split(<font color="#808080">','</font>) + <b><u><font color="#000000">end</font></u></b> + <b><u><font color="#000000">end</font></u></b>.parse! + + conf = YAML.load_file(<font color="#808080">'wireguardmeshgenerator.yaml'</font>).freeze + conf[<font color="#808080">'hosts'</font>].keys.select { options[:hosts].empty? || options[:hosts].<b><u><font color="#000000">include</font></u></b>?(_1) } + .each <b><u><font color="#000000">do</font></u></b> |host| + <i><font color="silver"># Generate Wireguard configuration for the host reload!</font></i> + WireguardConfig.new(host, conf[<font color="#808080">'hosts'</font>]).generate! <b><u><font color="#000000">if</font></u></b> options[:generate] + <i><font color="silver"># Install Wireguard configuration for the host.</font></i> + InstallConfig.new(host, conf[<font color="#808080">'hosts'</font>]).upload!.install!.reload! <b><u><font color="#000000">if</font></u></b> options[:install] + <i><font color="silver"># Clean Wireguard configuration for the host.</font></i> + WireguardConfig.new(host, conf[<font color="#808080">'hosts'</font>]).clean! <b><u><font color="#000000">if</font></u></b> options[:clean] + <b><u><font color="#000000">end</font></u></b> +<b><u><font color="#000000">rescue</font></u></b> StandardError => e + puts <font color="#808080">"Error: #{e.message}"</font> + puts e.backtrace.join(<font color="#808080">"\n"</font>) + exit <font color="#000000">2</font> +<b><u><font color="#000000">end</font></u></b> +</pre> +<br /> +<span>And we also have a <span class='inlinecode'>Rakefile</span>:</span><br /> +<br /> +<!-- Generator: GNU source-highlight 3.1.9 +by Lorenzo Bettini +http://www.lorenzobettini.it +http://www.gnu.org/software/src-highlite --> +<pre>task :generate <b><u><font color="#000000">do</font></u></b> + ruby <font color="#808080">'wireguardmeshgenerator.rb'</font>, <font color="#808080">'--generate'</font> +<b><u><font color="#000000">end</font></u></b> + +task :clean <b><u><font color="#000000">do</font></u></b> + ruby <font color="#808080">'wireguardmeshgenerator.rb'</font>, <font color="#808080">'--clean'</font> +<b><u><font color="#000000">end</font></u></b> + +task :install <b><u><font color="#000000">do</font></u></b> + ruby <font color="#808080">'wireguardmeshgenerator.rb'</font>, <font color="#808080">'--install'</font> +<b><u><font color="#000000">end</font></u></b> + +task default: :generate +</pre> +<br /> +<br /> +<h2 style='display: inline' id='invoking-the-mesh-network-generator'>Invoking the mesh network generator</h2><br /> +<br /> +<h3 style='display: inline' id='generating-the-wg0conf-files-and-keys'>Generating the <span class='inlinecode'>wg0.conf</span> files and keys</h3><br /> +<br /> +<span>To generate everything (the <span class='inlinecode'>wg0.conf</span> of all participating hosts, including all keys involved), we run the following:</span><br /> +<br /> +<!-- Generator: GNU source-highlight 3.1.9 +by Lorenzo Bettini +http://www.lorenzobettini.it +http://www.gnu.org/software/src-highlite --> +<pre>> rake generate +/usr/bin/ruby wireguardmeshgenerator.rb --generate +Generating dist/f<font color="#000000">0</font>/etc/wireguard/wg<font color="#000000">0</font>.conf +Generating dist/f<font color="#000000">1</font>/etc/wireguard/wg<font color="#000000">0</font>.conf +Generating dist/f<font color="#000000">2</font>/etc/wireguard/wg<font color="#000000">0</font>.conf +Generating dist/r<font color="#000000">0</font>/etc/wireguard/wg<font color="#000000">0</font>.conf +Generating dist/r<font color="#000000">1</font>/etc/wireguard/wg<font color="#000000">0</font>.conf +Generating dist/r<font color="#000000">2</font>/etc/wireguard/wg<font color="#000000">0</font>.conf +Generating dist/blowfish/etc/wireguard/wg<font color="#000000">0</font>.conf +Generating dist/fishfinger/etc/wireguard/wg<font color="#000000">0</font>.conf +</pre> +<br /> +<span>It generated all the <span class='inlinecode'>wg0.conf</span> files listed in the output, plus those keys:</span><br /> +<br /> +<!-- Generator: GNU source-highlight 3.1.9 +by Lorenzo Bettini +http://www.lorenzobettini.it +http://www.gnu.org/software/src-highlite --> +<pre>> find keys/ -type f +keys/f<font color="#000000">0</font>/priv.key +keys/f<font color="#000000">0</font>/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/f<font color="#000000">1</font>/priv.key +keys/f<font color="#000000">1</font>/pub.key +keys/f<font color="#000000">2</font>/priv.key +keys/f<font color="#000000">2</font>/pub.key +keys/r<font color="#000000">0</font>/priv.key +keys/r<font color="#000000">0</font>/pub.key +keys/r<font color="#000000">1</font>/priv.key +keys/r<font color="#000000">1</font>/pub.key +keys/r<font color="#000000">2</font>/priv.key +keys/r<font color="#000000">2</font>/pub.key +keys/blowfish/priv.key +keys/blowfish/pub.key +keys/fishfinger/priv.key +keys/fishfinger/pub.key +</pre> +<br /> +<span>Those keys are embedded in the resulting <span class='inlinecode'>wg0.conf</span>, so later, we only need to install the <span class='inlinecode'>wg0.conf</span> files and not all the keys individually.</span><br /> +<br /> +<h3 style='display: inline' id='installing-the-wg0conf-files'>Installing the <span class='inlinecode'>wg0.conf</span> files</h3><br /> +<br /> +<span>Uploading the <span class='inlinecode'>wg0.conf</span> files to the participating hosts and reloading WireGuard on them is then just a matter of executing (this expects, that all participating hosts are up and running):</span><br /> +<br /> +<!-- Generator: GNU source-highlight 3.1.9 +by Lorenzo Bettini +http://www.lorenzobettini.it +http://www.gnu.org/software/src-highlite --> +<pre>> rake install +/usr/bin/ruby wireguardmeshgenerator.rb --install +Uploading dist/f<font color="#000000">0</font>/etc/wireguard/wg<font color="#000000">0</font>.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 <font color="#000000">700</font> /usr/local/etc/wireguard ++ doas mv -v wg0.conf /usr/local/etc/wireguard +wg0.conf -> /usr/local/etc/wireguard/wg<font color="#000000">0</font>.conf ++ doas chmod <font color="#000000">644</font> /usr/local/etc/wireguard/wg<font color="#000000">0</font>.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/f<font color="#000000">1</font>/etc/wireguard/wg<font color="#000000">0</font>.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 <font color="#000000">700</font> /usr/local/etc/wireguard ++ doas mv -v wg0.conf /usr/local/etc/wireguard +wg0.conf -> /usr/local/etc/wireguard/wg<font color="#000000">0</font>.conf ++ doas chmod <font color="#000000">644</font> /usr/local/etc/wireguard/wg<font color="#000000">0</font>.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/f<font color="#000000">2</font>/etc/wireguard/wg<font color="#000000">0</font>.conf to f2.lan.buetow.org:. +Installing Wireguard config on f2 +Uploading cmd.sh to f2.lan.buetow.org:. ++ [ ! -d /usr/local/etc/wireguard ] ++ doas chmod <font color="#000000">700</font> /usr/local/etc/wireguard ++ doas mv -v wg0.conf /usr/local/etc/wireguard +wg0.conf -> /usr/local/etc/wireguard/wg<font color="#000000">0</font>.conf ++ doas chmod <font color="#000000">644</font> /usr/local/etc/wireguard/wg<font color="#000000">0</font>.conf ++ rm cmd.sh +Reloading Wireguard on f2 +Uploading cmd.sh to f2.lan.buetow.org:. ++ doas service wireguard reload ++ rm cmd.sh +Uploading dist/r<font color="#000000">0</font>/etc/wireguard/wg<font color="#000000">0</font>.conf to r0.lan.buetow.org:. +Installing Wireguard config on r0 +Uploading cmd.sh to r0.lan.buetow.org:. ++ <font color="#808080">'['</font> <font color="#808080">'!'</font> -d /etc/wireguard <font color="#808080">']'</font> ++ chmod <font color="#000000">700</font> /etc/wireguard ++ mv -v wg0.conf /etc/wireguard +renamed <font color="#808080">'wg0.conf'</font> -> <font color="#808080">'/etc/wireguard/wg0.conf'</font> ++ chmod <font color="#000000">644</font> /etc/wireguard/wg<font color="#000000">0</font>.conf ++ rm cmd.sh +Reloading Wireguard on r0 +Uploading cmd.sh to r0.lan.buetow.org:. ++ systemctl reload wg-quick@wg0.service ++ rm cmd.sh +Uploading dist/r<font color="#000000">1</font>/etc/wireguard/wg<font color="#000000">0</font>.conf to r1.lan.buetow.org:. +Installing Wireguard config on r1 +Uploading cmd.sh to r1.lan.buetow.org:. ++ <font color="#808080">'['</font> <font color="#808080">'!'</font> -d /etc/wireguard <font color="#808080">']'</font> ++ chmod <font color="#000000">700</font> /etc/wireguard ++ mv -v wg0.conf /etc/wireguard +renamed <font color="#808080">'wg0.conf'</font> -> <font color="#808080">'/etc/wireguard/wg0.conf'</font> ++ chmod <font color="#000000">644</font> /etc/wireguard/wg<font color="#000000">0</font>.conf ++ rm cmd.sh +Reloading Wireguard on r1 +Uploading cmd.sh to r1.lan.buetow.org:. ++ systemctl reload wg-quick@wg0.service ++ rm cmd.sh +Uploading dist/r<font color="#000000">2</font>/etc/wireguard/wg<font color="#000000">0</font>.conf to r2.lan.buetow.org:. +Installing Wireguard config on r2 +Uploading cmd.sh to r2.lan.buetow.org:. ++ <font color="#808080">'['</font> <font color="#808080">'!'</font> -d /etc/wireguard <font color="#808080">']'</font> ++ chmod <font color="#000000">700</font> /etc/wireguard ++ mv -v wg0.conf /etc/wireguard +renamed <font color="#808080">'wg0.conf'</font> -> <font color="#808080">'/etc/wireguard/wg0.conf'</font> ++ chmod <font color="#000000">644</font> /etc/wireguard/wg<font color="#000000">0</font>.conf ++ rm cmd.sh +Reloading Wireguard on r2 +Uploading cmd.sh to r2.lan.buetow.org:. ++ systemctl reload wg-quick@wg0.service ++ rm cmd.sh +Uploading dist/blowfish/etc/wireguard/wg<font color="#000000">0</font>.conf to blowfish.buetow.org:. +Installing Wireguard config on blowfish +Uploading cmd.sh to blowfish.buetow.org:. ++ [ ! -d /etc/wireguard ] ++ doas chmod <font color="#000000">700</font> /etc/wireguard ++ doas mv -v wg0.conf /etc/wireguard +wg0.conf -> /etc/wireguard/wg<font color="#000000">0</font>.conf ++ doas chmod <font color="#000000">644</font> /etc/wireguard/wg<font color="#000000">0</font>.conf ++ rm cmd.sh +Reloading Wireguard on blowfish +Uploading cmd.sh to blowfish.buetow.org:. ++ doas sh /etc/netstart wg0 ++ rm cmd.sh +Uploading dist/fishfinger/etc/wireguard/wg<font color="#000000">0</font>.conf to fishfinger.buetow.org:. +Installing Wireguard config on fishfinger +Uploading cmd.sh to fishfinger.buetow.org:. ++ [ ! -d /etc/wireguard ] ++ doas chmod <font color="#000000">700</font> /etc/wireguard ++ doas mv -v wg0.conf /etc/wireguard +wg0.conf -> /etc/wireguard/wg<font color="#000000">0</font>.conf ++ doas chmod <font color="#000000">644</font> /etc/wireguard/wg<font color="#000000">0</font>.conf ++ rm cmd.sh +Reloading Wireguard on fishfinger +Uploading cmd.sh to fishfinger.buetow.org:. ++ doas sh /etc/netstart wg0 ++ rm cmd.sh +</pre> +<br /> +<h3 style='display: inline' id='re-generating-mesh-and-installing-the-wg0conf-files-again'>Re-generating mesh and installing the <span class='inlinecode'>wg0.conf</span> files again</h3><br /> +<br /> +<span>The mesh network can be re-generated and re-installed as follows:</span><br /> +<br /> +<!-- Generator: GNU source-highlight 3.1.9 +by Lorenzo Bettini +http://www.lorenzobettini.it +http://www.gnu.org/software/src-highlite --> +<pre>> rake clean +> rake generate +> rake install +</pre> +<br /> +<span>That would also delete and re-generate all the keys involved.</span><br /> +<br /> +<h2 style='display: inline' id='happy-wireguard-ing'>Happy WireGuard-ing</h2><br /> +<br /> +<span>All is set up now. E.g. on <span class='inlinecode'>f0</span>:</span><br /> +<br /> +<!-- Generator: GNU source-highlight 3.1.9 +by Lorenzo Bettini +http://www.lorenzobettini.it +http://www.gnu.org/software/src-highlite --> +<pre>paul@f0:~ % doas wg show +interface: wg0 + public key: Jm6YItMt94++dIeOyVi1I9AhNt2qQcryxCZezoX7X2Y= + private key: (hidden) + listening port: <font color="#000000">56709</font> + +peer: 8PvGZH1NohHpZPVJyjhctBX9xblsNvYBhpg68FsFcns= + preshared key: (hidden) + endpoint: <font color="#000000">46.23</font>.<font color="#000000">94.99</font>:<font color="#000000">56709</font> + allowed ips: <font color="#000000">192.168</font>.<font color="#000000">2.111</font>/<font color="#000000">32</font> + latest handshake: <font color="#000000">1</font> minute, <font color="#000000">46</font> seconds ago + transfer: <font color="#000000">124</font> B received, <font color="#000000">1.75</font> KiB sent + persistent keepalive: every <font color="#000000">25</font> seconds + +peer: Xow+d3qVXgUMk4pcRSQ6Fe+vhYBa3VDyHX/4jrGoKns= + preshared key: (hidden) + endpoint: <font color="#000000">23.88</font>.<font color="#000000">35.144</font>:<font color="#000000">56709</font> + allowed ips: <font color="#000000">192.168</font>.<font color="#000000">2.110</font>/<font color="#000000">32</font> + latest handshake: <font color="#000000">1</font> minute, <font color="#000000">52</font> seconds ago + transfer: <font color="#000000">124</font> B received, <font color="#000000">1.60</font> KiB sent + persistent keepalive: every <font color="#000000">25</font> seconds + +peer: s3e93XoY7dPUQgLiVO4d8x/SRCFgEew+/wP<font color="#000000">7</font>+zwgehI= + preshared key: (hidden) + endpoint: <font color="#000000">192.168</font>.<font color="#000000">1.120</font>:<font color="#000000">56709</font> + allowed ips: <font color="#000000">192.168</font>.<font color="#000000">2.120</font>/<font color="#000000">32</font> + +peer: 2htXdNcxzpI2FdPDJy4T4VGtm1wpMEQu1AkQHjNY6F8= + preshared key: (hidden) + endpoint: <font color="#000000">192.168</font>.<font color="#000000">1.131</font>:<font color="#000000">56709</font> + allowed ips: <font color="#000000">192.168</font>.<font color="#000000">2.131</font>/<font color="#000000">32</font> + +peer: 0Y/H20W8YIbF7DA1sMwMacLI8WS9yG+<font color="#000000">1</font>/QO7m2oyllg= + preshared key: (hidden) + endpoint: <font color="#000000">192.168</font>.<font color="#000000">1.122</font>:<font color="#000000">56709</font> + allowed ips: <font color="#000000">192.168</font>.<font color="#000000">2.122</font>/<font color="#000000">32</font> + +peer: Hhy9kMPOOjChXV2RA5WeCGs+J0FE3rcNPDw/TLSn7i8= + preshared key: (hidden) + endpoint: <font color="#000000">192.168</font>.<font color="#000000">1.121</font>:<font color="#000000">56709</font> + allowed ips: <font color="#000000">192.168</font>.<font color="#000000">2.121</font>/<font color="#000000">32</font> + +peer: SlGVsACE1wiaRoGvCR3f7AuHfRS+1jjhS+YwEJ2HvF0= + preshared key: (hidden) + endpoint: <font color="#000000">192.168</font>.<font color="#000000">1.132</font>:<font color="#000000">56709</font> + allowed ips: <font color="#000000">192.168</font>.<font color="#000000">2.132</font>/<font color="#000000">32</font> +</pre> +<br /> +<span>All the hosts are pingable as well, e.g.:</span><br /> +<br /> +<!-- Generator: GNU source-highlight 3.1.9 +by Lorenzo Bettini +http://www.lorenzobettini.it +http://www.gnu.org/software/src-highlite --> +<pre>paul@f0:~ % foreach peer ( f1 f2 r0 r1 r2 blowfish fishfinger ) +foreach? ping -c<font color="#000000">2</font> $peer.wg0 +foreach? echo +foreach? end +PING f1.wg0 (<font color="#000000">192.168</font>.<font color="#000000">2.131</font>): <font color="#000000">56</font> data bytes +<font color="#000000">64</font> bytes from <font color="#000000">192.168</font>.<font color="#000000">2.131</font>: icmp_seq=<font color="#000000">0</font> ttl=<font color="#000000">64</font> time=<font color="#000000">0.334</font> ms +<font color="#000000">64</font> bytes from <font color="#000000">192.168</font>.<font color="#000000">2.131</font>: icmp_seq=<font color="#000000">1</font> ttl=<font color="#000000">64</font> time=<font color="#000000">0.260</font> ms + +--- f1.wg0 ping statistics --- +<font color="#000000">2</font> packets transmitted, <font color="#000000">2</font> packets received, <font color="#000000">0.0</font>% packet loss +round-trip min/avg/max/stddev = <font color="#000000">0.260</font>/<font color="#000000">0.297</font>/<font color="#000000">0.334</font>/<font color="#000000">0.037</font> ms + +PING f2.wg0 (<font color="#000000">192.168</font>.<font color="#000000">2.132</font>): <font color="#000000">56</font> data bytes +<font color="#000000">64</font> bytes from <font color="#000000">192.168</font>.<font color="#000000">2.132</font>: icmp_seq=<font color="#000000">0</font> ttl=<font color="#000000">64</font> time=<font color="#000000">0.323</font> ms +<font color="#000000">64</font> bytes from <font color="#000000">192.168</font>.<font color="#000000">2.132</font>: icmp_seq=<font color="#000000">1</font> ttl=<font color="#000000">64</font> time=<font color="#000000">0.303</font> ms + +--- f2.wg0 ping statistics --- +<font color="#000000">2</font> packets transmitted, <font color="#000000">2</font> packets received, <font color="#000000">0.0</font>% packet loss +round-trip min/avg/max/stddev = <font color="#000000">0.303</font>/<font color="#000000">0.313</font>/<font color="#000000">0.323</font>/<font color="#000000">0.010</font> ms + +PING r0.wg0 (<font color="#000000">192.168</font>.<font color="#000000">2.120</font>): <font color="#000000">56</font> data bytes +<font color="#000000">64</font> bytes from <font color="#000000">192.168</font>.<font color="#000000">2.120</font>: icmp_seq=<font color="#000000">0</font> ttl=<font color="#000000">64</font> time=<font color="#000000">0.716</font> ms +<font color="#000000">64</font> bytes from <font color="#000000">192.168</font>.<font color="#000000">2.120</font>: icmp_seq=<font color="#000000">1</font> ttl=<font color="#000000">64</font> time=<font color="#000000">0.406</font> ms + +--- r0.wg0 ping statistics --- +<font color="#000000">2</font> packets transmitted, <font color="#000000">2</font> packets received, <font color="#000000">0.0</font>% packet loss +round-trip min/avg/max/stddev = <font color="#000000">0.406</font>/<font color="#000000">0.561</font>/<font color="#000000">0.716</font>/<font color="#000000">0.155</font> ms + +PING r1.wg0 (<font color="#000000">192.168</font>.<font color="#000000">2.121</font>): <font color="#000000">56</font> data bytes +<font color="#000000">64</font> bytes from <font color="#000000">192.168</font>.<font color="#000000">2.121</font>: icmp_seq=<font color="#000000">0</font> ttl=<font color="#000000">64</font> time=<font color="#000000">0.639</font> ms +<font color="#000000">64</font> bytes from <font color="#000000">192.168</font>.<font color="#000000">2.121</font>: icmp_seq=<font color="#000000">1</font> ttl=<font color="#000000">64</font> time=<font color="#000000">0.629</font> ms + +--- r1.wg0 ping statistics --- +<font color="#000000">2</font> packets transmitted, <font color="#000000">2</font> packets received, <font color="#000000">0.0</font>% packet loss +round-trip min/avg/max/stddev = <font color="#000000">0.629</font>/<font color="#000000">0.634</font>/<font color="#000000">0.639</font>/<font color="#000000">0.005</font> ms + +PING r2.wg0 (<font color="#000000">192.168</font>.<font color="#000000">2.122</font>): <font color="#000000">56</font> data bytes +<font color="#000000">64</font> bytes from <font color="#000000">192.168</font>.<font color="#000000">2.122</font>: icmp_seq=<font color="#000000">0</font> ttl=<font color="#000000">64</font> time=<font color="#000000">0.569</font> ms +<font color="#000000">64</font> bytes from <font color="#000000">192.168</font>.<font color="#000000">2.122</font>: icmp_seq=<font color="#000000">1</font> ttl=<font color="#000000">64</font> time=<font color="#000000">0.479</font> ms + +--- r2.wg0 ping statistics --- +<font color="#000000">2</font> packets transmitted, <font color="#000000">2</font> packets received, <font color="#000000">0.0</font>% packet loss +round-trip min/avg/max/stddev = <font color="#000000">0.479</font>/<font color="#000000">0.524</font>/<font color="#000000">0.569</font>/<font color="#000000">0.045</font> ms + +PING blowfish.wg0 (<font color="#000000">192.168</font>.<font color="#000000">2.110</font>): <font color="#000000">56</font> data bytes +<font color="#000000">64</font> bytes from <font color="#000000">192.168</font>.<font color="#000000">2.110</font>: icmp_seq=<font color="#000000">0</font> ttl=<font color="#000000">255</font> time=<font color="#000000">35.745</font> ms +<font color="#000000">64</font> bytes from <font color="#000000">192.168</font>.<font color="#000000">2.110</font>: icmp_seq=<font color="#000000">1</font> ttl=<font color="#000000">255</font> time=<font color="#000000">35.481</font> ms + +--- blowfish.wg0 ping statistics --- +<font color="#000000">2</font> packets transmitted, <font color="#000000">2</font> packets received, <font color="#000000">0.0</font>% packet loss +round-trip min/avg/max/stddev = <font color="#000000">35.481</font>/<font color="#000000">35.613</font>/<font color="#000000">35.745</font>/<font color="#000000">0.132</font> ms + +PING fishfinger.wg0 (<font color="#000000">192.168</font>.<font color="#000000">2.111</font>): <font color="#000000">56</font> data bytes +<font color="#000000">64</font> bytes from <font color="#000000">192.168</font>.<font color="#000000">2.111</font>: icmp_seq=<font color="#000000">0</font> ttl=<font color="#000000">255</font> time=<font color="#000000">33.992</font> ms +<font color="#000000">64</font> bytes from <font color="#000000">192.168</font>.<font color="#000000">2.111</font>: icmp_seq=<font color="#000000">1</font> ttl=<font color="#000000">255</font> time=<font color="#000000">33.751</font> ms + +--- fishfinger.wg0 ping statistics --- +<font color="#000000">2</font> packets transmitted, <font color="#000000">2</font> packets received, <font color="#000000">0.0</font>% packet loss +round-trip min/avg/max/stddev = <font color="#000000">33.751</font>/<font color="#000000">33.872</font>/<font color="#000000">33.992</font>/<font color="#000000">0.120</font> ms +</pre> +<br /> +<span>Note that the loop above is a <span class='inlinecode'>tcsh</span> loop, the default shell used in FreeBSD. Of course, all other peers can ping their peers as well!</span><br /> +<br /> +<span>After the first ping, VPN tunnels now also show handshakes and the amount of data transferred through them:</span><br /> +<br /> +<!-- Generator: GNU source-highlight 3.1.9 +by Lorenzo Bettini +http://www.lorenzobettini.it +http://www.gnu.org/software/src-highlite --> +<pre>paul@f0:~ % doas wg show +interface: wg0 + public key: Jm6YItMt94++dIeOyVi1I9AhNt2qQcryxCZezoX7X2Y= + private key: (hidden) + listening port: <font color="#000000">56709</font> + +peer: 0Y/H20W8YIbF7DA1sMwMacLI8WS9yG+<font color="#000000">1</font>/QO7m2oyllg= + preshared key: (hidden) + endpoint: <font color="#000000">192.168</font>.<font color="#000000">1.122</font>:<font color="#000000">56709</font> + allowed ips: <font color="#000000">192.168</font>.<font color="#000000">2.122</font>/<font color="#000000">32</font> + latest handshake: <font color="#000000">10</font> seconds ago + transfer: <font color="#000000">440</font> B received, <font color="#000000">532</font> B sent + +peer: Hhy9kMPOOjChXV2RA5WeCGs+J0FE3rcNPDw/TLSn7i8= + preshared key: (hidden) + endpoint: <font color="#000000">192.168</font>.<font color="#000000">1.121</font>:<font color="#000000">56709</font> + allowed ips: <font color="#000000">192.168</font>.<font color="#000000">2.121</font>/<font color="#000000">32</font> + latest handshake: <font color="#000000">12</font> seconds ago + transfer: <font color="#000000">440</font> B received, <font color="#000000">564</font> B sent + +peer: s3e93XoY7dPUQgLiVO4d8x/SRCFgEew+/wP<font color="#000000">7</font>+zwgehI= + preshared key: (hidden) + endpoint: <font color="#000000">192.168</font>.<font color="#000000">1.120</font>:<font color="#000000">56709</font> + allowed ips: <font color="#000000">192.168</font>.<font color="#000000">2.120</font>/<font color="#000000">32</font> + latest handshake: <font color="#000000">14</font> seconds ago + transfer: <font color="#000000">440</font> B received, <font color="#000000">564</font> B sent + +peer: SlGVsACE1wiaRoGvCR3f7AuHfRS+1jjhS+YwEJ2HvF0= + preshared key: (hidden) + endpoint: <font color="#000000">192.168</font>.<font color="#000000">1.132</font>:<font color="#000000">56709</font> + allowed ips: <font color="#000000">192.168</font>.<font color="#000000">2.132</font>/<font color="#000000">32</font> + latest handshake: <font color="#000000">17</font> seconds ago + transfer: <font color="#000000">472</font> B received, <font color="#000000">564</font> B sent + +peer: Xow+d3qVXgUMk4pcRSQ6Fe+vhYBa3VDyHX/4jrGoKns= + preshared key: (hidden) + endpoint: <font color="#000000">23.88</font>.<font color="#000000">35.144</font>:<font color="#000000">56709</font> + allowed ips: <font color="#000000">192.168</font>.<font color="#000000">2.110</font>/<font color="#000000">32</font> + latest handshake: <font color="#000000">55</font> seconds ago + transfer: <font color="#000000">472</font> B received, <font color="#000000">596</font> B sent + persistent keepalive: every <font color="#000000">25</font> seconds + +peer: 8PvGZH1NohHpZPVJyjhctBX9xblsNvYBhpg68FsFcns= + preshared key: (hidden) + endpoint: <font color="#000000">46.23</font>.<font color="#000000">94.99</font>:<font color="#000000">56709</font> + allowed ips: <font color="#000000">192.168</font>.<font color="#000000">2.111</font>/<font color="#000000">32</font> + latest handshake: <font color="#000000">55</font> seconds ago + transfer: <font color="#000000">472</font> B received, <font color="#000000">596</font> B sent + persistent keepalive: every <font color="#000000">25</font> seconds + +peer: 2htXdNcxzpI2FdPDJy4T4VGtm1wpMEQu1AkQHjNY6F8= + preshared key: (hidden) + endpoint: <font color="#000000">192.168</font>.<font color="#000000">1.131</font>:<font color="#000000">56709</font> + allowed ips: <font color="#000000">192.168</font>.<font color="#000000">2.131</font>/<font color="#000000">32</font> +</pre> +<br /> +<h2 style='display: inline' id='conclusion'>Conclusion</h2><br /> +<br /> +<span>Having a mesh network on our hosts is great for securing all the traffic between them for our future <span class='inlinecode'>k3s</span> setup. A self-managed WireGuard mesh network is better than Tailscale as it eliminates reliance on a third party and provides full control over the configuration. It reduces unnecessary abstraction and "magic," enabling easier debugging and ensuring full ownership of our network.</span><br /> +<br /> +<span>I look forward to the next blog post in this series. We may start setting up <span class='inlinecode'>k3s</span> or take a first look at the NFS server (for persistent storage) side of things. I hope you liked all the posts so far in this series.</span><br /> +<br /> +<span>Other *BSD-related posts:</span><br /> +<br /> +<a class='textlink' href='./2025-05-11-f3s-kubernetes-with-freebsd-part-5.html'>2025-05-11 f3s: Kubernetes with FreeBSD - Part 5: WireGuard mesh network (You are currently reading this)</a><br /> +<a class='textlink' href='./2025-04-05-f3s-kubernetes-with-freebsd-part-4.html'>2025-04-05 f3s: Kubernetes with FreeBSD - Part 4: Rocky Linux Bhyve VMs</a><br /> +<a class='textlink' href='./2025-02-01-f3s-kubernetes-with-freebsd-part-3.html'>2025-02-01 f3s: Kubernetes with FreeBSD - Part 3: Protecting from power cuts</a><br /> +<a class='textlink' href='./2024-12-03-f3s-kubernetes-with-freebsd-part-2.html'>2024-12-03 f3s: Kubernetes with FreeBSD - Part 2: Hardware and base installation</a><br /> +<a class='textlink' href='./2024-11-17-f3s-kubernetes-with-freebsd-part-1.html'>2024-11-17 f3s: Kubernetes with FreeBSD - Part 1: Setting the stage</a><br /> +<a class='textlink' href='./2024-04-01-KISS-high-availability-with-OpenBSD.html'>2024-04-01 KISS high-availability with OpenBSD</a><br /> +<a class='textlink' href='./2024-01-13-one-reason-why-i-love-openbsd.html'>2024-01-13 One reason why I love OpenBSD</a><br /> +<a class='textlink' href='./2022-10-30-installing-dtail-on-openbsd.html'>2022-10-30 Installing DTail on OpenBSD</a><br /> +<a class='textlink' href='./2022-07-30-lets-encrypt-with-openbsd-and-rex.html'>2022-07-30 Let's Encrypt with OpenBSD and Rex</a><br /> +<a class='textlink' href='./2016-04-09-jails-and-zfs-on-freebsd-with-puppet.html'>2016-04-09 Jails and ZFS with Puppet on FreeBSD</a><br /> +<br /> +<span>E-Mail your comments to <span class='inlinecode'>paul@nospam.buetow.org</span></span><br /> +<br /> +<a class='textlink' href='../'>Back to the main site</a><br /> + </div> + </content> + </entry> + <entry> <title>Terminal multiplexing with `tmux` - Fish edition</title> <link href="https://foo.zone/gemfeed/2025-05-02-terminal-multiplexing-with-tmux-fish-edition.html" /> <id>https://foo.zone/gemfeed/2025-05-02-terminal-multiplexing-with-tmux-fish-edition.html</id> @@ -566,6 +1588,7 @@ __ejm\___/________dwb`---`______________________ <a class='textlink' href='./2024-12-03-f3s-kubernetes-with-freebsd-part-2.html'>2024-12-03 f3s: Kubernetes with FreeBSD - Part 2: Hardware and base installation</a><br /> <a class='textlink' href='./2025-02-01-f3s-kubernetes-with-freebsd-part-3.html'>2025-02-01 f3s: Kubernetes with FreeBSD - Part 3: Protecting from power cuts</a><br /> <a class='textlink' href='./2025-04-05-f3s-kubernetes-with-freebsd-part-4.html'>2025-04-05 f3s: Kubernetes with FreeBSD - Part 4: Rocky Linux Bhyve VMs (You are currently reading this)</a><br /> +<a class='textlink' href='./2025-05-11-f3s-kubernetes-with-freebsd-part-5.html'>2025-05-11 f3s: Kubernetes with FreeBSD - Part 5: WireGuard mesh network</a><br /> <br /> <a href='./f3s-kubernetes-with-freebsd-part-1/f3slogo.png'><img alt='f3s logo' title='f3s logo' src='./f3s-kubernetes-with-freebsd-part-1/f3slogo.png' /></a><br /> <br /> @@ -1136,10 +2159,11 @@ Apr <font color="#000000">4</font> <font color="#000000">23</font>:<font color= <br /> <span>This flexibility is great for keeping options open and managing different workloads without overcomplicating things. Overall, it's a nice setup for getting the most out of my hardware and keeping things running smoothly.</span><br /> <br /> -<span>See you in the next blog post of this series. Maybe we will be installing highly available storage with HAST or we start setting up k3s on the Rocky Linux VMs.</span><br /> +<span>See you in the next post of this series!</span><br /> <br /> <span>Other *BSD-related posts:</span><br /> <br /> +<a class='textlink' href='./2025-05-11-f3s-kubernetes-with-freebsd-part-5.html'>2025-05-11 f3s: Kubernetes with FreeBSD - Part 5: WireGuard mesh network</a><br /> <a class='textlink' href='./2025-04-05-f3s-kubernetes-with-freebsd-part-4.html'>2025-04-05 f3s: Kubernetes with FreeBSD - Part 4: Rocky Linux Bhyve VMs (You are currently reading this)</a><br /> <a class='textlink' href='./2025-02-01-f3s-kubernetes-with-freebsd-part-3.html'>2025-02-01 f3s: Kubernetes with FreeBSD - Part 3: Protecting from power cuts</a><br /> <a class='textlink' href='./2024-12-03-f3s-kubernetes-with-freebsd-part-2.html'>2024-12-03 f3s: Kubernetes with FreeBSD - Part 2: Hardware and base installation</a><br /> @@ -1860,6 +2884,7 @@ This is perl, v5.<font color="#000000">8.8</font> built <b><u><font color="#0000 <a class='textlink' href='./2024-12-03-f3s-kubernetes-with-freebsd-part-2.html'>2024-12-03 f3s: Kubernetes with FreeBSD - Part 2: Hardware and base installation</a><br /> <a class='textlink' href='./2025-02-01-f3s-kubernetes-with-freebsd-part-3.html'>2025-02-01 f3s: Kubernetes with FreeBSD - Part 3: Protecting from power cuts (You are currently reading this)</a><br /> <a class='textlink' href='./2025-04-05-f3s-kubernetes-with-freebsd-part-4.html'>2025-04-05 f3s: Kubernetes with FreeBSD - Part 4: Rocky Linux Bhyve VMs</a><br /> +<a class='textlink' href='./2025-05-11-f3s-kubernetes-with-freebsd-part-5.html'>2025-05-11 f3s: Kubernetes with FreeBSD - Part 5: WireGuard mesh network</a><br /> <br /> <a href='./f3s-kubernetes-with-freebsd-part-1/f3slogo.png'><img alt='f3s logo' title='f3s logo' src='./f3s-kubernetes-with-freebsd-part-1/f3slogo.png' /></a><br /> <br /> @@ -2253,6 +3278,7 @@ Jan 26 17:36:32 f2 apcupsd[2159]: apcupsd shutdown succeeded <br /> <span>Other BSD related posts are:</span><br /> <br /> +<a class='textlink' href='./2025-05-11-f3s-kubernetes-with-freebsd-part-5.html'>2025-05-11 f3s: Kubernetes with FreeBSD - Part 5: WireGuard mesh network</a><br /> <a class='textlink' href='./2025-04-05-f3s-kubernetes-with-freebsd-part-4.html'>2025-04-05 f3s: Kubernetes with FreeBSD - Part 4: Rocky Linux Bhyve VMs</a><br /> <a class='textlink' href='./2025-02-01-f3s-kubernetes-with-freebsd-part-3.html'>2025-02-01 f3s: Kubernetes with FreeBSD - Part 3: Protecting from power cuts (You are currently reading this)</a><br /> <a class='textlink' href='./2024-12-03-f3s-kubernetes-with-freebsd-part-2.html'>2024-12-03 f3s: Kubernetes with FreeBSD - Part 2: Hardware and base installation</a><br /> @@ -2957,10 +3983,11 @@ http://www.gnu.org/software/src-highlite --> <a class='textlink' href='./2024-12-03-f3s-kubernetes-with-freebsd-part-2.html'>2024-12-03 f3s: Kubernetes with FreeBSD - Part 2: Hardware and base installation (You are currently reading this)</a><br /> <a class='textlink' href='./2025-02-01-f3s-kubernetes-with-freebsd-part-3.html'>2025-02-01 f3s: Kubernetes with FreeBSD - Part 3: Protecting from power cuts</a><br /> <a class='textlink' href='./2025-04-05-f3s-kubernetes-with-freebsd-part-4.html'>2025-04-05 f3s: Kubernetes with FreeBSD - Part 4: Rocky Linux Bhyve VMs</a><br /> +<a class='textlink' href='./2025-05-11-f3s-kubernetes-with-freebsd-part-5.html'>2025-05-11 f3s: Kubernetes with FreeBSD - Part 5: WireGuard mesh network</a><br /> <br /> <a href='./f3s-kubernetes-with-freebsd-part-1/f3slogo.png'><img alt='f3s logo' title='f3s logo' src='./f3s-kubernetes-with-freebsd-part-1/f3slogo.png' /></a><br /> <br /> -<span class='quote'>Logo was generated by ChatGPT.</span><br /> +<span class='quote'>ChatGPT generated logo..</span><br /> <br /> <span>Let's continue...</span><br /> <br /> @@ -3287,6 +4314,7 @@ dev.cpu.<font color="#000000">0</font>.freq: <font color="#000000">2922</font> <br /> <span>Other *BSD-related posts:</span><br /> <br /> +<a class='textlink' href='./2025-05-11-f3s-kubernetes-with-freebsd-part-5.html'>2025-05-11 f3s: Kubernetes with FreeBSD - Part 5: WireGuard mesh network</a><br /> <a class='textlink' href='./2025-04-05-f3s-kubernetes-with-freebsd-part-4.html'>2025-04-05 f3s: Kubernetes with FreeBSD - Part 4: Rocky Linux Bhyve VMs</a><br /> <a class='textlink' href='./2025-02-01-f3s-kubernetes-with-freebsd-part-3.html'>2025-02-01 f3s: Kubernetes with FreeBSD - Part 3: Protecting from power cuts</a><br /> <a class='textlink' href='./2024-12-03-f3s-kubernetes-with-freebsd-part-2.html'>2024-12-03 f3s: Kubernetes with FreeBSD - Part 2: Hardware and base installation (You are currently reading this)</a><br /> @@ -3329,10 +4357,11 @@ dev.cpu.<font color="#000000">0</font>.freq: <font color="#000000">2922</font> <a class='textlink' href='./2024-12-03-f3s-kubernetes-with-freebsd-part-2.html'>2024-12-03 f3s: Kubernetes with FreeBSD - Part 2: Hardware and base installation</a><br /> <a class='textlink' href='./2025-02-01-f3s-kubernetes-with-freebsd-part-3.html'>2025-02-01 f3s: Kubernetes with FreeBSD - Part 3: Protecting from power cuts</a><br /> <a class='textlink' href='./2025-04-05-f3s-kubernetes-with-freebsd-part-4.html'>2025-04-05 f3s: Kubernetes with FreeBSD - Part 4: Rocky Linux Bhyve VMs</a><br /> +<a class='textlink' href='./2025-05-11-f3s-kubernetes-with-freebsd-part-5.html'>2025-05-11 f3s: Kubernetes with FreeBSD - Part 5: WireGuard mesh network</a><br /> <br /> <a href='./f3s-kubernetes-with-freebsd-part-1/f3slogo.png'><img alt='f3s logo' title='f3s logo' src='./f3s-kubernetes-with-freebsd-part-1/f3slogo.png' /></a><br /> <br /> -<span class='quote'>Logo was generated by ChatGPT.</span><br /> +<span class='quote'>ChatGPT generated logo..</span><br /> <br /> <span>Let's begin...</span><br /> <br /> @@ -3480,6 +4509,7 @@ dev.cpu.<font color="#000000">0</font>.freq: <font color="#000000">2922</font> <br /> <span>Other *BSD-related posts:</span><br /> <br /> +<a class='textlink' href='./2025-05-11-f3s-kubernetes-with-freebsd-part-5.html'>2025-05-11 f3s: Kubernetes with FreeBSD - Part 5: WireGuard mesh network</a><br /> <a class='textlink' href='./2025-04-05-f3s-kubernetes-with-freebsd-part-4.html'>2025-04-05 f3s: Kubernetes with FreeBSD - Part 4: Rocky Linux Bhyve VMs</a><br /> <a class='textlink' href='./2025-02-01-f3s-kubernetes-with-freebsd-part-3.html'>2025-02-01 f3s: Kubernetes with FreeBSD - Part 3: Protecting from power cuts</a><br /> <a class='textlink' href='./2024-12-03-f3s-kubernetes-with-freebsd-part-2.html'>2024-12-03 f3s: Kubernetes with FreeBSD - Part 2: Hardware and base installation</a><br /> @@ -5976,6 +7006,7 @@ http://www.gnu.org/software/src-highlite --> <br /> <span>Other *BSD and KISS related posts are:</span><br /> <br /> +<a class='textlink' href='./2025-05-11-f3s-kubernetes-with-freebsd-part-5.html'>2025-05-11 f3s: Kubernetes with FreeBSD - Part 5: WireGuard mesh network</a><br /> <a class='textlink' href='./2025-04-05-f3s-kubernetes-with-freebsd-part-4.html'>2025-04-05 f3s: Kubernetes with FreeBSD - Part 4: Rocky Linux Bhyve VMs</a><br /> <a class='textlink' href='./2025-02-01-f3s-kubernetes-with-freebsd-part-3.html'>2025-02-01 f3s: Kubernetes with FreeBSD - Part 3: Protecting from power cuts</a><br /> <a class='textlink' href='./2024-12-03-f3s-kubernetes-with-freebsd-part-2.html'>2024-12-03 f3s: Kubernetes with FreeBSD - Part 2: Hardware and base installation</a><br /> @@ -6338,6 +7369,7 @@ $ doas reboot <i><font color="silver"># Just in case, reboot one more time</font <br /> <span>Other *BSD related posts are:</span><br /> <br /> +<a class='textlink' href='./2025-05-11-f3s-kubernetes-with-freebsd-part-5.html'>2025-05-11 f3s: Kubernetes with FreeBSD - Part 5: WireGuard mesh network</a><br /> <a class='textlink' href='./2025-04-05-f3s-kubernetes-with-freebsd-part-4.html'>2025-04-05 f3s: Kubernetes with FreeBSD - Part 4: Rocky Linux Bhyve VMs</a><br /> <a class='textlink' href='./2025-02-01-f3s-kubernetes-with-freebsd-part-3.html'>2025-02-01 f3s: Kubernetes with FreeBSD - Part 3: Protecting from power cuts</a><br /> <a class='textlink' href='./2024-12-03-f3s-kubernetes-with-freebsd-part-2.html'>2024-12-03 f3s: Kubernetes with FreeBSD - Part 2: Hardware and base installation</a><br /> @@ -9494,174 +10526,4 @@ The remaining content of the Gemtext file... </div> </content> </entry> - <entry> - <title>Why GrapheneOS rox</title> - <link href="https://foo.zone/gemfeed/2023-01-23-why-grapheneos-rox.html" /> - <id>https://foo.zone/gemfeed/2023-01-23-why-grapheneos-rox.html</id> - <updated>2023-01-23T15:31:52+02:00</updated> - <author> - <name>Paul Buetow aka snonux</name> - <email>paul@dev.buetow.org</email> - </author> - <summary>In 2021 I wrote 'On Being Pedantic about Open-Source', and there was a section 'What about mobile?' where I expressed the dilemma about the necessity of using proprietary mobile operating systems. With GrapheneOS, I found my perfect solution for personal mobile phone use. </summary> - <content type="xhtml"> - <div xmlns="http://www.w3.org/1999/xhtml"> - <h1 style='display: inline' id='why-grapheneos-rox'>Why GrapheneOS rox</h1><br /> -<br /> -<span class='quote'>Published at 2023-01-23T15:31:52+02:00</span><br /> -<br /> -<span>In 2021 I wrote "On Being Pedantic about Open-Source", and there was a section "What about mobile?" where I expressed the dilemma about the necessity of using proprietary mobile operating systems. With GrapheneOS, I found my perfect solution for personal mobile phone use. </span><br /> -<br /> -<a class='textlink' href='./2021-08-01-on-being-pedantic-about-open-source.html'>On Being Pedantic about Open-Source</a><br /> -<br /> -<span>What is GrapheneOS?</span><br /> -<br /> -<span class='quote'>GrapheneOS is a privacy and security-focused mobile OS with Android app compatibility developed as a non-profit open-source project. It's focused on the research and development of privacy and security technologies, including substantial improvements to sandboxing, exploits mitigations and the permission model.</span><br /> -<br /> -<span>GrapheneOS is an independent Android distribution based on the Android Open Source Project (AOSP) but hardened in multiple ways. Other independent Android distributions, like LineageOS, are also based on AOSP, but GrapheneOS takes it further so that it can be my daily driver on my phone.</span><br /> -<br /> -<a class='textlink' href='https://GrapheneOS.org'>https://GrapheneOS.org</a><br /> -<a class='textlink' href='https://LineageOS.org'>https://LineageOS.org</a><br /> -<br /> -<pre> -Art by Joan Stark - _.===========================._ - .'` .- - __- - - -- --__--- -. `'. - __ / ,'` _|--|_________|--|_ `'. \ - /'--| ; _.'\ | ' ' | /'._ ; | - // | |_.-' .-'.' ___ '.'-. '-._| | - (\) \"` _.-` / .-'`_ `'-. \ `-._ `"/ - (\) `-' | .' .-'" "'-. '. | `-` - (\) | / .'(3)(2)(1)'. \ | - (\) | / / (4) .-. \ \ | - (\) | | |(5) ( )'==,J | | - (\) | \ \ (6) '-' (0) / / | - (\) | \ '.(7)(8)(9).' / | - (\) ___| '. '-.._..-' .' | - (\) /.--| '-._____.-' | - (\) (\) |\_ _ __ _ __ __/| - (\) (\) | | -(\)_._._.__(\) | | - (\\\\jgs\\\) '.___________________.' - '-'-'-'--' -</pre> -<br /> -<h2 style='display: inline' id='table-of-contents'>Table of Contents</h2><br /> -<br /> -<ul> -<li><a href='#why-grapheneos-rox'>Why GrapheneOS rox</a></li> -<li>⇢ <a href='#user-profiles'>User Profiles</a></li> -<li>⇢ <a href='#proxying-some-of-the-google-offerings-'>Proxying some of the Google offerings </a></li> -<li>⇢ <a href='#google-play-sandboxing-'>Google Play Sandboxing </a></li> -<li>⇢ <a href='#the-camera-and-the-cloud-'>The camera and the cloud </a></li> -<li>⇢ <a href='#fine-granular-permissions'>Fine granular permissions</a></li> -<li>⇢ <a href='#termux'>Termux</a></li> -<li>⇢ <a href='#so-why-not-use-a-pure-linux-phone'>So, why not use a pure Linux phone?</a></li> -<li>⇢ <a href='#small-grapheneos-downsides-'>Small GrapheneOS downsides </a></li> -</ul><br /> -<h2 style='display: inline' id='user-profiles'>User Profiles</h2><br /> -<br /> -<span>GrapheneOS allows configuring up to 32 user profiles (including a guest profile) on a single phone. A profile is a completely different environment within the phone, and it is possible to switch between them instantly. Sessions of a profile can continue running in the background or be fully terminated. Each profile can have completely different settings and different applications installed.</span><br /> -<br /> -<span>I use my default profile with primarily open-source applications installed, which I trust. I use another profile for banking (PayPal, various proprietary bank apps, Amazon store app, etc.) and another profile for various Google services (which I try to avoid, but I have to use once in a while). Furthermore, I have configured a profile for Social Media use (that one isn't in my default profile, as otherwise I am tempted to scroll social media all the time, which I try to avoid and only want to do intentionally when switching to the corresponding profile!).</span><br /> -<br /> -<span>The neat thing about the profiles is that some can run a sandboxed version of Google Play (see later in this post), while others don't. So some profiles can entirely operate without any Google Play, and only some profiles (to which I rarely switch) have Google Play enabled. </span><br /> -<br /> -<span>You notice how much longer (multiple days) your phone can be on a single charge when Google Play Services isn't running in the background. This tells a lot about the background activities and indicates that using Google Play shouldn't be the norm.</span><br /> -<br /> -<h2 style='display: inline' id='proxying-some-of-the-google-offerings-'>Proxying some of the Google offerings </h2><br /> -<br /> -<span>There's also the case that I am using an app from the Google Play store (as the app isn't available from F-Droid), which doesn't require Google Play Services to run in the background. Here's where I use the Aurora Android store. The Aurora store can be installed through F-Droid. Aurora acts as an anonymous proxy from your phone to the Google Play Store and lets you install apps from there. No Google credentials are required for that!</span><br /> -<br /> -<a class='textlink' href='https://f-droid.org'>https://f-droid.org</a><br /> -<br /> -<span>There's a similar solution for watching videos on YouTube. You can use the NewPipe app (also from F-Droid), which acts as an anonymous proxy for watching videos from YouTube. So there isn't any need to install the official YouTube app, and there isn't any need to login to your Google account. What's so bad about the official app? You don't know which data it is sending about you to Google, so it is a privacy concern. </span><br /> -<br /> -<h2 style='display: inline' id='google-play-sandboxing-'>Google Play Sandboxing </h2><br /> -<br /> -<span>Before switching to GrapheneOS, I had been using LineageOS on one of my phones for a couple of years. Still, I always had to have a secondary personal phone with all of these proprietary apps which (partially) only work with Google Play on the phone (e.g. Banking, Navigation, various travel apps from various Airlines, etc.) somewhere around as I didn't install Google Play on my LineageOS phone due to privacy concerns and only installed apps from the F-Droid store on it. When travelling, I always had to carry around a second phone with Google Play on it, as without it; life would become inconvenient pretty soon. </span><br /> -<br /> -<span>With GrapheneOS, it is different. Here, I do not just have a separate user profile, "Google", for various Google apps where Google Play runs, but Google Play also runs in a sandbox!!!</span><br /> -<br /> -<span class='quote'>GrapheneOS has a compatibility layer providing the option to install and use the official releases of Google Play in the standard app sandbox. Google Play receives no special access or privileges on GrapheneOS instead of bypassing the app sandbox and receiving a massive amount of highly privileged access. Instead, the compatibility layer teaches it how to work within the full app sandbox. It also isn't used as a backend for the OS services as it would be elsewhere since GrapheneOS doesn't use Google Play even when it's installed.</span><br /> -<br /> -<span>When I need to access Google Play, I can switch to the "Google" profile. Even there, Google is sandboxed to the absolute minimum permissions required to be operational, which gives additional privacy protection.</span><br /> -<br /> -<span>The sad truth is that Google Maps is still the best navigation app. When driving unknown routes, I can switch to my Google profile to use Google Maps. I don't need to do that when going streets I know about, but it is crucial (for me) to have Google Maps around when driving to a new destination.</span><br /> -<br /> -<span>Also, Google Translate and Google Lens are still the best translation apps I know. I just recently relocated to another country, where I am still learning the language, so Google Lens has been proven very helpful on various occasions by ad-hoc translating text into English or German for me.</span><br /> -<br /> -<span>The same applies to banking. Many banking apps require Google Play to be available (It might be even more secure to only use banking apps from the Google Play store due to official support and security updates). I rarely need to access my mobile banking app, but once in a while, I need to. As you have guessed by now, I can switch to my banking profile (with Google Play enabled), do what I need to do, and then terminate the session and go back to my default profile, and then my life can go on :-). </span><br /> -<br /> -<span>It is great to have the flexibility to use any proprietary Android app when needed. That only applies to around 1% of my phone usage time, but you often don't always know when you need "that one app now". So it's perfect that it's covered with the phone you always have with you. </span><br /> -<br /> -<h2 style='display: inline' id='the-camera-and-the-cloud-'>The camera and the cloud </h2><br /> -<br /> -<span>I really want my phone to shoot good looking pictures, so that I can later upload them to the Irregular Ninja:</span><br /> -<br /> -<a class='textlink' href='https://irregular.ninja'>https://irregular.ninja</a><br /> -<br /> -<span>The stock camera app of the OASP could be better. Photos usually look washed out, and the app lacks features. With GrapheneOS, there are two options:</span><br /> -<br /> -<ul> -<li>Use the official Google camera app with sandboxed Google Play Services running. You will get the full Google experience here.</li> -<li>Or, just use the default GrapheneOS camera app.</li> -</ul><br /> -<span>The GrapheneOS camera app is much better than the stock OASP camera app. I have been comparing the photo quality of my Pixel phone under LineageOS and GrapheneOS, and the differences are pronounced. I didn't compare the quality with the official Google camera app, but I have seen some comparison videos and the differences seem like they aren't groundbreaking. </span><br /> -<br /> -<span>For automatic backups of my photos, I am relying on a self-hosted instance of NextCloud (with a client app available via F-Droid). So there isn't any need to rely on any Google apps and services (Google Play Photos or Google Camera app) anymore, and that's great!</span><br /> -<br /> -<a class='textlink' href='https://nextcloud.com'>https://nextcloud.com</a><br /> -<br /> -<span>I also use NextCloud to synchronize my notes (NextCloud Notes), my RSS news feeds (NextCloud News) and contacts (DAVx5). All apps required are available in the F-Droid store.</span><br /> -<br /> -<h2 style='display: inline' id='fine-granular-permissions'>Fine granular permissions</h2><br /> -<br /> -<span>Another great thing about GrapheneOS is that, besides putting your apps into different profiles, you can also restrict network access and configure storage scopes per app individually.</span><br /> -<br /> -<span>For example, let's say you are installing that one proprietary app from the Google Play Store through the Aurora store, and then you want to ensure that the app doesn't send data "home" through the internet. Nothing is easier to do than that. Just remove network access permissions from that only app.</span><br /> -<br /> -<span>The app also wants to store and read some data from your phone (e.g. it could be a proprietary app for enhancing photos, and therefore storage access to a photo folder would be required). In GrapheneOS, you can configure a storage scope for that particular app, e.g. only read and write from one folder but still forbid access to all other folders on your phone.</span><br /> -<br /> -<h2 style='display: inline' id='termux'>Termux</h2><br /> -<br /> -<span>Termux can be installed on any Android phone through F-Droid, so it doesn't need to be a GrapheneOS phone. But I have to mention Termux here as it significantly adds value to my phone experience. </span><br /> -<br /> -<span class='quote'>Termux is an Android terminal emulator and Linux environment app that works directly with no rooting or setup required. A minimal base system is installed automatically - additional packages are available using the APT package manager.</span><br /> -<br /> -<a class='textlink' href='https://termux.dev'>https://termux.dev</a><br /> -<br /> -<span>In short, Termux is an entire Linux environment running on your Android phone. Just pair your phone with a Bluetooth keyboard, and you will have the whole Linux experience. I am only using terminal Linux applications with Termux, though. What makes it especially great is that I could write on a new blog post (in Neovim through Termux on my phone) or do some coding whilst travelling (e.g. during a flight), or look up my passwords or some other personal documents (through my terminal-based password manager). All changes I commit to Git can be synced to the server with a simple <span class='inlinecode'>git push</span> once online (e.g. after the plane landed) again.</span><br /> -<br /> -<span>There are Pixel phones with a screen size of 6", and that's decent enough for occasional use like that, and everything (the phone, the BT keyboard, maybe an external battery pack) all fit nicely in a small travel pocket.</span><br /> -<br /> -<h2 style='display: inline' id='so-why-not-use-a-pure-linux-phone'>So, why not use a pure Linux phone?</h2><br /> -<br /> -<span>Strictly speaking, an Android phone is a Linux phone, but it's heavily modified and customized. For me, a "pure" Linux phone is a more streamlined Linux kernel running in a distribution like Ubuntu Touch or Mobian. </span><br /> -<br /> -<span>A pure Linux phone, e.g. with Ubuntu Touch installed, e.g. on a PinePhone, Fairphone, the Librem 5 or the Volla phone, is very appealing to me. And they would also provide an even better Linux experience than Termux does. Some support running LineageOS within an Anbox, enabling you to run various proprietary Android apps occasionally within Linux.</span><br /> -<br /> -<a class='textlink' href='https://ubuntu-touch.io/'>Ubuntu Touch</a><br /> -<a class='textlink' href='https://en.wikipedia.org/wiki/Linux_for_mobile_devices'>More Linux distributions for mobile devices </a><br /> -<br /> -<span>But here, Google Play would not be sandboxed; you could not configure individual network permissions and storage scopes like in GrapheneOS. Pure Linux-compatible phones usually come with a crappy camera, and the battery life is generally pretty bad (only a few hours). Also, no big tech company pushes the development of Linux phones. Everything relies on hobbyists, whereas multiple big tech companies put a lot of effort into the Android project, and a lot of code also goes into the Android Open-Source project. </span><br /> -<br /> -<span>Currently, pure Linux phones are only a nice toy to tinker with but are still not ready (will they ever?) to be the daily driver. SailfishOS may be an exception; I played around with it in the past. It is pretty usable, but it's not an option for me as it is partial a proprietary operating system.</span><br /> -<br /> -<a class='textlink' href='https://sailfishos.org'>SailfishOS</a><br /> -<br /> -<h2 style='display: inline' id='small-grapheneos-downsides-'>Small GrapheneOS downsides </h2><br /> -<br /> -<span>Sometimes, switching a profile to use a different app is annoying, and you can't copy and paste from the system clipboard from one profile to another. But that's a small price I am willing to pay!</span><br /> -<br /> -<span>Another thing is that GrapheneOS can only run on Google Pixel phones, whereas LineageOS can be installed on a much larger variety of hardware. But on the other hand, GrapheneOS works very well on Pixel phones. The GrapheneOS team can concentrate their development efforts on a smaller set of hardware which then improves the software's quality (best example: The camera app).</span><br /> -<br /> -<span>And, of course, GrapheneOS is an open-source project. This is a good thing; however, on the other side, nobody can guarantee that the OS will not break or will not damage your phone. You have to trust the GrapheneOS project and donate to the project so they can keep up with the great work. But I rather trust the GrapheneOS team than big tech. </span><br /> -<br /> -<span>E-Mail your comments to <span class='inlinecode'>paul@nospam.buetow.org</span> :-)</span><br /> -<br /> -<a class='textlink' href='../'>Back to the main site</a><br /> - </div> - </content> - </entry> </feed> diff --git a/gemfeed/f3s-kubernetes-with-freebsd-part-5/wireguard.svg b/gemfeed/f3s-kubernetes-with-freebsd-part-5/wireguard.svg new file mode 100644 index 00000000..dd1e0dd0 --- /dev/null +++ b/gemfeed/f3s-kubernetes-with-freebsd-part-5/wireguard.svg @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="UTF-8"?> +<svg version="1.1" viewBox="0 0 1874.5 333.14" xmlns="http://www.w3.org/2000/svg"><defs><style>.a{fill:#88171a;}.b{fill:#231f20;}</style></defs><title>wireguard</title><path class="a" transform="translate(-1.5394)" d="m404.23 252.47-65.215-199.99h24.456l49.636 154.34 50.904-154.34h22.282l50.723 153.98 49.817-153.98h23.731l-65.034 199.99h-18.115l-52.715-161.04-52.172 161.04h-18.296z"/><path class="a" transform="translate(-1.5394)" d="m606.1 252.47v-155.07h24.637v155.07h-24.637z"/><path class="a" transform="translate(-1.5394)" d="m687.85 184.9v67.57h-24.274v-154.34h106.52q23.73 0 37.136 11.413 13.404 11.413 13.405 31.702a41.774 41.774 0 0 1-10.598 28.531q-10.597 12.05-27.625 14.764l42.933 67.932h-26.267l-43.839-67.57h-67.389zm0-22.644h82.243q12.5 0 19.112-5.4346 6.6101-5.4346 6.6118-15.579 0-10.143-6.6118-15.488-6.6152-5.3416-19.112-5.3442h-82.243v41.846z"/><path class="a" transform="translate(-1.5394)" d="m843.52 252.47v-154.7h145.1v22.644h-120.83v38.585h79.345v22.282h-79.345v48.911h127.53v22.282h-151.81z"/><path class="a" transform="translate(-1.5394)" d="m1166 198.31v-29.347h-54.527v-23.006h79.345v60.143q-14.495 24.999-37.77 38.313-23.28 13.315-52.806 13.315-44.929 0-74.182-29.619-29.257-29.618-29.256-75.087 0-45.65 29.347-75.269 29.347-29.618 74.091-29.618 27.716 0 50.542 12.137a98.119 98.119 0 0 1 37.136 34.6l-20.833 14.854a68.382 68.382 0 0 0-27.173-28.079 78.549 78.549 0 0 0-39.672-10.145q-33.694 0-55.795 23.097-22.104 23.096-22.101 58.421 0 35.325 22.101 58.331 22.099 23.008 55.795 23.006 21.012 0 37.408-9.0576 16.393-9.0565 28.351-26.992z"/><path class="a" transform="translate(-1.5394)" d="m1217.9 98.133h24.274v99.09q0 22.282 10.507 30.071 10.504 7.7908 41.665 7.7896 31.338 0 41.846-7.7896 10.504-7.7864 10.507-30.071v-99.09h24.093v105.43q0 28.442-18.025 41.122-18.027 12.677-58.784 12.681-40.581 0-58.331-12.5-17.756-12.5-17.753-41.303v-105.43z"/><path class="a" transform="translate(-1.5394)" d="m1367 252.47 78.62-154.7h15.217l79.345 154.7h-25.905l-20.108-39.31h-81.7l-19.927 39.31h-25.542zm55.976-59.78h60.505l-30.071-59.237z"/><path class="a" transform="translate(-1.5394)" d="m1567.1 184.9v67.57h-24.274v-154.34h106.52q23.73 0 37.136 11.413 13.404 11.413 13.405 31.702a41.774 41.774 0 0 1-10.598 28.531q-10.597 12.05-27.625 14.764l42.933 67.932h-26.267l-43.839-67.57h-67.389zm0-22.644h82.243q12.5 0 19.112-5.4346 6.6101-5.4346 6.6118-15.579 0-10.143-6.6118-15.488-6.6152-5.3416-19.112-5.3442h-82.243v41.846z"/><path class="a" transform="translate(-1.5394)" d="m1791.8 97.771q37.86 0 61.048 21.647 23.186 21.65 23.188 56.248 0 34.964-22.735 55.886-22.736 20.922-61.501 20.923h-68.657v-154.7h68.657zm0.3623 22.282h-44.745v110.14h44.745q27.534 0 43.295-14.764 15.76-14.762 15.76-40.125 0-24.456-16.304-39.854-16.304-15.395-42.752-15.398z"/><path class="b" transform="translate(-1.5394)" d="m401.21 304.63v18.614h-6.3467v-40.448h37.37v5.9204h-31.023v10.088h20.035v5.8257h-20.035z"/><path class="b" transform="translate(-1.5394)" d="m426.78 323.24 20.556-40.448h3.9785l20.745 40.448h-6.773l-5.2574-10.278h-21.361l-5.21 10.278h-6.6782zm14.635-15.63h15.819l-7.8623-15.488z"/><path class="b" transform="translate(-1.5394)" d="m476.56 318.08 3.0786-5.3047a35.512 35.512 0 0 0 9.0938 4.3574 31.144 31.144 0 0 0 9.4253 1.563 15.505 15.505 0 0 0 8.7148-2.2022 6.5827 6.5827 0 0 0 3.3154-5.6602 5.5059 5.5059 0 0 0-3.0312-5.1387q-3.0315-1.6809-9.5674-1.8711-11.036-0.14209-15.156-2.5576-4.1206-2.4155-4.1206-8.0044a9.7851 9.7851 0 0 1 4.523-8.3833q4.5227-3.1728 12.149-3.1733a35.061 35.061 0 0 1 10.112 1.4682 37.803 37.803 0 0 1 9.4492 4.3574l-3.1733 5.2573a31.907 31.907 0 0 0-8.1465-3.9546 27.298 27.298 0 0 0-8.3359-1.3975 14.736 14.736 0 0 0-7.3887 1.6104 4.7835 4.7835 0 0 0-2.7944 4.2153 3.9383 3.9383 0 0 0 2.8184 3.8364q2.8169 1.1367 9.7803 1.1367 9.6621 0 14.588 3.2681 4.9255 3.2681 4.9258 9.7095a11.509 11.509 0 0 1-4.9971 9.52q-4.9973 3.7888-12.954 3.7891a41.784 41.784 0 0 1-11.675-1.6812 40.763 40.763 0 0 1-10.633-4.7602z"/><path class="b" transform="translate(-1.5394)" d="m539.6 323.24v-34.812h-17.051v-5.6362h40.448v5.6362h-17.098v34.812h-6.2993z"/><path class="b" transform="translate(-1.5394)" d="m576.06 331.48a38.394 38.394 0 0 0 2.4629-4.1206 27.126 27.126 0 0 0 1.7051-4.1206h-0.37891a3.0036 3.0036 0 0 1-2.4394-1.208 4.718 4.718 0 0 1-0.9707-3.0547 4.8304 4.8304 0 0 1 1.1602-3.3389 3.7377 3.7377 0 0 1 2.9131-1.3027 3.7862 3.7862 0 0 1 3.2207 1.7285 7.8996 7.8996 0 0 1 1.2314 4.6655 11.548 11.548 0 0 1-1.7998 5.7075 34.646 34.646 0 0 1-5.352 6.7017z"/><path class="b" transform="translate(-1.5394)" d="m639.67 323.24v-40.448h5.2573l16.577 23.682 16.577-23.682h5.2573v40.448h-6.2993v-29.081l-15.535 22.498-15.488-22.498v29.081h-6.3466z"/><path class="b" transform="translate(-1.5394)" d="m720.37 324.52q-10.799 0-17.761-6.1099a20.39 20.39 0 0 1-0.02393-30.668q6.9382-6.0381 17.785-6.0386 10.941 0 17.88 6.0151a20.442 20.442 0 0 1-0.02393 30.715q-6.9624 6.0872-17.856 6.0864zm0-5.9204q8.0991 0 13.214-4.3809a14.671 14.671 0 0 0-0.02393-22.285q-5.1394-4.4048-13.19-4.4048-8.0522 0-13.144 4.3809a14.764 14.764 0 0 0 0 22.309q5.0911 4.3814 13.144 4.3809z"/><path class="b" transform="translate(-1.5394)" d="m775.46 282.79q9.8987 0 15.961 5.6602 6.0623 5.6602 6.0625 14.706 0 9.1414-5.9438 14.611-5.9451 5.4712-16.08 5.4707h-17.951v-40.448h17.951zm0.09473 5.8257h-11.699v28.797h11.699q7.199 0 11.32-3.8599 4.1206-3.8599 4.1206-10.491a13.686 13.686 0 0 0-4.2627-10.42q-4.2626-4.0254-11.178-4.0259z"/><path class="b" transform="translate(-1.5394)" d="m809.41 323.24v-40.448h37.938v5.9204h-31.591v10.088h20.745v5.8257h-20.745v12.788h33.344v5.8257h-39.69z"/><path class="b" transform="translate(-1.5394)" d="m866.48 305.57v17.666h-6.3466v-40.354h27.85q6.2044 0 9.7095 2.9839a10.301 10.301 0 0 1 3.5049 8.2886 10.926 10.926 0 0 1-2.7705 7.46 11.756 11.756 0 0 1-7.2231 3.8599l11.225 17.761h-6.8677l-11.462-17.666h-17.619zm0-5.9204h21.503a7.6927 7.6927 0 0 0 4.9966-1.4209 4.9717 4.9717 0 0 0 1.729-4.0732 4.9048 4.9048 0 0 0-1.729-4.0498 7.7901 7.7901 0 0 0-4.9966-1.397h-21.503v10.941z"/><path class="b" transform="translate(-1.5394)" d="m914.65 323.24v-40.448h3.3154l25.718 28.418v-28.418h6.2046v40.448h-3.3154l-25.671-28.323v28.323h-6.252z"/><path class="b" transform="translate(-1.5394)" d="m970.54 331.48a38.394 38.394 0 0 0 2.4629-4.1206 27.126 27.126 0 0 0 1.7051-4.1206h-0.37891a3.0036 3.0036 0 0 1-2.4394-1.208 4.718 4.718 0 0 1-0.9707-3.0547 4.8304 4.8304 0 0 1 1.1602-3.3389 3.7377 3.7377 0 0 1 2.9131-1.3028 3.7862 3.7862 0 0 1 3.2207 1.7285 7.8996 7.8996 0 0 1 1.2314 4.6655 11.548 11.548 0 0 1-1.7998 5.7075 34.646 34.646 0 0 1-5.352 6.7017z"/><path class="b" transform="translate(-1.5394)" d="m1030.7 318.08 3.0786-5.3047a35.512 35.512 0 0 0 9.0938 4.3574 31.144 31.144 0 0 0 9.4253 1.563 15.505 15.505 0 0 0 8.7148-2.2022 6.5827 6.5827 0 0 0 3.3154-5.6602 5.5059 5.5059 0 0 0-3.0312-5.1387q-3.0315-1.6809-9.5674-1.8711-11.036-0.14209-15.156-2.5576-4.1206-2.4155-4.1206-8.0044a9.7851 9.7851 0 0 1 4.523-8.3833q4.5227-3.1728 12.149-3.1733a35.061 35.061 0 0 1 10.112 1.4683 37.803 37.803 0 0 1 9.4492 4.3574l-3.1733 5.2573a31.907 31.907 0 0 0-8.1465-3.9546 27.298 27.298 0 0 0-8.3359-1.3975 14.736 14.736 0 0 0-7.3887 1.6104 4.7835 4.7835 0 0 0-2.7944 4.2153 3.9383 3.9383 0 0 0 2.8184 3.8364q2.8169 1.1367 9.7803 1.1367 9.6621 0 14.588 3.2681 4.9255 3.2681 4.9258 9.7095a11.509 11.509 0 0 1-4.9971 9.52q-4.9973 3.7888-12.954 3.7891a41.784 41.784 0 0 1-11.675-1.6812 40.763 40.763 0 0 1-10.633-4.7602z"/><path class="b" transform="translate(-1.5394)" d="m1084.1 323.24v-40.448h37.938v5.9204h-31.591v10.088h20.745v5.8257h-20.745v12.788h33.344v5.8257h-39.69z"/><path class="b" transform="translate(-1.5394)" d="m1177.6 313.34a22.946 22.946 0 0 1-9.0698 8.312 27.68 27.68 0 0 1-12.765 2.8657q-10.657 0-17.548-6.0386a20.531 20.531 0 0 1 0-30.691q6.8906-6.0857 17.548-6.0864a28.416 28.416 0 0 1 12.03 2.4868 21.89 21.89 0 0 1 8.7148 7.0332l-5.0205 3.5049a16.432 16.432 0 0 0-6.6074-5.3281 21.699 21.699 0 0 0-9.1172-1.8711 18.888 18.888 0 0 0-12.859 4.4287 14.637 14.637 0 0 0 0.02393 22.213 18.906 18.906 0 0 0 12.835 4.4287 20.434 20.434 0 0 0 9.52-2.1314 20.208 20.208 0 0 0 7.2466-6.6309z"/><path class="b" transform="translate(-1.5394)" d="m1190.2 282.89h6.3467v25.908q0 5.8257 2.7471 7.8623 2.7466 2.0369 10.894 2.0366 8.1936 0 10.941-2.0366 2.7466-2.0361 2.7471-7.8623v-25.908h6.2993v27.565q0 7.4363-4.7124 10.751-4.7139 3.3149-15.37 3.3154-10.61 0-15.251-3.2681-4.6421-3.2681-4.6416-10.799v-27.565z"/><path class="b" transform="translate(-1.5394)" d="m1252.4 305.57v17.666h-6.3467v-40.354h27.85q6.2043 0 9.7095 2.9839a10.301 10.301 0 0 1 3.5049 8.2886 10.926 10.926 0 0 1-2.7705 7.46 11.756 11.756 0 0 1-7.2231 3.8599l11.225 17.761h-6.8677l-11.462-17.666h-17.619zm0-5.9204h21.503a7.6927 7.6927 0 0 0 4.9966-1.4209 4.9717 4.9717 0 0 0 1.729-4.0732 4.9048 4.9048 0 0 0-1.729-4.0498 7.7901 7.7901 0 0 0-4.9966-1.397h-21.503v10.941z"/><path class="b" transform="translate(-1.5394)" d="m1300.5 323.24v-40.448h37.938v5.9204h-31.591v10.088h20.745v5.8257h-20.745v12.788h33.344v5.8257h-39.69z"/><path class="b" transform="translate(-1.5394)" d="m1403 323.24h-3.2681l-20.319-40.448h6.7256l15.204 30.265 14.967-30.265h6.9624z"/><path class="b" transform="translate(-1.5394)" d="m1439.6 305.57v17.666h-6.3467v-40.448h29.413q6.252 0 9.7334 2.96a10.32 10.32 0 0 1 3.481 8.3125 10.819 10.819 0 0 1-3.4575 8.2886 12.805 12.805 0 0 1-9.0938 3.2207h-23.729zm0-5.9204h23.066a7.6097 7.6097 0 0 0 4.9492-1.4209 5.6895 5.6895 0 0 0 0.07129-8.0991 7.0721 7.0721 0 0 0-4.7363-1.4209h-23.35v10.941z"/><path class="b" transform="translate(-1.5394)" d="m1486.8 323.24v-40.448h3.3154l25.718 28.418v-28.418h6.2046v40.448h-3.3154l-25.671-28.323v28.323h-6.252z"/><path class="b" transform="translate(-1.5394)" d="m1581.6 323.24v-34.812h-17.051v-5.6362h40.448v5.6362h-17.098v34.812h-6.2993z"/><path class="b" transform="translate(-1.5394)" d="m1613.3 282.89h6.3467v25.908q0 5.8257 2.7471 7.8623 2.7466 2.0369 10.894 2.0366 8.1936 0 10.941-2.0366 2.7466-2.0361 2.7471-7.8623v-25.908h6.2993v27.565q0 7.4363-4.7124 10.751-4.7139 3.3149-15.37 3.3154-10.61 0-15.251-3.2681-4.6421-3.2681-4.6416-10.799v-27.565z"/><path class="b" transform="translate(-1.5394)" d="m1669.2 323.24v-40.448h3.3154l25.718 28.418v-28.418h6.2046v40.448h-3.3154l-25.671-28.323v28.323h-6.252z"/><path class="b" transform="translate(-1.5394)" d="m1720.3 323.24v-40.448h3.3154l25.718 28.418v-28.418h6.2046v40.448h-3.3154l-25.671-28.323v28.323h-6.252z"/><path class="b" transform="translate(-1.5394)" d="m1771.3 323.24v-40.448h37.938v5.9204h-31.591v10.088h20.745v5.8257h-20.745v12.788h33.344v5.8257h-39.69z"/><path class="b" transform="translate(-1.5394)" d="m1822 323.24v-40.448h6.3467v34.623h30.028v5.8257h-36.375z"/><path class="a" transform="translate(-1.5394)" d="m301.28 145.56s6.9396-145.56-153.04-145.56c-141.48 0-145.9 139.63-145.9 139.63s-20.811 160.37 149.16 160.37c163.02 0 149.78-154.44 149.78-154.44zm-197.8-50.863c30.017-18.364 68.366-7.1401 82.735 20.476 2.7233 5.2338 3.0694 13.291 1.3447 18.782-5.9546 18.956-20.014 29.587-39.312 34.103 5.6892-4.8707 10.218-10.394 11.659-18.025a26.402 26.402 0 0 0-4.5425-20.956 26.76 26.76 0 0 0-30.811-9.3892c-11.881 4.5111-18.389 15.354-17.216 28.683 1.0898 12.381 10.484 20.405 28.061 23.453-2.627 1.3904-4.6503 2.4144-6.6299 3.5172a63.918 63.918 0 0 0-20.544 17.868c-1.7839 2.4084-3.0104 2.6024-5.727 0.94116-35.338-21.61-37.609-75.844 0.98226-99.453zm-26.449 133.53c-5.6769 1.441-11.178 3.5742-16.981 5.4775 2.8385-19.151 25.265-36.788 44.23-34.776a48.881 48.881 0 0 0-9.242 25.893c-6.302 1.1606-12.241 1.9414-18.007 3.405zm120.79-186.98c5.6099 0.20612 11.23 0.12091 16.844 0.25378a29.052 29.052 0 0 1 4.1674 0.58069 40.607 40.607 0 0 1-4.2357 5.4332c-2.007 1.8701-4.2745 3.6986-7.1661 0.856-0.6955-0.68372-2.3386-0.52679-3.5487-0.54272-5.5823-0.07336-11.172-0.25177-16.746-0.04132a104.04 104.04 0 0 0-14.425 1.473c-0.89368 0.16046-2.2299 3.1315-1.8191 4.227 0.9693 2.5853 2.3833 5.4363 4.4779 7.0898 7.7403 6.11 15.972 11.596 23.748 17.664 7.556 5.8966 14.589 12.358 18.875 21.253 5.5843 11.59 5.747 23.743 3.3388 35.95-4.0203 20.378-14.333 37.261-31.032 49.524-6.7288 4.941-15.06 7.7451-22.767 11.295-6.778 3.1225-13.755 5.8115-20.549 8.9008-12.249 5.5695-19.133 18.865-17.108 32.688 1.8585 12.685 12.987 23.271 25.735 25.456 15.292 2.6216 31.071-7.3163 34.812-22.86 4.2067-17.478-5.2898-33.083-23.065-37.813-0.78271-0.20831-1.5684-0.40552-3.2012-0.8269 4.7549-2.1245 8.8614-3.6381 12.653-5.7244q9.9213-5.4594 19.481-11.562c1.8742-1.199 2.8868-1.1996 4.4852 0.18225 12.225 10.57 19.518 23.718 21.563 39.839 3.3845 26.684-9.2471 51.198-33.072 63.762-36.86 19.439-81.965-2.6864-90.106-43.552-6.9738-35.003 17.73-66.754 47.462-72.884 12.787-2.6364 24.48-7.9596 33.57-17.807 5.8652-6.3541 8.7084-11.806 9.6772-14.266a39.565 39.565 0 0 0 2.7211-14.469 33.867 33.867 0 0 0-2.9654-12.398c-3.104-7.075-14.995-18.33-17.939-20.704l-28-21.921c-0.98761-0.81256-2.0994-0.75366-4.5079-0.59045-2.8611 0.19391-10.175 0.59888-13.331-0.22815 2.553-1.9321 9.5132-4.7451 12.502-7.007-9.0734-6.1297-19.43-3.9158-28.941-5.7461 2.1992-4.0959 13.081-10.39 19.27-11.091a91.533 91.533 0 0 0-1.6876-10.281c-0.37781-1.3917-1.9312-2.7408-3.2864-3.5355-3.286-1.9267-6.7694-3.5167-10.549-5.4327a21.936 21.936 0 0 1 11.332-3.5055 42.316 42.316 0 0 1 11.348 1.1056c6.7422 1.5405 12.124 0.53491 17.488-4.048-4.222-1.7002-8.4435-3.2535-12.538-5.0907a123.04 123.04 0 0 1-11.779-6.1583c10.622 1.4755 20.896 5.4585 31.757 4.0034q0.1387-0.74048 0.27728-1.4809c-8.1194-1.8899-16.239-3.7798-25.229-5.8724 15.04-1.3769 29.042-1.604 42.301 4.8541 3.731 1.8173 7.6348 3.3215 11.211 5.3972 1.7443 1.0124 2.9186 3.0078 4.3496 4.5594 1.1366 1.2325 2.0495 2.8837 3.446 3.6264 5.3 2.8184 11.134 2.9291 17.078 2.7879 0.04443-0.67694 0.08606-1.3114 0.1308-1.9933 5.9821 1.8693 12.715 8.7679 12.704 13.806-9.6911 0-19.374-0.037-29.056 0.05389-1.0348 0.0097-2.0626 0.76563-3.0936 1.1754 0.97986 0.57067 1.9428 1.5994 2.9423 1.6362z"/><path class="a" transform="translate(-1.5394)" d="m185.32 26.906a1.4806 1.4806 0 0 0-0.18927 2.3686 2.2326 2.2326 0 0 0 3.0724 0.8219c0.9328-0.47052 1.8478-0.97137 2.975-1.5665-0.9079-0.775-1.6362-1.4148-2.3857-2.0324-1.318-1.086-2.411-0.40386-3.4724 0.40833z"/><g transform="translate(293.8 179.57)" stroke-width="1px"><path d="m1566.2-95.856h-1.24c-7.56 0.08-11.84 6.64-11.84 13 0 6.16 3.92 12.32 12.2 12.32h0.56c8.6-0.24 12.36-6.16 12.36-12.24v-0.72c-0.28-6.36-4.84-12.36-12.04-12.36zm-5.52 5.16v14.44h1.8v-12.96h3.4c1.88 0 2.8 1.16 2.8 2.32 0 1.4-1.36 3-3.8 3-0.36 0-0.84-0.08-1.28-0.16l5.44 7.8h2.36l-4.92-6.64c2.4-0.44 4-2.36 4-4.24 0-1.76-1.52-3.56-4.88-3.56zm-3.44 0.28c2.52-2.72 5.16-3.72 8.24-3.72h1.28c5.48 0.24 9.44 5.8 9.44 11.16 0 0.76-0.08 1.64-0.24 2.36-0.84 4.92-5.12 8.36-10.08 8.36-0.12 0-0.36 0.04-0.48 0.04-6.28 0-10.28-5.68-10.28-11.36 0-0.48 0.08-1.12 0.12-1.64 0 0 0.28-3.12 2-5.2z"/></g></svg> diff --git a/gemfeed/index.html b/gemfeed/index.html index 8983608c..7b64a361 100644 --- a/gemfeed/index.html +++ b/gemfeed/index.html @@ -15,6 +15,7 @@ <br /> <h2 style='display: inline' id='to-be-in-the-zone'>To be in the .zone!</h2><br /> <br /> +<a class='textlink' href='./2025-05-11-f3s-kubernetes-with-freebsd-part-5.html'>2025-05-11 - f3s: Kubernetes with FreeBSD - Part 5: WireGuard mesh network</a><br /> <a class='textlink' href='./2025-05-02-terminal-multiplexing-with-tmux-fish-edition.html'>2025-05-02 - Terminal multiplexing with <span class='inlinecode'>tmux</span> - Fish edition</a><br /> <a class='textlink' href='./2025-04-19-when-book-notes.html'>2025-04-19 - 'When: The Scientific Secrets of Perfect Timing' book notes</a><br /> <a class='textlink' href='./2025-04-05-f3s-kubernetes-with-freebsd-part-4.html'>2025-04-05 - f3s: Kubernetes with FreeBSD - Part 4: Rocky Linux Bhyve VMs</a><br /> @@ -13,7 +13,7 @@ </p> <h1 style='display: inline' id='hello'>Hello!</h1><br /> <br /> -<span class='quote'>This site was generated at 2025-05-05T22:21:05+03:00 by <span class='inlinecode'>Gemtexter</span></span><br /> +<span class='quote'>This site was generated at 2025-05-11T11:35:57+03:00 by <span class='inlinecode'>Gemtexter</span></span><br /> <br /> <span>Welcome to the ...</span><br /> <br /> @@ -51,6 +51,7 @@ <br /> <h3 style='display: inline' id='posts'>Posts</h3><br /> <br /> +<a class='textlink' href='./gemfeed/2025-05-11-f3s-kubernetes-with-freebsd-part-5.html'>2025-05-11 - f3s: Kubernetes with FreeBSD - Part 5: WireGuard mesh network</a><br /> <a class='textlink' href='./gemfeed/2025-05-02-terminal-multiplexing-with-tmux-fish-edition.html'>2025-05-02 - Terminal multiplexing with <span class='inlinecode'>tmux</span> - Fish edition</a><br /> <a class='textlink' href='./gemfeed/2025-04-19-when-book-notes.html'>2025-04-19 - 'When: The Scientific Secrets of Perfect Timing' book notes</a><br /> <a class='textlink' href='./gemfeed/2025-04-05-f3s-kubernetes-with-freebsd-part-4.html'>2025-04-05 - f3s: Kubernetes with FreeBSD - Part 4: Rocky Linux Bhyve VMs</a><br /> diff --git a/uptime-stats.html b/uptime-stats.html index 6772368c..590d9102 100644 --- a/uptime-stats.html +++ b/uptime-stats.html @@ -13,7 +13,7 @@ </p> <h1 style='display: inline' id='my-machine-uptime-stats'>My machine uptime stats</h1><br /> <br /> -<span class='quote'>This site was last updated at 2025-05-05T22:21:05+03:00</span><br /> +<span class='quote'>This site was last updated at 2025-05-11T11:35:57+03:00</span><br /> <br /> <span>The following stats were collected via <span class='inlinecode'>uptimed</span> on all of my personal computers over many years and the output was generated by <span class='inlinecode'>guprecords</span>, the global uptime records stats analyser of mine.</span><br /> <br /> @@ -44,11 +44,11 @@ | 8. | *uranus | 59 | | 9. | pluto | 51 | | 10. | mega15289 | 50 | -| 11. | *t450 | 43 | -| 12. | *fishfinger | 43 | -| 13. | phobos | 40 | +| 11. | *fishfinger | 43 | +| 12. | *t450 | 43 | +| 13. | *mega-m3-pro | 41 | | 14. | mega8477 | 40 | -| 15. | *mega-m3-pro | 39 | +| 15. | phobos | 40 | | 16. | *blowfish | 33 | | 17. | sun | 33 | | 18. | *f2 | 25 | @@ -69,7 +69,7 @@ | 2. | sun | 3 years, 9 months, 26 days | | 3. | *uranus | 3 years, 9 months, 5 days | | 4. | uugrn | 3 years, 5 months, 5 days | -| 5. | *earth | 3 years, 4 months, 24 days | +| 5. | *earth | 3 years, 4 months, 29 days | | 6. | *blowfish | 3 years, 4 months, 17 days | | 7. | deltavega | 3 years, 1 months, 21 days | | 8. | pluto | 2 years, 10 months, 29 days | @@ -82,7 +82,7 @@ | 15. | host0 | 1 years, 3 months, 9 days | | 16. | *makemake | 1 years, 3 months, 5 days | | 17. | tauceti-e | 1 years, 2 months, 20 days | -| 18. | *mega-m3-pro | 0 years, 11 months, 27 days | +| 18. | *mega-m3-pro | 0 years, 12 months, 7 days | | 19. | callisto | 0 years, 10 months, 31 days | | 20. | alphacentauri | 0 years, 10 months, 28 days | +-----+----------------+-----------------------------+ @@ -163,7 +163,7 @@ | 3. | alphacentauri | 6 years, 9 months, 13 days | | 4. | vulcan | 4 years, 5 months, 6 days | | 5. | *makemake | 4 years, 4 months, 7 days | -| 6. | *earth | 3 years, 10 months, 10 days | +| 6. | *earth | 3 years, 10 months, 16 days | | 7. | sun | 3 years, 10 months, 2 days | | 8. | uugrn | 3 years, 5 months, 5 days | | 9. | *blowfish | 3 years, 4 months, 18 days | @@ -204,11 +204,11 @@ | 13. | Linux 2... | 22 | | 14. | Darwin 21... | 17 | | 15. | Darwin 15... | 15 | -| 16. | Darwin 22... | 12 | -| 17. | Darwin 18... | 11 | -| 18. | *Darwin 24... | 11 | -| 19. | FreeBSD 7... | 10 | -| 20. | FreeBSD 6... | 10 | +| 16. | *Darwin 24... | 13 | +| 17. | Darwin 22... | 12 | +| 18. | Darwin 18... | 11 | +| 19. | FreeBSD 6... | 10 | +| 20. | OpenBSD 4... | 10 | +-----+----------------+-------+ </pre> <br /> @@ -224,8 +224,8 @@ | 2. | *OpenBSD 7... | 6 years, 7 months, 27 days | | 3. | FreeBSD 10... | 5 years, 9 months, 9 days | | 4. | Linux 5... | 4 years, 10 months, 21 days | -| 5. | Linux 4... | 2 years, 7 months, 22 days | -| 6. | *Linux 6... | 2 years, 7 months, 22 days | +| 5. | *Linux 6... | 2 years, 7 months, 27 days | +| 6. | Linux 4... | 2 years, 7 months, 22 days | | 7. | FreeBSD 11... | 2 years, 4 months, 28 days | | 8. | Linux 2... | 1 years, 11 months, 21 days | | 9. | *FreeBSD 14... | 1 years, 5 months, 2 days | @@ -238,8 +238,8 @@ | 16. | Darwin 22... | 0 years, 6 months, 22 days | | 17. | Darwin 15... | 0 years, 6 months, 15 days | | 18. | FreeBSD 5... | 0 years, 5 months, 18 days | -| 19. | FreeBSD 13... | 0 years, 4 months, 2 days | -| 20. | *Darwin 24... | 0 years, 3 months, 31 days | +| 19. | *Darwin 24... | 0 years, 4 months, 9 days | +| 20. | FreeBSD 13... | 0 years, 4 months, 2 days | +-----+----------------+------------------------------+ </pre> <br /> @@ -255,7 +255,7 @@ | 2. | *OpenBSD 7... | 424 | | 3. | FreeBSD 10... | 406 | | 4. | Linux 5... | 317 | -| 5. | *Linux 6... | 177 | +| 5. | *Linux 6... | 178 | | 6. | Linux 4... | 175 | | 7. | FreeBSD 11... | 159 | | 8. | Linux 2... | 121 | @@ -268,9 +268,9 @@ | 15. | Darwin 18... | 32 | | 16. | Darwin 22... | 30 | | 17. | Darwin 15... | 29 | -| 18. | FreeBSD 5... | 25 | -| 19. | FreeBSD 13... | 25 | -| 20. | *Darwin 24... | 18 | +| 18. | FreeBSD 13... | 25 | +| 19. | FreeBSD 5... | 25 | +| 20. | *Darwin 24... | 20 | +-----+----------------+-------+ </pre> <br /> @@ -284,7 +284,7 @@ +-----+------------+-------+ | 1. | *Linux | 1054 | | 2. | *FreeBSD | 944 | -| 3. | *Darwin | 144 | +| 3. | *Darwin | 146 | | 4. | *OpenBSD | 96 | | 5. | *NetBSD | 1 | +-----+------------+-------+ @@ -298,10 +298,10 @@ +-----+------------+-----------------------------+ | Pos | KernelName | Uptime | +-----+------------+-----------------------------+ -| 1. | *Linux | 27 years, 8 months, 13 days | +| 1. | *Linux | 27 years, 8 months, 19 days | | 2. | *FreeBSD | 11 years, 4 months, 3 days | | 3. | *OpenBSD | 7 years, 3 months, 8 days | -| 4. | *Darwin | 4 years, 7 months, 19 days | +| 4. | *Darwin | 4 years, 7 months, 28 days | | 5. | *NetBSD | 0 years, 1 months, 1 days | +-----+------------+-----------------------------+ </pre> @@ -314,10 +314,10 @@ +-----+------------+-------+ | Pos | KernelName | Score | +-----+------------+-------+ -| 1. | *Linux | 1836 | +| 1. | *Linux | 1837 | | 2. | *FreeBSD | 794 | | 3. | *OpenBSD | 464 | -| 4. | *Darwin | 301 | +| 4. | *Darwin | 303 | | 5. | *NetBSD | 2 | +-----+------------+-------+ </pre> |
