this post was submitted on 27 Oct 2023
4 points (83.3% liked)

homeassistant

11833 readers
13 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
 

Howdy. I have HAOS running in a Virtualbox VM on a computer on my private subnet (let's call it the .150 subnet). All my IoT devices are on my .151 subnet. HA can see most of my IoT devices because I'm not currently isolating the subnets, but my vacuum is defying discovery because of UDP crossing the subnets. I'm sure there's a way to configure the router to allow cross-subnet discovery, but it would just be better all around if HAOS was on the IoT subnet.

Is it possible to make HAOS think it's on the .151 subnet, even though the host computer for the VM running HAOS is on the .150 subnet?

I've read briefly about Virtualbox's networking features, but I not only know nothing about them, I don't even know generally whether a VM can be configured to be on a different subnet than it's host. I would think not, because when I do isolate the subnets, nothing that's physically on the .151 subnet would be able to see the host computer on the .150 subnet to get to the VM that thinks it's on the .151 subnet. But I'm guessing.

Also, HA has some network configs:

I changed these from .150 to .151 but simply lost connectivity to HA (thankfully, it's super easy to restore from a VM snapshot!).

I'd appreciate any help.

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 1 points 10 months ago (1 children)

This is interesting. Do you mean that I should configure the private subnet itself to also contain addresses in the iot subnet? What would that mean for "isolating" the subnets? Would it be possible for iot devices to not see private devices?

Also, can you please explain what virtualbox's host network is? What does it do?

Thanks!

[–] [email protected] 2 points 10 months ago

Yes, configure it to be one large subnet so that they can all talk to each other

That does wreck your isolation

Host networking would allow the VM to act as if it was another machine on your network and not a machine inside a host. Your physical network card would end up with 2IP addresses

If you want isolation, I would actually go more complex than this and I would give Home Assistant two separate virtual network cards, one which is on the IOT network and one that is not.  you will have to set up priority for them so that it understands which one it should use to go out to the Internet. I’m not actually sure how well Home Assistant handles two network cards, i’d have to look up the info, but it should be able to

If it can’t, you will have to put a reverse proxy in front of it with some fancy rules