0

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 ?

enter image description here

Community
  • 1
  • 1
mrid
  • 5,782
  • 5
  • 28
  • 71
  • In addition to to PTR, be aware of https://aws.amazon.com/premiumsupport/knowledge-center/ec2-port-25-throttle/ – Dusan Bajic Apr 17 '20 at 18:25

2 Answers2

2

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.

Michael - sqlbot
  • 169,571
  • 25
  • 353
  • 427
  • Thanks, I just submitted the form :) any idea why this requires a special request? My company's website shows an IP on pinging it, and on doing reverse lookup, it points to ec2. Why should the world know where it's hosted on ? – mrid Apr 18 '20 at 08:10
0

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/

mdeora
  • 4,152
  • 2
  • 19
  • 29
  • You have misunderstood the purpose of that article. It is for setting up reverse DNS for addresses owned by third parties, not addresses owned by AWS. – Michael - sqlbot Apr 17 '20 at 23:28