Let's get access and documentation sorted!

One of the reasons to join the Devember challenge is to learn. I love learning new things, but I do need to recognise my own limitations with balancing limited attention span and hyperfocus problems. One of the big reasons why I haven’t gotten too far with my previous attempts at getting my networking goals done :persevering_face:
Concerning hyperfocus… I was reading up on how to tackle this as soon as I finished writing my post, from a couple days ago, about whether I should do this in the first place… Preparation is important after all!

So yeah… I guess this will be a thing then! :sweat_smile: Let me start out with where I’m currently at, from there I’ll see where my priorities lie and what I would like to get done.

What is the starting point?

I never really considered what I have a “home lab”, just a couple devices to handle data storage, backups and some extra compute for services. In my mind, that’s not fancy enough to be called such… But I guess that it doesn’t have to be fancy!

Still… with the devices I have on the network and accessing them all, it does take a bit of setup to make it all work. I’ve done some things over time to make it easier to navigate the network, but it could definitely use some work.

So let me start out with what devices are on it on a day by day basis and what actually runs the network.

Devices on the network

As I said, not too much complexity. I’ll give a quick rundown of what we have on it. And I’ll probably get into a bit more detail as I get further into describing the services/needs.

Router/switch/AP

This is just a single device; a MikroTik hAP AX². It is a wonderful little device which also runs a WireGuard server for remote access.

Personal compute

My desktop, spouse’s laptop (both running openSUSE Slowroll), a Steam box, Switch 2 and our phones.
With some extra phones on occasion as we have family over.

Network compute

The NAS; a Synology DS220+. It is the central data hub of the network and runs a couple services we use.
A NUC; a 13th gen. Intel i5 model running openSUSE Leap. This hosts Jellyfin, Minecraft and doubles as secondary desktop connected to the tv (which I keep disconnected from the internet for obvious reasons…).


What are my goals?

1. Documentation

I’ve set up a couple things in the past years and half-documented what I did for when I need to troubleshoot something. Part of the things I really need to get access to quickly I do have. And there are some things I’ve set up and then never touch again. It would be good to have those documented as well, because if… when something goes wrong, I do also need to know what I’ve done.
I know that it doesn’t have to be all step by step documentation, but for some things I need to have something written down if I want to retrace my steps.

2. Making external (full) access easier

I currently run a WireGuard server on the router, which works but admittedly is quite a chore to set up for when devices change. Plus it runs directly on an open port to the internet and I’d like to see if I can make that a bit more secure.

3. Securely enabling access to (select) services from outside the network

I have the Minecraft and Jellyfin servers for now. And some other services at times which I would like to have accessible without needing (or giving) VPN access.

4. Remote desktop

Hmm… let’s call this a stretch goal :thinking:
With Wayland being the default, I can’t use AnyDesk anymore… So I was looking at RustDesk as an alternative. For our own devices it isn’t really an issue, because I can just run xrdp and use Remmina. But I’m also the family helpdesk and need to remote into family devices.

5. NAS replacement

The latest and unplanned addition! Not so much a stretch goal, but I’ll see if this will actually arrive in December as planned…
I’m upgrading my (2-bay) NAS with the new 4-bay Beelink ME Pro. Which I plan to make a TrueNAS box running the services I have on the current one.


How do I plan to get there?

Well… I’ve started by reading some documentation on my router and have a couple ideas I want to try out from the applications list in the main topic and older videos on the subjects. I’m not really one to grab for LLMs to get things done for me, I need to read up and do the things in order to learn.

Challenges I see along the way are my preference of running containers in Podman, where I see the majority of instructions on just Docker. I run openSUSE Leap on the NUC and manage it through Cockpit, which has wonderful integration for Podman, so I have an easy GUI to keep track of what and how things are running. And I prefer not to have to deal with two container systems running side by side.

So what is next?

I’ll follow up with new posts to list documentation I’ve found and what I’ve done to get things working. I plan to use the posts as a basis for my personal documentation. How those take shape might get a separate post :thinking:

But first sleeping… I’ve had this open for about three hours as I get distracted while writing this :sweat_smile:

1 Like

when i document i tend to go overboard (maybe not?) like this python script:

#!/bin/env python
import subprocess
import sys

# Step 1: Get interface information using ip a command
ip_a_output = subprocess.run(['ip', 'a'], capture_output=True, text=True)
ip_a_lines = ip_a_output.stdout.splitlines()

# Filter lines containing 'enp' and exclude those with "inet"
filtered_lines = []
for line in ip_a_lines:
    if 'enp' in line and not any('inet' in part for part in line.split()):
        filtered_lines.append(line)

