Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Home Assistant OS 9.5 changed IP subnet again #14

Open
dilorenzo1987 opened this issue Jan 30, 2023 · 15 comments
Open

Home Assistant OS 9.5 changed IP subnet again #14

dilorenzo1987 opened this issue Jan 30, 2023 · 15 comments

Comments

@dilorenzo1987
Copy link

they did it again :)

Always fun....

home-assistant/operating-system#2246
home-assistant/operating-system#2259

@ThomDietrich
Copy link
Owner

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...

@dilorenzo1987
Copy link
Author

Strange, it broke for me, my new config looks now like that:
remote_forwarding:

  • 127.0.0.1:8123:172.30.232.1:8123

@hnykda
Copy link
Contributor

hnykda commented Jan 31, 2023

Hey. It broke it for me as well :-/ . The line from you @dilorenzo1987 doesn't seem to work.

@hnykda
Copy link
Contributor

hnykda commented Jan 31, 2023

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.

@supermar1010
Copy link

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.

@hnykda
Copy link
Contributor

hnykda commented Apr 20, 2023

....aaaaand after Homeassitant OS update to v10, I had to go to the 172.30.232.1 "again" 😁 ...

@ThomDietrich
Copy link
Owner

ThomDietrich commented May 25, 2023

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

@hnykda
Copy link
Contributor

hnykda commented May 25, 2023

Sounds like a good idea. I started with #16 for the first part, but it's just a stub.

@cnieves1
Copy link

cnieves1 commented Nov 3, 2023

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,

@hnykda
Copy link
Contributor

hnykda commented Nov 3, 2023

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

@ThomDietrich
Copy link
Owner

Hey @cnieves1,
the IP subnet your envirnonment uses is printed on the Log when you start the app. Did you check there?
image

@cnieves1
Copy link

cnieves1 commented Nov 3, 2023

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?

@Rjevski
Copy link

Rjevski commented May 12, 2024

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.

@ThomDietrich
Copy link
Owner

@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?

@hnykda
Copy link
Contributor

hnykda commented May 15, 2024

no objections, this sounds good to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants