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?

  • cichy1173@szmer.info
    link
    fedilink
    English
    arrow-up
    3
    ·
    edit-2
    1 year ago

    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
      link
      fedilink
      English
      arrow-up
      1
      ·
      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.