Changing your IPv4 address Print

  • 0

Tempest Hosting, LLC is removing the 142.252.252.0/22 subnet from our bare-metal hosting services. If you are currently using this IP you must move off of it by March 11th 2022. If this change affects you, a ticket will have been opened giving you instructions on what to do.

Changing your IPv4 on Windows and Linux


We are unable to cover all of the possible operating systems on this page, however we will be covering how to use networking on Ubuntu 20.04 as well as IPv4 Properties on the Windows Server 2019 GUI. If you are running another operating system and need assistance feel free to open a ticket on our portal or use the buzz-words "how to change ipv4 on {your operating system" in google.

Ubuntu 20.04 (Netplan)


SSH into your server using a user with root level credentials (you may have to use DCI manager if you are unable to access this due to incorrect IP configuration) You can see info on how to do that here: https://tempesthosting.cloud/en/article/getting-started-with-dci-manager-1v8vdu9/

Proceed to go to the netplan directory

cd /etc/netplan


Once in the directory view the configuration files (.yaml). Once we have the name of the configuration file we can nano into it.

nano 50-cloud-init.yaml


The configuration should look like this:

network:
    version: 2
    ethernets:
        eth0:
            addresses:
            - 142.252.252.122/24
            gateway4: 142.252.252.1
            match:
                macaddress: yo:ur:ma:ca:dr:es:s0
            nameservers:
                addresses:
                - 4.4.4.4
            set-name: eth0


We can change the addresses, and gateway option to reflect the changes given to us in our DCI manager page.
Once we have made our changes we can run the following to test and apply our config(s):

This will show you any issues with your configuration syntax.

netplan try


This will apply your new changes to your network configuration.

netplan apply

 

Debian 10/11 (interfaces)


SSH into your server using a user with root level credentials (you may have to use DCI manager if you are unable to access this due to incorrect IP configuration) You can see info on how to do that here: https://tempesthosting.cloud/en/article/getting-started-with-dci-manager-1v8vdu9/

Proceed to network directory within etc directory

cd /etc/network


Network Directory

You'll need to edit the interfaces file within /etc/network. You can do this with nano for example

nano interfaces


This will open the following screen, which should contain the existing IP configuration

Interfaces file with nano

Where it says address, you'll want to change the IP address from your old one to your new one, and the old gateway to the new gateway. You can find your IP address and gateway in the IP ticket we have with you, or on the DCI IP Addresses tab. Once set, you can save the file within nano with CTRL + X, and then it will ask you whether you wish to save changes. Hit 'Y' on the keyboard to confirm.

Now, depending on what the public interface is you'll want to use ifdown and ifup commands to bring down and bring the interface back up with the new IP address information. The public interface should usually be listed inside the interfaces file after allow-hotplug. For example, in our case, it is eth0. You can use use the ip a command to show the server's interfaces.

ifdown eth0 && ifup eth0


We can also ping Cloudflare to make sure network connectivity is still working if doing this over IPMI.

Reload the interface and verify network connectivity

Windows Server 2019



First of all log into your Remote Desktop Connection and go to the adapter icon in the bottom right. If you are unable to access your remote desktop connection you may have to use IPMI via our DCI Manager portal. You can see info on how to do that here: https://tempesthosting.cloud/en/article/getting-started-with-dci-manager-1v8vdu9/


Then navigate to "Change adapter options" this will open up a Windows Vista era tab. There select the adapter you are using. For our Intel and Ryzen builds this will show up as some sort of Mellanox Ethernet adapter.


Once you have your adapter right click and go to Properties > Internet Protocol Version 4 (TCP/IPv4) > Properties




Images for this article were taken from a virtualised instance of Windows Server 2019, adapter names will differ depending on hardware specifications
You will then be greeted with a page that looks like the image below.


This may already be filled with values (your old ip if you are transferring). Replace the fields with your new IP Address, Netmask and Gateway. If you are struggling to find these values you can find them on your DCI page.


You are able to calculate your netmask for windows using https://www.calculator.net/ip-subnet-calculator.html and the provided prefix length in DCI.


Was this answer helpful?

« Back