Community discussions

MikroTik App
 
jonofe
just joined
Topic Author
Posts: 6
Joined: Sat Dec 02, 2017 12:18 am

Multiple PTRs for same IP in ROS Static DNS

Sun Oct 24, 2021 3:13 pm

Hi Guys,

I'm using the static DNS feature in my RB4011 (FW 6.48.4) to resolve DNS request for my private domain.
For some devices I have defined multiple entries with the same A recorde, means same IP, because the are serving multiple purposes (proxy.mydomain.home, adguard.mydomain.home, etc.)
In general that works perfectly fine.

When it comes to reverse lookups, it seems ROS is automatically creating one PTR per static DNS entry, which results in multiple PTR belonging to the same IP. And in addition ROS is responding to reverse lookups in a kind of round robin method responding always with different DNS names.

Is it somehow possible to deactivate that behavior, to get e a unique reverse lookup resolution?
Would be greate to have checkbox when creating a new entry, where you could decide, whether you want to have a PTR or not.

Thanks in advance fpr your feedback.

BR, André
 
User avatar
mkx
Forum Guru
Forum Guru
Posts: 11587
Joined: Thu Mar 03, 2016 10:23 pm

Re: Multiple PTRs for same IP in ROS Static DNS

Mon Oct 25, 2021 6:57 pm

In my not so limited history with DNS I never saw DNS server returning more than one PTR record for single IP address. And I always worked with full-featured DNS servers. So this behaviour doesn't seem to be ROS-specific in any way.
What you could do (and still wouldn't seem weird) is to create multiple CNAME records, all pointing to same canonical name. If records of CNAME type are supported by ROS' DNS server.

BTW, it seems that times when positive reverse lookup for a FQDN meant site had some legitimacy are long gone. Doesn't matter with all the CDNs around the net ...
 
jonofe
just joined
Topic Author
Posts: 6
Joined: Sat Dec 02, 2017 12:18 am

Re: Multiple PTRs for same IP in ROS Static DNS

Fri Oct 29, 2021 11:32 am

I'm not saying, that the Mikrotik Router is returning more than one PTR at a time, but if you have defined multiple static DNS entries for the same IP and you do reverse lookups on that IP, you don't get always the same name, but the different names in a round robin process.

To explain better what I mean, try this:
[admin@Router] > /ip dns static add address=10.10.10.10 name=s1.net.local
[admin@Router] > /ip dns static add address=10.10.10.10 name=s2.net.local 
[admin@Router] > /ip dns static add address=10.10.10.10 name=s3.net.local 
[admin@Router] > put [:resolve 10.10.10.10]]                                
s1.net.local
[admin@Router] > put [:resolve 10.10.10.10]]
s2.net.local
[admin@Router] > put [:resolve 10.10.10.10]]
s3.net.local
[admin@Router] > put [:resolve 10.10.10.10]]
s1.net.local
[admin@Router] > put [:resolve 10.10.10.10]]
s2.net.local
[admin@Router] > put [:resolve 10.10.10.10]]
s3.net.local
So there seems to be 3 PTR for one single IP and ROS delivers in round robin the DNS names if you are doing reverse lookups.
I would like to specify for which static DNS entry ROS creates a PTR, to be able to have a deterministic response to reverse lookups.

Who is online

Users browsing this forum: derolf, esantos999, pants6000, wsantos and 58 guests