问题原文
原帖链接 · mealesbia · CC BY-SA 4.0
I have a nginx in docker on an AWS Elastic Beanstalk.
I need to provide the resolver of nginx.
What resolver do I need to use? I read about:
resolver 169.254.169.253;
OR
resolver 172.16.0.23;
And some else. My /etc/resolv.conf is showing my CIDR of my VPC with a .2 at the end. It's not clear what I have to define now.
已采纳解答
原帖链接 · Tim · CC BY-SA 4.0
As described by AWS the VPC base address plus two of your CIDR is a DNS server - eg if the VPC is 192.168.5.0 it's 192.168.5.2. This is likely a suitable resolver.
As Michael has pointed out in the comments 169.254.169.253 is a DNS resolver with a static IP, so it's easier to port across VPCs. That's one IP below the user metadata IP.
You haven't really described exactly what problem you're having, so it's difficult to give you any more advice.
- 10.0.0.0: Network address.
- 10.0.0.1: Reserved by AWS for the VPC router.
- 10.0.0.2: Reserved by AWS. The IP address of the DNS server is always the base of the VPC network range plus two; however, we also reserve the base of each subnet range plus two. For VPCs with multiple CIDR blocks, the IP address of the DNS server is located in the primary CIDR. For more information, see Amazon DNS Server.
- 10.0.0.3: Reserved by AWS for future use.
- 10.0.0.255: Network broadcast address. We do not support broadcast in a VPC, therefore we reserve this address.
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
