How to change Private DNS in AWS

Asked

Viewed 209 times

1

I am climbing some machines in AWS and I need to change the Private DNS of the machines, initially I am trying to change in a linux, I do not know if this change is internal in the machine or ADM of AWS... I changed in the host and this with the name I want, but when I try to drip it’s not solving... Could you help me?

1 answer

1


If you intend to access your servers by example.com instead of the name they generate, you will have to configure your own DNS server.

By default, AWS VPC manages DHCP for you and comes with Amazon’s DNS Server.

You can read in the documentation the options at your disposal to resolve the issue:

DHCP Options Sets

Domain-name-Servers

The IP Addresses of up to four Domain name Servers, or Amazonprovideddns. The default DHCP option set specifies Amazonprovideddns. If specifying more than one Domain name server, Separate them with commas.

Domain-name

If you’re using Amazonprovideddns in us-East-1, specify ec2.internal. If you’re using Amazonprovideddns in Another Region, specify Region.compute.Internal (for example, ap-Northeast-1.compute.Internal). Otherwise, specify a Domain name (for example, Mycompany.com).

Important

Some Linux Operating systems Accept Multiple Domain Names separated by Spaces. However, other Linux Operating systems and Windows Treat the value as a single Domain, which Results in Unexpected behavior. If your DHCP options set is Associated with a VPC that has instances with Multiple Operating systems, specify only one Domain name.

Free translation:

Domain-name-Servers

The IP addresses of up to four domain name servers, or Amazonprovideddns. The default DHCP option set specifies Amazonprovideddns. If you specify server more than one domain name, separate them with commas.

Domain-name

If you are using Amazonprovideddns in us-East-1, specify ec2.internal. If you are using Amazonprovideddns in another region, specify Region.compute.Internal (e.g., ap-northeast-1.compute.Internal). Otherwise, specify a domain name (for example, Mycompany.com).

Important

Some Linux operating systems accept multiple domain names separated by spaces. However, other Linux and Windows operating systems treat value as a single domain, which results in unexpected behavior. If your defined DHCP options is associated with a VPC that has cases with multiple operating systems, specify only one domain name.


Alternative

Given that you can’t change without implementing your own DNS servers, you can easily refer to it under another name by creating a record CNAME, which will have the desired effect.

For that, in the DNS zones of the place yesterday you have your example.com, add a record CNAME guy:

meuNovoNovo IN CNAME meuNomeAntigo.

This way, when accessing meuNovoNovo, the server where it is registered will indicate that they should search for the information on meuNomeAntigo.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.