VPS not accesible from SSH or SFTP but i can access through the console access in Digital Ocean

Posted September 5, 2014 3.8k views

I dont know what happen to my VPS i just got a mail regarding unlimited download attempt from an IP and after that i am not able to access through SSH or SFTP even my domain is also not resolving please help. i am not able to ping my another ip from the server and i can access that trough Digital Ocean console access.

1 comment

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
2 answers

Do you know if your home network is blocking any ports? have you tried from another computer, or maybe from your phone? (there is a lot of ssh clients around, try to install one on your phone and see if it connects)

  • Hi,

    This incident took place when I was load testing on my server and opened nearly 200 web sessions on a browser.

    When the server stopped responding through browser and SSH I thought it had blocked my IP.

    I tried accessing the server from alternate IP and even different PC (just in case it blocked the MAC address) but couldn’t access it. The server was completely cut off from outside world. The DO console was the only workaround.

    I flushed iptables and restarted UFW, but still both inbound and outbound traffic was blocked. The server was absolutely working fine from the console and had ample free resources. I restarted NGINX and apache to bring back the server to normal condition but it gave NGINX 502 gateway error. Finally, I had to restart the server to bring it back to normal condition.

    What had happened to the server still remains a mystery.


My VPS is Ubuntu with 1 GB ram. The steps in detail which I took to regain access from digital ocean console is as follows:

  1. Tried finding my IP address in the iptables blocked list. It was not listed there.
  2. Disabled UFW and Enabled UFW - Couldn’t access the website. Even server’s outbound traffic was blocked (Checked by command apt-get update)
  3. service ufw stop - This time outbound and inbound traffic was smooth. But, couldn’t access the website got an error 502 bad gateway.
  4. IPTABLES -F, to flush iptables. Not respite.
  5. service apache-sp restart and service nginx-restart. Still got 502 nginx error.
  6. Finally, rebooted the server and everything worked fine.