home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
71.73k stars 29.98k forks source link

Local network restriction does not support IPv6 global unicast addresses #97456

Open nomis opened 1 year ago

nomis commented 1 year ago

The problem

The "can only log in from the local network" restriction on users doesn't work when the network uses IPv6 global unicast addresses (2000::/3) because only unique local addresses (fd00::/8) are considered to be local.

The local IPv6 network needs to be auto-detected and/or the IP addresses that are considered to be in "the local network" needs to be configurable.

What version of Home Assistant Core has the issue?

2023.7.3

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Core

Integration causing the issue

No response

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

issue-triage-workflows[bot] commented 11 months ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

nomis commented 11 months ago

This still hasn't been fixed:

def is_local(address: IPv4Address | IPv6Address) -> bool:
    """Check if an address is on a local network."""
    return is_loopback(address) or is_private(address) or is_link_local(address)
issue-triage-workflows[bot] commented 8 months ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

nomis commented 8 months ago

This still hasn't been fixed:

def is_local(address: IPv4Address | IPv6Address) -> bool:
    """Check if an address is on a local network."""
    return is_loopback(address) or is_private(address) or is_link_local(address)
issue-triage-workflows[bot] commented 5 months ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

nomis commented 5 months ago

This still hasn't been fixed:

def is_local(address: IPv4Address | IPv6Address) -> bool:
    """Check if an address is on a local network."""
    return is_loopback(address) or is_private(address) or is_link_local(address)
issue-triage-workflows[bot] commented 2 months ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

nomis commented 2 months ago

This still hasn't been fixed:

def is_local(address: IPv4Address | IPv6Address) -> bool:
    """Check if an address is on a local network."""
    return is_loopback(address) or is_private(address) or is_link_local(address)