Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IPv6 not working with Hetzner #295

Closed
angristan opened this issue Sep 18, 2018 · 4 comments
Closed

IPv6 not working with Hetzner #295

angristan opened this issue Sep 18, 2018 · 4 comments

Comments

@angristan
Copy link
Owner

No description provided.

@angristan angristan added the bug label Sep 18, 2018
@angristan
Copy link
Owner Author

angristan commented Sep 18, 2018

OK, this is not related to the script.

I already noticed the issue while playing with bridges and LXD and reported it to Hetzner but they don't care.

Let's take an example:

root@debian-2gb-nbg1-1 ~ # ip a
...
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 96:00:00:10:8d:b4 brd ff:ff:ff:ff:ff:ff
    inet 159.69.198.162/32 brd 159.69.198.162 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 2a01:4f8:1c1c:7b7a::1/64 scope global deprecated
       valid_lft forever preferred_lft 0sec
    inet6 fe80::9400:ff:fe10:8db4/64 scope link
       valid_lft forever preferred_lft forever

You can see that our public IPv6 has valid_lft forever preferred_lft 0sec. I don't exactly know what triggers this, but when you do something related to IPv6, the kernel may drop the IPv6 since it has a TTL of 0 sec.

To fix this, in our case:

ip -6 addr change 2a01:4f8:1c1c:7b7a::1/64 dev eth0 preferred_lft forever

To permanently fix it:

root@debian-2gb-nbg1-1 ~ # cat /etc/network/interfaces.d/50-cloud-init.cfg
# This file is generated from information provided by
# the datasource.  Changes to it will not persist across an instance.
# To disable cloud-init's network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp
    dns-nameservers 213.133.99.99 213.133.98.98 213.133.100.100

auto eth0:0
iface eth0:0 inet6 static
    address 2a01:4f8:1c1c:7b7a::1/64
    gateway fe80::1
    post-up route add -A inet6 default gw fe80::1%eth0 || true
    pre-down route del -A inet6 default gw fe80::1%eth0 || true
    post-up ip -6 addr change 2a01:4f8:1c1c:7b7a::1/64 dev eth0 preferred_lft forever

@angristan
Copy link
Owner Author

angristan commented Sep 18, 2018

To do:

  • Find what exactly breaks IPv6 here: another inet6 interface
  • Add this to the FAQ: 1cd80a5
  • Make a blog post about it

@nilava
Copy link

nilava commented Apr 26, 2019

Thank you! Thanks a lot! I was going crazy trying to figure why ipv6 wasn't working with OpenVPN, you are a lifesaver!

@angristan
Copy link
Owner Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants