Changing the main IP address of a server

In the context of a large-scale optimization of our network, some IP addresses need to be changed. If you are reading this article you have most likely received an e-mail from us and therefore you are affected by this change. But there is no need to worry, the procedure is easy and can be finished quickly. In addition to that you can use the new and the old address simultaneously for some days, so a trouble-free transfer with no downtime is possible. Nonetheless, you should be careful, because a misconfiguration can cause your server to become unreachable.

Besides the change of the IPv4 address, we mention the change of the IPV6 address as well in the following tutorial. You can ignore these IPv6 specific settings, if you are not using IPv6 on your server.

Please also note that this tutorial refers to the newest versions of the mentioned operating systems. There might be some smaller differences on older versions.

ifconfig

Part 1: Control panel specific adjustments

If you are using cPanel on your server please adjust your cPanel configuration first. To perform this task please execute the steps 1 to 7 which are described at the following URL and continue after that according to this blog post:
cPanel IP Migration Wizard

If you are using Plesk on your server then please read the following post:
How do I change the main IP address on an interface through Parallels Plesk Panel?
As soon as you read the sentence "manually change the IP address on the server from the backend as root" please execute the steps which are described in this blog post.

Part 2: Operating system specific settings

Debian / Ubuntu

  • Open the file /etc/network/interfaces. There you can find a section which starts with the line iface eth0 inet static and which contains lines like the following ones:

    address 192.168.1.123
    netmask 255.255.255.0
    broadcast 192.168.1.255
    gateway 192.168.1.1
  • Please adjust the values of address (IPv4 address), netmask, broadcast and gateway according to the information which you have received from us by e-mail.
  • If IPv6 is configured on your server, then you can find an additonal section in this file which starts with the line iface eth0 inet6 static.
    There you can find a further address-line, in which you have to replace the IPv6 address. Further adjustments are not necessary in this section.
  • Open the file /etc/hosts, search this file for your old IP address and replace it with the new one.
  • If you are changing the IP address on a Dedicated Server, then it is also necessary to change the resolvers. Please skip this step if you are changing the IP address on a VPS: Open the file /etc/resolv.conf and replace all nameserver-entries with the following two:

    nameserver 213.136.95.10
    nameserver 213.136.95.11
  • Activate the new configuration by restarting the networking service which can be done by executing the following command:
    service networking restart

CentOS

  • Please open the file /etc/sysconfig/network-scripts/ifcfg-eth0 and edit the values of the following variables according to the information in the e-mail which you have received from us: IPADDR (IPv4 address), NETMASK, GATEWAY and (if applicable) IPV6ADDR (IPv6 address). Please do not change any other lines.
  • Open the file /etc/sysconfig/network and there, adjust the value of GATEWAY once more.
  • Open the file /etc/hosts, search this file for your old IP address and replace it with the new one.
  • If you are changing the IP address on a Dedicated Server, then it is also necessary to change the resolvers. Please skip this step if you are changing the IP address on a VPS: Open the file /etc/resolv.conf and replace all nameserver-entries with the following two:

    nameserver 213.136.95.10
    nameserver 213.136.95.11

    Please also adjust the DNS1 entry in the first configuration file by entering 213.136.95.10.
  • Activate the new configuration by restarting the networking service which can be done by executing the following command:
    service network restart

Fedora

  • Please open the file /etc/sysconfig/network-scripts/ifcfg-eth0. There you can find amongst others the variables IPADDR0 (IPv4 address), PREFIX0 (CIDR prefix) and GATEWAY0 (gateway). Edit the values of these variables according to the information which you have received from us by e-mail.
  • If you are changing the IP address on a Dedicated Server, then it is also necessary to change the resolvers. Please skip this step if you are changing the IP address on a VPS: Open the file /etc/resolv.conf and replace all nameserver-entries with the following two:

    nameserver 213.136.95.10
    nameserver 213.136.95.11

    Please also adjust the DNS1 and DNS2 entries in the first configuration file.
  • Activate the new configuration by restarting the networking service which can be done by executing the following command:
    systemctl restart network.service

