„Lockdown Mode“ for more security #57
lukaslindnermusic
started this conversation in
Feature Requests
Replies: 1 comment 3 replies
-
Someone doing what they shouldn't be doing will generate a lot of 4xx errors, so I think it would be easier and more robust to use an existing solution like Fail2Ban to block that traffic. That way you can completely customise the blocking / timeframe / limits / etc.
The "Lockdown mode" proposal would still expose the same amount of information as the existing solution (i.e. that there is nothing at a random string link). And using something like Fail2Ban will mitigate any risk of spam to the Immich host. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Context: I have immich installed on a NAS in my local network and the proxy lives on my VPS where also other public services are running. I manage that VPS only through a VPN connection, and the proxy also utilizes this VPN to connect back to my NAS (only the port for immich is allowed).
Currently, I think every theoretically valid link gets sent to the api to check if it exists.
That way, it is theoretically possible to spam the immich host device with requests through the proxy by just using a random string.
I personally would prefer that the proxy contacts the immich host only if absolutely necessary... aka I would prefer it if the proxy knows in advance which shared links are currently active, matches the request against that list of links and only calls the immich instance when there is a match.
I think that this could be implemented by using a simple txt file in the docker compose directory that gets binded to the container in the same way as the custom config does. The txt file then would contain the random link token, one on each line.
Of course, this requires the additional step to update this list if you share something new or remove something, but you can also automate this in various ways (for example with bash scripts that are called via an Apple Shortcut or something).
But as this additional security layer requires an additional step when sharing a new link through Immich, I would make it optional and disabled by default. So you could set up a flag for "lockdown_mode" (or however you wanna call it) in the config that needs to be set to true (and also obviously the binding of the list has to exist).
What are your thoughts on this? I think it would be easily implemented and a good improvement if you really care about exposing only the absolutely necessary stuff.
Beta Was this translation helpful? Give feedback.
All reactions