8 comments

  • Bender 4 hours ago

    My personal preference is to 'ip route add blackhole ${net}' as it has the lowest CPU overhead and I can add hundreds of thousands of CIDR blocks with no noticeable impact. The only downside is that it won't stop UDP packets from getting to a UDP listener. There will not be a response but the application will still see it. For my TCP daemons it's great.

        grep -m1 -E ^Tot /proc/net/fib_triestat ;ip route | grep -Fc blackhole
        Total size: 56735  kB
        426951
    
    Those 426951 blackhole routes include data-centers, VPS providers, botnets, AI datacenters that ignore robots.txt, search engines, abused CDN's, known bad residential nodes and much more. I still see a few residential proxy bots that do a halfway decent job of pretending to be real people at times but the feds are playing whack-a-mole with them. The bots self report to my silly blog so I can block them elsewhere on systems I might care a little bit about. Happy to share them if anyone is remotely interested.

    I also use a couple generalized rules in nftables raw table that keeps a lot of beyond poorly written bots away including hping3 tcp floods and masscan. My rules to port 443 are stateless. One must not taunt the state table.

    • seki285 4 hours ago

      I would like to learn more how you maintain your table of IP ranges (or CIDR block). How do you decide when to add/remove a range?

      I'm most concerned about blocking innocent users, currently I use Cloudflare to block known bad ASNs using a list I found on GitHub.

      • Bender 3 hours ago

        How do you decide when to add/remove a range?

        The only IP's that come and go are the Tor 30 day blocklist and a couple FireHOL attackers from a repo though I will sometimes leave the last entries live until reboot. I do not really need to block tor but I use this silly blog as a testing ground. Tor and some known abusers come from a git repo I refresh periodically.

        The data-centers, VPS providers, CDNs, known botnets are perma-banned. For my hobby nodes I personally find this acceptable. I would not do this in a professionally managed data-center. There are better methods for those cases especially for B2B corporate arrangements. Regardless of what daemons I run I never have external dependencies that need to be accessed from my node or from the client with exception of stratum-1 time servers.

        I do have to periodically update the CIDR blocks for given ASN's. I have not automated this but I probably should some day. It's not hard to automate, I am just excessively "efficient". I was told to stop calling myself lazy, but I am.

        Methods 2, 3 and 5 are the ones I talk about here. [1]

        [1] - https://nochan.net/b/Internet-Crap/20260606-How-To-Block-Som...

    • idoubtit 4 hours ago

      That's interesting. I haven't used fail2ban for a long time, but reaction is worth evaluating. Unfortunately, that post does not describe their full configuration. Maybe it's on purpose, so that attackers can't adjust to fit.

      My experience is that modern web scraping had no obvious pattern, since it is proxied through many IPs. The last time a server was failing to handle the pressure, we decided to temporarily ban IPs from some Asian regions. How does the FSF decide to ban an IP?

      Why do they use iptables + ipset instead of nftables? Is there a technical reason or is it just legacy? AFAIK, Nftables is more performant, and IMO simpler. And it has native sets, see https://wiki.nftables.org/wiki-nftables/index.php/Sets

      • itintheory 3 hours ago

        > The last time a server was failing to handle the pressure, we decided to temporarily ban IPs from some Asian regions.

        This is something we've been forced to do at work, a LOT. Some weeks it's Huawei Cloud, Tencent, and Alibaba. Other weeks it's all China Telecom. We're using Anubis where possible, but a lot of it is just whack-a-mole with residential proxies. I looked at Datadome and HUMAN, but they would be hundreds of thousands a year at our traffic scale, and I suspect may also have false positives. We abandoned CrowdSec for that reason as well.

        I'd love to find a decent k8s native solution to this problem.

        • thomzane 3 hours ago

          iptables has been mostly a wrapper for nftables for some time now. The choice of iptables + ipset with reaction is the difference in their configuration. Compare restart performance between the ipset and nftables example configurations with lists of greater than 1 million IPs.

        • Magicrafter13 5 hours ago

          > This software is gay, trans and anticolonialist. If you're uncomfortable with that, please don't use it

          Weird message to include in AGPLv3 licensed software (which explicitly allows people to use software however they like, regardless of their beliefs or feelings).

          • Groxx 5 hours ago

            You can have preferences while not restricting legal rights.

            • graemep 4 hours ago

              You can, but if the exact quote in the GP is correct the claim is claiming the software is "gay, trans and anti-colonialist" and asks you not to use it. Why use a license that is designed to be politically neutral and then ask some people not to use it?

              What I can see is a fairly clear indication that they do not want contributions from people whose politics differ from theirs. I would also question whether government funding of a project with political policies about who can participate is appropriate. The political stance is also rooted in a particular culture so is unwelcoming to people from other cultures.

              Of course people can political views and preferences, but they presumably have some aim in mind when making that statement in the README. What is that aim?

              • drdexebtjl 22 minutes ago

                A license designed to be politically neutral?

                The GPL variants are the antithesis of politically neutral.

                • Groxx 3 hours ago

                  >Why use a license that is designed to be politically neutral and then ask some people not to use it?

                  Because you can have preferences while not restricting legal rights.

                  • BigTTYGothGF 4 hours ago

                    > What I can see is a fairly clear indication that they do not want contributions from people whose politics differ from theirs

                    This is the same FSF that in the past has refused contributions from people whose politics include "I would like this software to run on my windows/apple/other proprietary platform". They're extremely political.

                    • collinfunk 3 hours ago

                      When did this occur? I am a GNU maintainer, and have never heard such a thing from the FSF. The GNU Coding Standards and other similar texts leave the decision to support non-free platforms up to the maintainer.

                      • rpdillon 30 minutes ago

                        It was an emoji solution for Emacs that only worked on Mac. RMS basically said:

                        "If the point is to promote Free Software, we do ourselves a disservice by making our Free Software work better on a proprietary system than a Free system. Let's include this support when it works on the Free platforms as well."

                        FSF is political, but only about Free Software. Their goal is to promote it, and I think RMS has shown very clear thinking in this regard. I don't love the decision/outcome (someone did work to make something better and it was rejected), but I get it in service of the larger goal.

                        To flip the pschology, you could imagine a world where Emacs did way more awesome stuff on Windows and Mac, and the ensuing HN discussion where the obvious snipe appears a dozen times: "lol they keep talking about free software but their own products work better on windows lol".

                        • BigTTYGothGF 2 hours ago

                          It was a while ago (20-ish years?) and I'm forgetting the details, but it was RMS and I think the package was emacs.

                        • mqus 1 hour ago

                          But... that software (reaction) is not written by the FSF? They just use it

                        • jasonvorhe 1 hour ago

                          Because signalling has replaced real virtue.

                          • stonogo 4 hours ago

                            The aim is to reduce the number of users of the software who are uncomfortable with those who are gay, trans, and/or anticolonial, probably because dealing with such people is a heavier burden than the other kind.

                            • jasonvorhe 1 hour ago

                              You wouldn't know my stance on the matter based on a pull request, especially not if some author didn't plaster it all around their profile.

                              • actionfromafar 2 hours ago

                                Seems like it might be working!

                                • graemep 3 hours ago

                                  How would a you even know whether a user was uncomfortable with any of those things? Why would someone with a particular political stance be a heavier burden on maintainers? How would you even know how someone felt - if someone reports a bug it is highly unlikely they are going to add something like "I am uncomfortable with gays" are they? Nor is it going to be in the comments in contributed code. It sounds more like that the maintainers are uncomfortable with people who are not like themselves.

                                  • Groxx 3 hours ago

                                    You seem to be drastically overcomplicating this. They are asking people who are uncomfortable with it to not use it. The people who are uncomfortable with it are the ones deciding, nothing at all in there implies that they are deciding who is uncomfortable.

                            • fluoridation 2 hours ago

                              My Gen Y brain can't read the phrase "[inanimate object] is gay" without interpreting it as disapproval.

                            • nubinetwork 2 days ago

                              > We placed our regular expressions in fail2ban, and found that we were hitting the maximum rules that could be added to UFW firewall rules on our systems which showed degradation around 65,000 rules

                              Firewalld had a similar issue up until recently as well.

                            • wasmperson 4 hours ago

                              It's somewhat interesting to see the FSF's approach to this. From what I understand they can't really use something like anubis since they want their websites to be accessible without javascript:

                              https://www.gnu.org/philosophy/javascript-trap.html

                              Users can't consent to running a page's javascript the way they can consent to running a program they've intentionally downloaded, so it's effectively "non-free" regardless of license.

                            • m3047 3 hours ago

                              "Many sysadmins know about fail2ban..." and many will now know about reaction. But why will the result be any different than fail2ban? It won't.

                              I identify features (which can be expressed as firewall rules) from log data; I write totals to a temporary store (Redis). I have periodic tasks which scan the temp store for patterns which exceed thresholds. When that occurs, fail2ban creates the appropriate rules. This occurs in depth and in concentric rings.

                              Et tu?

                              • thomzane 2 hours ago

                                The difference between fail2ban and reaction is performance. If you are not hitting the ceiling of fail2ban, then you may not need reaction.

                                Do you have a blog post about your automated fail2ban rule generation?

                              • charcircuit 3 hours ago

                                >Popa botnet

                                It's no more of a botnet than ProtonVPN for example. Apps intentionally added the Popa SDK to their apps as a monetization method. This allows apps without ads and tracking to be financially viable. I would expect FSF to support apps being able to move off of monetization schemes that depend on tracking people so it is disappointing for them to put such alternative monetization technologies in a negative light.

                                • thomzane 2 hours ago

                                  This monetization scheme benefits the botnet controller and the developer who added the SDK and not the user who likely did not realize they signed up to become an exit node.

                                  • charcircuit 1 hour ago

                                    It allows as free versions of apps to be economically viable and compete with others. It helps users because they don't need to be spied on and shown ads to fund the development of the app.

                                    The existence of an app brings users value, else they wouldn't use it.

                                    • ryandrake 48 minutes ago

                                      Recruiting your users' systems into a botnet is not an acceptable way to make an app "economically viable" any more than, say, installing a rootkit on their systems.

                                      • nemomarx 1 hour ago

                                        the fsf has never really been concerned with commercial viability. They're the worst audience for this sort of argument.

                                        and I doubt these apps are really Free versions - do they support user modifications and access to the code? If they did support the four freedoms maybe the fsf would have something positive to say to balance it out?

                                    • worik 25 minutes ago

                                      "Monetization". What a horror.

                                      I pay for some software services. The services I pay for have a billing page (or a donation page) and I pay via the banking system

                                      I rigorously block every ad, every tracker, every thing that does "monetization"

                                      The evil period of trying sneaky ways to generate money is, I am optimistic, coming to an end.

                                      If you want my money, ask me. If you must have my money, demand it. If you are sneaking around "monetization" I will do everything I can to stop you.

                                    • cyanydeez 2 days ago

                                      are scrapers attackers?

                                      I get they're DDoS; but take the mask off, and arn't they just the AI monied interests that fund the FSF? and a lot of them are just active inference, eg, the user is trying to ask about something and the AI monied interests setup a web scraper to go and get that data.

                                      Just seems like no one wants to call out the hand that feeds them in a human centipede that's best described as the torment nexus.

                                      • m3047 3 hours ago

                                        Anything which fills my logs with garbage is unwanted. Your cat could have fallen asleep on the keyboard, I don't care. If you want to use the internet as a giant petri dish, that's on you; but the cat box is elsewhere. I can feed you garbage or block you because your code is shit, or I don't like your style.

                                        • nemomarx 5 hours ago

                                          instead of scraping then, they could pay the fsf for a dump of the site or some API access or something, right? why overload the servers normally.

                                        • kaladin-jasnah 2 days ago

                                          > AI monied interests that fund the FSF

                                          Can you elaborate on who these interests are precisely?

                                          • cyanydeez 2 days ago

                                            I tried: https://www.fsf.org/patrons; the last FY listed is 2020.

                                            • kaladin-jasnah 2 days ago

                                              I'm not entirely sure how those companies are related to "AI-monied" after clicking on their websites.

                                              • cyanydeez 2 days ago

                                                the point is i tried to answer and the page is 6 years out of date....

                                                • socratic_weeb 5 hours ago

                                                  The point is that it is presumed that you must've gotten the info somewhere in order to back up your claims. If not this outdated website, where then?

                                                  • tokai 2 hours ago

                                                    So you made shit up.

                                                • thomzane 3 hours ago

                                                  The patrons page is updated regularly.