Amazon EC2 instance has new IP, updated DNS records, still points to old IP - amazon-web-services

Long story short here, I restarted my EC2 instance unwittingly which (without an EIP) changed the pubic facing IP address. Ok fair enough, but after I changed the DNS records on Hover.com for my domain now when I type in www.mydomain.com it points back to the old instance IP that doesn't work.
I verified this with host www.mydomain.com on my Linux command line.
I looked at the DNS records and they are clearly changed to the new IP for the A records (for * and #).
The only thing I can come up with is that perhaps the DNS servers listed are the problem. Here are the name servers I'm using
My attempted solution has been trying to find a way to update these servers, but I am not finding any help on that. Any recommendations to solve this issue?

Check the TTL (Time To Live = cache duration) on your DNS server, be sure to use the smallest duration allowed (0 if possible). This will tell DNS relays and clients to cache the resolution for a short period of time (or not at all if you set it to 0)
However, some clients do not honor the TLS proposed by the DNS and your only solution is to wait for their cache to expire.
The dig command will show you the TTL sent by your DNS server, as in the example below : 60 secs.
$ dig www.stormacq.com +noall +answer
; <<>> DiG 9.10.6 <<>> www.stormacq.com +noall +answer
;; global options: +cmd
www.stormacq.com. 60 IN A 54.192.29.54
www.stormacq.com. 60 IN A 54.192.29.133
www.stormacq.com. 60 IN A 54.192.29.136
www.stormacq.com. 60 IN A 54.192.29.234
I would suggest you to use an Elastic IP Address, these are provided without charges as long as it is attached to a running EC2 instance. (see https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html for more details)

I solved this by using Hover's DNS servers instead of using Amazon's. I contacted Hover and they recommended changing to their name servers and removing Amazon's. Apparently Amazon's DNS servers were taking a long time to update records (if they were trying to at all).
Record #1 ns1.hover.com
Record #2 ns2.hover.com
Record #3 blank
Record #4 blank
*edit: Thumbs down but no comment explaining why? This answer worked for me

Related

Google VM instance domain issue

I am trying to get my domain (moviefinder.app) to connect to http://34.67.108.103/. I have followed the documentation (https://cloud.google.com/dns/docs/tutorials/create-domain-tutorial).
The second last step seems to be working $ dig +trace moviefinder.app
But the last step $ nslookup moviefinder.app gives me this error:
You have to wait until DNS propagation is completed.
DNS records are not a instant process, It means you need to wait for a DNS record updates because it is time required for DNS servers worldwide to update their cached information for a domain name.
You can check whether your DNS propagation is completed or not in here
EDIT) I missed your dns setup is worked fine with dig command, I think cause of this result is difference of dig and nslookup, Please refer to this link

Amazon Route53 domain not linking to Lightsail

I'm a complete newbie to networking so bear with me. FYI I am using the pre-bundled Ubuntu 16.04 instance on Amazon Lightsail. I am building a Django project.
I have a domain registered on Route53 that I am trying to link to my Lightsail project. I created a DNS zone and static IP following the Lightsail docs. Then I created the appropriate A and NS records in the Hosted Zone in Route53.
But when I run the Django server from the command line, using port 0.0.0.0:8000 (after doing sudo ufw allow 8000), I cannot connect to bungol.com:8000. I used this website to check if bungol.com is correctly linked but it seems there is no ip address attached to the domain.
So I have 2 questions:
Firstly, why is this not working?
Secondly, how do I go about troubleshooting such an issue? There are so many things here that could have caused the issue and I'm clueless as to how I should start solving the problem.
Answer, you did everything correctly.
How long did you wait after configuring your DNS records? Your screenshot does not show the TTL values, but you would have to wait at least that long usually.
I just went to your site www.bungol.com and it works. The IP address 19.221.198.143 matches based upon a ping.
There is some conflicting information in the docs (see discussion). The trick is to use Lightsail only to set up a static IP and use that IP for the A record on the Route53 side.
No need to set up a DNS zone in Lightsail or deal with its nameservers.

Updates to Type A record set not reflecting in Route 53

I had 2 EC2 instances - one connected to mydomain.com and another connected to dev.mydomain.com
When mydomain.com instance went down because of some reason I changed the record set of mydomain.com to the public IP of second EC2 instance. The change was immediately reflected and mydomain.com started working fine.
After a few hours after fixing issues with the first EC2 server I reverted the IP address in the record set of mydomain.com. But this does not work. mydomain.com still points to the 2nd EC2 machine.
Can anybody suggest possible solutions?
DNS changes take time to propagate. Also, computers cache DNS responses, so checking changes can be difficult. The best advice is to wait, or to check it via a different computer.
You might want to use a service like https://cachecheck.opendns.com/ to check the resolution, or clear your cache before checking (in Windows, use ipconfig /flushdns).
DNS records have a ttl or Time To Live. This means records are not refreshed from the central server until that TTL has expired.
You should look at using failover records in R53 :)

Name Resolution Failed for Route53

I'm using an EC2 server in conjunction with Route53.
However, despite my best efforts, I cannot understand why the DNS is failing to resolve.
What I have done so far:
Ensured the domain and hosted zone share the same NS
Set up an elastic IP for EC2 and added an A record with that info
Opened up all traffic on all ip addresses in my security group within EC2
waited for propagation
Made sure I was using my www address for testing
I can access the site using the elastic IP itself, which tells me the security group isn't the issue.
Here's screenshots of my Hosted Zone and Name Server.
Any help here is greatly appreciated.
It appears to now be working, albeit only on cellular. Looks like I just need to wait for my ISP to do their thing, despite being over 72 hours now.

How to link domain name and static ip linking together

I am new to all this. I have setup a Nginx server http://52.x.x.x I am testing it. I bought domain name from namecheap. I want domain name routed to the ip. What setting I should configure for this.
First, make sure your instance is associated with an Elastic IP (EIP). If you do not do that, your instance's public IP address will change each time you reboot. Here are the instructions from AWS on how to setup and assign an EIP:
http://docs.aws.amazon.com/AmazonVPC/latest/GettingStartedGuide/getting-started-assign-eip.html
Note that if you don't associate that EIP to a running instance you will be charged. You can reference EIP pricing here:
https://aws.amazon.com/ec2/pricing/
Next, as mbaird mentioned setup an A record in your DNS management at Namecheap.com. All you have to do is add an A record and enter the public EIP address that you received in the step above. As a start set your TTL (Time to Live) to 60 seconds. Here are the instructions on how to do that from Namecheap:
https://www.namecheap.com/support/knowledgebase/article.aspx/434/78/how-do-i-set-up-host-records-for-a-domain
You can use www.whatsmydns.net to help troubleshoot any DNS propagation. (i.e. It takes a while for all of the world-wide root DNS servers to know that your domain name points to 54.x.x.x)
And finally - just as a suggestion - don't post your IP address in a forum like this unless you absolutely have to. Instead write something like, 54.x.x.x.
I hope this helps!