Score:0

reverse DNS (bind) for single ip/machine on non-private network

cn flag

I have a simple problem: my DNS does not answer a reverse lookup of my public ip address (e.g. 11.22.33.44) correct ... it just answers SOA and NS (taken from SOA record), but no PTR (additional extra entry for NS also not working, but who cares).

We are not talking about a private net, so I don't have the option to just setup a reverse zone for 33.22.11 and add a PTR record for 44 ... (I tried locally without notifying others and this would work fine).
But this way, I would answer authoritative for my network neighbors (1.43 and 45-254) also ... doesn't sound correct.

So I setup a single ip reverse zone 44.33.22.11 and added the SOA.

@     IN    SOA   mydomain.com. hostmaster.mydomain.com. (
                  2513; Serial
                  86400         ; Refresh (every 24h)
                  10800         ; Retry (every 3h)
                  3600000       ; Expire (after 42 days)
                  3600 )        ; TTL Negativ Cache (1h)

So far, so good, upto here, all works as expected.
To add PTR, I tried the following entries but NONE gets responded by bind when asked for it:

  • @ IN PTR mydomin.com.
  • @. IN PTR mydomin.com.
  • IN PTR mydomain.com.
  • . IN PTR mydomain.com.

It appears to ignore anything but the SOA for a single-ip-zone (the above entries do not even cause an error in bind), so how do I get the required PTR created?

thanks for any hint, even if I'm just silly and dont see the obvious :-)

^5 sven

Score:1
jp flag

Your PTR record needs to go into in-addr.arpa, not into your mydomain.com zone.

Do you have control over this directly?

If your public IP has been assigned to you from some hosting company, usually they would have to offer you some interface to set the reverse DNS for any of you public IP addresses.

il flag
You mean, that in my SOA record, I have to use in-addr.arpa? Sorry, but I'm in DNS for the first time. I set the DNS with my privider to a hidden primary, so I have indeed FULL control over all records.<br/> Can you post the req'd contens of the reverse zone? You'll get a virtual beer ;-)
jp flag
"so I have indeed FULL control over all records" -> what is "all" here? yourdomain.com or in-addr.arpa, which I doubt?
jp flag
You should make sure you understand that forward and reverse DNS are two pretty unrelated databases. One is domain name -> IP address. The other one is (global) IP address -> name.
Score:0
cg flag

To add resverse resolution you need to add this configuration

  1. Add where bind will find reverse zone file (for this example net (192.168.1.0/24))

    zone "1.168.192.in-addr.arpa" { type primary; file <path>/<filename.rev>; }

  2. Create the reverse file zone <filename.rev> (The file name should match)

$ORIGIN 1.168.192.in-addr.arpa.
$TTL 86400
@     IN     SOA    dns1.example.com.     hostmaster.example.com. (
                    2001062501 ; serial
                    21600      ; refresh after 6 hours
                    3600       ; retry after 1 hour
                    604800     ; expire after 1 week
                    86400 )    ; minimum TTL of 1 day
# Update your DNS server
      IN     NS     dns1.example.com.
      IN     NS     dns2.example.com.

# PTR for 192.168.1.100 -> web.example.com
100    IN     PTR    web.example.com.

il flag
I already tryed this variant, bit this does a Class C reverse with the result, that my DNS replies authoritative for the whole subnet (192.168.1.0/24). But as I said: it is no private! it is a visible, globally valid single IP and I'm not sure what happens to the provider's secondaries, when many guys like me claim the whole subnet.
Roid avatar
cg flag
What happens?, nothing, DNS does not know any about subnets just remember can set the whole Class C or multiple Class C for your domain.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.