Hetzner - DokuWiki
Cloud Networks Configuration/en
(Die Seite wurde neu angelegt: „= Hetzner Cloud Networks Configuration = == <span id="networks_configuration_install_package"></span>Installation of the auto-configuration package == Download t…“) |
(→Manual configuration of alias IPs) |
||
Zeile 74: | Zeile 74: | ||
== <span id="networks_configuration_alias_ips"></span>Manual configuration of alias IPs == | == <span id="networks_configuration_alias_ips"></span>Manual configuration of alias IPs == | ||
On Debian based distributions (Ubuntu, Debian): | On Debian based distributions (Ubuntu, Debian): | ||
+ | |||
1. Access the server via SSH | 1. Access the server via SSH | ||
+ | |||
2. Create the configuration file and open an editor | 2. Create the configuration file and open an editor | ||
Version vom 16. Juli 2019, 11:09 Uhr
Inhaltsverzeichnis |
Hetzner Cloud Networks Configuration
Installation of the auto-configuration package
Download the latest version of `hc-utils` for your OS and your architecture on: https://packages.hetzner.com/hcloud/
On Debian based distributions (Ubuntu, Debian):
curl https://packages.hetzner.com/hcloud/deb/hc-utils_0.0.1-1_all.deb -o /tmp/hc-utils_0.0.1-1_all.deb -s apt install -f /tmp/hc-utils_0.0.1-1_all.deb
On RHEL based distributions:
CentOS 7
curl https://packages.hetzner.com/hcloud/rpm/hc-utils-0.0.1-1.el7.noarch.rpm -o /tmp/hc-utils-0.0.1-1.el7.noarch.rpm -s yum install /tmp/hc-utils-0.0.1-1.el7.noarch.rpm
Fedora 29
curl https://packages.hetzner.com/hcloud/rpm/hc-utils-0.0.1-1.fc29.noarch.rpm -o /tmp/hc-utils-0.0.1-1.fc29.noarch.rpm -s yum install /tmp/hc-utils-0.0.1-1.fc29.noarch.rpm
Fedora 30
curl https://packages.hetzner.com/hcloud/rpm/hc-utils-0.0.1-1.fc30.noarch.rpm -o /tmp/hc-utils-0.0.1-1.fc30.noarch.rpm -s yum install /tmp/hc-utils-0.0.1-1.fc30.noarch.rpm
Uninstall auto-configuration package
On Debian based distributions (Ubuntu, Debian):
apt remove hc-utils
On RHEL based distributions (Fedora, CentOS):
yum remove hc-utils
Manual configuration via DHCP
On Debian based distributions (Ubuntu, Debian): The interface for the network will be named `ens10` for the first attached network, `ens11` for the second and `ens12` for the third. 1. Access the server via SSH 2. Create the configuration file and open an editor
touch /etc/network/interfaces.d/61-my-private-network.cfg nano /etc/network/interfaces.d/61-my-private-network.cfg
3. Paste the following configuration into the editor.
auto ens10:0 iface ens10:0 inet dhcp
4. Now you should restart your network. *Caution: This will reset your network connection*
sudo service networking restart
On RHEL based distributions (Fedora, CentOS): The interfaces will be named `eth1`,`eth2` and `eth3`. 1. Access the server via SSH 2. Create the configuration file and open an editor
touch /etc/sysconfig/network-scripts/ifcfg-eth1 vi /etc/sysconfig/network-scripts/ifcfg-eth1
3. Paste the following configuration into the editor
DEVICE=eth1 BOOTPROTO=dhcp ONBOOT=yes
4. Now you should restart your network. *Caution: This will reset your network connection*
systemctl restart network
Manual configuration of alias IPs
On Debian based distributions (Ubuntu, Debian):
1. Access the server via SSH
2. Create the configuration file and open an editor
touch /etc/network/interfaces.d/61-my-private-network.cfg nano /etc/network/interfaces.d/61-my-private-network.cfg
3. Paste the following configuration into the editor and replace your.ali.as.IP with one of the alias IPs. Keep in mind to increase the identifier by one when using more alias IPs.
auto ens10:1 iface ens10:1 inet static address your.ali.as.IP netmask 32
4. Now you should restart your network. *Caution: This will reset your network connection*
sudo service networking restart
On RHEL based distributions: The interfaces will be named `eth1` and up to `eth3`. 1. Access the server via SSH 2. Create the configuration file and open an editor
touch /etc/sysconfig/network-scripts/ifcfg-eth1:0 vi /etc/sysconfig/network-scripts/ifcfg-eth1:0
3. Paste the following configuration into the editor and replace your.ali.as.IP with one of the alias IPs. Keep in mind to increase the identifier by one when using more alias IPs.
BOOTPROTO=static DEVICE=eth1:0 IPADDR=your.ali.as.IP PREFIX=32 TYPE=Ethernet USERCTL=no ONBOOT=yes
4. Now you should restart your network. *Caution: This will reset your network connection*
systemctl restart network