首页 > 解决方案 > Not able to expose spring boot port in aws ec2 to outer world

问题描述

I am running spring boot app on aws on port 8443. But I am not able to ping it from outside world

$ 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

My inbound security group rules

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   -

My inbound network 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

While doing telnet inside the container on port 8443 works. But on doing telnet from my local by ip on 8443 fails.

标签: javaamazon-web-servicesamazon-ec2server

解决方案


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


推荐阅读