• 1 Post
  • 154 Comments
Joined 2 years ago
cake
Cake day: June 14th, 2023

help-circle
  • The short answer: For a router, either find an off-the-shelf Wifi router that is supported by OpenWRT (very nice and very easy), or (and this is my personal preference) build your own firewall mini PC which will be much more complex and powerful to the point of complete overkill but also fully controllable right down to the network stack (and what’s the point of a homelab if not fiddling around with such things?).

    You can run OpenWRT directly on full AMD64 PC if you want, or even just a Raspberry Pi (some people appear to have had good luck with the 4B and 5, though I don’t know the specifics of that approach) The famous PfSense would be another option, based on BSD. I used to use that, but I really wanted something directly Linux-based.

    Which brings us to the fact that you can also even use a standard Linux distro like Debian and install all the tools you want on top of that and set up all the firewall yourself from scratch. That is actually what I do, using Linux kernel’s nftables for NAT Masquerading/IP forwarding and managing it currently with foomuuri which is essentially just a very lightweight nftables configuration manager. It doesn’t do anything you can’t do directly with nftables, but even though it’s perfect for me but I’m not sure I would recommend it in general. They have some very simple examples, but the documentation is pretty sparse, you need to either understand nftables under the hood or infer what you can by reading between the lines of the few examples you can find. A more mature and traditional Linux firewall like firewalld might be preferable if you want. Either way, this is definitely a much more complex route though, and fighting with firewall rules to get things to work is not everybody’s idea of “fun”. It is powerful though, and infinitely flexible. If you want it to “just work” without hassle, stick to the single-purpose devices and use OpenWRT as the OS designed to do this. It’s way simpler.

    If you do decide do go the DIY firewall route though, all you really need for a firewall PC is at least a second NIC (some motherboards have two wired NIC onboard already, you can use one for WAN and the other + WiFi for LAN) or you can a PCIe network card that has multiple ports. I wouldn’t really recommend using one of your existing Mini PCs for this, as it’s really not a good idea to share the firewall/network appliance functionality shared with other services, both for security and for configuration complexity reasons. The firewall really works best and is easiest to configure when it is truly just a gateway for the network, putting traffic from one side out the other side, plus whatever fundamental network/firewall services you need to accomplish that. When you start also trying to selectively route some of that traffic to actual services on the firewall itself, it gets really complex and ugly really fast, and even if you can get it working which is often very nontrivial, it’s also very fragile and it’s easy to blow open holes in your security this way.

    I’ve actually now got a pair of mini-PC firewalls, both set up using foomuuri, uCARP and Kea to do failover with each other so if one goes offline the other takes over its IP and starts routing traffic until it comes back. It’s not perfect or completely bulletproof but it’s pretty good for an amateur! In a pinch (when my previous, non-redundant firewall died) I’ve also used an GL.iNet travel router as my network’s primary router temporarily and their routers support an expansion board with 5G/SIM support so that could be an option too. I have to say it worked perfectly and was actually pretty nice, my only hesitation is that the travel router (at least the one I have, Beryl AX) seems to run a bit hot and I’m not sure it’s really intended for 24/7/365 operation (plus I need it for when I travel). They do make home routers too though, so maybe worth looking into, they’re really nice hardware running their own fork of OpenWRT out of the box.


  • They don’t really understand anything because they don’t really think. They just repeat what they’re told while convincing themselves its an independent thought that appeared in their head as if by magic. These are the people outsourcing most of their thinking these days to ChatGPT, because it’s not something they’ve ever really valued or been interested in doing themselves. Life’s a lot easier when you don’t have to think about much. They’re “doers” not “thinkers”. And frankly, it shows. We see an awful lot of stuff getting done right now, and very little thinking.



  • Aha I see you did the text-based install then? I’ve never done that myself but I just tried it now and it worked fine for me with the default password it mentions. Make sure caps lock is off. You will not be able to see the password when you type it, so be extra careful you are typing it correctly.

    Most of the same cautions about internet access still apply, if your networking is active on this VM there’s a non-zero chance you can get hacked right away when you’re in default passwords/initial setup mode. If you continue to have trouble getting in, you should reinstall it once again onto a fresh VM with network mode set to NAT if possible, or even disabled completely, and see if it works in that configuration. It really is critical to get the password set up before opening up the internet.


  • cecilkorik@lemmy.catoSelfhosted@lemmy.worldWhat do I do -- Incorrect?
    link
    fedilink
    English
    arrow-up
    8
    arrow-down
    1
    ·
    6 days ago

    Not sure what you mean by “what was provided”… who is providing a username and password for your yunohost?

    You are supposed to create your own username and password during the “Begin” setup process after it first installs. “root” and “yunohost” are very insecure and if you use passwords that are copy/pasted from somewhere else on a machine connected to the internet it will be hacked, potentially almost immediately. People have bots that literally just try to connect using these common default passwords all day every day to every site on the internet. I have literally had machines with such crappy passwords hacked within minutes of spinning them up. The same thing can happen even when you are first doing the setup process. If somebody else can get in, they can (most likely with a bot) do the setup process themselves and set up their OWN username/password, and now it will ask you for that password that THEY set, which you have no way of knowing. The instance belongs to the first person to claim it, and if that’s not you, you have to wipe it and start over.

    Your yunohost VM interface should not be exposed to the internet during setup. Even briefly, or someone else can immediately compromise it like this. The only way to ensure you are the first person to access it is to make sure you are the ONLY person who can access it, until it is properly set up and secured. Bots are WAY faster than you can be.

    Use localhost console, VM port forwarding or some other secure method of making sure nobody but your own host computer can access the IP of the server where you are setting things up, until it has a strong, secure password (not “yunohost”) and make sure you have all its security features configured and working before you even think about making it accessible to the internet.









  • The “Unhook” addon (increasingly required for Youtube now, in my opinion) will still completely block this as it blocks all shorts. Fuck shorts anyway. Also as TechnologyConnections pointed out in a recent video, the subscription feed still and always has completely bypasses Youtube’s recommended brainrot anyway and allows you to subscribe to and follow the creators and topics you actually care about. Until we have a viable alternative to Youtube (and hopefully stuff like this will drive that to happen sooner rather than later) the other option is to stick to subscriptions as much as possible and only subscribe to creators that don’t abuse this or use shorts at all, preferably.


  • For RAID that’s pretty much it as far as I know, but I’m pretty sure it can be a lot simpler and more flexible using some of these newfangled filesystems that are out nowadays like LVM and ZFS and maybe BTRFS? I can’t pretend I’m super up to date on all the latest technologies, I know they can do some really incredible stuff though. I’m not familiar enough to recommend it, but it might be worth looking into what they can do for you if your NAS supports it. From what I understand they don’t use RAID at all, although they might be able to simulate it, instead they treat disks as JBOD (just a bunch of disks) and use their own strategies to spread whole filesystems and partition structures across them in various safe and redundant ways that are way more flexible, that don’t care about disk size or anything like that, they’ll handle any shapes and sizes and I think they can be expanded and contracted pretty freely. I think ZFS in particular is really heavily used for this and supports some crazy complicated structures.


  • At the end of the day it doesn’t matter so much if they’re in 2x 2 bays or 1x 4 bay that’s backing itself up. It might give a little extra redundancy and safety to have them on separate NAS but the backup software is what’s going to be doing the heavy lifting here and it shouldn’t really matter whether it’s talking to two different disks/arrays on the same machine/NAS (as long as the NAS allows you to split the 4 drives into 2 different arrays which from my experience they do)


  • I don’t know what kind of data this is but when you say the whole household’s data is going to be on it, I want to take a moment to point out that while RAID1 is redundant, it is NOT a backup. Both drives will happily delete, overwrite, corrupt, or encrypt all your data as quickly as you can blink the moment they believe something has told them to, and will both do it simultaneously to both “redundant” copies of your data. It also won’t help if your powersupply blows up and nukes both drives at once. It only guards against individual hardware failure of a single disk, nothing else. While that failure mode is quite common (and using RAID actually increases the risk of it) it’s important to remember that it’s also not the only cause of data loss.

    If any of this data is important and irreplaceable, consider whether you’d be better off spending your additional future budget setting up another pair of drives to maintain continuous backups. There are a variety of simple tools that can create incremental, time-machine-like backups from hard-drive based storage to other hard-drive based storage while using a minimal amount of additional space (I use this rock-solid script based on rsync but literally there are dozens of backup tools that do almost exactly the same thing, often using rsync under the hood themselves). This still won’t help you if say, your house burns down with both drive arrays inside it, but it’s an improvement over a single huge RAID NAS and gives you the option to roll back from a known-good snapshot or restore a file that was deleted or corrupted long ago and you never noticed.

    To answer your original question, it generally isn’t possible to do what you’re asking. You might be able to get away with starting the RAID array as RAID1+0 and pretending that half the drives (the RAID1 mirror side) have failed, but that will mean your two existing disks are running in RAID0 striping mode with no RAID1 mirrors, and a failure of EITHER one will lose all your data until you get the second two drives installed. And that’s super sketchy and would be tricky to even set up. You cannot run a RAID1+0 with only two drives in mirror mode because they’ll both be missing their striped RAID0 volume. In fact, if this happens on a live array, you lose the whole array in that case too. Despite having 4 drives, RAID1+0 is technically still only singly-redundant. Any single failure can be tolerated, but two failures can make the whole array unrecoverable if they happen to be the wrong two failures (both failures from the same stripe, leaving only two working RAID1 mirrors of the other stripe), and due to striping it really is unrecoverable. Only small chunks of each file will be available on the surviving RAID1 mirrors.

    In almost all cases, changing the geometry of the array means rebuilding it from scratch, and you usually need some form of temporary storage to be able to do that. The good news is, if you decide to add 2 drives to an existing 2 drive RAID1 setup, you have 4 drives, each 4TB. and you cannot possibly have more than 4TB of data because your existing two drives are RAID1 and only have 4TB capacity between them. You can probably use 3 of those drives to set up a 4-drive RAID 1+0 with a missing drive, after copying all the data from your RAID1 array onto drive #4 temporarily. Then once the 3-drive array is up, copy it back onto the NAS array. Finally, you can slot drive #4 into the NAS as well, treating it as a “new” drive to replace the “failed” one, and the array should sync over all the stripes it needs and bring it into the array properly. This is all definitely possible with Linux’s built-in software RAID tools (I’ve done stupider things) however whether your specific NAS box will let you to do this successfully is something I can’t promise.

    It’s important to keep in mind this is all sketchy as hell (remember what I said about backups and asking whether this data was irreplaceable? yeah. don’t stop thinking about that), but technically it should work.

    Edit to add: Another perspective is, once you get your 2 additional drives, you can turn your NAS drive + backup drive into two RAID0s to extend them. A pair of 4 TB RAID0 drives gives you the 8 TB of storage you ultimately want. A second pair of RAID0 drives gives you 8 TB that you can use to make regular backups of the primary RAID0. Again you need to do some array rebuilding, but this time you have an already-existing backup so you don’t even have to worry about dancing around creating initially-broken arrays. Yes the risk of a RAID0 failure taking down one of the arrays is much higher, but that’s what your backups are for. If a single drive fails, you either lose the primary array (sucks, but you still have all your backups on the other RAID0 safe and sound) or you lose the backup (not a big deal because the primary’s still happy and healthy, and once you fix the backup array you can start making new backups again). Either way, you’re now relying on an actual backup strategy to ensure your data is safe instead of relying on RAID1, which is not a backup. The only thing you lose is the the continuous uptime if you do have a failure in the primary array, and the ability of RAID1 to read from both arrays at once and theoretically increase the read speed. But the advantages of gaining a proper scheduled backup outweigh that in my opinion.


  • It is, but it’s also necessary sometimes. If governments didn’t have any power and could just be ignored or openly defied without consequences, we wouldn’t have to care about what they want to censor. But they do have power, despite all our wishing that they didn’t, and we can’t organize a resistance to them without careful maneuvering and sometimes at least making an appearance of playing by their rules. Government censorship you can unsubscribe from is objectively better than censorship you can’t. Don’t let perfect be the enemy of good.



  • It’s not Peertube, but as at least a step away from Youtube I’ve found a lot of my favourite creators immediately cross-post all their videos to Odysee (including electronics guys like Louis, Bigclive, GreatScott, etc) and I’ve also found some new channels to watch there. It’s not a great site, it’s marginally better than Youtube, which is not a high bar. For obvious reasons, I’m looking forward to finding recommendations in Peertube too though so I’ll be watching this thread.