OPNsense Forum

Archive => 23.1 Legacy Series => Topic started by: dnll on April 27, 2023, 06:22:10 AM

Title: opnsense dns with multiple subnets
Post by: dnll on April 27, 2023, 06:22:10 AM
Rather simple issue here, when I try to ping opnsense with its hostname it replies from a different IP every time.

(https://i.imgur.com/kuY00kF.png)

All of those addresses are different subnets. I'm doing my tests from the 10.1.1.0/24 subnet (which has access to all the other subnets). Is there a way to make it so that the DNS answers with the IP from the correct segment when asked about itself?

I'm using Unbound.
Title: Re: opnsense dns with multiple subnets
Post by: franco on April 27, 2023, 08:48:56 AM
What version are you using? I don't think that is any longer the case with latest versions or at least it was supposed to be fixed...


Cheers,
Franco
Title: Re: opnsense dns with multiple subnets
Post by: CJ on April 27, 2023, 01:46:45 PM
Quote from: franco on April 27, 2023, 08:48:56 AM
What version are you using? I don't think that is any longer the case with latest versions or at least it was supposed to be fixed...


Cheers,
Franco

It's still the case on 23.1.5_4.  I haven't had a chance to update to 23.1.6 yet.
Title: Re: opnsense dns with multiple subnets
Post by: franco on April 27, 2023, 02:14:24 PM
Which service are you using? And did you select specific interfaces or left it to "all (recommended)"?


Cheers,
Franco
Title: Re: opnsense dns with multiple subnets
Post by: dnll on April 27, 2023, 06:50:16 PM
Quote from: franco on April 27, 2023, 02:14:24 PM
Which service are you using? And did you select specific interfaces or left it to "all (recommended)"?


Cheers,
Franco
I don't understand your question? What do you mean, which specific interface? You mean in Unbound settings? I left it untouched to "all".

Attached is a list of my running services. I'm still on 22.1.10 but someone else replied with another version. (https://uploads.tapatalk-cdn.com/20230427/08c980720492813da03b58ab80b79481.jpg)

Sent from my Pixel 7 Pro using Tapatalk

Title: Re: opnsense dns with multiple subnets
Post by: franco on April 27, 2023, 10:12:28 PM
Ok so "Do not register system A/AAAA records" was added for this in 22.7.3. A bit of a non-issue here ;)


Cheers,
Franco
Title: Re: opnsense dns with multiple subnets
Post by: dnll on April 28, 2023, 02:00:25 AM
Just upgraded to 22.7.4 and... can't find that option in Unbound settings or general settings?

I will complete the upgrades up to 23.7 later on tonight and will report back if I find that new setting. Didn't realize I was so far back.
Title: Re: opnsense dns with multiple subnets
Post by: dnll on April 28, 2023, 06:29:01 AM
Can confirm it's in the Unbound general settings starting with version 23.1. I just enabled the option and added an override for the IP I want it to be, works like a charm.
Title: Re: opnsense dns with multiple subnets
Post by: franco on April 28, 2023, 08:31:37 AM
Did you mistake 22.7_4 for 22.7.4 perhaps?


Cheers,
Franco
Title: Re: opnsense dns with multiple subnets
Post by: dnll on April 28, 2023, 02:20:08 PM
Quote from: franco on April 28, 2023, 08:31:37 AM
Did you mistake 22.7_4 for 22.7.4 perhaps?


Cheers,
Franco
Definitely did, I updated through the web UI and never saw 22.7.4. Had to update ~4 times to get to 23.1.6.

Sent from my Pixel 7 Pro using Tapatalk