I host a website on a VPS. It was working great but after one evening I could not access my site, could not ping the VPS, and could not connect VPS via SSH/Putty. I was able to login to my VPS service provider account and able to SSH to the VPS through the browser interface.
Putty was giving no connection error. Site was not reachable. And ping was timing out.
This problem is specific to Linux / Ubuntu serves. The following solution assumes that your VPS was working great previously and you did not make any firewall / iptables changes to create this problem.
This problem occurs when VPS server has a static IP address through netplan but over dhcp. You can verify this using the *.yml file under the /etc/netplan folder. You can fix this problem by making your VPS IP static in netplan, restarting your server, and reconfiguring iptables and firewalls.
address that DHCP assigns dynamically. Even if DHCP assigns the same address, it can still make your VPS invisible to the outside world.
Edit your *.yaml file and fill-out your VPS and server information as given below, save the file, and restart your server.
# This is the network config written by ’subiquity’