EC2 domain name ERR_CONNECTION_TIMED_OUT - amazon-web-services

I have bought a domain name from GoDaddy and would like to host it on an EC2 instance. I have created the instance and have installed apache. I have added an index.php with phpinfo(); and it is showing correctly when I access the public IP on browser. Now I would like to point my domain name to this instance. For this I have added an A RECORD at Godaddy DNS configuration. But when I access the doamin, it is showing
ERR_CONNECTION_TIMED_OUT
message in the broswer. Is there any additional settings I need to do ?

What you did is what it is needed. SO if it is not working then then you have to check everything again :
- check (for example with ping) if the domain is in fact resolving to correct IP address (from your computer and from instance for example to use different DNS servers). You can also use host command (for example host www.mydomain.com 8.8.8.8 - it will use google's dns (8.8.8.8) as the source of truth
- check if Security Group in aws allows inbound traffic (that's probably true as you can reach the instance directly)
- try to connect from different network (again this should not be problem as IP is reachable using IP).
you can also post the domain name and requested Ip so we can check this for you ;)

Related

GCP load balancer stuck in FAILED_NOT_VISIBLE status

I am trying to create a load balancer using a app engine backend. I followed the official guide . I followed this (pretty good) tutorial too. I can't get the domain status to switch to ACTIVE. It remains stuck as FAILED_NOT_VISIBLE, which indicates there may be a problem with setting the domain names.
I don't know what's missing. I have a relatively simple LB setting. The frontend is defined with the HTTPS protocol and an ephemeral address (#frontend_ip).
In the Cloud DNS, I created a zone with the following record sets :
/ A record type / IPv4 = #frontend_ip
www / CNAME record type / IPv4 = #frontend_ip
The SSL certificate has the 2 same domain names defined as above (with and without www). I selected the Google managed certificate type.
The following command gcloud compute target-https-proxies list shows my target-proxy is associated with my SSL certificate.
I tried a different way by creating an External IP address first, as explained in the above linked guide. Then, by selecting this External IP address in my Frontend configuration, instead of an ephemeral address. Then by selecting this External IP address as the IPv4 address of my domain names definitions. That doesn't seem to work either.
Any help would be greatly appreciated, as I don't know what's missing. I've tried to delete it all and re create the LB and DNS settings.
You state that you created a zone. Is that zone pointed to by your domain registrar? Your problem is most likely incorrect DNS setup. Start at your Domain Registrar and make sure everything is set up correctly. Since you created a new zone, you probably have a Name Server problem

AWS EC2 change public DNS hostname so that it works with Reverse DNS lookup

I've already gone through the following links but couldn't find anything useful:
https://forums.aws.amazon.com/thread.jspa?threadID=79119
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/set-hostname.html
How to change Public DNS in amazon ec2
EC2 t2.micro instance has no public DNS
I have a ec2 server running ubuntu. I've set up an elastic IP for the instance, and have configured my domain with that IP on Route 53. It's working fine.
Now I'm using the server to send a few (transactional) emails. I still haven't used TLS in the mails, so Gmail correctly shows that I havent encrypted this message in red. But instead of my domain name, it shows ec2---my-server-ip---my-server-location has not encrypted the message.
I ran reverse DNS lookup on https://www.whatismyip.com/reverse-dns-lookup/ and it showed the amazon server details.
How can I change this DNS hostname to my own domain name ?
https://forums.aws.amazon.com/thread.jspa?threadID=79119
Read that one again, because it contains your answer.
Create an A record matching the reverse entry you want, if you don't already have one, then send a request to AWS support to associate the hostname you want with the Elastic IP, using this form:
https://aws-portal.amazon.com/gp/aws/html-forms-controller/contactus/ec2-email-limit-rdns-request
That's how you do it. It can only be done with an Elastic IP.
Reverse DNS look up is linked with the PTR record set by the owner of the IP address.
In case of AWS you need to get in touch with AWS support for setting up the PTR record for an Elastic IP address assigned to your account.
They will ask you to create a public zone file of reverse IP address followed by in-addr.arpa
eg. your ipv4 address is - 1.2.3.4
then zone file needs to be created with 4.3.2.1.in-addr.arpa with an PTR record pointing to your ipaddress.
You can refer this link for more information - https://aws.amazon.com/premiumsupport/knowledge-center/route-53-reverse-dns/

How I can make that the request to 'api.mydomain.com:8000' redirect to IP for the EC2 instance

I have an api running in a EC2 instance in AWS in certain port (ej 8000). I have register a domain in bluehost provider.
Currently my app is pointing to the IP that offer the EC2 instance, but I want to change to the domain in order to use like api.mydomain.com:8000.
I tried to create a configuration in the DNS zone of panel control in the bluehost account, but it does not work, I think the DNS type I have to use is the 'SRV record', but I tried some configuration but the cpanel dont take it.
How I can make that the request to 'api.mydomain.com:8000' redirect to the EC2 instance's IP and the configurated port?. Thank you
You can use a normal A record for api.mydomain.com and point that to your instances IP address. You don't include the port anywhere in the DNS configuration.
If it was a website that was on port 8000 you would type api.mydomain.com:8000 in your browser url.
Make sure that your instances security group is open on port 8000, and that your instance is listening on port 8000.
When you say "it didn't work", what do you mean? Where was there a failure?
Normally you would create an 'A'record to point a domain name to a IP address, not a 'SRV' record.

Assigning domain name to host on Route 53 in AWS

I'm deploying my first app on EC2. I have a domain name registered, lets call it example.com. My ec2 instance has a public ip, lets say, 100.100.100.100. When I got the EC2 instance, I already have a wordpress site installed on it (the blog for my app - blog.example.com). Hitting the public ip directly goes to the blog.
My app is running on the 4000 port of this EC2 instance. I want to assign the example.com domain to this.
I'm using AWS Route 53 for the DNS. I'm clicking on create a record set, where I give the name - www.example.com to the value 100.100.100.100:4000. The type is an IP-v4. However, when I try to assign this, I get the error below:
The record set could not be saved because:
- The Value field contains invalid characters or is in an invalid format.
It's because I've specified the port of the ip in the value. How do I get example.co to point to this app on 100.100.100.100:4000? Thank you for all the help in advance!
Amazon Route53 is a global Domain Name Service (DNS).
DNS services are used to resolve DNS names (eg example.com) to an IP address (eg 100.100.100.100). However, DNS servers do not point to ports on a machine (eg port 4000).
Therefore, to refer to 100.100.100.100:4000, you would use example.com:4000.

Can I use Amazon's DNS servers for my mail server

We have a domain mydomain.com, which we have registered with a UK registrar. We are using Amazon's Route53, and this domain has been added in Route53 and is using the name servers as follows;
ns-558.awsdns-05.net
ns-1755.awsdns-27.co.uk
ns-466.awsdns-58.com
ns-1343.awsdns-39.org
I've added the relevant A records for www etc to point our elastic IP to this domain.
We are also running MailEnable on this EC2 server (running Windows 2012). The MailEnable server is asking for me to enter DNS addresses (Check and configure DNS settings), I assume it will use when sending email.
My question is what DNS addresses / servers can I use ? Can I use
ns-558.awsdns-05.net
ns-1755.awsdns-27.co.uk
ns-466.awsdns-58.com
ns-1343.awsdns-39.org
You can see the DNS address(es) in the screen shot below.
You can't use those Amazon servers because they're authoritative-only (they'll only tell you about domains they know about, instead of acting as a recursive proxy). You can use Google's public DNS servers at 8.8.8.8 and 8.8.4.4 for that field.
(original answer below)
You need to create an A record that points at the elastic IP assigned to your mail server (for example, mail.yoursite.com points at 1.2.3.4). Then, you'd create an MX record for yoursite.com that points at mail.yoursite.com. Finally, I believe you would give MailEnable mail.yoursite.com, but I'm not 100% sure on that.