# Replace macvtap0@enp11s0 with macvtap0
modified_lines = []
for line in filtered_lines:
    # Using regex to replace the specific pattern
    modified_line = line.replace('macvtap0@enp11s0', 'macvtap0')
    modified_lines.append(modified_line)

# Process each line using awk logic (split on colon and take second field)
batch_commands = []
for line in modified_lines:
    parts = line.split(':')
    if len(parts) > 1:  # Ensure we have enough fields
        command = f'a show {parts[1].strip()}'
        batch_commands.append(command)

# Write the commands to a temporary file
with open('/tmp/ip.txt', 'w') as f:
    for cmd in batch_commands:
        f.write(f"{cmd}\n")

# Run ip -b with the generated file
subprocess.run(['ip', '-b', '/tmp/ip.txt'])

Yes i know the script isnt perfect, but it works, i just wanted to show how i document.

Btw anyone can use this script, i am not responsible for any data loss or other damage caused by running this script.
If you doont understand what this script does, DO NOT RUN IT. that disclaimer applies to any script you find anywhere, whether its from me, @Wendell , $micro$soft, debian, arch, github or anyone else.

2 Likes

If I can only run scripts which I fully understand, I can just stop using computers :joy:

Sure… I do have a basic understanding, but programming in any capacity was never my thing. Working as an application manager, I would always delegate things which needed coding to others :sweat_smile:
Just let me manage the applications/systems and handle the people using them!

That’s also where my experience in writing documentation comes from. Writing and giving instructions/training to staff and customers. Which I tend to do the old fashioned way of just opening a blank document and typing out steps and what to take into account while making changes.
That’s how I’ve written my current pages and updated them as needed when things changed.

Let’s get into some more detail there:

How have I set up documentation?

I use the Synology NAS as central data point in our home. It is the place which all back-ups go to (and it in turn incrementally backed up to a private cloud), but also runs a couple services/applications. One of those is Notes Station, which is a pretty basic note taking application. The easy thing for me is that it works well in the browser and phone, so I can consult my notes whenever I need.

Currently, I have a couple instructions set up already:

  • My NFS mounts setup
  • How I’ve got WoL setup for the NUC
  • How auto shutdown services are set up
  • My Jellyfin setup
  • My Minecraft setup
  • My old Plex setup - don’t use that anymore since I switched to Jellyfin though
  • A script for forced display activation - don’t use that anymore since I tweaked something in the bios though :thinking:
  • How I did local remote access before Wayland - deprecated at this point
  • How my WireGuard server is set up

Reading through them now, I see that I need to update the Minecraft setup. But for the most part it is fine as is.
The work there is expanding what I have…

Which subjects do I need documentation on:

  • How I set up my home network on the router
    While most of it is the basic default configuration, I made a couple tweaks along the years and it is nice to have a place to look back at what I changed.
  • Looking forward a bit: the upcoming changes in remote access and external access management.

To keep things neatly in order, I would prefer writing a short note on each individual subject. So for the current network, that would be:

  • Firewall tweaks and NAT (that can go into one)
  • DNS tweaks for replacing the ISP servers (that’s definitely something useful if I ever need to do that again :persevering_face:)
  • DHCP tweaks to make devices easier to access
  • Interface/VLAN tweaks to replace my ISP router
  • Address pools or wifi setup? Might be too simple for this :thinking:

For the project list, that would add:

  • New access tool
  • Reverse proxy
  • Certificates

I don’t plan to write up the articles here in these posts… I’ll write those in my native Dutch, which would make it a lot less accessible for you all :grin: But I do plan on linking to a couple articles/documentation about functions I’m using, which might be nice if someone would like to learn about the options I’ve picked.


New/updated documentation articles

Let’s do a quick first entree for this, because I’ve been reading up on reverse proxy options to pick for and I realised that I already (mostly) fixed this for the internal side through one of the DNS tweaks I mentioned above.

Internal DNS tweak

I only have a couple devices on the network so it isn’t that difficult to remember a couple IP addresses. But a couple months ago RouterOS 7.23 introduced a new DNS options which makes this so much easier that I wouldn’t want to go back!

MikroTik have a short demonstration about how to set up how to have the DNS server automatically use device names and append a suffix to create elegant and easy to remember addresses for your home network:

This is not included in the DNS documentation, that only lists the option to manually set similar names.
Overall I quite like their documentation, because they generally include links to their own videos if they made one on the subject. Nice references and instructions overall.

