3

Hey all!

I'm fairly new to Home Assistant and have just created a few dashboards to be able to view my router statistics and be able to restart them via REST if need be. Love being able to do this seamlessly from one place.

It got me thinking however, that I can only really access the dashboard when I'm on my internal network. I know that there is a paid Home Assistant cloud that would enable me to view my dashboards and such publicly and securely, but I was wondering if this community has set it up themselves for free and securely.

Would anyone be able to guide me in the right direction?

you are viewing a single comment's thread
view the rest of the comments
[-] redcalcium@c.calciumlabs.com 4 points 1 year ago

You can use Tailscale and Zerotier to access your local HomeAssistant from any devices connected with your Tailscale/Zerotier account.

But if you want to expose your HomeAssistant to public using a custom domain name, one way to do that is by using Cloudflare Tunnel: https://www.makeuseof.com/use-cloudflare-tunnel-expose-local-servers-internet/

[-] sikhness@lemmy.ca 1 points 1 year ago

Would using Tailscale be similar to a VPN where I'd have to establish a VPN connection and have all my traffic directed to Tailscale?

[-] redcalcium@c.calciumlabs.com 1 points 1 year ago

Tailscale is a virtual lan network. When you enable tailscale, you'll have an additional network and ip address in your connected devices. It's not actually redirecting all your traffics there, unless you specifically configure it to do so (if you do so, you can designated a device as an "exit node" for your outbound traffic).

[-] MystikIncarnate@lemmy.ca 0 points 1 year ago

I'm thinking to expose HA via a cloudflare tunnel; but I'm concerned as to what security implications this may have. I'm not sure what, if any, security issues the HA login page may have. I can easily put everything through a reverse proxy, which I already have set up for other reasons. I may migrate all my externally exposed webpages via cloudflare.

Have any lemmings used cloudflare for this? what is your experience with it?

[-] redcalcium@c.calciumlabs.com 2 points 1 year ago* (last edited 1 year ago)

Security is a rabbit hole and you can go very deep depending on your risk model (an ordinary middle class people has different cybersecurity risk than, say, a CEO of a major bank). Let's say you are an ordinary lemming that don't have to be worry about being specifically targeted by a hacker group or a nation state, you just don't want some botnets get into your network and take over your IoT stuff, I think the following is reasonable enough:

  • by deploying your HA instance using docker or VM, if it somehow got compromized by an automated botnets / malware, the infection will be contained and you can easily wipe it off and start again. Real hackers might be able to escape the sandbox but run of the mills botnets that always scan the internet for exploits usually don't.
  • setup OTP: https://www.home-assistant.io/docs/authentication/multi-factor-auth/
  • you can max out security level of HA login page (or the entire HA) using cloudflare's firewall rule: https://developers.cloudflare.com/firewall/cf-dashboard/create-edit-delete-rules/ . This should stop most bots from trying to bruteforce your login page.
  • assuming you're using cloudflare tunnel, you aren't actually exposing your entire machine to the internet, but just the homeassistant port. That being said, it'll be nice if you take some precaution and disable root ssh login and perhaps disallow password login too, just for peace of mind.
[-] MystikIncarnate@lemmy.ca 1 points 1 year ago

My HomeAssistant is on a dedicated system right now, so if it's lost, I can reinstall without too much trouble. I have it backed up to my google drive, and I'm planning on setting up some local backups.... so the config will almost certainly not be lost. I have to make it a bit more robust to make sure we have backups of the zwave controller config and security keys and everything for the S2 devices, and whatnot...

I'm wondering if HA supports login via device certificate, it may be more secure than a password, even with OTP, and after a rough initial setup for the users, it should be seamless for them to use it, regardless of if they're local or remote. I also want to get it set up to integrate with Google's assistant, mainly for nest home mini's we have placed around the house. I'm not a fan of paying for that privilege, so I'm still examining my options.

Any input you may have on this from a security standpoint would be appreciated. For context, I'm an IT admin by day (system and network mainly), I have some experience with security, but when it comes to pretty much anything that requires metasploit or anything more complicated, I'm generally out of my league. Working with systems, firewalls, tunnels, forwarding, ports, protocols, etc. that's all my jam. I'm good with doing what's needed. I have a homelab and a farm of virtual machines to do my bidding day-to-day. So I'm not stranger to complexity; as long as it's logical to add complexity to the system, then I won't shy away from whatever needs to be done to accomplish the task.

[-] redcalcium@c.calciumlabs.com 1 points 1 year ago* (last edited 1 year ago)

If you want some peace of mind, there is nothing wrong to keep your home assistant instance locked up behind your lan. You can still access it externally using a VPN, or zerotier/tailscale. If you need notification support, just configure sms or email notification so HomeAssistant can still send you alert via SMS or email.

If you're ok with not being able to use HomeAssistant mobile app, then you can add some extra security by putting your home assistant instance behind an authenticating proxy. This means your home assistant will be protected by two login pages when you attempt to access it from outside your network.

Some authenticating proxy options are Cloudflare Access or OAuth2 Proxy.

If you're already using Cloudflare, then using Cloudflare Access might be no brainer. If you're already have experience with setting up your own OIDC providers using keycloak, auth0, okta, or Google oauth2 provider, then putting your home assistant instance behind OAuth2 Proxy might be a good option. Those auth providers usually have stricter login pages and you usually can add even stricter rules to the login page (e.g. disallow login from certain countries, rate limit, add captcha in addition to 2fa, etc). How strict your extra login security will be is entirely up to you.

For Google assistant integration, you'll need to enable the API in your GCP account as mentioned in this page. But it does require your home assistant url to be publicly routable from GCP servers so Google assistant can reach it, which means you can't put your instance behind an authenticating proxy or keep it behind your lan. You might still be able to whitelist certain path from the authenticating proxy (e.g. the /api/google_assistant endpoint), but I haven't tried it yet.

[-] tehcpengsiudai@kbin.social 1 points 1 year ago

Currently using CloudFlare for two different homes. One is on cloudflared add-on, with Nginx Proxy Manager as the reverse proxy.

The other, CloudFlare tunnel hosted on a docker container in the same network, with Nginx Proxy Manager as well to unify ports for some services.

Both setups been working well so far, ignoring the concerns that the HA frontend may have potential security issues.

this post was submitted on 04 Jul 2023
3 points (100.0% liked)

homeassistant

11921 readers
36 users here now

Home Assistant is open source home automation that puts local control and privacy first. Powered by a worldwide community of tinkerers and DIY enthusiasts. Perfect to run on a Raspberry Pi or a local server. Available for free at home-assistant.io

founded 1 year ago
MODERATORS