kea gives out wrong nameserver addresses

Started by defaultuserfoo, Today at 05:10:47 PM

Previous topic - Next topic
Today at 05:10:47 PM Last Edit: Today at 05:12:37 PM by defaultuserfoo
Hi,

how do I make it so that kea gives out the correct name server addresses when answering DHCP requests?

For IPv4, it is wrongly giving out the IP address of the network interface of the subnet.

It needs to give out the IP addresses of the name servers that are configured in System: Settings: General.

The wrong addresses lead to bad things like this:

#:~$ ping -c 3 ifconfig.me
PING ifconfig.me (127.0.0.1) 56(84) bytes of data.
64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.021 ms
64 bytes from localhost (127.0.0.1): icmp_seq=2 ttl=64 time=0.044 ms
64 bytes from localhost (127.0.0.1): icmp_seq=3 ttl=64 time=0.031 ms

--- ifconfig.me ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2032ms
rtt min/avg/max/mdev = 0.021/0.032/0.044/0.009 ms
#:~$ dig ifconfig.me @192.168.3.50

; <<>> DiG 9.18.50 <<>> ifconfig.me @192.168.3.50
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 33669
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
; COOKIE: 05965e03b87ebe05010000006acba6915551276eb8e4afcc (good)
;; QUESTION SECTION:
;ifconfig.me.                   IN      A

;; ANSWER SECTION:
ifconfig.me.            297     IN      A       34.160.111.145

;; Query time: 10 msec
;; SERVER: 192.168.3.50#53(192.168.3.50) (UDP)
;; WHEN: Sun Oct 11 17:09:05 CEST 2026
;; MSG SIZE  rcvd: 84

How does that even work? (192.168.3.50 is the right address of the name server.)
PowerEdge R210II

Deselect "autofill properties" or similar in the subnet and you can configure your own gateway, DNS server, etc.
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

Quote from: Patrick M. Hausen on Today at 05:16:19 PMDeselect "autofill properties" or similar in the subnet and you can configure your own gateway, DNS server, etc.

Cool, thanks!

Why isn't it automatically filled with the right (i. e. configured) name server addresse(s)?
PowerEdge R210II

The right address is the interface address as Unbound is the default DNS server.

What you configure in the general settings is DNS servers the firewall uses for its own DNS queries, not what clients should use.

Most get confused because the firewall is a dns client, and also a dns server.
Hardware:
DEC740

Today at 06:05:38 PM #4 Last Edit: Today at 06:12:04 PM by defaultuserfoo
Quote from: Monviech (Cedrik) on Today at 05:46:48 PMThe right address is the interface address as Unbound is the default DNS server.

What you configure in the general settings is DNS servers the firewall uses for its own DNS queries, not what clients should use.

Most get confused because the firewall is a dns client, and also a dns server.

In 'System: Settings: General' is the option 'Do not use the local DNS service as a nameserver for this system', which I have enabled.  Since the local DNS service is not to be used, giving out the interface address as name server address is wrong.  Sure you can point out that the option says 'for this system' and argue that this doesn't mean systems connected to the network(s) 'this systems' serves. But the IP addresses given out are IP address of 'this system', and the option would obviously mean the systems' addresses are 'not to be used' as name server addresses.  I'd call that splitting hairs.

Unbound is also disabled, so obviously giving out the interface address as name server address is wrong.  That's kinda difficult to split hairs about.

So just do what the user expects.  Maybe clear up the wording.

Improve the help texts:  What happens when the autocollect option is disabled and some of the fields aren't filled in?  For example, I still expect that the domain name configured in 'System: Settings: General' is given out to the DHCP clients unless I put something else in.

Kea has a different behaviour than DHCP, and that isn't good.  DHCPs help text says "Leave blank to use the system default DNS servers: This interface IP address if a DNS service is enabled or the configured global DNS servers."

I expect the same behaviour from kea, or at least better help texts.  Be more user friendly and don't leave the users to guessing.
PowerEdge R210II

Quote from: defaultuserfoo on Today at 06:05:38 PMBe more user friendly and don't leave the users to guessing.
I had ZERO guessing when :
- Installing & Configuring OPNsense for the first time.
- Migrating from ISC DHCP Server to KEA as the DHCP Server.

But then again I am that weirdo that always immediately presses all the "Advanced Settings" and "Expert Options" buttons without trying the basic/standard settings/options first so I guess it depends on what kind of person you are ?! :)
Weird guy who likes everything Linux and *BSD on PC/Laptop/Tablet/Mobile and funny little ARM based boards :)