Anafroj

@Anafroj@sh.itjust.works

This profile is from a federated server and may be incomplete. Browse more on the original instance.

Anafroj, (edited )

As a long time 5e DM, I’m amazed by how many times BG3 can slap me in the face with totally wrong rules implementations and I still love it.

Anafroj,

Actually, for once, it’s a quite good implementation of the 5e ruleset. :)

In the Player Handbook (p.147) :

Improvised Weapons

Sometimes characters don’t have their weapons and have to attack with whatever is at hand. An improvised weapon includes any object you can wield in one or two hands, such as broken glass, a table leg, a frying pan, a wagon wheel, or a dead goblin.

Often, an improvised weapon is similar to an actual weapon and can be treated as such. For example, a table leg is akin to a club. At the DM’s option, a character proficient with a weapon can use a similar object as if it were that weapon and use his or her proficiency bonus.

An object that bears no resemblance to a weapon deals 1d4 damage (the DM assigns a damage type appropriate to the object). If a character uses a ranged weapon to make a melee attack, or throws a melee weapon that does not have the thrown property, it also deals 1d4 damage. An improvised thrown weapon has a normal range of 20 feet and a long range of 60 feet.

Anafroj, (edited )

Well I didn’t want google to read my mails

Sadly, it only works if no one in the recipients of the mail is on gmail (or if everyone use pgp, which I would tend to think is even more rare).

I host my own mailserver as well, and I would add as benefits:

  • creating as many email address as you want easily, possibly regexp based address (awesome to give every site a different address and know where the spam comes from, without using the well known schema username+something@host). That also makes routing/filtering mails way more easy, you just have to match the recipient address.
  • delivering mails to software, to put email at the center of interapps messaging (basically, that means that postfix pass a matching email to the executable of your choice on your system instead of storing it in your mailbox)
  • advanced rules for handling emails. When I want to block a spammer that managed to get my real email, I use regexps to match their mails and reject it with a “REJECT 5.1.1 Recipient address rejected: User unknown in local recipient table” error, imitating the error for unknown users, which often triggers a mail system to remove your address from their database
  • easily configure apps to send me email. When I write an application that will send emails to me and only me, I configure it to use my smtp on port 25 without authentication instead of the usual smtps configuration they expect. It connects to it and asks to send a mail to me, which is accepted since I’m a local user. It makes everything way easier (try to do that with gmail and get your IP banned)
  • easy backups. Both of the mail system (I backup the whole sdcard of the pi) and of the emails. Never lose an email again.
Anafroj,

I guess slapping it on my local raspberry pi wouldn’t be enough no?

Oh no, that would be way not enough. :) Managing a mailserver is a sysadmin task by itself. While you don’t need to do much once it works (which often is a perk of sysadmin work, compensating for the fact that when it does not work, they may have to wake in the middle of the night to fix it), it’s notoriously difficult to get right : you have the configuration of the mailserver to get right first, so that you can send emails, but nobody else can and you don’t become a spam relay without knowing it. Then you have a lot of configuration to do to be able to retrieve your emails from your server, which uses other protocols that you must learn about. Then you have “optional” things that you must setup (SPF, DKIM and DMARC), which you won’t be able to send mails to gmail or outlook if you don’t set them up properly. And when you will have got all of that right, you will have enough experience to be hired as a sysadmin. :)

I can’t provide a good resource for learning it, I learned it 15 years ago when it was way more simple (before SPF and DKIM), and picked every addition as they appeared, but any course on how to manage a mail system will do. There is no difference in doing it for your self-hosted server and for a company (except maybe that for a company, they’ll make you handle users in a database, which you can forego for your own needs). I would recommend to learn how to use postfix first, then any imap server (courier-imap is a top runner), and when you’re comfortable with that, you can learn about SPF, then DKIM, then DMARC. But be aware before going through it that this is basically learning a new skill (sysadmin). You can find docker images that setup everything automatically for you, but I would recommend against that, because at some point, things will break and you will have no idea how to fix them. And if you try to fix them while not knowing well what you’re doing, that’s a good way to end up being a spam relay. Plus, those docker images are difficult to customize, which quite defeats the point of managing your own mail system to begin with.

Anafroj, (edited )

I do have to say for the purpose of tinkering I love these bigger projects because you learn so much on the way. Now having read your answer I am even more exited to try it out :D

That’s awesome to hear! Welcome, and have fun! :)

I haven’t heard of most of your abbreviations/term till now

Oh, my apologies. Here is a definition list :

  • SMTP : Simple Mail Transfer Protocol : the base of any mail system, it’s the server you contact to send emails, which relays your mail to an other SMTP server (where your contact is hosted), which stores the mail for user to retrieve
  • IMAP : Internet Message Access Protocol : one of the protocols that can be used to retrieve emails from your mailserver (the other one being POP3)
  • SPF : Sender Policy Framework, a configuration on your domain name specifying which machines are allowed to send mails in its name
  • DKIM : DomainKeys Identified Mail : a signing process (signing each mail) to validate the “From” email address is indeed authorized from the domain it pretends to
  • DMARC : a warning system to let you know when someone pretended to be you (also giving instructions about what to do with emails when SPF and/or DKIM are missing or wrong)
Anafroj, (edited )

My party is level 4.

  • Cleric of Talos (the chaotic evil god of storm and destruction), Tempest domain (obviously)
  • Shadowheart, default class (we’re the couple of doom!)
  • Asterion, default class, subclass assassin
  • Gale, default class, subclass school of necromancy

Not like I have a choice, anyway, we killed all other companions (except Wyll, who left by himself before it happened). They started it!

Anafroj,

However Port 22 should never be open to the outside world.

That’s not a good advice, sorry. You can bind openssh to an other port, but the only thing it changes is that you have less noise in your logs (and the real solution to that is to use fail2ban, as it also protect you for upcoming attacks on other services from those hosts). The real most important security measure is to make sure your softwares are always up to date, as old vulnerable software is the first cause of penetration (and yes, it’s better to deactivate password login to only use ssh keys, that’s a good advice).

EDIT: I’m elaborating on that because I realize it may come out as harsh without giving enough details. The main reason while changing ports is a bad idea is because it gives a false sense of security (like your last sentence makes it obvious). While it does allow to protect from automated vulnerability scanners that sweep the internet, it’s trivial to port scan your host, then to test unfamiliar ports for well known protocols. When that happens (and it will), if you think you could avoid frequent updates thanks to port change, you’re powned. The most important thing is to have a strict update policy of weekly, if not daily, updates. There is no working around it.

Anafroj, (edited )

The best you can do to know if it was an attack is to inspect the logs when you have time. There are a lot of things that can cause a process going wild without being an attack. Sometimes, even filling the RAM can cause the CPU to appear overloaded (and will freeze the system anyway). One simple way to figure out if it’s an attack : reboot. If it’s a bug, everything will get back to normal. If it’s a DDoS, the problem will reappear up to a few minutes after reboot. If it’s a simple DoS (someone exploiting a bug of a software to overload it), it will reappear or not given if the exploit was automated and recurring, or was just a one-shot.

The fact that both your machines fell at the same time would tend to make think it’s an attack. On the other hand, it may just be a surge of activity on the network with VPSes with way not enough resources to handle it. Or it may even be a noisy neighbor problem (the other people sharing with you the real hardware on which your VPSes run who will orverload it).

Anafroj,

If you do not neglect updates, then by all mean, changing ports does not hurt. :) Sorry if I may have strong reaction on that, but I’ve seen way too many people in the past couple decades counting on such anecdotal measures and not doing the obvious. I’ve seen companies doing that. I’ve seen one changing ports, forcing us to use the company certificate to log in, and then not update their servers in 6 months. I’ve seen sysadmins who considered that rotating servers every year made it useless to update them, but employees should all use Jumpcloud “for security reasons”! Beware, though, mentioning port changing without saying it’s anecdotal and the most important thing is updates, because it will encourage such behaviors. I think the reason is because changing ports sounds cool and smart, while updates just sound boring.

