• schizo@forum.uncomfortable.business
    link
    fedilink
    English
    arrow-up
    3
    ·
    1 month ago

    We probably need more details as to what exactly you’re attempting to accomplish and how you’re attempting to accomplish it.

    The main issue is that each rule you add to a firewall has a performance penalty: each packet is checked against each rule before it’s passed.

    Ten rules require 10x more cpu than 1 rule, 100 rules need 10x more than 10 rules, and so on.

    Depending on how much traffic and how many rules we’re talking about and what kind of expectation you have for performance as well as anything else (eg. vpn endpoint), “small and cheap” may not be fast enough, and you might have to lean into higher performance hardware.

    • Auli@lemmy.ca
      link
      fedilink
      English
      arrow-up
      1
      ·
      26 days ago

      They’re not checked against every rule. First pass it stops.

      • schizo@forum.uncomfortable.business
        link
        fedilink
        English
        arrow-up
        1
        ·
        26 days ago

        Yeah, maybe could have been clearer.

        I was very vividly remembering a VERY SMART client I had a while ago that had like 600 rules blocking all manner of ports and protocols and IPs, and wondering why everything performed like dogshit.

        Sure, it’ll go until it hits the first match, but if you have enough rules, you’re going to be churning through an awful lot of cpu getting everything to the first match.

        OP may not have been intending to do something quite that uh, special, but people do funky things.