Can't reach to an AWS EC2 instance website - amazon-web-services

I just launched a instance on AWS and I'm trying to open the website. So I copy the Public IPv4 address and paste it on my page. But it always returns This site can’t be reached 35.78.183.239 took too long to respond.
I've changed my firewall setting to access google chrome and set security groups HTTP, HTTPS. I can't figure out where the problem is. Any suggestions?

You didn't specify what webserver or AMI is on your EC2 instance.
You need to setup an AMI or manually install and setup a webserver for anything to show, otherwise the EC2 instance, while reachable, will not respond.
Make sure that ssh access is enabled and try ssh into the machine. If you can successfully login, then you know the instance is reachable and the problem is with your webserver software. This will help you debug.

What port is your application running on? When you enable HTTP and HTTPS it only allows ports 80 and 443 on the security group. This won't help if your application runs on a different port, so you'll need to add that to your security group to allow inbound traffic.

Related

EC2 instance refused to connect

I have a site built on NodeJS, which I am currently trying to deploy on the free tier on AWS.
So far I have created an instance, launched it, I can connect via SSH (console) to my instance, and have successfully pulled my files from my Git repository. However, when I try to browse my public DNS, I get: http://ec2-13-234-136-30.ap-south-1.compute.amazonaws.com:2222 took too long to respond.
I have also had a look at the settings on security group (as recommended on a different post) and ensured that inbound and outbound 'HTTP' and 'HTTPS' traffic are allowed (screenshot below):
Inbound settings: Inbound settings
Outbound settings: enter image description here
Any ideas on what else could be causing this issue? I would greatly appreciate your help. Thanks.
Your security configuration is too permissive, please limit to the port and protocols you are using.
Given that your firewall is off, which you should definitely check to confirm,
I guess you start NodeJs server binding to hostname 127.0.0.1, which allows only local traffics from EC2 instance.
Try changing it to 0.0.0.0, which allows public traffic and see if that solves your problem.

AWS EC2 instance "This site can't be reached", though I do have the ports 80 and 443 open

I have been looking for help with this problem, and the answers just say to add inbound rules to the security group. Well, I have done those and I am still unable to access my website from the public DNS (just putting that into the url box and navigating to it). There are multiple port 22 inbound rules for the people accessing my server, and the outbound rule is just "All traffic".
I've had this problem running Wordpress on EC2 instances. Things I'd try:
Access the instance via ssh. Check out https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AccessingInstancesLinux.html
If you're accessing through ssh, maybe it's because your disk is full. To check this you can run df -h on your Amazon EC2 server.
I tried accessing my newly setup AWS EC2 Instance and I had this same issue, I later realised I was accessing the public DNS via HTTPS which had not been set up. when I changed the url to use HTTP it worked. Ensure to configure HTTP in the security group.

How to open outside access to ElasticSearch server hosted on Windows EC2 instance?

I didn't find such guide or articles how to do it for ElasticSearch hosted on Windows server.
I have the EC2 amazon windows instance which running ElasticSearch server on port 9200, but I can't achieve it by _ec2_ip_adress:9200 outside the server.
I completely sure that all TCP ports are opened in amazon security group rules, I've turned off the firewall on the server as well.
So that is the problem in ElasticSearch configs.
Can someone help me with that?
Well but you know that then any body would be able to delete/create stuff in your index until you have shield.
If you really want to open it, also make sure that in windows firewall you opened port 9200.
So what i would do i would probably restrict in firewall on in Amazon access to this port for specific IPs (Actually in my project i am doing that :) )
There is one more thing to check on which IP is runned as soon as i remember ES will run on private IP. Look to network.host default is __local__. Try network.host: 0.0.0.0

What Do I Need To Do To Enable My EC2 Windows Instance As a Web Server?

I'm not a hardware guys, so I'm probably missing something simple, but I did the following:
Created a Windows VM.
Activated the web server role/IIS features (I can successfully serve a page via localhost when remote desktopped in).
Made sure outgoing port 80 wasn't blocked in Windows firewall.
Created a load balancer that pointed to the instance (to make enablement of SSL easier).
I then tried pulling up both the load balancer public DNS and the VM'w and neither of them pull up any web page. The Windows VM instance reports that it's running, but the load balancer reports that the VM is OutOfService trying to forward port 80.
What do I need to do to be able to serve my web site?
Open port 80 on the AWS security group assigned to your EC2 instance.
Open inbound access to port RDP in your security group.
This will make you to access the Windows server of your ec2-instance.
Edit the Security Group assigned to your EC2 instance and add a rule to allow port 80 in Inbound and outbount rules.

How to view website launched in Amazon EC2 instance?

I have followed the steps provided by Amazon EC2. I have installed a wordpress website in the EC2 Instance.
My public DNS is given as ec2-xx-xxx-xx-xxx.us-west-2.compute.amazonaws.com/
and Public IP is also given as xx-xxx-xx-xxx.
How to view the website from any other machine?
Note:
EC2 Instance is created and running now.
I can view it in the localhost as well as public DNS in the EC2 instance using RDP. (http://ec2-xx-xxx-xx-xxx.us-west-2.compute.amazonaws.com/)
If you can see the web site from the EC2 instance, but not from other machines, there is probably one of the following things wrong:
The DNS entry is not available or is wrong. Since you can RDP using that entry, this can't be the cause.
Access to the correct port is being blocked by the security group or firewall. Since the instructions you referenced specifically say to make sure that both port 80 (HTTP) and 3389 (RDP) are open, and you know that is true from port 3389, this isn't likely, but is possible. Make sure that there are security group rules for both port numbers that look the same.
The Windows server itself is refusing to allow outside access to port 80 on that address. This is unlikely, but not impossible, and the instructions specify that you should "disable Internet Explorer Enhanced Security Configuration", and at the end cover "Making Your WordPress Site Public". Make sure that the web server isn't configured to only respond to requests from localhost (127.0.0.1) and that there are no Windows firewall rules blocking port 80.
I think that the likeliest problem is number 2, above. Perhaps you forgot to open port 80 in the security group, or typed a different port number or a different address range to open it to.