How to setup PTR record in Oracle Cloud Infrastructure (OCI)22 Jun 2023
One of my VPS machines use Cloudron to easily self-host apps. And I always receive a notification from my Cloudron instance saying:
PTR DNS record (PTR) did not match. Hostname: <IP> Expected: <My Domain Name> Actual: null
PTR: A Pointer record reverse maps an IP address to a hostname. This behavior is the opposite of an A Record, which forward maps a hostname to an IP address. PTR records are commonly found in reverse DNS zones. For more information about PTR records, see RFC 1035.1
So I looked it up and it takes me to OCI’s Reverse DNS. As it says, reverse DNS maps an IP to a hostname.
Even though my DNS records are managed by Cloudflare, the IP belongs to OCI. PTR records are primarily used for reverse DNS lookup, and their management is typically handled by the owner of the IP address range, which, in this case, is OCI.
Create an A (IPv4) or AAAA (IPv6) forward record that points your FQDN to the IP.
Open a service ticket for OCI and include the IP and FQDN that you want in the PTR. Note that you need to explicitly mention that you have finished step 1 in the ticket.
After OCI team added the PTR record, we can verify by executing
dig -x <IP> and check the
ANSWER SECTION contains the PTR record.
E.g. if your IP is
188.8.131.52 and the mapped FQDN is
dig -x 184.108.40.206 would return the following in the
220.127.116.11.in-addr.arpa. 3600 IN PTR example.com.