home-assistant-addons
home-assistant-addons copied to clipboard
Home Assistant OS 9.5 changed IP subnet again
they did it again :)
Always fun....
https://github.com/home-assistant/operating-system/pull/2246 https://github.com/home-assistant/operating-system/pull/2259
Hey! I saw this change but I don't think / didn't believe it's related to the forwarding addon. Can you confirm that your setup broke with 9.5? Mine didn't...
Strange, it broke for me, my new config looks now like that: remote_forwarding:
- 127.0.0.1:8123:172.30.232.1:8123
Hey. It broke it for me as well :-/ . The line from you @dilorenzo1987 doesn't seem to work.
Ha, 172.17.232.1
(the older one from https://github.com/home-assistant/operating-system/pull/2259/files#diff-eb737cfe0628960e2fa0312e80496db0bee4f2df3ab26b949aebd0dcced2467aL11) works! I guess I need to adjust it afterwards again.
I'm a bit confused now. Mine work fine, but I'm using a completely different url :D
56080:localhost:8123
, where 56080 is the port homeassisatnt should be exposed on my remote server.
....aaaaand after Homeassitant OS update to v10, I had to go to the 172.30.232.1
"again" 😁 ...
TODO
As I am just dealing with this issue again, I realized it would be good for general reliability, if the script had one step in which it checks (e.g. via curl
), whether the configured 172.30.232.1:8123
is reachable.
While at it, I would also separate the two "ip:port" combinations out into seperate input fields, for usability, especially in the UI config mode. The current support for a list of forwarding ports is imho not needed. If someone needs more, they can always add stuff in other_ssh_options
.
Any further thoughts? If anyone wants to contribute a PR, I would definitely appreciate that!
Btw: For me both 172.30.32.1
and 172.30.232.1
work :D
Sounds like a good idea. I started with #16 for the first part, but it's just a stub.
Hi! I tried several IPs and none of them seem to work... The ones I tried:
- 172.30.32.1:8123
- 172.30.232.1:8123
- 172.17.32.1:8123
- 172.17.232.1:8123
- 172.17.0.1:8123
None of them seem to work... Do you know how can I see the real IP and port HA is using?
Thanks in advance,
For me, this works. Normal hassos
hostname: ...my-remote-ip...
ssh_port: 22
username: root
remote_forwarding:
- 127.0.0.1:8124:172.30.232.1:8123
other_ssh_options: ""
force_keygen: false
Hey @cnieves1,
the IP subnet your envirnonment uses is printed on the Log when you start the app. Did you check there?
Thanks a lot @ThomDietrich !
Didn't know that!. I get:
1: lo inet 127.0.0.1/8 scope host lo\ valid_lft forever preferred_lft forever
1: lo inet6 ::1/128 scope host \ valid_lft forever preferred_lft forever
4: docker0 inet 172.30.232.1/23 brd 172.30.233.255 scope global docker0\ valid_lft forever preferred_lft forever
4: docker0 inet6 fe80::42:74ff:fed9:f650/64 scope link \ valid_lft forever preferred_lft forever
5: hassio inet 172.30.32.1/23 brd 172.30.33.255 scope global hassio\ valid_lft forever preferred_lft forever
5: hassio inet6 fe80::42:5bff:fee5:ceae/64 scope link \ valid_lft forever preferred_lft forever
Does that mean that 172.30.32.1 (hassio) should work?
That's one of the addresses I tried. Maybe it's something related with ports? I tried 127.0.0.1:8123:172.30.32.1:8123 (and I only changed the second IP address when trying, not the port) I don't see the ports listed anywhere... is there any way to check which port it's using?
Is there a reason why you insist on using IP addresses? I've successfully used hostnames and these remain stable. That also seems to be the recommended way of communicating with the supervisor (rather than hardcoding its IP).
To forward the SSH add-on's port to the remote (under port 51179 for example), I set localhost:51179:core-ssh:22
. I believe you could forward the UI by using home-assistant
as the hostname like in localhost:58123:home-assistant:8123
.
@Rjevski that is a very interesting point! The short answer would be that in this context I generally expect IPs to be fixed and clear. However, I agree that this might be a good way forward. Would you like to open a PR?
To all reading here: Any objections?
no objections, this sounds good to me.