• 0 Posts
  • 56 Comments
Joined 3 years ago
cake
Cake day: August 15th, 2023

help-circle

  • remotelove@lemmy.catolinuxmemes@lemmy.world•IPv4 is hard
    link
    fedilink
    arrow-up
    2
    ·
    edit-2
    12 days ago

    Thanks for the correction on the the broadcast address, btw. The details are important.

    At home, I have 172.16/12 scoped out for my cluster subnet and just use the second and third octet to denote service function. It’s excessive scoping, but it’s an internal scope for a private network and broadcasts are generally contained to the cluster network. It would be trivial to split that into a 172.16/16 if I ever had the desire. (Speaking bluntly, it really doesn’t matter much in this case. I’ll need to split it out to keep Longhorn traffic segregated later, but it’s not an issue now.)

    The rest of the network is reasonably scoped out across 192.168 ranges and chopped up across a few VLANs.

    My addressing scheme is split into “public” and “stay the fuck out”, with most 172 addresses being the latter. At home this is great. In a large network, scoping out such a large 172 subnet could be detrimental. (“It depends” on the detrimental bit and requires proper planning and understanding about why subnets were even built into IPv4 from the get-go.)

    Edit: Most addressing is static on my cluster network, with DHCP only handing out addresses based on MAC address. The 172 subnet has very restricted dynamic IP ranges.

    Regardless of what is what, it’s a scheme I recognize and that is the more important bit.



  • Also, it depends on the problem you are trying to solve and if the good deal lets you buy plenty of spare drives.

    I have a 3 server cluster running 9 k8s nodes with persistent storage in Longhorn. While it thrashes the drives a bit more and I lose performance, I opted to use hardware RAID so a drive rebuild would be much easier. (I think with Ceph, it’s a step or two more to kick a drive out of the storage pool before you can swap the drive safely. The fact that I can’t remember much about Ceph already and it’s only been a month or two since I setup a Ceph testing cluster should alone explain my decision.)

    Basically, I get volume replication backed by easy to manage and affordable drive replacements. I even get mirrored boot drives too. The setup is fault tolerant to a degree and it gives me enough time to shuffle things around if a server starts to die completely.

    All the drives are used and have already had a full life, but yey, the risk is ok because the parts are cheap. I’ll probably buy another refurbished server of the same type just for the spare parts, drives and memory. I could even just use the extra server as a cold standby. Whatevers.

    The cluster isn’t critical, to be perfectly honest. It really just holds a massive tool suite of containers that I need at random times and now I at least have solid templates and ansible confogs for all of those containers anyway. Even the data isn’t super critical.

    Parts are cheap and my setup allows for disposable drives in a setup where risk tolerance is sky-high.

    My NAS is RAID 10 with brand-new drives and read/write cycles are conserved. I care about that data and will probably mirror that storage that to an additional pair of mirrored m.2’s to absorb most of the read a cycles while adding an additional redundancy layer. (The hdds would primarily only see write cycles and probably just function as an incremental backup location for specific folders off of the m.2’s.)

    Those are the cliff notes, and only I attempted to explain how I thought about risk in my setup. Volume over quality for my cluster: I think about fast recovery and how I can parch around a problem during a catastrophic failure. Long term: Multiple layers of redundancy for important data with less concern about price but I have less capacity and speed.

    Having spent years around lots of equipment, I view a flashy red light on an HDD as a suggestion to do something about it in a couple of days if the server is just a worker node. (I have been desensitized to most hardware faults, TBH.)


  • Flags have always been poorly standardized outside of system apps and tools. Generally, -u should equal --update (and depending on how the app was written, may warn for --up: “Did you mean --update?”) Single tick flags are generally combinable: -ua or -ls. I have seen long single tick flags somewhere, but can’t remember where. (Your -update example.) Various python libraries than handle flags have helped a ton with getting people to use the same patterns, so that is nice.

    You just summed up my first experience with systemd many years ago.

    systemctl != sysctl. Both somehow got wedged into the same index in my brain and took years for me to correct. On top of that, <service> <action> was reversed to <action> <service>. (Or was it the other way around?)

    I was convinced from my first experience with systemd that the person who wrote it was the purest form of evil. (It’s leveled out a bit over the years, so it’s tolerable to use these days. Still not a fan though.)









  • Good luck with that, I suppose. Botnets can have thousands, if not hundreds of thousands of infected hosts that will endlessly scan everything on the interwebs. Many of those infected hosts are behind NAT’s and your abuse form would be the equivalent of reporting an entire region for a single scan.

    But hey! Change the world, amirite?


  • I don’t want to go so far as to tell you how to think, but as long as we are talking about how to visualize IP addresses, you may want to check out subnets and subnet masking.

    The notation of IP addresses starts to make sense when you think about the early days of TCP/IP when all IP addresses were public and NAT’ing wasn’t really required yet. Basically, there needed to be ways for networks to filter traffic by IP blocks that were applicable. (It was [in part] a precursor to collision avoidance, but absolutely not the full story.) We still use addressing and masking today, but it’s more obvious when it’s local. (Like in data centers, where it’s super practical to mask off a block of addresses for a row or rack of servers.)

    To your point, yeah. IP addresses are probably more comparable to the Dewey Decimal System rather than actual numbers and thinking of them as strings is probably easier.





  • remotelove@lemmy.catoSelfhosted@lemmy.world•Secrets
    link
    fedilink
    English
    arrow-up
    5
    ·
    2 years ago

    I would look into something like Doppler instead of Vault. (I don’t trust any company acquired by IBM. They have been aquiring and enshittifying companies before there was even a name for it.)

    Look into how any different solutions need their keys presented. Dumping the creds in ENV is generally fine since the keys will need to be stored and used somehow. You might need a dedicated user account to manage keys in its home folder.

    This is actually a host security problem, not generally a key storage problem per se. Regardless of how you have a vault setup, my approach here is to create a single host that acts as a gateway for the rest of the credentials. (This applies to if keys are stored in “the cloud” or in a local database somewhere.)

    Since you are going to using a Pi, you should focus on that being a restricted host: Only run your chosen vault solution on it. Period. Secure and patch it to the best of your ability and use very specific host firewall rules for minimum connectivity. Ie: Have one user for ssh in and limit another user account to managing vault, preferably without needing any kind of elevated access. This is actually a perfect use case for SELinux since you can put in some decent restrictions on the host for a single app (and it’s supporting apps…)

    If you are paranoid enough to run a HIDS, you can turn on all the events for any type of root account actions. In theory once the host is configured, you shouldn’t need root again until you start performing patches.