Hetzner - DokuWiki

Cloud IP static/en
(Fedora / CentOS)
(Fedora / CentOS)
Zeile 41: Zeile 41:
 
TYPE=Ethernet
 
TYPE=Ethernet
 
USERCTL=no
 
USERCTL=no
IPADDR=<Ihre IPv4-Adresse>
+
IPADDR=<your IPv4 address>
 
NETMASK=255.255.255.255
 
NETMASK=255.255.255.255
 
DNS1=213.133.98.98
 
DNS1=213.133.98.98

Version vom 17. August 2018, 06:56 Uhr

Static IP configuration (Cloud)

Debian/Ubuntu

edit of /etc/network/interfaces

auto eth0
iface eth0 inet static
        address <your IPv4 address>
        netmask 255.255.255.255
        gateway 172.31.1.1
        pointopoint 172.31.1.1
        dns-nameservers 213.133.98.98 213.133.99.99 213.133.100.100


iface eth0 inet6 static
        address <one IPv6 address from your subnet, e.g. 2a01:4f8:0:3df1::1>
        netmask 64
        gateway fe80::1

Add file /etc/cloud/cloud.cfg.d/98-disable-network.cfg

network:
  config: disabled

Execute the following command

rm /etc/network/interfaces.d/50-cloud-init.cfg

Fedora / CentOS


edit of /etc/cloud/cloud.cfg.d/98-disable-network.cfg

network:
  config: disabled


edit of /etc/sysconfig/network-scripts/ifcfg-eth0

BOOTPROTO=static
DEVICE=eth0
HWADDR=<keep the HWADDR as is!>
ONBOOT=yes
TYPE=Ethernet
USERCTL=no
IPADDR=<your IPv4 address>
NETMASK=255.255.255.255
DNS1=213.133.98.98
DNS1=213.133.99.99


edit of /etc/sysconfig/network-scripts/route-eth0

172.31.1.1/32 dev eth0
default via 172.31.1.1 dev eth0


© 2019. Hetzner Online GmbH. Alle Rechte vorbehalten.