Selfhosted
A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.
Rules:
-
Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.
-
No spam posting.
-
Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.
-
Don't duplicate the full text of your blog or github here. Just post the link for folks to click.
-
Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).
-
No trolling.
Resources:
- awesome-selfhosted software
- awesome-sysadmin resources
- Self-Hosted Podcast from Jupiter Broadcasting
Any issues on the community? Report it using the report flag.
Questions? DM the mods!
view the rest of the comments
Yeah its only possible to login with a key.
What limits would you set on the firewall?
From the bit I've read people usually say changing the ssh port is mostly "security theatre" is this not fully true?
For the limit : basically you need to ask yourself how many connection someone if able to do in a second to your server. As an example, my limit is always 15. A bit high but I'm sure I'm not blocking a legitimate one (either from myself or someone else)
For the ssh port : it's true, but trust me you'll be happy to change for something random like 5927 because you'll have far less bit trying to connect or probe your ip, thus your logs won't be cluttered!
It would be security theatre if it was done for security. I'm not doing it for security, though - it's for my sanity when checking the logs. Unrestricted SSH simply attracts too many bots and the failed logins make it impossible to quickly grasp a picture of what's happening.
In regards to limits - this is my rule file for iptables on my lemmy instance:
This is very much a WIP, I'm going to implement some ddos protection as soon as I get some spare time.
Could you explain a bit of what these are doing and why you decided on these rules?
Also, isn't bruteforcing an SSH key near to impossible?
There are 2 extra chains - to log a connection and accept it, and to log a connection and drop it. I've only used log and accept for testing.
The default action on input chain is also changed to drop.
SSH port gets connection attempts counted - 20 connections within 10 minutes from the same IP and it goes to log and drop. I could just drop it, but for now I feel immense satisfaction knowing that some bot is waiting for timeout instead of attempting the next username/pass.
I've tried a similar thing with https because lemmy.world was dosing me. It did work, but I've now commented it out since Lemmy software has become more robust. Lemmy.world still sucks from my, as an instance owner, perspective, but it no longer bombards me periodically.
It does not increase security per se but it does limit the amount of bots trying to connect to your server. At least it will make your log a bit less cluttered with random garbage.
Also installing something like fail2ban might be a good idea. Or even better would be to block all ssh connections except from a specific ip address (whitelist). This of course depends whether you can trust your ip to stay the same, or if you can still log in through some other interface if necessary.