Can’t access Linode server after migration to a new region? Here’s the fix.
Linode provides a very easy option to migrate your VPS (virtual private server) instance to a different datacenter region when you need it.

I recently decided to get the server closer to home. The migration process itself was quick and easy. After about 45 minutes, I got the server relocated to Linode’s Singapore region and had a new IPv4 address issued. But that’s when I had trouble accessing my server right after the migration.
When I SSH to the new IP address, I wasn’t getting any response from the server. To ensure the server did migrate successfully, I used Linode’s LISH console to login directly to the server. Thankfully, I had at least one good news. There, I confirmed that SSHD service was indeed running.

TL;DR: The problem and the resolution
- Issue: Unable to access Linode server after migration to a new region.
- Cause: Network interface settings on the server were not updated with the new IP and gateway address after migration.
- Solution:
- Update the
/etc/network/interfacesconfiguration file with the new IP and gateway address. - Update the DNS resolver
/etc/resolv.confto the designated DNS Resolvers within the same datacenter region.
- Update the
The longer version: Figuring out why I can’t access my Linode server after migration to a new region
To try to figure out what was wrong, I tried to get the public IP from within the server via the LISH console. You can easily do this by hitting https://checkip.amazonaws.com.
curl https://checkip.amazonaws.com
It was timing out. That made me suspect that the server wasn’t able to reach out to the public network. At this point, I tried to check the server’s network interface settings. True enough, the interface was still holding the old IP and gateway address.

Fixing the Linode’s connection issue
To get the server back running as normal, it is as simple as just updating the etc/network/interface configuration file with the new IP and gateway address. Thankfully, Linode has a LISH console which can connect to the server for this purpose.

It seems that the automatic network configuration from Linode’s cloud manager didn’t work after the server migrated.
Another thing to also update is the DNS resolver on the server. While the old ones would work, it is always best to configure to the designated DNS Resolvers within the same datacenter region. You can find the list from the Cloud Console.

At this point, you should already be able to SSH to the server from your local machine. It would be a lot easier to edit it using the terminal. The LISH console don’t support pasting from your machine.
sudo vi /etc/resolv.conf
Hope this helps!
If this post has been useful, support me by buying me a latte or two 🙂
