AWS – DNS无法解析到弹性IP地址

huangapple go评论92阅读模式
英文:

AWS - DNS fails to Elastic IP

问题

我一直在网上搜索并严格按照指南操作,但在成功进行DNS解析方面遇到了问题,希望你能帮忙。

我有一个托管基本Web应用程序的EC2实例,并附加了弹性IP地址。导航到弹性IP成功,我可以访问该应用程序(浏览到 http://xx.xxx.xx.xxx)。

我已经通过Route 53注册了一个域名,它正在显示。我已经创建了一个托管区域 - 最初,域名服务器与域名注册不匹配,并且测试记录失败了。我已经更改了NS详细信息以与注册的域名匹配,现在测试记录成功了。

我已经在托管区域中添加了一条记录(记录类型A,我已经验证该值是弹性IP,TTL 300在简单路由上)。这导致在尝试导航到该地址时出现 ERR_NAME_NOT_RESOLVED 错误。

我想不出还要提供什么其他信息。令人恼火的是,我之前按照相同的步骤操作,第一次就成功了,但我为了进行深入调试而将实例拆除了!

安全组(入站):

  1. sgr-08c70629989159bef IPv4 HTTP TCP 80 0.0.0.0/0
  2. sgr-07bfd9815f5b49e27 IPv4 HTTPS TCP 443 0.0.0.0/0
  3. sgr-076d93d22a441005c IPv4 SSH TCP 22 109.150.228.140/32

安全组(出站):

  1. sgr-049ed17ff4caa8935 IPv4 HTTP TCP 80 0.0.0.0/0
  2. sgr-0fa4371f7df144f16 IPv4 HTTPS TCP 443 0.0.0.0/0
  3. sgr-028599127e1b9375d IPv4 All traffic All All 0.0.0.0/0

我有一个公共子网,NACL如下:

入站:

  1. 100 All traffic All All 0.0.0.0/0 Allow
  2. * All traffic All All 0.0.0.0/0 Deny

出站:

  1. 100 All traffic All All 0.0.0.0/0 Allow
  2. * All traffic All All 0.0.0.0/0 Deny

谢谢!

英文:

I've been scouring online and following guidance to the letter but hitting an issue getting a successful DNS resolution, I hope you can help.

I have an EC2 instance hosting a basic web app, with an Elastic IP attached to that instance. Navigating to the Elastic IP is successful and I can access the app (browsing to http://xx.xxx.xx.xxx).

I've registered a domain through Route 53 and that is displaying. I've created a hosted zone - initially the Name Servers didn't match the domain registration and a Test Record failed. I've changed the NS details to match that of the Registered Domain and the Test Record now succeeds.

I've added a record to the Hosted Zone (Record type A, I've verified the value is the Elastic IP, TTL 300 on Simple Routing). This results in a ERR_NAME_NOT_RESOLVED error when trying to navigate to the address.

I can't think of what other information to provide. Annoyingly I followed the same steps previously and it worked first time but I tore the instance down for intense debugging!

Security Group (Inbound):

  1. sgr-08c70629989159bef IPv4 HTTP TCP 80 0.0.0.0/0
  2. sgr-07bfd9815f5b49e27 IPv4 HTTPS TCP 443 0.0.0.0/0
  3. sgr-076d93d22a441005c IPv4 SSH TCP 22 109.150.228.140/32

Security Group (Outbound):

  1. sgr-049ed17ff4caa8935 IPv4 HTTP TCP 80 0.0.0.0/0
  2. sgr-0fa4371f7df144f16 IPv4 HTTPS TCP 443 0.0.0.0/0
  3. sgr-028599127e1b9375d IPv4 All traffic All All 0.0.0.0/0

I have one public subnet for which the NACLs are:

  1. Inbound:
  2. 100 All traffic All All 0.0.0.0/0 Allow
  3. * All traffic All All 0.0.0.0/0 Deny
  4. Outbound:
  5. 100 All traffic All All 0.0.0.0/0 Allow
  6. * All traffic All All 0.0.0.0/0 Deny

Thanks!

答案1

得分: 1

我已解决此问题。对于其他遇到相同问题的人 - 请在您注册的域中更正域名服务器,而不是在托管区域中。

英文:

I've resolved this. For anyone else having the same issue - correct the Name Servers in your Registered Domain, rather than in your Hosted Zone.

huangapple
  • 本文由 发表于 2023年7月20日 14:19:43
  • 转载请务必保留本文链接:https://go.coder-hub.com/76727163.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定