That being said, port scanning is not just about targeted pentesting. You can’t just run nmap on a host anymore, because IDS (intrusion detection systems) will detect it, but nowadays automated pentesting tools do distributed port scanning to bypass them : instead of flooding a host to test all their ports, they test a range of hosts for the same port, then start over with a new port. It’s half-way classic port scanning and the “let’s just test the whole IP range for a single vulnerability” that we more commonly see nowadays. But they are way harder to detect, as they scan smaller sets of hosts, and there can be hours before the same host is tested twice.

Anafroj,

I’m not sure about the feasibility of this (my first thought would be that ssh on the host can be accessed directly by IP, unless maybe the VPN software creates its own network interface and sshd binds on it?), but this does not remove the need for frequent updates anyway, as openssh is not the only software that could have bugs : every software that opens a port should be protected as well, and you can’t hide your webserver on port 80 behind a VPN if you want it to be public. And it’s anyway a way more complicated setup than just doing updates weekly. :)

Anafroj,

Oh, ok, you whitelist IPs in your firewall. That certainly works, if a bit brutal. :) (then again, I blacklist everyone who is triggering a 404 on my webserver, maybe I’m not the one to speak about brutality :P ) You don’t even need a VPN, then, unless you travel frequently (or your ISP provides dynamic IP, I guess).

Anafroj,

Oh, I see. Totally makes sense. :)

I guess it depends on the country, but here in France, yes, most landline ISPs provide static IPs (maybe all? there are a couple I haven’t try ; mobile IPs are always dynamic, though). It was not always the case, but I haven’t had a dynamic IP since the 2000’. I feel you, dealing with pointing a domain to a dynamic IP is a PITA.

Ahah, yeah, I protected myself against accidentally banning my own IPs. First, my server is a Pi at home, so I can just plug a keyboard and a screen to it in case of problem. But more importantly, as I do that blacklisting through fail2ban, I just whitelisted my IPs and those of my relatives (it’s the ignore_ip variable in /etc/fail2ban/jail.conf)., so we never get banned even if we trigger fail2ban rules (hopefully, grandma won’t try to bruteforce my ssh!). It allowed me to do an other cool stuff : I made a script ran through cron that parses logs for 404 and checks if they were generated by one of the IPs in that list, mailing me if it’s the case. That way, I’m made aware of legit 404 that I should fix in my applications.

Anafroj, (edited )

“karma” (as reddit calls scoring) never was more true to its name. :)

I haven’t looked at Lemmy’s implementation of upvotes/downvotes, but they should be ActivityPub activities, so it means they should appear by making a request to the user’s actor.

EDIT: I’ve just checked random users outbox (that’s the ActivityPub name for the list of activities), included mine, they are actually just empty. So that probably means that Lemmy is only publishing the upvotes/downvotes when pushing activities to federated servers, which would make those activities way more private, although not completely : someone could setup their own instance to learn about them, and it’s best to be assume that at some point, someone will start such instance and publish an app revealing all votes for everybody (plus, as others mentioned, Kbin is already doing it).

Anafroj, (edited )

Obligatory check : are you sure you really need a forge? (that’s the name we use to designate tools like Github/Gitlab/Gitea/etc). You can do a lot with git alone : you can host repositories on your server, clone them through ssh (or even http with git http-backend, although it requires a bit of setup), push, pull, create branches, create notes, etc. And the best of it : you can even have CI/CD scripts as post-receive hooks that will run your tests, deploy your app, or reject the changes if something is not right.

The only thing you have to do is to create the repos on your server with the –bare flag, as in git init --bare, this will create a repos that is basically only what you usually have in the .git directory, and will avoid having errors because you pushed to a branch that is not the currently one checked. It will also keep the repos clean, without artifacts (provided you run your build tasks elsewhere, obviously), so it will make all your sources really easy to backup.

And to discuss issues and changes, there is always email. :) There is also this, a code review tool that just pop up on HN.

