Subject: Default Reverse Lookup name for unused IP in unbound Date: Fri, Sep 23, 2022 at 10:06:30AM +0000 Quoting JAHANZAIB SYED via Unbound-users (unbound-users@lists.nlnetlabs.nl): > If I query reverse look via any public dns for my ISP's different Ip > address, I get this result,,, > > For every IP on which my ISP have made custom record I get this result: > ** nslookup 111.111.111.158 > nslookup 111.111.111.159.myisp.com > Name: company1.isp.com > ** nslookup 111.111.111.159 > nslookup 111.111.111.159.myisp.com > Name: company2.isp.com > > For several other hundreds IP addresses of my ISP, I get this result as > default > > ** nslookup 111.111.111.160 > Name: 111-111-111-160.myisp.com > Address: 111.111.111.160 > > > ** nslookup 111.111.111.161 > Name: 111-111-111-161.myisp.com > Address: 111.111.111.161 > > How this is done that every unused ip, no ping replies from them and each ip > is showing isp name by default? Do ISP creates manual records for there > unused IP's as well or is there any geenral statemetn defined in there dns? > How I can do this in my Unbound config so that if I do Nslookup for any > unused Ip of my LAN it should return like x-x-x-x-mydomain.com ?
The easy way is by installing a wildcard in the reverse zone: *.e.1.0.8.4.0.0.0.8.9.2.0.1.0.a.2.ip6.arpa. 3600 IN PTR unpop-node.besserwisser.org. Giving: $ dig -x 2a01:298:4:801e::0de ; <<>> DiG 9.18.6 <<>> -x 2a01:298:4:801e::0de ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 61153 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1 ;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 4096 ; COOKIE: 5ca933867037179b69ac210f632d8dbd1308320f4deed845 (good) ;; QUESTION SECTION: ;e.d.0.0.0.0.0.0.0.0.0.0.0.0.0.0.e.1.0.8.4.0.0.0.8.9.2.0.1.0.a.2.ip6.arpa. IN PTR ;; ANSWER SECTION: e.d.0.0.0.0.0.0.0.0.0.0.0.0.0.0.e.1.0.8.4.0.0.0.8.9.2.0.1.0.a.2.ip6.arpa. 3514 IN PTR unpop-node.besserwisser.org. Reverse DNS of course is like any other DNS, valid strings are valid strings: ; <<>> DiG 9.18.6 <<>> blatant.config.ignorance.e.1.0.8.4.0.0.0.8.9.2.0.1.0.a.2.ip6.arpa. PTR ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 16174 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1 ;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 4096 ; COOKIE: 6f371eae447b44183d532a08632d8e0ec4f9de577cc0854f (good) ;; QUESTION SECTION: ;blatant.config.ignorance.e.1.0.8.4.0.0.0.8.9.2.0.1.0.a.2.ip6.arpa. IN PTR ;; ANSWER SECTION: blatant.config.ignorance.e.1.0.8.4.0.0.0.8.9.2.0.1.0.a.2.ip6.arpa. 3600 IN PTR unpop-node.besserwisser.org. If you want to have a more special RDATA section in the reply, an active authoritative server is required, where ansvers are synthesized on-the-fly. -- Måns Nilsson primary/secondary/besserwisser/machina MN-1334-RIPE SA0XLR +46 705 989668 Are we on STRIKE yet?
signature.asc
Description: PGP signature