Project

General

Profile

Actions

Bug #10143

open

System hostname DNS entry is assigned to the wrong IP on multi-wan setups

Added by Daniel Pereira over 4 years ago.

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

0%

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

Description

According to the official docs, pfSense has kept the first and the second interface named WAN and LAN respectively, for history (legacy?) reasons.

When we have a multi-wan setup and eventually one of the WAN gateways is assigned to the "LAN" interface, the System DNS name ends up being resolved as the external IP address, instead of as the internal one. Overriding it does not work because instead of actually overriding, it in fact just adds a new "A" entry on the DNS response.

Currently, as shown here, the way that it finds which IP to assign to the $hostname.$domain is by getting whichever IP is assigned to the "LAN" interface, which might be assigned to a gateway.

1. Could we add some configuration so that one can tell the DNS resolver which interface the hostname DNS entry should get the address from, being defaulted to the first not assigned to a gateway?
2. Overriding the hostname.domain doesn't work, it just adds a new A entry to the DNS response. Is this expected?

❯ dig router.lan                               

; <<>> DiG 9.14.9 <<>> router.lan
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 35394
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1

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

;; ANSWER SECTION:
router.lan.        3600    IN    A    177.XXX.XXX.XXX
router.lan.        3600    IN    A    192.168.1.1

;; Query time: 0 msec
;; SERVER: 192.168.1.1#53(192.168.1.1)
;; WHEN: Tue Dec 31 17:28:54 -03 2019
;; MSG SIZE  rcvd: 71

No data to display

Actions

Also available in: Atom PDF