YunoHost-Apps / wireguard_ynh

WireGuard VPN software with a web UI configuration companion, packaged for YunoHost.
GNU General Public License v3.0
35 stars 10 forks source link

IPv6 lost after installation #109

Closed genma closed 3 months ago

genma commented 3 months ago

When I install the Wireguard Server application my server loses its IPv6 connection. The ip is still associated but Yunohost itself tells me that I have no more IPv6. It comes back if I uninstall. I'm looking for it and can't figure out why....

Yunohost diagnostic : image

tituspijean commented 3 months ago

When the app is installed, what's the output of the command ip -6 route ? You may hide your public IP and replace it with PUBLIC_IPV6.

Does curl ip6.yunohost.org work?

genma commented 3 months ago

It's on a VPS, provided by Heztner. At home (other server, selfhosted, same versions Yunohost/debian), IPv6 still here.

On the VPS, Before Wireguard installation via yunohost package : ` root@genma:/etc/network/interfaces.d# ip route default via 172.31.1.1 dev eth0 10.8.0.0/24 dev tun0 proto kernel scope link src 10.8.0.1 172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1 linkdown 172.31.1.1 dev eth0 scope link

curl ip6.yunohost.org 2a01:4f8:c17:3678::1r `

AFTER Package installation (and Ipv6 view as lost inside Yunohost diagnostic) ` root@genma:/etc/network/interfaces.d# ip route default via 172.31.1.1 dev eth0 10.8.0.0/24 dev tun0 proto kernel scope link src 10.8.0.1 10.10.10.0/24 dev wg0 proto kernel scope link src 10.10.10.0 172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1 linkdown 172.31.1.1 dev eth0 scope link

curl ip6.yunohost.org ^C Time out `

tituspijean commented 3 months ago

That's even more complete than I requested, and will be very helpful though... Please redo those steps with the -6 flag on the ip command. 😉

genma commented 3 months ago

BEFORE

ip -6 route
::1 dev lo proto kernel metric 256 pref medium
2a01:4f8:c17:3678::/64 dev eth0 proto kernel metric 256 pref medium
fe80::/64 dev eth0 proto kernel metric 256 pref medium
default via fe80::1 dev eth0 metric 1024 onlink pref medium

AFTER

ip -6 route
::1 dev lo proto kernel metric 256 pref medium
2a01:4f8:c17:3678::/64 dev eth0 proto kernel metric 256 pref medium
fd42::/112 dev wg0 proto kernel metric 256 pref medium
fe80::/64 dev eth0 proto kernel metric 256 pref medium
default via fe80::1 dev eth0 metric 1024 onlink pref medium
fd42::/112 dev wg0 proto kernel metric 256 pref medium 

is added

genma commented 3 months ago

Interessting : same issue with a direct wireguard installation with this script https://github.com/angristan/wireguard-install who automatized the wireguard installation & configuration (curl ipv6 not working, Yunohost lost IPv6 connexion...). And removing wireguard via the script (option is provided) makes all works again... => Wireguard installation distribu IPv6 routing/connexion on this server... Problem is on my VPS. I'll continue to search later and give interessing informations here.

tituspijean commented 3 months ago

What's your kernel version? Have you tried rebooting the server?

genma commented 3 months ago

Solve following https://stanislas.blog/2019/08/fix-ipv6-hetzner-cloud/ It was a "bug" from via VPS Provider, Hetzner (using permanent fix guideline).