What I'm trying to do is access my webserver on my EC2 from the outside.
Here's what I've done so far:
From outside the ec2:
telnet <my ec2 ip> 80
I get telnet: Unable to connect to remote host: Connection refused
nmap <my ec2 ip>
port 80 is not listedFrom inside the ec2:
netstat -aon
it shows it is listening on port 80Make sure that your web server is bound to the external network interface.
Using 0.0.0.0
will ensure that connections can be made from any interface. On the other hand, using 127.0.0.1
(localhost
) would have behavior like what you describe, where you can connect to the web server locally, you can reach the host externally (e.g. via ping
) but cannot connect to the web server externally.