openSUSE

  • Please open the file /etc/sysconfig/network/ifcfg-eth0. There you can find amongst others the variables IPADDR (IPv4 address) and PREFIXLEN (CIDR prefix). Edit the values of these variables according to the information which you have received from us by e-mail.
  • If you are changing the IP address on a Dedicated Server, then it is also necessary to change the resolvers. Please skip this step if you are changing the IP address on a VPS: Open the file /etc/resolv.conf and replace all nameserver-entries with the following two:

    nameserver 213.136.95.10
    nameserver 213.136.95.11
  • Activate the new configuration by restarting the networking service which can be done by executing the following command:
    rcnetwork restart

Windows

  • View the available network adapters by entering "View network connections" into the start menu.
  • In the new window you should now see "Local Area Connection".
  • Perform a right click on this icon and select "Properties".
  • By double clicking on "Internet Protocol Version 4" a new window opens with your old IP configuration. Edit these values accoring the information in the e-mail which you have received from us.
  • If you are performing the reconfiguration on a Dedicated Server, then (and only then) you have to change the preferred and alternate DNS server additionally. Please enter 213.136.95.10 and 213.136.95.11 here.
  • After you have finished the configuration of "Internet Protocol Version 4" please continue with the configuration of "Internet Protocol Version 6" if applicable.
  • If you are performing the reconfiguration on a Dedicated Server, then (and only then) you have to change the preferred and alternate DNS server additionally. Please enter here 2a02:c200:0001:0010:0000:0000:2543:0001 and 2a02:c200:0001:0010:0000:0000:2544:0001.
  • Apply the configuration by clicking on OK.

Part 3: Test of the configuration

As soon as the new configuration is active you will lose your SSH oder RDP connection, but you should be able to reconnect with the new IP address without problems. To make a final check of the new settings please try to ping both, the old and the new IP address. You should be able to ping the new IP address, the old IP address has to be not reachable. If this is not the case, then something didn't work out. Please double-check in this case if you have performed all changes as described. If you are not able to find the cause, please do not hesitate to contact our technical support.

Optional: Part 4: Configuration of additional software

Please note that the configuration of additional software which you have installed may also contain the old IP address which has to be replaced. Unfortunately, we cannot provide assistance in this case because each piece of software stores settings such as the IP address differently.

Optional: Part 5: Configuration of the old IP address as an additional IP address

You can configure your old IP address as an additional IP address for some days, e.g. to wait for the adjustment of your DNS entries. But you have to bear in mind that you have to remove this old IP address from your configuration before the deadline that has been sent to you via e-mail. The following command adds the IP address temporarily which means that you have to execute the command once more after a server reboot:

ip addr add OLD-IP-ADDRESS/OLD-PREFIX dev eth0

To finally remove the IP address you can restart your server or execute the following command:

ip addr del OLD-IP-ADDRESS/OLD-PREFIX dev eth0

Server not reachable anymore?

If you have made a mistake during the reconfiguration and suddenly your server is not reachable anymore, neither via the old IP address nor via the new IP address, then you have the following options:

  • If the affected server is a VPS you can establish a VNC connection. Via VNC you can use your VPS as if you were sitting in front of it and adjust the IP settings once more. The details about how to establish such a connection can be found in the e-mail with all login details which you have received after provision of your VPS.
  • On a Dedicated Server, VNC is not available, but here you can use our rescue system which you can start via the customer control panel. Indeed the rescue systems requires some knowledge in the Linux command line. A tutorial on the rescue system can be found here. For Windows, the rescue system is not very helpful. In this case you can of course contact our support team. Please also note that the rescue system on your server is always reachable with the new IP address.

We wish you success with the reconfiguration of your IP settings! If you encounter any unexpected problems you can contact our support at any time.

Comments (0) Trackbacks (0)

No comments yet.


Leave a comment


No trackbacks yet.