0

I followed the docs of digitalocean to host my django app. After spending hours on the same, i was able to host. But the next day when I checked the ip address, it is not available. Also, I cannot ssh remotely. The only way to login is the web console from the digital ocean site.

When I ssh remotely i get this error :

ssh: connect to host 139.59.24.133 port 22: Connection timed out

I reboot the droplet and it did not help.

This is my nginx sites-available directory:

server {
    listen 80;
    server_name 139.59.24.133;

    location = /favicon.ico { access_log off; log_not_found off; }
    location /static/ {
        root /home/dl/logistics;
    }

    location / {
        include proxy_params;
        proxy_pass http://unix:/run/gunicorn.sock;
    }
}

I referred questions in digital ocean and their support is too low. Any help will be appreciated.

Srijwal R
  • 101
  • 3

1 Answers1

0

you can't ssh to it because all ports in that IP address seems to be closed. My bet is that you have ufw filtering all traffic in port 22(SSH port).

So you should allow traffic to port 22 and then you'll be able to ssh normally.

The same goes for 80 or 443 or 8000(django development server) I assume you followed the tutorial but once you restarted the droplet all the ufw rules were reset thus filtering all traffic.

In conclusion, if the IP is correct and you get a timeout usually it's a network issue(firewall or connectivity issues)

Hope that helps.

xinoman12
  • 101
  • 1
  • Thanks for your response. I checked and the result is firewall is not active. I doubt if it is rate limiting issue. – Srijwal R Dec 19 '19 at 13:17
  • I've run nmap -Pn against that IP and all ports are filtered. I'd check iptables with: `sudo iptables -L` And then use: `sudo ufw allow 22` To allow traffic for port 22. – xinoman12 Dec 19 '19 at 16:39
  • Tried it, but did not help. – Srijwal R Dec 20 '19 at 04:15