Arama Yap Mesaj Gönder
Biz Sizi Arayalım
+90
X
X
X
X

Knowledge Base

Homepage Knowledge Base Server/VPS/VDS How to Assign IPs on Hetzner Server...

Bize Ulaşın

Konum Halkalı merkez mahallesi fatih cd ozgur apt no 46 , Küçükçekmece , İstanbul , 34303 , TR

How to Assign IPs on Hetzner Servers: An A-to-Z Guide

Hetzner is a server provider based in Germany, offering cost-effective and high-performance server solutions. It is widely preferred throughout Europe, especially with its Hetzner Cloud Dedicated service. In this article, we will explain step by step how to assign IP addresses on Hetzner servers.

Also, keep in mind that similar IP management requirements may exist on Turkey Location VPS servers.


Requirements Before Assigning an IP Address in Hetzner

  • Your server must be active

  • The IP address must be added to the server in the Hetzner Robot or Cloud panel

  • You must have root (administrator) privileges on your server

  • Your distribution system (Ubuntu, Debian, AlmaLinux, etc.) must be prepared according to the IP configuration


Assigning Additional IP from Hetzner Robot Panel

  1. Log in to your Hetzner Robot account.

  2. Select your server from the "Server" section.

  3. Click on the "IPs" tab.

  4. Request a new IP by clicking "Order Additional IP Addresses".

  5. Once the IP address is approved, you can define it on the server with the following steps.


Assigning IP Address to Server (Ubuntu/Debian)

  1. Connect to your server via SSH.

  2. Run the following command to see your IP addresses:

ip addr show
  1. Open the /etc/network/interfaces file:

sudo nano /etc/network/interfaces
  1. Add the new IP under the existing configuration. Example:

auto eth0:0
iface eth0:0 inet static
    address 192.168.1.100
    netmask 255.255.255.255
    gateway 192.168.1.1

Note: In Hetzner, the netmask is usually 255.255.255.255.

  1. Restart the network:

sudo systemctl restart networking

Assigning IP Address to Server (CentOS / AlmaLinux)

  1. Connect to your server via SSH.

  2. Go to your network settings folder:

cd /etc/sysconfig/network-scripts/
  1. Copy the existing network file:

cp ifcfg-eth0 ifcfg-eth0:0
  1. Edit the new file:

nano ifcfg-eth0:0
  1. Set the content as follows:

DEVICE=eth0:0
BOOTPROTO=static
ONBOOT=yes
IPADDR=192.168.1.100
NETMASK=255.255.255.255
GATEWAY=192.168.1.1
  1. Restart the network service:

systemctl restart network

To Make IP Settings Permanent

To prevent the settings from being lost after your server is rebooted, you must have permanently configured the above files.


Things to Consider When Setting Up IP on Hetzner Servers

  • The additional IP address is not assigned to another MAC address. The default NIC is used.

  • To avoid "ARP" problems on the server, proxy_arp or similar network management settings should be checked.

  • If firewall settings are to be made on an IP basis, new IPs should be added.


Frequently Asked Questions (FAQ)

How long does it take for an IP address to become active in Hetzner?
The additional IP you ordered usually becomes active within 5-15 minutes.

Why is the IP address not pinging?
If the necessary network settings are not made on the server or if there is a firewall block, it may not be possible to ping.

Can I also assign an IPv6 address?
Yes, you can request IPv6 blocks through the Hetzner Cloud panel.

Can I add more than one IP address?
Yes. You can use multiple IPs by allocating IP blocks such as /29, /28.

Are additional IPs mandatory when setting up a Proxy or VPN server?
Yes. It may be necessary to define a separate IP address for each user for Proxy/VPN.


In this article, we have explained in detail how to assign IP addresses on Hetzner servers. If you want to get more information or need a server, you can check our Turkey Location VPS or Hetzner Cloud options. 

Can't find the information you are looking for?

Create a Support Ticket
Did you find it useful?
(2253 times viewed / 254 people found it helpful)

Call now to get more detailed information about our products and services.

Top