Score:0

Adguard Home doesn't return local IP for domain when rewriting, but returns external IP

cn flag

I have three domains i want to have mapped:

  1. r2.x --> 192.168.165.2
  2. d2.x --> 135.181.103.62
  3. test.x --> 10.1.2.3

I have added these to Adguard Home DNS rewrite. I have tested this with dig on another machine:

Dig for r2.x

❯ dig r2.x

; <<>> DiG 9.16.1-Ubuntu <<>> r2.x ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 54513 ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION: ;r2.x. IN A

;; Query time: 10 msec ;; SERVER: 172.22.160.1#53(172.22.160.1) ;; WHEN: Wed Jun 23 08:56:00 CEST 2021 ;; MSG SIZE rcvd: 22

Dig for d2.x

❯ dig d2.x

; <<>> DiG 9.16.1-Ubuntu <<>> d2.x ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 27472 ;; flags: qr rd ad; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0 ;; WARNING: recursion requested but not available

;; QUESTION SECTION: ;d2.x. IN A

;; ANSWER SECTION: d2.x. 0 IN A 135.181.103.62

;; Query time: 10 msec ;; SERVER: 172.22.160.1#53(172.22.160.1) ;; WHEN: Wed Jun 23 09:08:11 CEST 2021 ;; MSG SIZE rcvd: 42

Dig for test.x

❯ dig test.x

; <<>> DiG 9.16.1-Ubuntu <<>> test.x ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 1501 ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 4096 ;; QUESTION SECTION: ;test.x. IN A

;; Query time: 50 msec ;; SERVER: 172.22.160.1#53(172.22.160.1) ;; WHEN: Wed Jun 23 09:08:58 CEST 2021 ;; MSG SIZE rcvd: 35

I can't figure out why Adguard Home doesn't want to resolve domains when the A record is a local IP. The strange thing is that the query log for test.x does in fact show a response with IP

Adguard home query log for test.x

Still dig doesn't show me anything. It is the same with nslookup:

➜ nslookup test.x Server: amplifi.lan Address: 192.168.165.1

*** amplifi.lan can't find test.x: Non-existent domain

But for d2.x nslookup resolves just fine

➜ nslookup d2.x Server: amplifi.lan Address: 192.168.165.1

Non-authoritative answer: Name: d2.x Address: 135.181.103.62

There is nothing standing out in my upstream:

AdGuard Home upstream settings

I run version v0.106.3 of AdGuard Home on a raspberry pi.

I am not a network admin, nor am i a DNS wizard.

Can anyone here tell me why dig only gets shown external IPs, but not local IPs?

Score:0
cn flag

This was solved by manually adding the AdGuard Home as a alternate DNS Alternate DNS

The strange thing is still:

  1. my router is still requesting the test.x on the AdGuard Home
  2. AdGuard Home still answers with "test.x has this IP"
  3. dig is returning the IP, but is now using the alternate DNS

This i think i strange, because my router is resolving the IP correctly, I can see the resolve in the query log (AdGuard is saying "here is the IP for test.x).

I am sure there is a good explanation. I would still like to have one, but for now, it is resoling everything correctly, and i like that.

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.