Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: Reverse Lookup On Private DNS Zone #607

Closed
akamalov opened this issue Dec 5, 2017 · 4 comments
Closed

Question: Reverse Lookup On Private DNS Zone #607

akamalov opened this issue Dec 5, 2017 · 4 comments
Labels

Comments

@akamalov
Copy link

akamalov commented Dec 5, 2017

Greetings,

Please note, this is a question, no issue is being raised.

I tried to post a question in Stack Overflow, but I got zero hits back (https://stackoverflow.com/questions/47645016/azure-private-dns-reverse-lookup-terraform)

Question: I am a little confused about reverse lookup on Azure.

What I want to do is to reverse-lookup private IP addresses assigned. I can forward lookup my internal zone (something like auto generated fgityvclopuymnv.bx.internal.cloudapp.net), but I cannot reverse lookup the IP address

I did create in-addr.arpa segment for the network segment using Terraform, but it seem still not provide a reverse lookup.

###########################################################################
# Reverse DNS Lookup
###########################################################################

resource "azurerm_dns_zone" "reverse-8_0_10" {
  name                = "8.0.10.in-addr.arpa"
  resource_group_name = "${azurerm_resource_group.rg.name}"
tags {
      environment = "${var.environment_tag}"
     }
}

resource "azurerm_dns_ptr_record" "zookeeper" {
  name                = "zookeeper"
  zone_name           = "${azurerm_dns_zone.reverse-8_0_10.name}"
  resource_group_name = "${azurerm_resource_group.rg.name}"
  ttl                 = 60
  records             = ["${var.env_short_name}-private.${var.dns_suffix}"]
tags {
      environment = "${var.environment_tag}"
     }
}

resource "azurerm_dns_ptr_record" "kafka" {
  name                = "kafka"
  zone_name           = "${azurerm_dns_zone.reverse-8_0_10.name}"
  resource_group_name = "${azurerm_resource_group.rg.name}"
  ttl                 = 60
  records             = ["${var.env_short_name}-private.${var.dns_suffix}"]
 tags {
      environment = "${var.environment_tag}"
     }
}

Zone gets created, as well as PTR records, but still reverse lookup is not possible.

I did go through https://www.terraform.io/docs/providers/azurerm/r/dns_ptr_record.html but still can't seem to grasp how reverse lookup is attainable in Azure environment.

Are there any examples that can demonstrate such as:

  • Create internal DNS zone
  • Create in-addr.arpa reverse zone

...using Terraform? May be I can model after it and solve this problem.

Thanks so much in advance!!

@ranieuwe
Copy link
Contributor

This was not possible with Azure DNS at the time this question got posted. The resolver on the Virtual Network would not be able to know where to go for the DNS resolution for the private arpa zone and hence could do not do any reverse DNS resolution.

With the release of Azure Private DNS this is now possible though.

PR #1404 should bring that functionality to Terraform.

If this answers your question, can this issue be closed?

@akamalov
Copy link
Author

akamalov commented Jun 28, 2018 via email

@tombuildsstuff
Copy link
Contributor

👍 closing in favour of #1404

@ghost
Copy link

ghost commented Mar 30, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!

@ghost ghost locked and limited conversation to collaborators Mar 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants