When installing Arch Linux on a VPS, you usually need to enable VNC and configure the networking by yourself before you can SSH into your machine. This post serves as a guide to connect your server to the internet.
First of all, confirm that networking hasn't been set up yet:
There should be no response from the ping.
Now let's find out the name of the network interface:
You should see an ethernet device named like
The number at the end will differ.
This is the name of the network interface we'll configure in the following steps.
Arch Linux uses
systemd which includes the
systemd-networkd network manager by default.
To configure the network manager, edit the following file:
sudo vim /etc/systemd/network/20-wired.network
Start by specifying the network interface name:
Now you need to enter your IP address, subnet mask and the gateway. Ideally your VPS provider should include that data in your dashboard. You can enter the addresses in the network section:
[Network] Address=220.127.116.11/32 Gateway=18.104.22.168 DNS=22.214.171.124
The DNS shown here is the Cloudflare DNS because it's reliable and easy to remember, but feel free to use a different DNS.
If your VPS has an IPv6 address you can add more of the same lines to the network section:
Address=1111:1111:1111::2345 Gateway=1111:1111:1111::1111 DNS=2606:4700:4700::1111
Try to start the DNS resolver and the network manager:
sudo systemctl start systemd-resolved sudo systemctl start systemd-networkd
Check if we're online on both IPv4 and IPv6:
ping -4 google.com ping -6 google.com
If everything went smooth, make the DNS resolver and the network manager start automatically on boot:
sudo systemctl enable systemd-resolved sudo systemctl enable systemd-networkd
To finalize the setup, add an
A record for IPv4 and an
AAAA record for IPv6 to your DNS and your server should be fully configured.