0

Problem: I'm unable to access any service running on by Ubuntu 22.04, including SSH. This server has been running for months without any issues. It currently hosts a frontend as well as 3 different backend services, which were all running perfectly for months. Now, I'm unable to send any request to the server.

When I try to SSH into the server, it hangs and after a while says

ssh: connect to host xx.xxx.xxx.xxx port 22: Operation timed out

When I make a curl request to one of the backend services, I get

curl: (28) Failed to connect to xx.xxx.xxx.xxx port xxxx after 75007 ms: Couldn't connect to server

Again, I have confirmed these services all work and can be requested locally from within the VPS.

Background: I believe this all happened after I installed Nginx on my server. I was trying to set up a reverse proxy which I've done hundreds of times before. This might be unrelated, but it's the only thing I can think of changing on the VPS before the issues started occurring. I simply installed the Nginx with apt, added Nginx Full rules to UFW, then restarted Nginx with a new conf.

Things I've already checked:

  • UFW is disabled
  • I've confirmed with VPS provider that there is no network level firewall running
  • I've disabled Nginx and uninstalled it
  • All services including SSH are running on the VPS

Edit:

ping 8.8.8.8 gives me error From xx.xxx.xxx.xxx icmp_seq=1 Destination Host Unreachable

Seems like my VPS isn't even connected to the internet anymore?

5
  • Check with ip route, what is your default route. I think that might be wrong. Check with the VPS provider on the correct settings Commented Dec 5, 2023 at 22:50
  • @LukeAttard is there a way that the gateway ip or netmask could've been changed without me explicitly doing so? Commented Dec 6, 2023 at 1:43
  • dhcp could do it, highly unlikely any of the standard services would have changed it. However it is possible that the VPS has changed something on their end that has esulted in a need for a differnt gateway. Or possible there was an update that was installed, that has changed the naming of your interfaces, and that may have resulted in your settings not being applied. Do you statically assign the ip and gateway? or is it dhcp assigned? Commented Dec 6, 2023 at 8:14
  • @LukeAttard you were right! Reached out to VPS provider to double check, and my ip and netmask were not correct. I have no idea if this was my fault or if the VPS provider changed this on their end. Cheers and thanks for the help. Commented Dec 16, 2023 at 15:07
  • Often these issues are the hardest and most time consuming to fix thank to human nature and Confirmation bias. Happy o have helped, I have put the answer in to help others to easily see it when they come across the post. Would be good if you can mark it as accepted :) thanks Commented Dec 16, 2023 at 15:17

2 Answers 2

2

Check you default gateway. It is possible that the VPS has changed something on their end that has resulted in a need for a differnt gateway. Or possible there was an update that was installed, that has changed the naming of your interfaces, and that may have resulted in your settings not being applied.

1

The issue was that my default gateway ip and netmask were not correct. I had to ask the VPS provider what to set it to, and once it was configured properly, the server had access to the internet again.

I'm not sure if I caused these parameters to change, or if the VPS provider did some kind of update which changed them. Anyhow, thanks to Luke for pointing me in the right direction.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .