Access node app on digital ocean - This site can't be reached

后端 未结 2 1606
温柔的废话
温柔的废话 2021-02-05 16:07

I am unable to access my digital ocean node js app. I\'ve already SSH\'ed in, cloned my Node app from Git, npm installed, and successfully started the app on the droplet, yet I

2条回答
  •  既然无缘
    2021-02-05 16:50

    Some Digital Ocean droplets (mainly one-click apps) come with ufw firewall installed and by default all ports except for 22, 80, and 443 are blocked.

    To check if ufw is installed and which ports are blocked/open do:

    sudo ufw status

    Output:

    To                         Action      From
    --                         ------      ----
    22                         LIMIT       Anywhere                  
    80                         ALLOW       Anywhere                  
    443                        ALLOW       Anywhere                  
    22 (v6)                    LIMIT       Anywhere (v6)             
    80 (v6)                    ALLOW       Anywhere (v6)             
    443 (v6)                   ALLOW       Anywhere (v6)
    

    To allow traffic on port 9000 do:

    sudo ufw allow 9000/tcp
    

提交回复
热议问题