OPNsense Forum

English Forums => 24.7, 24.10 Legacy Series => Topic started by: defaultuserfoo on October 11, 2024, 01:49:25 AM

Title: KEA: how to specify DNS server(s) per subnet?
Post by: defaultuserfoo on October 11, 2024, 01:49:25 AM
Hi,

how can I specify different DNS server(s) per subnet when using KEA?
Title: Re: KEA: how to specify DNS server(s) per subnet?
Post by: dseven on October 11, 2024, 01:54:41 AM
Edit the subnet, and uncheck "Auto collect option data"
Title: Re: KEA: how to specify DNS server(s) per subnet?
Post by: defaultuserfoo on October 11, 2024, 03:44:49 AM
Thank you very much!

The help text of that option could be more clear.  Here's a suggestion:


Automatically update option data for relevant attributes as routers,
dns servers and ntp servers when applying settings from the gui.


Perhaps make that


Use data from the settings of this firewall for DHCP options given
to clients when the 'Auto collect option data' option is enabled.
With this option disabled, you can specify the DHCP options
given to clients manually.


... and rename that option to something like 'Use default DHCP options'.


PS: Is there a way to specify multiple DNS servers?  I tried that and it said I need to specify valid addresses.
Title: Re: KEA: how to specify DNS server(s) per subnet?
Post by: dseven on October 11, 2024, 11:13:32 AM
Quote from: defaultuserfoo on October 11, 2024, 03:44:49 AM
PS: Is there a way to specify multiple DNS servers?  I tried that and it said I need to specify valid addresses.

I usually type the first one, then hit the Tab key (which should turn what you typed into a ... thing, with an 'x'), then type the second, etc. Another way is to click outside the field, then click inside again (to refocus).
Title: Re: KEA: how to specify DNS server(s) per subnet?
Post by: defaultuserfoo on October 11, 2024, 12:20:12 PM
Thanks, it's working now!

I guess it didn't like that I copied and pasted two addresses at the same time into the field.
Title: Re: KEA: how to specify DNS server(s) per subnet?
Post by: Patrick M. Hausen on October 11, 2024, 12:35:17 PM
You can copy & paste a bunch of addresses/networks into these multi entry fields if you separate them by commas. Like 1.2.3.4,5.6.7.8 in the case of DNS servers. Make sure there are no spaces, though!
Title: Re: KEA: how to specify DNS server(s) per subnet?
Post by: defaultuserfoo on October 11, 2024, 06:15:34 PM
Oh, cool, I didn't know that!  I pasted them with space(s) in between ...