【问题标题】:Not able to expose spring boot port in aws ec2 to outer world无法将 aws ec2 中的 Spring Boot 端口暴露给外部世界
【发布时间】:2020-06-22 16:38:38
【问题描述】:

我在 8443 端口上的 aws 上运行 spring boot 应用程序。但我无法从外部 ping 它

$ sudo netstat -tulpn
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      1305/sshd
tcp        0      0 0.0.0.0:8443            0.0.0.0:*               LISTEN      24449/java
tcp        0      0 0.0.0.0:8091            0.0.0.0:*               LISTEN      24449/java
tcp        0      0 0.0.0.0:2000            0.0.0.0:*               LISTEN      24449/java
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      12632/nginx.conf
tcp6       0      0 :::22                   :::*                    LISTEN      1305/sshd
udp        0      0 0.0.0.0:68              0.0.0.0:*                           927/dhclient

我的入站安全组规则

Type
Protocol
Port range
Source
Description - optional
HTTP    TCP 80  0.0.0.0/0   -
SSH TCP 22  0.0.0.0/0   -
Custom TCP  TCP 8443    0.0.0.0/0   -

我的入站网络 Acl

Rule #
Type
Protocol
Port Range
Source
Allow / Deny
100
ALL Traffic
ALL
ALL
0.0.0.0/0
ALLOW
*
ALL Traffic
ALL
ALL
0.0.0.0/0
DENY

在容器内使用 8443 端口进行 telnet 时有效。但是在 8443 上通过 ip 从我的本地进行 telnet 失败。

【问题讨论】:

  • 请同时附上出站网络ACL
  • 你在 EC2 上使用公共 IP 吗?

标签: java amazon-web-services amazon-ec2 server


【解决方案1】:

实际上,我本地计算机的防火墙正在停止连接。我检查了另一台笔记本电脑,我能够连接。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2020-01-28
    • 1970-01-01
    • 2018-05-26
    • 1970-01-01
    • 2019-02-12
    • 2021-08-30
    • 2020-02-21
    相关资源
    最近更新 更多