OPNsense Forum

Archive => 22.7 Legacy Series => Topic started by: johnnylee on September 09, 2022, 08:18:43 pm

Title: os.bind: import DNS records out of band?
Post by: johnnylee on September 09, 2022, 08:18:43 pm
Hi.  Not sure if this the proper place to post.

Wondering if I can populate my bind zone files without having to onesy twosy through the WebUI.  Like I was able to do this for DHCP records by exporting the opnsense config, adding entries to the DHCPD section in the XML file, importing the config, and restoring that service.

Looks like I can just add to the bind section like this:
          <record uuid="bc20f611-d2c8-4d09-ac48-68c864713eb4">
            <enabled>1</enabled>
            <domain>391a631a-5dda-4625-86be-426ba86d5fe5</domain>
            <name>duskull</name>
            <type>A</type>
            <value>10.199.10.1</value>
          </record>

.. would just need to generate unique record UUID's for each new entry.  Assume as long as these UUIDs are unique, it does not really matter what they are?

Thanks, John
Title: Re: os.bind: import DNS records out of band?
Post by: mimugmail on September 09, 2022, 09:49:43 pm
Yep, just replace onw char is fine :)