cross-posted from: https://lemmy.world/post/11162262

Hey,

For all of you that are running proper setups and use nftables to protect your servers be aware that pvxe/nftables-geoip now has the ability to generate IP lists by country.

This can be used to, for instance, drop all traffic from specific countries or the opposite, drop everything except for your own country.

https://github.com/pvxe/nftables-geoip/commit/c137151ebc05f4562c56e6802761e0a93ed107a2

Here’s how you can block / track traffic from certain countries:

Previously you had to load the entire geoip DB containing multiple GB and would end up using a LOT of RAM. Those guides aren’t yet updated to use the country specific files but it’s just about changing the include line to whatever you’ve generated with pvxe/nftables-geoip.

  • moreeni@lemm.ee
    link
    fedilink
    arrow-up
    3
    ·
    9 months ago

    What’s the point of your comment? I doubt anyone here would just block countries on random from accessing their servers. The tool doesn’t seem to promote such behaviour either.

    • h3ndrik@feddit.de
      link
      fedilink
      arrow-up
      3
      ·
      edit-2
      9 months ago

      Yeah, back when the war with Russia and the Ukraine started I’ve seen people post tutorials about how to block people in Russia from accessing their blog and self-hosted services. So just for political reasons. I don’t think this makes the world a better place.

      Same with countries where lots of attacks originate from. I think a better approach would be to block offending address ranges if possible, not directly block countries and all the people who live there.

      I don’t think something needs to directly promote bad behaviour. Sometimes just making it easy, is enough to warrant a disclaimer to think before applying it.

      • N0x0n@lemmy.ml
        link
        fedilink
        arrow-up
        3
        ·
        9 months ago

        Totally agree! This will isolate people from accessing useful information.