How to fix the network error while connecting to your VPS after a restart.
- Login using the VNC button
- If using Ubuntu 18+ run the following command
- Once you run the command, add the line
- The file should now look something like this
# File is autogenerated by Cloud-Init and will be recreated after each boot network: version: 2 ethernets: eth0: match: macaddress: 52:54:00:29:71:04 set-name: eth0 addresses: - 184.108.40.206/24 nameservers: addresses: [220.127.116.11, 18.104.22.168] mtu: 1400 routes: - scope: link to: 22.214.171.124/32 via: 0.0.0.0 - to: 0.0.0.0/0 via: 126.96.36.199 on-link: true
- You can see the new line at the bottom.
Once you do this save the file and restart the VPS. It should now have a network connection.