And it works with Github! :) Just add a git remote to Github, and you can push to it or fetch from it. You can even setup hooks to sync with it. I publish my FOSS projects both on Github and Gitlab, and the only thing I do to propagate changes is to push to my local bare repos that I use for easy backups, they each have a post-update hook which propagates the change everywhere it needs to be (on Github, Gitlab, various machines in my local network, which then have their own post-update hooks to deploy the app/lib). The final touch to that : having this ~/git/ directory that contains all my bare repos (which are only a few hundred MB so fit perfectly in my backups) allowed me to create a git_grep_all script to do code search in all my repos at once (who needs elasticsearch anyway :D ) :


<span style="color:#323232;">#!/usr/bin/env bash
</span><span style="color:#323232;"># grep recursively bare repos
</span><span style="color:#323232;">
</span><span style="color:#323232;">INITIAL_DIR=$(pwd)
</span><span style="color:#323232;">for dir in $(find . -name HEAD -exec dirname '{}' ;); do
</span><span style="color:#323232;">  pushd $dir > /dev/null
</span><span style="color:#323232;">  git grep "$*" HEAD > /dev/null
</span><span style="color:#323232;">  if [[ "$?" = "0" ]]; then
</span><span style="color:#323232;">    pwd
</span><span style="color:#323232;">    git grep "$*" HEAD
</span><span style="color:#323232;">    echo
</span><span style="color:#323232;">  fi
</span><span style="color:#323232;">
</span><span style="color:#323232;">  popd > /dev/null
</span><span style="color:#323232;">done
</span>

(note that it uses pushd and popd, which are bash builtins, other shells should use other ways to change directories)

The reason why you may still want a forge is if you have non tech people who should be able to work on issues/epics/documentation/etc.

Anafroj,

It’s coming to Gitlab too! (although, this will take quite some time)

Fully local nameservice

I’m finally starting to install local web apps that my wife/kids would be interested in, and I know it has to be super easy or they’re never going to go near it. Most everything is running on my Synology on different ports, with absolutely nothing exposed to the outside world, and I’d like to run local DNS and proxy so...

Anafroj, (edited )

I don’t use a pihole, but I have a pi with my favorite distro acting as server, and I use dnsmasq for what you mention. It allows to set the machine as the nameserver for all your machines (just use its IP in your router DNS conf, DHCP will automatically point connected machines to it), and then you can just edit /etc/hosts to add new names, and it will be picked up by the nameserver.

Note that dnsmasq itself does not resolve external names (eg when you want to connect on google.com), so it needs to be configured to relay those requests to an other nameserver. The easy way is to point it to your ISP nameservers or to public nameservers like those from Cloudflare and Google (I would really recommend against letting them know all domains you’re interested in), or you can go the slightly more difficult way as I did, and install an other nameserver (like bind9) that runs locally. Gladly, dnsmasq allowed to configure its relay nameserver to be on something else than port 53, which is quite rare in dns world. Of course, if you’re familiar with bind9, you could just declare new zones in it. I just find it (slightly 😂) more pleasant to work with /etc/hosts.

Anafroj,

Oh, ok. Thanks for letting me know. 👍️

Anafroj, (edited )

I’ve been running my own email server for years, and while it’s indeed difficult at first, it is possible and you don’t have much to do to maintain it when it works. All the horror stories you hear come from the fact it’s difficult to get right, and even when you get it right, you will have deliverability problems the first year, until your domain name gets established (and provided you don’t use it for spam, obviously - and yes, marketing is spam).

What you need :

  • being willing and serious about reading lot of documentation
  • an IP that is not recognized as a home IP. So you’ll need a “business ISP”, or one that is not well known. You bypass this problem by using AWS.
  • choosing a well recognized TLD for your domain name, like .com, .org, .net, etc. Don’t use one of those fancy new extensions (.shop, .biz, etc), they are associated with spammers.
  • learning how SPF works and getting it right (there are plenty of documentation and test tools for that)
  • same for DKIM
  • same for DMARC

Start using that for a year without making it your main address. Best is to use it for things not too mainstream, like FOSS mailing lists, discussing with people having their own mailserver, etc, those will not drop your mails randomly. When a year has gone with frequent usage, you can migrate to that email address or domain.

Regarding the architecture of your network : do you read your emails on several machines (like, on mobile and laptop)? If not, you can dramatically simplify your design by using pop3 instead of imap, connecting your client to the AWS server, downloading all your emails to computer and removing them from the server at the same time. There, you have all your mails locally and you don’t need dovecot. :)

