0
votes

I launched an EC2 instance using AMI "Deep Learning AMI (Amazon Linux 2) Version 29.1 - ami-0785b5da651a70c82", set the inbound rule to:

"HTTP   TCP 80  0.0.0.0/0"
"SSH    TCP 22  0.0.0.0/0"

I can ssh to the host, and started jupyter notebook --port 80. On the ec2 instance, I can get page back using wget localhost.

But I just can't connect from outside the AWS. From my java client to connect to the host with port 80, I got "Connection refused". When connecting through browser, I got site not exist error.

I really confused, wondering how to trace this connectivity issue. Seems AWS added a lot of magic, including VPC, gateway, subnet, NAT and etc, I don't know whether there is any setting in the middle block the traffic. Seems no way for me to find out which component is failed between.

Any suggestion is highly welcome, thanks in advance. // Jack

1
I see you have added the port 80 to access the website but can you try telnet <ip> 80 from your laptop and telnet localhost 80 from the ec2?error404
You mention NAT, are you able SSH from externally but just HTTP does not work? OR is the SSH also internal?Chris Williams
I can SSH externally from my laptop, but got refused error when I try to connect through HTTP from the same laptop.BlueDolphin
I can't install telnet because of System restriction, but I tried the same code on google.com, works fine.BlueDolphin

1 Answers

0
votes

ssh tunneling solve the problem