Hetzner - DokuWiki

Cloud floating IP persistent/en

Cloud floating IP persistent

If you are using more than one  floating IP, then the number on the interface (eth0:1) will be increased (example eth0:2)

Debian/Ubuntu

edit of /etc/network/interfaces.d/99-floating.cfg IPv4:

auto eth0:1
iface eth0:1 inet static
    address <your floating IP>
    netmask 255.255.255.255

IPv6:

auto eth0:1
iface eth0:1 inet6 static
    address <one IPv6 address of the subnet, e.g. 2a01:4f9:0:2a1::2>
    netmask 64

After the reboot of the cloud server, the floating IP should be available.

CentOS/Fedora

edit of /etc/sysconfig/network-scripts/ifcfg-eth0:1 IPv4:

BOOTPROTO=none
DEVICE=eth0:1
ONBOOT=yes
IPADDR=<your floating IP>
NETMASK=255.255.255.255

IPv6:

BOOTPROTO=none
DEVICE=eth0:1
ONBOOT=yes
IPV6ADDR=<one IPv6 address of the subnet, e.g. 2a01:4f9:0:2a1::2>/64
IPV6INIT=yes


© 2020. Hetzner Online GmbH. Alle Rechte vorbehalten.