[英]Azure Ubuntu VM application only able to connect on port 80
I have an Ubuntu16.04 VM on Azure, and am trying to run a node server on it. 我在Azure上具有Ubuntu16.04 VM,并尝试在其上运行节点服务器。 When I bind the port to 80, I am able to access it from my browser ( http://abcd:80 ). 将端口绑定到80后,便可以从浏览器( http:// abcd:80 )访问它。 However, if I try to instead bind the server to a different port, such as 3300 or 8080, the browser times out when trying to connect to it. 但是,如果我尝试将服务器绑定到其他端口,例如3300或8080,则浏览器尝试连接时会超时。 ( http://abcd:3300 ) ( http:// abcd:3300 )
I have ensured that: 我确保:
I am listening on the correct port (I think?) netstat -ant | grep 3300
(我认为),我听的正确端口netstat -ant | grep 3300
netstat -ant | grep 3300
gives netstat -ant | grep 3300
给
tcp6 0 0 :::3300 :::* LISTEN
I have spent a few hours now researching on the internet how to get it to work and tried everything I could find, but to no avail. 我现在花了几个小时在互联网上研究如何使其工作,并尝试了所有我能找到的,但无济于事。 If anyone has any input i'd be happy to try it out. 如果有人有任何意见,我将很乐意尝试。
Jason was correct, it was a ufw issue. 杰森是正确的,这是一个普遍存在的问题。 If anyone comes across this question in the future, I solved it with the command 如果将来有人遇到这个问题,我可以使用以下命令解决
sudo ufw allow proto tcp from any to any port 3300
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.