阿里ubuntu服务器,外网通过ip访问不了的问题?

写了个demo(node官网那段hello world),在服务器上运行无问题,curl localhost也可以返回,但外网访问不了

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')

clipboard.png

补充:防火墙没开
clipboard.png

阅读 4.3k
2 个回答

防火墙和安全组放行端口了吗?

iptables要开对应端口?我猜的

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题