Home  >  Q&A  >  body text

node - Alibaba ubuntu server, the external network cannot access through IP?

Written a demo (the hello world part of the node official website), and it runs without problems on the server. Curl localhost can also return, but it cannot be accessed from the external network

const http = require('http')

http.createServer(function(req,res){
        res.writeHead(200,{'Content-Type':'text/plain'})
        res.end('hello world')
}).listen(8082)


console.log('server running on http://localhost:8082')

Supplement: The firewall is not turned on

巴扎黑巴扎黑2712 days ago665

reply all(2)I'll reply

  • 曾经蜡笔没有小新

    曾经蜡笔没有小新2017-05-16 13:20:01

    Have the firewall and security group released the ports?

    reply
    0
  • PHPz

    PHPz2017-05-16 13:20:01

    Do you need to open the corresponding port for iptables? I guessed

    reply
    0
  • Cancelreply