nix-community / nixos-install-scripts

collection of one-shot scripts to install NixOS on various server hosters and other hardware. [maintainer=@happysalada]
123 stars 68 forks source link

Hetzner Cloud ipv6 #3

Open zeratax opened 3 years ago

zeratax commented 3 years ago

after running the install script I am unable to receive any traffic over ipv6. Is it possible to edit the install script to have the network interfaces correctly configured or how would I configure them now to get them working?

nh2 commented 3 years ago

IPv6 does seem to work for me.

Can you ping -6 the IPv6 from outside? (You can also ping -6 nh2.me for a test to see if it works at all -- this is such a Hetzner server.)

zeratax commented 3 years ago

huh no I can't reach it from the outside and even from the vps I just get

ping: connect: Network is unreachable

The only thing related to networking in the generated configuration afaict is this:

{
  networking.useDHCP = false;
  networking.interfaces.ens10.useDHCP = true;
  networking.interfaces.ens3.useDHCP = true;
}

and I set networking.allowPing = true;

nh2 commented 3 years ago

Ah sorry, I confused myself.

You are right that the installer script by default just generates what the NixOS installer puts in, which is the enabling of DHCP. Indeed, we should check what needs to be done so that IPv6 also works out of the box there -- I don't know the immediate answer to this, so this issue is justified.

On my Hetzner Cloud servers, after setting them up with the script, I currently configure explicit IPs (because I also use the Floating IPs feature from Hetzner).

You can find an example here: https://gist.github.com/nh2/6814728dc3bea1508323e9bf2213c28d

In particular, these lines:

Give that a shot to see if it gives you IPv6 connectivity.

It would be great for somebody to contribute a config change that makes IPv6 work out of the box.

I'd also like to know whether it's possible to configure a server such that it gets its non-floaing IPs via DHCP, and additionally to configure the floating IPs manually.