How do I access my public DNS on Amazon's EC2

Solution 1:

The default is not allowed any connection to the instance. The same can not be installed Web server.

  • allow ssh(for UNIX) or RDP(for Windows) and HTTP
    • open https://console.aws.amazon.com/ec2/
    • NETWORKING & SECURITY->Security Groups
    • select default
    • add rules to SSH(for your ip or 0.0.0.0/0)
    • add rules to HTTP
  • connect to the instance and install Web server
  • check public DNS through a web browser

Solution 2:

For those of you using Centos (and perhaps other linux distibutions), you need to make sure that its FW (iptables) allows for traffic on port 80 (or any other port you want). In order to test if its the machine's FW that's preventing access (as opposed to Amazon settings) try the following:

sudo service iptables stop
sudo chkconfig iptables off

Now test if you can access the machine. If thats the case then you'll need to open the specific ports your application needs. See here on how to do that.

to re-enable the rules just:

service iptables start
chkconfig iptables on