Hey guys,

Currently im just running calibre and nextcloud docker containers over the web, with a ddns from noip and a cloudflare domain. But i also want to setup a vaultwarden container too, so now i need to really consider the security of my server. What are the main things to watch out for? Calibre and nextcloud are just using subdomains, is it okay to have a subdomain to connect to vaultwarden? Am i better off just trusting bitwarden and sticking with them?

Thanks!

  • zikk_transport2@lemmy.world
    link
    fedilink
    English
    arrow-up
    21
    ·
    1 year ago

    IMO if you are asking such question - stick to Bitwarden cloud.

    Passwords, at least to me, is something I don’t want to lose. I don’t trust myself I could provide a proper uptime & security, so I just use cloud version.

    • MajinBlayze@lemmy.world
      link
      fedilink
      English
      arrow-up
      4
      ·
      edit-2
      1 year ago

      I recently switched to cloud from vaultwarden. I was comfortable enough with the security, but when I started to actually plan disaster recovery, it was something I literally could not afford to get wrong.

      So bitwarden is the one service I don’t, and have no plans to, self host.

        • MajinBlayze@lemmy.world
          link
          fedilink
          English
          arrow-up
          1
          ·
          1 year ago

          That’s great. For me, at least, getting a server restored from backup on something like aws without access to passwords was going to require more preparation than I was willing to deal with.

          Definitely worth exploring if you’re prepared to handle that though.

    • 🅱🅴🅿🅿🅸@sh.itjust.worksOP
      link
      fedilink
      English
      arrow-up
      3
      ·
      1 year ago

      Yeah that was something i was worried about too, not like my server is an proper rig. Its just a shitty laptop with a slow ass HDD, and who knows how much life its got

  • gaylord_fartmaster@lemmy.world
    link
    fedilink
    English
    arrow-up
    18
    ·
    1 year ago

    Is there a reason you can’t just VPN in and expose only the VPN gateway? My preferred security is not exposing a bunch of random applications to the internet and hoping each doesn’t ever have any vulnerabilities.

    • 🅱🅴🅿🅿🅸@sh.itjust.worksOP
      link
      fedilink
      English
      arrow-up
      1
      arrow-down
      1
      ·
      1 year ago

      Yeah i could definitely do that, however would that cause much trouble regarding using the nextcloud android app, or my ereader which uses OPDS to get books from calibre? I get thatd id have to sign into the VPN, but i already use mullvad on everything.

      Sorry, just dont know much about personal VPNs

      • gaylord_fartmaster@lemmy.world
        link
        fedilink
        English
        arrow-up
        2
        ·
        1 year ago

        As long as you’re connected to the VPN it probably shouldn’t. I use the automate app on my phone to automatically connect to my home wireguard server whenever I’m off my wi-fi, and it works great.

        You’re going to run into an issue of only being able to have one VPN connected on Android at a time though if you’re already running mullvad on it, but as long as you have a decent connection at home and no data cap, you could just route all of your traffic through your home network, and then split tunnel your private IPs to connect directly, and anything else through mullvad.

  • balance_sheet@lemmy.world
    link
    fedilink
    English
    arrow-up
    12
    ·
    1 year ago

    is it okay to have a subdomain to connect to vaultwarden?

    A lot of the people would disagree but I think so, yes. Provided that you have set up all the security measures such as firewall/fail2ban, you’ll be fine.

    Am i better off just trusting bitwarden and sticking with them?

    I think of it as a matter of personal preferences. But honestly, if you had to ask this without your own basic plans for security, I’d advice you to stick with Bitwarden. You’ll just sleep better, that’s all.

      • balance_sheet@lemmy.world
        link
        fedilink
        English
        arrow-up
        3
        ·
        1 year ago

        Sorry, but I sincerely hope you just don’t selfhost Vaultwarden.

        Its just a shitty laptop with a slow ass HDD, and who knows how much life its got

        I think your main problem is going to be a reliability than security when this is the case. What is your plan for backup? You will be locked out, possibly permanently if you lose Vaultwarden data. Judging by your comments, you really, really don’t want to selfhost password manager of any sort.

        • 🅱🅴🅿🅿🅸@sh.itjust.worksOP
          link
          fedilink
          English
          arrow-up
          1
          ·
          1 year ago

          Sorry, but I sincerely hope you just don’t selfhost Vaultwarden.

          Are you saying this because i dont know much about firewalls and VPNs right now? Or because i dont have a good backup solution? Or something else?

          Currently my backup solution might not be the nicest, but im taking regular backups on the same laptop, copying those onto an external HD, and syncing that onto my main PC, hopefully whoch should be enough

          • balance_sheet@lemmy.world
            link
            fedilink
            English
            arrow-up
            2
            ·
            1 year ago

            Are you saying this because i dont know much about firewalls and VPNs right now? Or because i dont have a good backup solution? Or something else?

            Yes.

            Backup sounds to be enough but I still advice you not to. You can familiarize yourself with security in general before you do something as critical as a password manager.

  • mspencer712@lemmy.fmhy.ml
    link
    fedilink
    English
    arrow-up
    7
    ·
    1 year ago

    Security is a tough thing to give advice about. Different people have different levels of risk tolerance. It’s embarrassing to give advice about one’s personal views - tedious to write - and then get replies about how that’s too much security, too little security, etc.

    Attackers can use tricks to enumerate dns subdomains. They can compromise one container and pivot to the container host.

    You can frustrate automated compromises by putting up roadblocks or speed bumps they have to get through before seeing the stock landing or login pages for well known apps. That can buy you a little time if a serious exploit is discovered and you know you won’t be on top of container updates. But stay on your container updates.

      • mspencer712@lemmy.fmhy.ml
        link
        fedilink
        English
        arrow-up
        2
        ·
        edit-2
        1 year ago

        I’m a bad one to get how-to advice from if you’re starting out. Not a fan of docker and I don’t know what watchtower is. I’m one of those electricity-wasting home labbers who loves ESXi, vlans, and /30 nets for each individual VM.

        I’m also one of those who takes months to accomplish what someone competent can do in days. It’s taking me forever to get openldap, postfix, dovecot, and roundcube to all play nice. (Because I’m trying to “be like daddy” and mimic the security I see at work, I can’t follow normal walkthroughs, or just install an off the shelf container and make it someone else’s problem. But this way makes me read manuals and gain a deep, durable understanding of the technology. And it takes forever.)

  • sftp@lemmy.world
    link
    fedilink
    English
    arrow-up
    7
    ·
    1 year ago

    I just use wildcard domain that points to my local IP of my homelab. For example, *.myhomelab.com points to 192.168.1.111 (the local IP of my machine). Then, reverse proxy routes my traffic. Here are some great vids about it: by Wolfgang, by Christian Lempa, and by TechnoTim

    To access my home network from outside, I use WireGuard VPN. So, I have the only one open port to the global web. I also use a random port, to dodge some bots. I use DDNS to access my VPN server, since I have a dynamic IP.

    I know some people use Tailscale (it uses WireGuard under the hood) so check it out too.

    Personally, I use wgeasy container to work with WireGuard, but it’s so easy to be manually configured.

    I’m not an expert in security or system administrating. I’m just a regular software developer, and homelabbing is my hobby. However, I have common sense of the security basics. I consider every open port as a potential vulnerability that could be exploited by hackers. So less open ports -> less security risks. Also, using VPN to access my home network adds additional layer of security. Adding 2FA for each service is also a great idea.

  • gobbling871@lemmy.world
    link
    fedilink
    English
    arrow-up
    1
    arrow-down
    2
    ·
    1 year ago

    I always see guys swearing by Wireguard for VPN access as a security measure and seems to me like if someone unauthorized gets your public key, they have access to the kingdom.

    • Scholars_Mate@lemmy.world
      link
      fedilink
      English
      arrow-up
      2
      ·
      1 year ago

      It’s your private key, but yes, you would need to keep it secret just like you would an SSH key.

      The benefits of a VPN are that you don’t need to open ports up to the internet and rely on your individual services to be secure. Your VPN would authenticate users and ensure that the communication over the tunnel is encrypted (useful if you don’t want to set up SSL/https). They can also hide what services you are hosting or even hide the fact that you are even running a VPN.

      Private keys are going to be far more secure than passwords since you really can’t brute force them in the same way you can passwords. Getting ahold of someone’s private key is probably going to be far more difficult than guessing their password. Even if an attacker were to get ahold of your private key, they would still need to contend with the security of your service, e.g. logging into it, which would be no worse than not having a VPN.

      • gobbling871@lemmy.world
        link
        fedilink
        English
        arrow-up
        1
        ·
        1 year ago

        You don’t get any network isolation with this approach vs a service running in its own dedicated virtual network. Just for this reason, I think Wireguard as a VPN access to other local services is insecure.

        • hungover_pilot@lemmy.world
          link
          fedilink
          English
          arrow-up
          2
          ·
          1 year ago

          Just because your using a VPN doesn’t mean you can’t isolate hosts to a separate network. I keep my services in a different VLAN and I can route/firewall traffic between that network and anywhere else as I please.