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?
- How can I check and edit the network configuration on Linux?
- How can I temporarily change my network configuration on Linux?
- How can I permanently change my network configuration using netplan?
- How do I check if my server is working after I make changes?
How can I check and edit the network configuration on Windows?
To check your network configuration on Windows, run the following command in Command Prompt (CMD):
ipconfig /allYou 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.8The key fields to note are IPv4 Address, Subnet Mask, and Default Gateway.
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.)
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.11with your relevant IP address. - To update the subnet mask – Change
255.255.255.0with your relevant subnet mask. (255.255.255.0is the default setting.) - To update the default gateway – Change
222.222.222.2with your relevant default gateway.
- To update the IP address – Change
How can I check and edit the network configuration on Linux?
To check your network configuration on Linux, run the following commands:
ip addr ip routeRunning
ip addrshould return output similar to the following. The value afterinetgives you the IP address and subnet mask (in CIDR notation, e.g./24corresponds to255.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 eth0In this example, the IP address is
111.111.111.11and the subnet mask is/24(equivalent to255.255.255.0). The interface name iseth0.Running
ip routeshould return output similar to the following. The IP address afterdefault viais 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.11In this example, the default gateway is
222.222.222.2.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.)
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:
First, if you haven't already installed netplan, run the following command to do so:
sudo apt update sudo apt install netplan.ioNext, run the following commands to check the available configuration files:
cd /etc/netplan/ lsYou should see output listing the YAML files in that directory, for example:
Example output of
ls /etc/netplan/:50-cloud-init.yamlThere may be one or more
.yamlfiles listed. Note the filename you want to edit.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_NAMEwith the relevant file name:sudo nano /etc/netplan/YOUR_FILE_NAMEFor example, your command should look something like this:
sudo nano /etc/netplan/50-cloud-init.yamlYou 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: falseThe key fields are
addresses(your IP address and subnet mask in CIDR notation) andgateway4(your default gateway).Now you can edit any settings you need. As mentioned before, make sure the IP address, subnet mask and default gateway are all correct.
Press CTRL+O and then Enter to save the changes.
Press CTRL+X to exit out of the file editor.
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.
Run this command to update the IP address and subnet mask with
NEW_IP_ADDRESS/SUBNET_MASKreplaced with the relevant IP address and subnet mask andINTERFACE_NAMEreplaced with your network interface name:sudo ip addr add NEW_IP_ADDRESS/SUBNET_MASK dev INTERFACE_NAMEFor example, your command should look something like this:
sudo ip addr add 111.111.1.111/24 dev eth0Then run this command to update your default gateway, just replace
GATEWAY_IPwith your default gateway:sudo ip route add default via GATEWAY_IPFor example, your command should look something like this:
sudo ip route add default via 111.111.1.1Finally run the following commands with
INTERFACE_NAMEreplaced with your network's interface name:ip addr show INTERFACE_NAME ip routeFor 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
Feedback sent
We appreciate your effort and will try to fix the article