OPNsense Forum

Archive => 22.1 Legacy Series => Topic started by: qdrop on April 13, 2022, 03:54:52 pm

Title: Automatic minimal setup / provisioning
Post by: qdrop on April 13, 2022, 03:54:52 pm
Hi everyone.

We're currently evaluating OPNsense as our gateway software of choice for a large-scale rollout (potentially up to 100 devices in multple countries).

One usecase we're a bit struggling on currently is an automated setup / provisioning routine: We would like to get a new appliance (hardware) online as easily as possible.

We're aware that we can simply put the nano version on a USB-stick and boot from there. But how can we inject an initial config.xml into that image so that this gets applied on boot?

It's ok if an employee only has to configure the BIOS (remotely via a videocall) and plugin a USB-stick. But we don't want that these employees have to coupe with network configuration tasks.

Are there any howtos or recommended procedures to accomplish that?

Best

Thomas
Title: Re: Automatic minimal setup / provisioning
Post by: zerwes on April 13, 2022, 09:00:10 pm
Hello.
We have similar challenge ...
Currently I am focusing on the configuration via ansible:
https://github.com/Rosa-Luxemburgstiftung-Berlin/ansible-opnsense
And for the preseed / unattendet install I just found https://www.freebsd.org/cgi/man.cgi?bsdinstall(8)
So I am interested here too ...
Title: Re: Automatic minimal setup / provisioning
Post by: qdrop on April 14, 2022, 10:04:45 am
I will try to check what happens if you use the nano edition and inject a config.xml directly into the image. It should actually boot properly.

That would to for us: As long as a user can just insert a USB-stick to get it running, we're fine.
Title: Re: Automatic minimal setup / provisioning
Post by: zerwes on April 20, 2022, 08:03:55 am
Just another hint to share, as I was just documenting the current state of our project ...
maybe the opnsense-importer might help you ...
the official documentation is kind of terese (maybe just waiting for a good pull request! it's oss!) https://docs.opnsense.org/manual/install.html#opnsense-importer
but from the code
https://github.com/opnsense/core/blob/master/src/sbin/opnsense-importer#L318
and the forum
https://forum.opnsense.org/index.php?topic=9442.0
you can get more informations