SSH connection time out due to misconfigured static IPv6

Background: My ISP has locked down a setting to change IP Mode, which is now set to IPv4 & IPv6 mix mode. So I wanted to get a static IPv6 for my pi(pihole) that I could use as DNS for my network like I have been doing with the static IPv4 already configured on the pi.

Steps to reproduce

  1. Turned on Ipv6
  2. Found the newly assigned local IPv6 (fe80::xxxx:xxxx:xxxx:xxxx/64)
  3. Then, I did this:
sudo nano /etc/network/interfaces.d/ipv6
# IPv6
auto wlan0
iface wlan0 inet6 static
pre-up modprobe ipv6
address  fe80::xxxx:xxxx:xxxx:xxxx/64
  1. Reboot

Now, my Pi won’t even connect to the internet. SSH attempts say: Connection timed out.

So I tried to spin WSL on Windows to see if I could mount the root partition to make edits to the IPv6 file, but it turns out that it is an open issue on the WSL github where it can’t do that for some reason for USB drives and devices. Now,

  1. My priority is to get my Pi online. Is there a way I can still do that without having to do a fresh install?
  2. Once it gets online, how do I really set static IPv6? Is simply enabling IPv6 enough?
  3. I want to understand what I did wrong with that IPv6 config that I did earlier. I should have specified the gateway and other details too?

I would appreciate any help and comments. Thank you.

So you want a local IPv6 to be static, then don’t use the link local address:

For an private ipv6 network like an private ipv4 (for example the 10.0.0.0/8) you must use ipv6 ula fc00::/7 adresses, a router can route these adresses only in an LAN environment. Fe80::/10 adresses can only used between two physical links or in an switched network. (Like the apipa adresses 169.254.0.0/16 in ipv4).

You can connect a keyboard and a monitor and boot they pi, revert your changes and use dietpi-config to activate IPv6, but I’m not shure if you can set also a static fc00 IP with dietpi-config.

it is not needed to configure this manually. Usually the SBC will create an own Link Local Address and keep it. Not even necessary to activate ULA. At least my PiHole is doing so.

    inet6 fe80::::::5cfc/64 scope link
       valid_lft forever preferred_lft forever

You see, I have a Link Local Address, which is valid forever. This one can be used as IPv6 address for your DNS server

Ohhh yes an old issue on WLS. Use a VM like virtualbox to mount your SD card. Or simply boot your SBC from a USB pen stick and once up, connect your SD card to get access :slight_smile: Quite some options. Just take one and we could guide you.

1 Like

Thank you for your suggestions. Luckily for me, I found a recent image of the card stored locally, so I just reflashed it because it seemed like the fastest idea.

it is not needed to configure this manually. Usually the SBC will create an own Link Local Address and keep it. Not even necessary to activate ULA. At least my PiHole is doing so.

You are right, I rebooted the SBC and the router too and the Pi seems to hold onto the same IPv6 address without doing any extra shenanighans. As a matter of fact, the image I found had IPv6 turned off but enabling it again gave me the same IPv6 that it had before the reflashing, which indicates that it is probably associated with the hardware.