• 0 Posts
  • 7 Comments
Joined 1 year ago
cake
Cake day: June 17th, 2023

help-circle



  • Your post couldn’t be more true. Decades ago I was sold on MythTV, this PVR software but it only ran on Linux and you had to compile it yourself. So I gave Linux and MythTV a shot. As it turned out, both MythTV and early desktop Linux were a buggy, frustrating mess. X broke all the time. Incomprehensible, ungoogleable compile errors all the time.

    I spent so much time troubleshooting MythTV and compilation problems that I ended up learning Linux inside and out and the C programming language to be able understand the compile errors. I went on to lead a major open source project and have had a long career as a programmer, using all the knowledge I gained that started with fighting MythTV.



  • GameGod@lemmy.catoSelfhosted@lemmy.worldHave I been DoS'd?
    link
    fedilink
    English
    arrow-up
    2
    ·
    11 months ago

    I don’t see anyone else actually telling you how to figure out if you’re being DoSed, so I’ll start:

    Check your logs. Look at what process is eating your CPU in htop and then look at the logs for that process. If it’s a web application, that means the error and access logs for it. If you see a flood of requests to a single URL, or some other suspicious pattern in the log, then you can try blocking the IPs associated with them temporarily and see if it alleviates the load. Repeat until the load goes down.

    If your application uses a database, check your database logs too. IIRC postgres logs queries that take longer than 5 seconds by default, which can make it easy to spot a slow query especially during a time of high load.

    I don’t think DNS amplification attacks over UDP are likely to be a problem as I think most cloud providers filter traffic with forged src addresses (correct me if I’m wrong). You can also try blocking all inbound UDP traffic if you suspect a UDP flood but this will likely break DNS lookups for you temporarily. (your machine should not have any open UDP ports in any case though if you’re just running Lemmy).

    If you want to go next level, you can use “perf” to generate a system-wide profile and flamegraph which will show you where you’re burning CPU cycles. This can be extremely useful for troubleshooting performance or optimizing applications. (you’ll find that even ipfilters takes CPU power, which is why most DDoS protection happens on dedicated hardware upstream)