Inspired by this comment to try to learn what I’m missing.

  • Cloudflare proxy
  • Reverse Proxy
  • Fail2ban
  • Docker containers on their own networks
  • gamer@lemm.ee
    link
    fedilink
    English
    arrow-up
    0
    ·
    3 days ago

    My new strategy is to block EVERY port except WireGuard. This doesn’t work for things you want to host publicly ofc, like a website, but for most self host stuff I don’t see anything better than that.

    • irmadlad@lemmy.world
      link
      fedilink
      English
      arrow-up
      0
      ·
      2 days ago

      My new strategy is to block EVERY port

      Wow! All 65535 +/-, in and out? That’s one way to skin a cat.

      • gamer@lemm.ee
        link
        fedilink
        English
        arrow-up
        0
        ·
        2 days ago

        ez pz:

        #!/usr/sbin/nft -f
        table inet filter {
            chain input {
                type filter hook input priority raw; policy accept;
                iif "lo" accept
                ct state established,related accept
                iif "enp1s0" udp dport 51820 accept
                iif "enp1s0" drop
            }
        
            chain forward {
                type filter hook forward priority raw; policy accept;
                iif "lo" accept
                ct state established,related accept
                iif "enp1s0" udp dport 51820 accept
                iif "enp1s0" drop
            }
        
            chain output {
                type filter hook output priority raw; policy accept;
            }
        }