Hetzner - hpaluch/hpaluch.github.io GitHub Wiki

Hetzner hosting notes

Hetzner is popular Web, VPS (Virtual VM) and Dedicated server hosting.

VPS Issues

IPv6 configuration lost

I repeatedly found that my VPS server was unreachable over IPv6 because it no longer get assigned Public IPv6 with Network Manager (only Link-Local address starting with fe80).

And even address visible on Web console (trailing zeroes ::0) does not work.

As solution I made following changes to /etc/NetworkManager/system-connections/cloud-init-eth0.nmconnection (your device name may differ!)

WARNING! Make VM backup first in Web Console (!) - so you can rollback to working network version

  • original IPv6 snippet:

    [ipv6]
    method=auto
    may-fail=true
    
  • changed to:

    [ipv6]
    method=manual
    may-fail=false
    address1=2a01:4f8:1c1e:XXXX::1/64
    gateway=fe80::1
    dns=2a01:4ff:ff00::add:1;2a01:4ff:ff00::add:2;
    
  • NOTE: Remember to replace first 64-bit part 2a01:4f8:1c1e:XXXX (contains exactly 3 colons) with IPv6 of your VPS server! (visible in Web Console)

  • then restart systemctl restart NetworkManager

  • now you can use address on address1 line to reach your VPS over IPv6, for example:

    # replace XXXX with your 2 bytes of VPS IPv6 address:
    curl -v 'https://[2a01:4f8:1c1e:XXXX::1]'
    

Note: backup this new NetworkManager configuration to same safe place - it can be sometimes overwritten (because cloud-init may reinitialize it).

Later found official documentation here: https://docs.hetzner.com/cloud/servers/primary-ips/primary-ip-configuration/#fedorarhel9-based-distributions-alma-centos-rocky that basically states same, but is missing explanation that default (auto-assigned IPv6) will not work properly...

Finding your Public IP address

I always use VPS Firewall in Hetzner Web Console to limit SSH access to my home PC only.

To find out my IPv4 address I use:

curl checkip.amazonaws.com # always IPv4 only
curl -4 checkip.global.api.aws # alterntive

To check for my IPv6 IP address I use:

curl -6 checkip.global.api.aws

Source: https://docs.aws.amazon.com/cli/v1/userguide/cli-services-ec2-sg.html