this post was submitted on 14 Jun 2023
0 points (NaN% liked)

Selfhosted

40266 readers
1177 users here now

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:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. 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.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 1 year ago
MODERATORS
 

Hey all! For the longest time I've had a server that hosts some things (eg Syncthing), but is only available via SSH tunneling.

I've been thinking of self-hosting more things like Nextcloud and Vaultwarden. I can keep my SSH tunneling setup but it might make it difficult to do SSL.

How do you manage the security of having public-facing servers?

top 4 comments
sorted by: hot top controversial new old
[–] cichy1173@szmer.info 2 points 1 year ago* (last edited 1 year ago) (1 children)

You should be concerned, because there is always a risk, but there is also a risk when you are just using internet even without selfhosting. It is good to remember some rules:

  1. Keep apps up to date
  2. Open only that ports, that you need (80, 443, maybe 22 for ssh)
  3. If you open ssh port, use keys authentication and cut possibility logging with password
  4. Do not expose apps, that you are not need in this form, for example Yunohost allows to hide apps behind Yunohost SSO logging page
  5. Using cloudflare or/and Fail2Ban is cool
  6. Maybe I am a little bit paranoic, but I do not expose apps, that can be used anonymously by everyone, for example link shorters or pastebin alternatives.

It is not all of course.

[–] Longpork_afficianado@lemmy.nz 1 points 1 year ago

I would add to this, disable icmp response on any internet facing server that does not aboluetly require it, it make it whitelisted to your know IPs when it is. If your server does not appear online then you will only really be vulernable to targeted attacks where your ip is already known.

[–] Midou@kbin.projectsegfau.lt 1 points 1 year ago

Isolate your programs, keep the critical stuff away from the public using tailscale or a VPN, hell, even an SSH tunnel could work in your case, make sure to keep different password for each software for your database. If possible virtualize each software to keep them from communicating to other softwares. This is how i manage my infrastructure (or should be, i haven't gotten yet to use tailscale for admin only websites).

[–] returnofblank@lemmy.world 1 points 1 year ago

Password protect your services, set up your web server correctly, use cloudflare for some extra security against stuff like DDoS/DoS attacks. Also less is more, do not expose what you don't need to expose.

There is always inherent risk with opening up your stuff to the world wide web.

Some stuff you can't even secure yourself; some services just have bad security practices. The only way to fix them would be to wait for an update or submit a pull request.

load more comments
view more: next ›