Project

General

Profile

Actions

Bug #14331

open

rDNS for the Hostname IP is first DNS override rather than hostname

Added by Pete Holzmann over 1 year ago. Updated over 1 year ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
DNS Resolver
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Plus Target Version:
Release Notes:
Default
Affected Version:
All
Affected Architecture:
All

Description

Expected Function:
Given that Hostname produces a typical local DNS entry for subnets, eg:
`local-data: "my.dom.ain. A 192.168.1.1"`
I expect the rDNS to match, ie:
`local-data-ptr: "192.168.1.1 my.dom.ain"`
This brings clarity and sense to all kinds of monitoring and cataloging systems.

Actual Outcome / BUG:
rDNS is set to the first name alphabetically, in the list of unbound host overrides.
If I have aa-test.dom.ain, the rDNS for the IP is
`local-data-ptr: "192.168.1.1 aa-test.dom.ain"`

(Not sure if related, and I consider this minor by comparison: no rDNS names are autoassigned to other local subnet gateway IP's)

Ref: https://forum.netgate.com/topic/179526/where-does-freebsd-store-hostname-once-set/13?_=1682947251607

Actions #1

Updated by Danilo Zrenjanin over 1 year ago

I couldn't reproduce it.

A hostname defined under System>General is pftest2.ipbgd.office

I made a host override record - aa.ipbgd.office pointing to the LAN IP address 192.168.10.2

Here is the content of the /var/unbound/host_entries.conf

local-zone: "ipbgd.office." transparent
local-data-ptr: "127.0.0.1 localhost.ipbgd.office" 
local-data: "localhost. A 127.0.0.1" 
local-data: "localhost.ipbgd.office. A 127.0.0.1" 
local-data-ptr: "::1 localhost.ipbgd.office" 
local-data: "localhost. AAAA ::1" 
local-data: "localhost.ipbgd.office. AAAA ::1" 
local-data-ptr: "192.168.10.2 pftest2.ipbgd.office" 
local-data: "pftest2.ipbgd.office. A 192.168.10.2" 
local-data: "aa.ipbgd.office. A 192.168.10.2" 

Here is what I get when I execute dig @127.0.0.1 -x 192.168.10.2

;; ANSWER SECTION:
2.10.168.192.in-addr.arpa. 3600    IN    PTR    pftest2.ipbgd.office.

It looks valid to me.

Actions #2

Updated by Pete Holzmann over 1 year ago

Danilo Zrenjanin wrote in #note-1:

I couldn't reproduce it.

A hostname defined under System>General is pftest2.ipbgd.office

I assume you mean the hostname? ;)

VERY interesting.

I made a host override record - aa.ipbgd.office pointing to the LAN IP address 192.168.10.2

Here are some additional differences between your test and mine. Perhaps one or more of these poke at the "real" issue?

1) I have ipv6 enabled. Thus, the start of my hosts_unbound is
  • Same local-zone
  • Same half-dozen localhost.* lines
  • ipv6 entry and reverse for my hostname

PERHAPS that is the real bug! Because...

2) I have a host override record defined for my hostname! Without that, it doesn't exist at all for ipv4?!!

3) I also have many other host overrides defined, both pointing to my pfSense gateway (192.168.1.1 -- .2 and .3 are CARP IP's), and for other VLANs.

Actions

Also available in: Atom PDF