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
:
ping to IPv6 API:
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*
sudo systemctl restart dhcpcd
to solve strange networking problems.