So if I want to connect to my Jellyfin server on the NUC for instance, any client app can just work with nuc.lan instead of the IP. Works great and I might almost stop using static IPs because of how easy this is :partying_face:

WireGuard server

Ok… updated the article with reference to the documentation page by MikroTik. And they have a video to guide you through the steps as well, which I always like as a visual reference when clicking through WinBox.

So far, so good… Especially with the new additions of the config and QR code, this makes it a lot easier to reference.

Easy access from outside the network

How will I handle remote access? Why do I want to change it then? Mainly for ease of adding or editing clients.

Current setup

Currently I’m using my MikroTik router as a WireGuard server. I still refer back to the documentation by MikroTik when I need to look up how I need to change something.

Switching to Back to Home

But… They have released a new feature just over a year ago now called “Back to Home”. Which admittedly does the same thing, but is a bit easier to manage. Especially for mobile clients. And those are the majority of clients to set up and the most fiddly to manually configure.

Setting up BTH

So I just followed the instructions on the BTH documentation page. And quickly checked the video about it as well.

Everything connects and looks fine!
I do have a publickly accessible IPv4 and IPv6, so I don’t need the relay services. The service seems to be up and running in WinBox. It lists the connection as active, lists the client I just set up on my phone and doesn’t report any weird things.

So here’s to testing if I can access my network services. Syncing/backup and the card/calDAV services seem to work just fine.

When things don’t work

And then I try to access Jellyfin… Connection cannot be established on the app. I check the web version and get the same result.
Disable BTH and everything is fine again :thinking:

After another couple more tries with different applications/services, it seems that I can’t access the router, NUC, NAS or any other device on the network. I checked settings and they seem to be fine :persevering_face:

So now what?

I can’t really find what is going wrong here… The documentation says that I have everything set up correctly and even when cross referencing how I set up the WireGuard clients. Those basically work the same, so the settings should be identical.
And while I do see that the client allowed addresses are set up the same, I still can’t assess anything through BTH :expressionless_face:

But another thing I notice now, is that the WireGuard peers now include an easy to copy client config file and a QR to scan for the mobile app. That certainly wasn’t a thing when I set up the system years ago! Or even a year ago when I painstakingly had to manually create the config for my new phone.

Then… keep using WireGuard?

That leaves me wondering though… does this make switching to BTH useful for me? :thinking:
For now, I think it doesn’t. I seem to have the options for ease of use with my current setup, which I didn’t know I had. I guess they really did release some useful updates over the past year!

That wasn’t what I set out to accomplish when I started out this morning, but there you have it :man_shrugging:
Anticlimactic? Yeah… But that does leave me with an easier path; I just have to update the documentation I have.

I didnt say you had to read/understand the code, just understand what it is supposed to do and vet the author a bit ,bad reviews, is it alpha/beta software etc.

1 Like

Setting up secure outside access

Ok… some more time to figure out how to get secure access to my network services, without just opening up ports on the internet.

While I did open ports temporarily in the past, I do recognise that it is an easier attack surface and ideally won’t handle it like that again. To get this sorted, I’ve been reading up on reverse proxy options and getting a certificate to have data securely encrypted.

So far though, I haven’t really had much succes with getting things set up.

What have I been trying so far?

Well… I have some (simple shared) hosting set up with a couple domains I’ve been using for years. So I figured that I might be able to redirect a subdomain to the public IP of my router. I have both a static IPv4 and IPv6, which I’ve used for port forwarding, so that should work. Right?

Where did I get stuck?

Getting the webhost to redirect traffic however, has been a bit of a pain so far :expressionless_face:

I switched the DNS settings for the domain, but got stuck…

I tried accessing the web console of the router over HTTP, which works just fine. But I get stuck with HTTPS. Whenever I try to access the router, I don’t just get the expected “insecure connection” warning, but just nothing at all. I checked the active services and firewall to see if I accidentally have anything misconfigured. And lo and behold! I did make a (tiny) mistake in the firewall settings. But… it turned out not in a way that should cause issues. Otherwise the HTTP port shouldn’t have worked either.

After correcting the settings, I checked again and still nothing.

I thought to work around this by trying the next step; get the reverse proxy going! In the worst case I can just access it through the IP. So why not see if I can at least get that running?

But again… I get stuck on the certificates part. I can import and configure them. But still not through the domain or even directly the IP address.

Time to call it quits for now… After an evening of tinkering, my attention is pretty much gone anyway.

What did work?

I found an alternative route after this all, but to be honest… I’m not really liking it.

