OPNsense
  • Home
  • Help
  • Search
  • Login
  • Register

  • OPNsense Forum »
  • English Forums »
  • General Discussion »
  • Unbound NS/SOA records for private domains
« previous next »
  • Print
Pages: [1]

Author Topic: Unbound NS/SOA records for private domains  (Read 8246 times)

eugenmayer

  • Newbie
  • *
  • Posts: 24
  • Karma: 2
    • View Profile
Unbound NS/SOA records for private domains
« on: June 03, 2018, 09:59:51 am »
I am using a public TLD for which i use the private-domain flag in unbound and also a domain override.

So lets assume it company.com - i use the namespace <namspace>.company.com as a internal domain, so internal.company.com. (Domain override in unbound).

The problem now is, that i am using a tool form ACME DNS-01 challenges which will do a dns lookup on the default DNS server ( OPNsense in this question ) searching for a NS record ( primary nameserver for company.com ) like

Code: [Select]
dig mysub1.internal.company.com NS
during the challenge. If it finds a NS record, it will poll the primary server for a TXT record created durin DNS-01- if it does not find a NS server it will fail.

Apperently with OPNsense + unbound + domain override that NS responses are all empty. I ask myself how could i potentially fix that.

So

Code: [Select]
dig mysub1.internal.company.com NS
and

Code: [Select]
dig internal.company.com NS are emt
are empty, since the domain override is on internal.company.com

Code: [Select]
dig company.com NS
will return the problem primary NS (public server)

Any hints on how to solve this?
Logged

fabian

  • Hero Member
  • *****
  • Posts: 2769
  • Karma: 200
  • OPNsense Contributor (Language, VPN, Proxy, etc.)
    • View Profile
    • Personal Homepage
Re: Unbound NS/SOA records for private domains
« Reply #1 on: June 03, 2018, 10:17:27 am »
NS records can be created in an advanced configuration. The configuration like looks like the one generated here in the code:
https://github.com/opnsense/core/pull/2097/files#diff-a89985242e1eea6a91d3e103e3353d5cR594
Logged

eugenmayer

  • Newbie
  • *
  • Posts: 24
  • Karma: 2
    • View Profile
Re: Unbound NS/SOA records for private domains
« Reply #2 on: July 17, 2018, 11:34:43 am »
thank you @fabian. Not sure what you refer to in the commit .. those things? https://github.com/opnsense/core/pull/2097/files#diff-a89985242e1eea6a91d3e103e3353d5cR584 .. Thanks
Logged

eugenmayer

  • Newbie
  • *
  • Posts: 24
  • Karma: 2
    • View Profile
Re: Unbound NS/SOA records for private domains
« Reply #3 on: July 17, 2018, 03:34:03 pm »
for anybody running into that, use "typetransparent" instead of "transparent" in unbound
Logged

random1104

  • Jr. Member
  • **
  • Posts: 79
  • Karma: 0
    • View Profile
Re: Unbound NS/SOA records for private domains
« Reply #4 on: July 22, 2021, 07:07:27 pm »
Sorry for the necroposting but feels relevant to the original quest, is this possible today?. I need SOA/NS records for the domain managed by the firewall, it's basically to emulate a "well behaved" authoritative DNS?
Logged

random1104

  • Jr. Member
  • **
  • Posts: 79
  • Karma: 0
    • View Profile
Re: Unbound NS/SOA records for private domains
« Reply #5 on: July 22, 2021, 09:56:02 pm »
for the record, this is the way: https://docs.opnsense.org/manual/unbound.html#advanced-configurations

If running CARP, configuration should be done on both nodes.
Logged

kd.gundermann

  • Newbie
  • *
  • Posts: 27
  • Karma: 0
    • View Profile
Re: Unbound NS/SOA records for private domains
« Reply #6 on: August 19, 2022, 04:13:26 pm »
I am having the same problem too, but neither switching to "typetransparent" in Unbound -> General
nor creating a Template with
Code: [Select]
server:
  private-domain: intern.mydomain.de
  private-domain: video.mydomain.de
allowes me to resolve SOA/NS records.

Reading the unbound docs:
Quote
private-domain: <domain name> Allow this domain, and all its subdomains to contain private addresses
I don't understand how this would enable/create SOA/NS records.

Am I missing something? How could I create SOA/NS records ?
Logged

Maurice

  • Hero Member
  • *****
  • Posts: 1213
  • Karma: 158
    • View Profile
    • GitHub
Re: Unbound NS/SOA records for private domains
« Reply #7 on: August 19, 2022, 05:38:20 pm »
You have to create local-zone and local-data entries (see the unbound.conf man page). But please remember:

Quote
4. Non-Goals
  • An authoritative name server
  • Too many Features
https://www.nlnetlabs.nl/documentation/unbound/requirements/

Cheers
Maurice
Logged
OPNsense virtual machine images
OPNsense aarch64 firmware repository

Commercial support & engineering available. PM for details (en / de).

kd.gundermann

  • Newbie
  • *
  • Posts: 27
  • Karma: 0
    • View Profile
Re: Unbound NS/SOA records for private domains
« Reply #8 on: August 19, 2022, 06:48:30 pm »
Hi Maurice,

Quote from: Maurice on August 19, 2022, 05:38:20 pm
4. Non-Goals
  • An authoritative name server

so what would you recommend ?? Installing os-bind as an authoritative name server on opnsense?
Do you know of any documentation how to configure bind together with unbound in OPNsense ?

Thank you very much
Klaus
Logged

Maurice

  • Hero Member
  • *****
  • Posts: 1213
  • Karma: 158
    • View Profile
    • GitHub
Re: Unbound NS/SOA records for private domains
« Reply #9 on: August 20, 2022, 04:43:18 pm »
@kd.gundermann, depends on your use case. If you want an authoritative name server running on OPNsense itself, the BIND plugin is currently the go-to option. Or you run a name server on a separate machine (which is what I do).

There is some info about the BIND plugin in the official OPNsense docs, otherwise just search the forum.

Cheers
Maurice
Logged
OPNsense virtual machine images
OPNsense aarch64 firmware repository

Commercial support & engineering available. PM for details (en / de).

  • Print
Pages: [1]
« previous next »
  • OPNsense Forum »
  • English Forums »
  • General Discussion »
  • Unbound NS/SOA records for private domains
 

OPNsense is an OSS project © Deciso B.V. 2015 - 2024 All rights reserved
  • SMF 2.0.19 | SMF © 2021, Simple Machines
    Privacy Policy
    | XHTML | RSS | WAP2