Anafroj, (edited )

Keep in mind that not everyone is using the upvotes weighting, so it’s not just about “those who allow downvotes and those who don’t”.

Personally, I find the whole upvoting/downvoting thing to be a very toxic feature that encourages hive mind and blaming divergence, so I hide scores and I sort posts and comments by chronological order. I would not use Lemmy if I was forced to be under the influence of social scoring, so defederating from instances which do not apply the same rules on downvoting would feel very detrimental to me.

Upvotes/downvotes were implemented by websites like Reddit as a scaling trick, so they can get millions of users without the need to hire hundreds of thousands of moderators. But it turned out that adding subreddits with volunteer moderators worked better anyway, and this is already what we have on Lemmy, with instance owners and community moderators, so there is really no need for some dystopian scoring of everything someone says.

Anafroj,

😂 No worry, I would not have seen it anyway. :)

Anafroj,

You’re welcome. I don’t use mobile myself : do you use an app, or it’s just about opening your Lemmy instance url in a browser? If it’s the later, you can go in the settings and there is a “Show Scores” checkbox. Just uncheck it, hit the “save” button and you’re done. :) This is also where you find the “Sort Type” select box which allows to define default sorting and put it to “New”. It only works for posts on the homepage, though, you have to take the habit to manually click “new” after reading a post to sort its comments (I could have swear it was using the “Sort Type” option before, or maybe just remembering last sort, but it’s not the case anymore).

Anafroj, (edited )

Thanks, that’s a good idea.

The reason why it only works on page reload is because Lemmy is a SPA : it makes it look like you’re browsing several pages, but it’s actually always the same, and it uses javascript to change the url and load new content. So the “load” event, triggered when the current page is done loading, is only triggered once because the page is only changed once. If you wonder why : SPA became commonplace in the 2010s because javascript applications started to get way bigger than previously, and it was helping with page load speed. For a time… because when you make page load faster, people just make it load more things until it’s slow again. :)

My first reaction was that additionally to binding to the load event, we probably just can bind to the popstate event, which happens when the url is programmatically changed. But my first tests were not successful in doing that. I’ll have a quick look at the source code of Lemmy later today to see if I can solve this.

Anafroj,

You’re welcome. :) Oh yeah, you probably use a lot of them, they are everywhere, although it’s not obvious to the user. One way to figure it out is to open the browser inspector (usually control + shift + i, same to close it) and look on the “network” tab, which lists all network requests made by the page, to see if this list gets emptied when you click a link (if it’s a real new page, the list is emptied and new requests appear).

My apologies, I spent an hour on the popstate problem before losing interest and calling it a day. Lemmy uses the inferno frontend framework (a clone of react), which uses the inferno-router router to handle page changes, which uses the history lib to do it, which… uses pushState as I expected it would. And yet, binding on popstate won’t work. 🤷 Maybe I’ll have an other look at it one day if it bugs me enough. :)

Anafroj,

Anyone heard of them being DDOS’d? This certainly sounds like ongoing DDOS and protections kicking in (assuming that by “verify my account” you mean “having to solve a captcha”).

Anafroj,

That’s how I’ve been playing my longest running campaign. :D Counterpoint : by average word count, that would be four of five books. And very boring ones at that : want an other whole chapter on shopping? ^^ I prefer to call it “exploring my imagination”. Nothing produces as vivid imagery in the brain as writing, except maybe drawing/painting, but writing can produce a new complexe scenery in just a matter of minutes.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • JUstTest
  • mdbf
  • ngwrru68w68
  • tester
  • magazineikmin
  • thenastyranch
  • rosin
  • khanakhh
  • InstantRegret
  • Youngstown
  • slotface
  • Durango
  • kavyap
  • DreamBathrooms
  • megavids
  • tacticalgear
  • osvaldo12
  • normalnudes
  • cubers
  • cisconetworking
  • everett
  • GTA5RPClips
  • ethstaker
  • Leos
  • provamag3
  • anitta
  • modclub
  • lostlight
  • All magazines