Default Reverse Lookup name for unused IP in unbound
JAHANZAIB SYED
aacable at hotmail.com
Fri Sep 23 12:03:27 UTC 2022
Ok with wildcard tip, I proceed little further.
I added following record in reverse zone
* IN PTR example.com.
Now If I do nslookup for any LAN IP (pool 192.168.1.x/24) who doesn't have any PTR record, it resolves to
> 192.168.1.200
Name: example.com
Address: 192.168.1.200
How can I turn this example.com to default as IP.example.com (e.g: 192-168-1-200.example.com)
Regards,
SJZ
<http:///>
________________________________
From: Måns Nilsson
Sent: Friday, September 23, 2022 4:05 PM
To: JAHANZAIB SYED
Cc: unbound-users at lists.nlnetlabs.nl
Subject: Re: Default Reverse Lookup name for unused IP in unbound
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 at 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?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nlnetlabs.nl/pipermail/unbound-users/attachments/20220923/96bf0d15/attachment.htm>
More information about the Unbound-users
mailing list