I can't connect to my server because of network configuration issues, what can I do?

Overview:

At Contabo, we provide full root or administrator access to our servers, giving you complete control over their configuration.

This means that any configuration issues on your server are solely your responsibility and our Customer Support team is unable to assist with troubleshooting these issues.

If you're having trouble accessing your server due to configuration-related problems, you may find the suggestions below helpful.


What should I check when I'm having problems with my network configuration?

If you're experiencing network configuration issues, we recommend verifying the following settings to ensure they are correctly configured:

  • IP address
  • Subnet mask
  • Default gateway


If you're unsure what these settings should be, you can find the correct values in the Customer Control Panel in the IP Management area. You can also follow our guide here for step-by-step instructions on where to find these settings in the Customer Control Panel.

Once you know the correct IP address, subnet mask, and gateway, connect to your server via VNC and follow the steps below to check your server's current configuration and make any necessary changes. If you're not sure how to connect to your server via VNC, you can follow our guide here or watch the tutorial on our YouTube account here.


Table of Contents:


How can I check and edit the network configuration on Windows?

  1. To check your network configuration on Windows, run the following command in Command Prompt (CMD):

    ipconfig /all
  2. You should see output similar to the example below, which shows how your server is currently configured:

    Example output of ipconfig /all:

    Windows IP Configuration
    
       Host Name . . . . . . . . . . . . : myserver
       Primary Dns Suffix  . . . . . . . :
       Node Type . . . . . . . . . . . . : Hybrid
       IP Routing Enabled. . . . . . . . : No
       WINS Proxy Enabled. . . . . . . . : No
    
    Ethernet adapter Ethernet:
    
       Connection-specific DNS Suffix  . :
       Description . . . . . . . . . . . : Red Hat VirtIO Ethernet Adapter
       Physical Address. . . . . . . . . : 00-50-56-AB-CD-EF
       DHCP Enabled. . . . . . . . . . . : No
       Autoconfiguration Enabled . . . . : Yes
       IPv4 Address. . . . . . . . . . . : 111.111.111.11 (Preferred)
       Subnet Mask . . . . . . . . . . . : 255.255.255.0
       Default Gateway . . . . . . . . . : 222.222.222.2
       DNS Servers . . . . . . . . . . . : 8.8.8.8

    The key fields to note are IPv4 Address, Subnet Mask, and Default Gateway.

  3. Please check that the IP address, subnet mask and default gateway displayed match up with the ones outlined in the Customer Control Panel. (You can check the Customer Control Panel configuration by following our guide here.)

  4. If you need to update the IP, subnet mask or default gateway you can run the following example command, just make sure to change the example configurations with your own configurations:

    netsh interface ip set address name="Ethernet" static 111.111.111.11 255.255.255.0 222.222.222.2
    • To update the IP address – Change 111.111.111.11 with your relevant IP address.
    • To update the subnet mask – Change 255.255.255.0 with your relevant subnet mask. (255.255.255.0 is the default setting.)
    • To update the default gateway – Change 222.222.222.2 with your relevant default gateway.

How can I check and edit the network configuration on Linux?

  1. To check your network configuration on Linux, run the following commands:

    ip addr
    ip route
  2. Running ip addr should return output similar to the following. The value after inet gives you the IP address and subnet mask (in CIDR notation, e.g. /24 corresponds to 255.255.255.0):

    Example output of ip addr:

    1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
        link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
        inet 127.0.0.1/8 scope host lo
    
    2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP
        link/ether 00:50:56:ab:cd:ef brd ff:ff:ff:ff:ff:ff
        inet 111.111.111.11/24 brd 111.111.111.255 scope global eth0

    In this example, the IP address is 111.111.111.11 and the subnet mask is /24 (equivalent to 255.255.255.0). The interface name is eth0.

  3. Running ip route should return output similar to the following. The IP address after default via is your default gateway:

    Example output of ip route:

    default via 222.222.222.2 dev eth0
    111.111.111.0/24 dev eth0  proto kernel  scope link  src 111.111.111.11

    In this example, the default gateway is 222.222.222.2.

  4. Please check that the IP address, subnet mask and default gateway displayed match up with the ones outlined in the Customer Control Panel. (You can check the Customer Control Panel configuration by following our guide here.)

  5. The process for modifying your network configuration in Linux can vary based on your distribution and whether you need the changes to be temporary or permanent. Below, we outline some common methods to update your network settings based on your specific requirements.



How can I permanently change my network configuration using netplan?

If you want to permanently change your network configuration on Linux, we recommend using netplan and following the steps below:

  1. First, if you haven't already installed netplan, run the following command to do so:

    sudo apt update
    sudo apt install netplan.io
  2. Next, run the following commands to check the available configuration files:

    cd /etc/netplan/
    ls

    You should see output listing the YAML files in that directory, for example:

    Example output of ls /etc/netplan/:

    50-cloud-init.yaml

    There may be one or more .yaml files listed. Note the filename you want to edit.

  3. You need to open the relevant YAML configuration file to modify your network settings. To open the file, run the following command replacing YOUR_FILE_NAME with the relevant file name:

    sudo nano /etc/netplan/YOUR_FILE_NAME

    For example, your command should look something like this:

    sudo nano /etc/netplan/50-cloud-init.yaml

    You should then see a configuration file similar to the following:

    Example contents of /etc/netplan/50-cloud-init.yaml:

    network:
      version: 2
      ethernets:
        eth0:
          addresses:
            - 111.111.111.11/24
          gateway4: 222.222.222.2
          nameservers:
            addresses:
              - 8.8.8.8
              - 8.8.4.4
          dhcp4: false

    The key fields are addresses (your IP address and subnet mask in CIDR notation) and gateway4 (your default gateway).

  4. Now you can edit any settings you need. As mentioned before, make sure the IP address, subnet mask and default gateway are all correct.

  5. Press CTRL+O and then Enter to save the changes.

  6. Press CTRL+X to exit out of the file editor.

  7. Finally run the following commands to make sure your changes have been saved:

    ip addr
    ip route

How can I temporarily change my network configuration on Linux?

If you want to temporarily change your network configuration on Linux for testing you can follow the instructions below. Please note once you reboot the server the changes will be lost.

  1. Run this command to update the IP address and subnet mask with NEW_IP_ADDRESS/SUBNET_MASK replaced with the relevant IP address and subnet mask and INTERFACE_NAME replaced with your network interface name:

    sudo ip addr add NEW_IP_ADDRESS/SUBNET_MASK dev INTERFACE_NAME

    For example, your command should look something like this:

    sudo ip addr add 111.111.1.111/24 dev eth0
  2. Then run this command to update your default gateway, just replace GATEWAY_IP with your default gateway:

    sudo ip route add default via GATEWAY_IP

    For example, your command should look something like this:

    sudo ip route add default via 111.111.1.1
  3. Finally run the following commands with INTERFACE_NAME replaced with your network's interface name:

    ip addr show INTERFACE_NAME
    ip route

    For example, your command should look something like this:

    ip addr show eth0
    ip route

How do I check if my server is working after I make changes?

If you make changes to your server's configuration and want to check if the changes have worked, simply reboot the server from the Customer Control Panel and try connecting again.


If you're unsure how to do this, you can read our guide here.


I'm still having issues connecting to my server, what should I do?

As mentioned at the beginning of this guide, at Contabo we offer root or administrator access to our servers meaning you can configure the servers as you like.

However, we do have a general guide on troubleshooting connection issues to your server, which you can find here.

We also have some video content on how to solve connection issues with your server that you can find below:

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article

Can't find what you're looking for?