cancel
Showing results for 
Search instead for 
Did you mean: 
Replies are disabled for this topic. Start a new one or visit our Help Center.

Nest Wifi - Reverse DNS lookup not working

ShellDude
Community Member

I use DHCPD on my Nest Router for managing my LAN subnet reservations / leases and a custom DNS server defined on my Nest Wi-fi network that i use for my own purposes.

For normal resolution, everything works fine.  The Nest Router forwards all forward lookups to my internal DNS server for entries it does not manage via its own DHCP server and resolves those it does manage (.lan) directly.  

However, it looks like the Nest Router provides NO support for ANY reversed lookups.  

Example (host is configured as a RESERVATION on the Nest Router - DNS managed  by my custom DNS server):

 

> SERVER <NEST ROUTER>
...
> <NAME MANAGED VIA CUSTOM DNS>
...
Address: <RESERVED ADDRESS>
> <RESERVED ADDRESS>
** server can't find <REVERSED ADDRESS>.in-addr.arpa: NXDOMAIN

> SERVER <CUSTOM DNS>
...
> <NAME MANAGED VIA CUSTOM DNS>
...
Address: <RESERVED ADDRESS>
> <RESERVED ADDRESS>
<REVERSED RESERVED ADDRESS>.in-addr.arpa	name = <NAME MANAGED BY CUSTOM DNS>

 

 

The same applies for any LEASES the Nest Router manages itself .

Example (Nest Router hands out normal lease and is authority for the name):

 

> SERVER <NEST ROUTER>
...
> <NAME MANAGED VIA NEST ROUTER LEASE>
...
Address: <LEASED ADDRESS>
> <LEASED ADDRESS>
** server can't find <REVERSED ADDRESS>.in-addr.arpa: NXDOMAIN

 

The expected behavior is that the Nest Router would provide the reversed lookup for any LEASES it manages and forward any RESERVATIONS to my Custom DNS. Server, just like it does forward lookups.

 

7 REPLIES 7

MichaelP
Diamond Product Expert
Diamond Product Expert

Hello @ShellDude 

I did a little experimenting with this on my own network here. It looks like it only works when asking for a PTR record rather than an A record. I used the 'dig' tool for this and compared the query it sends using the '-x' flag to one built by hand using the ...in-addr.arpa approach.

For example:

dig @192.168.86.1 -x 192.168.86.63

generates a query that looks like:

63.86.168.192.in-addr.arpa. IN PTR

...which produces the expected .lan host name (not just for reserved addresses, either – it seems to work for all the addresses handed out by DHCP).

 

Whereas:

dig @192.168.86.1 63.86.168.192.in-addr.arpa

generates a query that looks like

63.86.168.192.in-addr.arpa. IN A

(asking for an IPv4 "A" record), which doesn't work. But, this:

dig @192.168.86.1 63.86.168.192.in-addr.arpa PTR

(specifying you want a PTR record explicitly), does work just like the '-x' flag.

 

So, it does seem to work, as long as the reverse lookup request is asking for the right thing.

Edit to add: I don't think it's going to delegate reverse lookups to your custom server, though.

AbigailF
Community Specialist
Community Specialist

Hey folks, 

Thanks for lending a hand, @MichaelP.
@ShellDude, I wanted to follow up and see if you are still in need of any help. Please let me know if you are still having any concerns or questions from here, as I would be happy to take a closer look and assist you further.

Thanks,
Abi

ShellDude
Community Member

um yeah.... while @MichaelP did show a functional dig command, I'd like him to demonstrate a working example of doing a reverse lookup using traditional methods, like a socket.getnameinfo() call in python, or a gethostbyaddr() in c.

This is broken y'all.  I don't know how else to explain it.

 

In even more simple terms, the way I fixed this was to disable DHCP entirely on my Nest Hub and now my custom dns server also doubles as my network's DHCP server.

MichaelP
Diamond Product Expert
Diamond Product Expert

Hello @ShellDude 

Just a clarification, I don't work for Google. I'm just a customer who enjoys helping people solve problems. But, I am a computer engineer. So, here's a quick C program that reverse resolves addresses in the ".lan" domain on my Google WiFi system here:

#include <stdio.h>
#include <stdlib.h>

#include <arpa/inet.h>
#include <netdb.h>

int main(int argc, char *argv[]) {
    const char *addrString;
    struct in_addr address;
    struct hostent *host;

    if(argc < 2) {
        fprintf(stderr, "usage: %s <IPv4-address>\n", argv[0]);
        exit(-1);
    }
    addrString = argv[1];

    if(!inet_aton(addrString, &address)) {
        fprintf(stderr, "can't parse IP address %s\n", addrString);
        exit(-1);
    }

    host = gethostbyaddr(&address, sizeof address, AF_INET);
    if(host == NULL) {
        fprintf(stderr, "cannot reverse resolve address %s\n", addrString);
        exit(-1);
    }

    printf("Hostname for %s is: %s\n", addrString, host->h_name);
}

 This works as long as the system I run it on is pointing at the Google WiFi router for DNS resolution. This is also my DHCP server.

Jhonleanmel
Community Specialist
Community Specialist

Hey folks, 

MichaelP, appreciate your helpful response. 
ShellDude, chiming in to ensure everything is good here. Have you had the chance to try the suggestion above? If yes, how is it?

Best,
Mel

AbigailF
Community Specialist
Community Specialist

Hey ShellDude,

We’d like to check in again in case you have any further questions or concerns. Feel free to reply to this thread and we’ll help you out.

Regards, 
Abi

AbigailF
Community Specialist
Community Specialist

Hi ShellDude,

We haven't heard from you in a while so we'll be locking this thread if there is no update within 24 hours. If you have any new issues, updates or just a discussion topic, feel free to start a new thread in the Community.

Cheers, 
Abi