Hetzner is one of Europe's leading data center and hosting providers. It is known for its high-performance servers and flexible solutions. In this article, we will examine in detail how to perform ISO mounting and network configuration on Hetzner servers. ISO mounting is a common method for installing a specific operating system or software on the server. Network configuration ensures that the server is correctly connected to the network and can communicate. These two processes are critical for the server to function correctly and provide the desired services.
1. Introduction to ISO Mounting
ISO mounting is the process of connecting an ISO image file to the server as a virtual drive. This allows the operating system or software within the ISO image to be installed directly on the server. Traditionally, this process was done using a physical CD/DVD drive and disc. However, thanks to ISO mounting, this process can be done faster, easier, and more reliably.
1.1. What is an ISO Image?
An ISO image is an archive file that is an exact copy of all the data on a CD, DVD, or Blu-ray disc. This file usually has the ".iso" extension and contains all the files and folders on the disc, as well as metadata such as disc structure and boot information.
1.2. Advantages of ISO Mounting
- Speed: Much faster than using a physical disc.
- Convenience: Eliminates the hassle of finding or inserting a physical disc.
- Reliability: Problems such as disc scratching or damage are avoided.
- Remote Access: ISO mounting can be done without physical access to the server.
1.3. Tools Required for ISO Mounting
To perform ISO mounting on Hetzner servers, remote management tools such as KVM (Keyboard, Video, Mouse) console or IPMI (Intelligent Platform Management Interface) are generally used. These tools allow remote access to the server, making it possible to mount the ISO image and install the operating system.
2. ISO Mounting with Hetzner Robot Interface
Hetzner offers a web-based interface called "Robot" to manage its servers. This interface allows you to easily perform many operations such as server management, rebooting, console access, and ISO mounting.
2.1. Accessing the Robot Interface
You can access the Hetzner Robot interface by logging in with your Hetzner customer account. After logging in, you will see a list of your servers. Select the server you want to mount the ISO on.
2.2. Rescue System
Before mounting the ISO, you may need to boot the server into the "Rescue System". The Rescue System is a minimal Linux environment that you can use when there is a problem with your server or when installing the operating system. In the Robot interface, you can find the option to boot your server into the Rescue System.
Step-by-Step Rescue System Boot:
- Select your server in the robot interface.
- Click on the "Rescue" tab.
- Check the "Activate Rescue System" option.
- Select the desired operating system (usually Linux).
- Click the "Activate Rescue System" button.
- Note the SSH information provided to you. You will connect to the Rescue System with this information.
2.3. ISO Mounting Steps
After successfully connecting to the Rescue System, you can start the ISO mounting process.
Step-by-Step ISO Mounting:
- Select your server in the robot interface.
- Click on the "ISO" tab.
- Select the ISO image you want to mount from the list. Hetzner offers ISO images of popular operating systems. If you want to use your own ISO image, you may need to upload it to Hetzner.
- Click the "Mount ISO" button.
- Wait for the ISO image to finish mounting. This time may vary depending on the size of the ISO image and the server speed.
- After the ISO image is mounted, restart the server.
- During the restart, you may need to adjust the boot order in the BIOS settings to boot from the ISO image. This can usually be done by entering the BIOS (with keys like Del, F2, F12).
- The server will boot from the ISO image and the operating system installation will begin.
3. Network Configuration
After the operating system installation is complete, you need to configure the server's network correctly. This ensures that the server connects to the network correctly and communicates.
3.1. Identifying Network Interfaces
You can use the following commands to identify the network interfaces on your server:
ip addr show
This command lists all network interfaces on your server and the IP addresses assigned to them. Usually, Ethernet interfaces have names like "eth0", "enp0s3".
3.2. Static IP Address Configuration
It is generally recommended to use a static IP address on Hetzner servers. A static IP address ensures that your server is always assigned the same IP address. This makes it easier to manage your server's DNS records and other network configurations.
Static IP address configuration varies depending on the operating system you are using. Here are some examples of static IP address configuration in popular operating systems:
3.2.1. Debian/Ubuntu
You can configure a static IP address by editing the /etc/network/interfaces file.
sudo nano /etc/network/interfaces
Add a configuration like the following to the file:
auto eth0
iface eth0 inet static
address 192.168.1.100
netmask 255.255.255.0
gateway 192.168.1.1
dns-nameservers 8.8.8.8 8.8.4.4
In this example:
- eth0: The name of the network interface.
- address: The IP address of the server.
- netmask: The network mask.
- gateway: The gateway (router) address.
- dns-nameservers: The addresses of the DNS servers.
After making the changes, restart the network service:
sudo systemctl restart networking
3.2.2. CentOS/RHEL
You can configure a static IP address by editing the /etc/sysconfig/network-scripts/ifcfg-eth0 file.
sudo nano /etc/sysconfig/network-scripts/ifcfg-eth0
Add a configuration like the following to the file:
TYPE=Ethernet
BOOTPROTO=static
NAME=eth0
DEVICE=eth0
ONBOOT=yes
IPADDR=192.168.1.100
NETMASK=255.255.255.0
GATEWAY=192.168.1.1
DNS1=8.8.8.8
DNS2=8.8.4.4
After making the changes, restart the network service:
sudo systemctl restart network
3.3. DNS Configuration
DNS (Domain Name System) is a system that translates domain names into IP addresses. The DNS configuration must be done correctly so that your server can correctly access domain names on the internet.
DNS configuration is usually done in the /etc/resolv.conf file. However, on some operating systems, this file is updated automatically. In this case, you need to specify the DNS servers in the network configuration files.
For example, in Debian/Ubuntu, you can specify DNS servers using the dns-nameservers parameter in the /etc/network/interfaces file.
3.4. Firewall Configuration
It is important to use a firewall to ensure the security of your server. The firewall controls incoming and outgoing network traffic to your server, preventing unauthorized access.
One of the most popular firewall tools is iptables. However, you can also use tools such as UFW (Uncomplicated Firewall) or firewalld, which offer a more user-friendly interface.
UFW Usage Example:
sudo ufw allow ssh
sudo ufw allow http
sudo ufw allow https
sudo ufw enable
sudo ufw status
These commands allow access to SSH (22), HTTP (80), and HTTPS (443) ports and enable the firewall.
4. Real-Life Examples and Case Studies
4.1. E-Commerce Site Server Migration
An e-commerce site, when migrating from its old server to Hetzner, installed the operating system and database on the new server using ISO mounting. In this way, an exact copy of the data on the old server was transferred to the new server, and the migration process was completed with minimal interruption. Network configuration was done by updating the new IP addresses and DNS records.
4.2. Game Server Setup
A game server administrator used ISO mounting to install a custom game server software on a Hetzner server. They mounted the ISO image of the software via the Hetzner Robot interface and restarted the server to initiate the installation. Network configuration was done by adding firewall rules to allow access to the ports used by the game server.
5. HTML Tables
5.1. Operating System Installation Methods Comparison
Method | Advantages | Disadvantages |
---|---|---|
ISO Mounting | Fast, easy, reliable, remote access | Requires ISO image, may require BIOS settings |
Physical Disk | Widely known | Slow, requires physical disk, risk of disk damage |
Network Installation (PXE) | Centralized management, simultaneous installation on multiple servers | Complex configuration, requires network infrastructure |
5.2. Popular Firewall Tools Comparison
Tool | Advantages | Disadvantages |
---|---|---|
iptables | Powerful, flexible, widely used | Complex interface, steep learning curve |
UFW (Uncomplicated Firewall) | User-friendly, simple commands | Not as flexible as iptables |
firewalld | Dynamic zones, graphical interface | Complex configuration, high resource consumption |
6. Visual Explanations
ISO Mounting Diagram (Textual Description):
A computer (client) connects to the Hetzner Robot interface. The Robot interface provides access to the server's KVM console. Through the KVM console, an ISO image is mounted to the server. The server boots from the ISO image and starts the operating system installation.
Network Configuration Diagram (Textual Description):
The server is connected to a network switch. The network switch connects to the internet via a router. The server uses DNS servers to translate domain names to IP addresses. The firewall controls incoming and outgoing network traffic to the server.
7. Frequently Asked Questions
- Question 1: Which ISO images can I use during ISO mounting?
- Answer: You can use the ISO images offered in the Hetzner Robot interface, or you can upload your own ISO image to Hetzner and use it.
- Question 2: How can I connect to the Rescue System?
- Answer: After activating the Rescue System in the Robot interface, you can connect with an SSH client using the SSH credentials provided to you.
- Question 3: After restarting my server, it doesn't boot from the ISO image. What should I do?
- Answer: You need to set the boot order in your server's BIOS settings to boot from the ISO image. You can usually use keys like Del, F2, F12 to enter the BIOS.
- Question 4: How can I find my static IP address?
- Answer: You can find your IP address in the details of your server in the Hetzner Robot interface. You can also find your IP address by connecting to the Rescue System and using the `ip addr show` command.
- Question 5: How can I configure my firewall?
- Answer: You can configure your firewall using firewall tools such as UFW, firewalld, or iptables. The tool you use depends on your operating system and preferences.
8. Conclusion and Summary
ISO mounting and network configuration on Hetzner servers are critical for the server to function correctly and provide the desired services. ISO mounting simplifies operating system or software installation, while network configuration ensures that the server connects to the network correctly and communicates. In this article, we have examined in detail how to perform ISO mounting, how to perform network configuration, and how to take important security measures such as firewalls. With this information, you can successfully set up and manage your Hetzner server.
Key Points:
- ISO Mounting: Simplifies operating system installation.
- Rescue System: A minimal Linux environment that you can use when there is a problem with your server.
- Network Configuration: Ensures that the server connects to the network correctly.
- Firewall: Ensures the security of your server.
- Regular Updates: Increases the security and performance of your server.
Additional Resources: