0

I have this strange bug on my Raspberry PI that my public IPv6 is not working (sometimes!). When I restart my Pi the IPv6 gets assigned and I can reach my Pi from the internet. However and some point it does not work anymore. If I look at ifconfig I still can see that my interface has the IPv6 assigned. However when I'm executing a curl request to an online service to get back my IPv6 I only get the IPv4 back. After a restart the same curl request will give me my IPv6.

I don't know what might cause this behavior so I have a hard time to investigating it. Any idea or help to find the issue is highly appreciated!

ifconfig:

enter image description here

ping to IPv6 API:

enter image description here

The command @dougie gave me fixed the issue but it would be good to know were it is coming from to prevent it in the future.

pi@home-server:~ $ curl 'https://api64.ipify.org?format=json'
{"ip":"46.87.255.134"}pi@home-server:~ $ sudo systemctl restart dhcpcd
Warning: The unit file, source configuration file or drop-ins of dhcpcd.service changed on disk. Run 'systemctl daemo                      n-reload' to reload units.
pi@home-server:~ $ systemctl daemon-reload
==== AUTHENTICATING FOR org.freedesktop.systemd1.reload-daemon ===
Authentication is required to reload the systemd state.
Authenticating as: ,,, (pi)
Password:
==== AUTHENTICATION COMPLETE ===
pi@home-server:~ $ curl 'https://api64.ipify.org?format=json'
{"ip":"2003:de:ef2b:5642:10ed:f093:609b:5c20"}pi@home-server:~ $

Edit:

I found a workaround by FP2K-Minske that solved the issue for me:

sudo nano /etc/dhcpcd.conf
denyinterfaces veth*
5
  • 2
    Please post cut'n'paste text not fuzzy screen captures. Have you tried sudo systemctl restart dhcpcd to solve strange networking problems.
    – Dougie
    Jan 15 at 20:59
  • Thanks @Dougie that command helped!
    – jwillmer
    Jan 16 at 9:14
  • @jwillmer This command is also executed on boot up. How long does it "fix" your problem?
    – Ingo
    Jan 16 at 16:29
  • @Dougie I can't detect a regular pattern of this issue. Sometimes it takes a day to reoccur, sometimes a week. Maybe some docker container is generating this issue. Because my server only hosts docker containers, everything else is default installation. But I don't understand how this can happen so I don't know which container could cause this.
    – jwillmer
    Jan 16 at 23:32
  • Sorry I can't help. I don't run docker.
    – Dougie
    Jan 17 at 0:30
0

This actually has more to do with your router and ISP than it does the RPi. If you wish to prefer the IPv6, you can force it in a network configuration like this.

Be aware, though, that this may or may not be reliable, as not every service out there is accessible via IPv6. My ISP even had for a very long time a flaky IPv6 routing infrastructure (mostly better now for me, but not everywhere I imagine).

1
  • I don't think it has to do with ISP or router. My old server with Ubuntu on it was running the same network configuration before I replaced it with the Pi and I never had problems with my IPv6. I need to use IPv6 since my server can only be reached via IPv6 from outside - my ISP shares the IPv4 with many clients.
    – jwillmer
    Jan 15 at 23:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.