Skip Navigation

Uncomplicated firewall rule set for a *arr stack.

I set up an *arr stack and made it work, and now I'm trying to make it safe - the objectivly correct order.

I installed uncomplicated firewall on the system to pretend to protect myself, and opened ports as and when I needed them.

So I'm in mind to fix my firewall rules and my question is this: Given there's a more sensible ufw rule set what is it, I have looked online I couldn't find any answers? Either "limit 8080", "limit 9696", "limit ..." etc. or "open". Or " allow 192.168.0.0/16" would I have to allow my docker's subnet as well?

To head off any "why didn't you

<brilliant idea>

?" it's because I'm dumb. Cheers in advance.

25 comments
  • What's your actual end goal? What are you trying to protect against? Do you only want certain systems on your network to be able to access your apps? There's not really much of a point of a firewall if you're just going to open up the ports to the whole network.

    If you want it to be more secure then I'd close all the ports except for 22 (SSH) and 443 (HTTPS), stick a reverse proxy in front of everything (like Nginx Caddy, Traefik, etc), and use Authentik for authentication, with two-factor authentication enabled. Get a TLS certificate using Let's Encrypt and a DNS challenge. You have to use a real domain name for your server, but the server does not have to be publicly accessible - Let's Encrypt works for local servers too.

    The LinuxServer project has a Docker image called "SWAG" that has Nginx with a bunch of reverse proxy configs for a bunch of common apps. Might be a decent way to go. The reverse proxy should be on the same Docker network as the other containers, so that it can access them directly even though you won't be exposing their ports any more.

    Authentik will give you access controls (eg to only allow particular users to access particular apps), access logs for whenever someone logs in to an app, and two-factor auth for everything. It uses OIDC/OAuth2 or SAML, or its own reverse proxy for apps that don't support proper auth.

  • Is your system running behind a ISP router / selfhosted at home or a VPS at some provider?

    • ISP modem. I have a pi3 running pihole-dhcp-unbound, ufw and log2ram.

      My system is a pi4 running *arrs, qBit, fail2ban, portainer in docker and ufw for now. Use case is: via mobile phone access *arrs, let them do their things and manually play files via hdmi or move files via thumbdrive. I was thinking giving up the phone access to put them on their own network, but subnets are beyond my ken for now.

      Hoping to increment my security, and then the system as my skills develop.

      Edit, qBit and prowlarr are behind gluetun set up for mullvard. I'm in the UK so had to put the indexer behind a VPN. UFW

  • Acronyms, initialisms, abbreviations, contractions, and other phrases which expand to something larger, that I've seen in this thread:

    Fewer LettersMore Letters
    DNSDomain Name Service/System
    HTTPHypertext Transfer Protocol, the Web
    HTTPSHTTP over SSL
    IPInternet Protocol
    NATNetwork Address Translation
    SSHSecure Shell for remote terminal access
    SSLSecure Sockets Layer, for transparent encryption
    SSOSingle Sign-On
    TLSTransport Layer Security, supersedes SSL
    VPNVirtual Private Network
    VPSVirtual Private Server (opposed to shared hosting)

    [Thread #501 for this sub, first seen 10th Feb 2024, 13:55] [FAQ] [Full list] [Contact] [Source code]

25 comments