In RouterOS, there is a built in DDNS service. That lets me get a certificate through Let’s Encrypt without issue and everything I got stuck on just work from there.
The problem I have with it, is that I now have a long URL which I still can’t easily use. I might as well just learn the IPv6 address, because that’s quite a lot shorter. So being unhappy with this solution, I shut that off again.

Where am I now?

I did not succeed… again… yet… :face_exhaling:

I was wondering if it might be a problem with HTST. But I tried it on a different domain which I don’t actively use and ran into the same problem there. So that was ruled out quite fast.

While I can use the DDNS option, I’m not going to do that. I really liked the option to get it running under one of my domains and will give it another shot in the future. Just need a fresh mind to read through settings and options again.

And I was looking at maybe handling it through a web connected/tunneled option like Caddy or maybe NetBird once that comes out of beta. NetBird would also allow me to give another shot at remote access control instead of WireGuard. So that might be a nice option to try anyway.

Besides the simple webhosting, I also have a small VPS which gives me a bit more freedom to tinker with than Plesk does.

So yeah, so far it has been a bit of a bummer. I have looked at this before, but haven’t really made serious attempts at the problem. And I’m running into the “November/December is too damned busy” problem I have every year.
I do like having another go at this though. Because I like the tinkering/troubleshooting parts. And I do love digging through the documentation of what I need to get done to set things up. This is not at all what I’m usually working with, so there is a lot of new material to read through. And that’s still the thing I really like about taking on this challenge.

Also, with the Beelink incoming in (presumably late) December, I’m already thinking about how I might get things set up with that. I’ve been reading through the catalogue of applications for TrueNAS. And besides the services I need to replace my current Synology NAS, there are a couple options there which give me another shot to get these things running.

For now… I’m looking at further working on the documentation. I see that MikroTik updated their own documentation, which honestly makes my own notes easier to compile from what I know that I tweaked. I’ll get it all sorted… eventually :grin:

There’s a couple updates on the project!

Remote Desktop

While I’m still looking for a more general replacement for AnyDesk, I haven’t really gotten around to getting a Rustdesk server set up. I’m shelving that bit for the next point, but you can read more about that beneath the next header.

For now, I’ve got perfect access to my machines set up with the KRDP solution Wendell posted about last weekend! All the home machines run Plasma, so I can access any desktop I need. Besides being able to access configurations through Cockpit, but that’s more management than user troubleshooting as for my spouse for instance.
So while not perfect as general remote desktop solution, this solves 99% of the cases I have on my home network.

NAS replacement

The Kickstarter on the Beelink Me Pro just ended and that means that my NAS replacment will get shipped soon(ish). They currently have an estimate of “December 2026”, which I think is fairly optimistic for now. But I don’t know how many units they already have built, so maybe it is more of a promotional/discounted starter for Beelink. I’ll see…

But that means that I’ll have the 4-bay Core 3 304 to replace my current 2-bay Synology 220+. That means more bays for some storage expansion, but also quite a bit more power to run tasks. So I’ve been reading up on what I need to get my current services duplicated and expanded.

I know that it is still a bit theoretical at this point, but I’d rather read up on what I’m getting myself into than having to find out all the things when I’ve got everything at home already. So here’s the plan for now:

Storage

I plan to move over the two 4TB drives I have in the Synology. That won’t expand my current storage pool, but the extra bays give me space to expand with another 4TB drive down the line.

Services

There are a couple applications I need to replicate the services I have running on the Synology. And while the Beelink does come with FygoOS, I plan to install TrueNAS on it to run those applications.
But for now I’m planning on running:

  • NextCloud
    • Calendar/CalDAV
    • Contacts/CardDAV
    • Cloud storage
  • Immich
  • qBittorrent
  • Joplin

TrueNAS and these applications will be a whole adventure in itself, so I sincerely hope that getting this set up will be relatively painless :sweat_smile:

But… If I don’t try, I won’t know if this will work out well for me. And I can see some expansion options down the line as well, because I know that the 304 is quite overpowered for just this. So one thing I plan on adding is a RustDesk server for the above mentioned remote desktop access.
And that would also require me to fiddle with that external access option. I’m currently reading up on what might best suit my needs. Maybe Newt with Pangolin on a VPS (I have a small one with resources to spare) or a similar setup with NetBird or something else… Let’s first see how the basic setup of the other services will go.

This all will also mean that I’ll need to update/write a lot of my current documentation. But again… I’ll get there when I actually have the machine here at home. So for now it seems as though I need to hit pause on this project till I get my machine delivered.