无法访问 AWS EC2 上的套接字服务器
我正在尝试在 Amazon Web Services EC2 实例上运行套接字服务器。套接字能够自行正常运行,并且实例上的本地远程登录可以连接,但尝试从外部远程登录到套接字会失败。我已进入安全组,以确保我使用的端口对 TCP 和 UDP 都开放(尽管套接字服务器已配置为 TCP)。我还缺少其他东西吗?
I am trying to run a socket server on an Amazon Web Services EC2 instance. The socket is able to run just fine on it's own, and telnetting locally on the instance can connect, but trying to telnet to the socket from the outside is failing. I have gone into the security groups to ensure the ports I am using are open for both TCP and UDP (though the socket server has been configured for TCP). Is there something else I am missing?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
默认情况下,服务器可能正在侦听环回接口或 ipv6。您可以通过运行
netstat --listen -p
进行检查,它将显示哪个程序侦听哪个地址/端口。如何让程序监听外部ipv4接口取决于程序/编程语言。The server might be listening on the loopback interface or ipv6 by default. You can check that by running
netstat --listen -p
which will show you which program listens on which address/port. How to make the program listen on the external ipv4 interface depends on the program/programming language.