vagrant
vagrant copied to clipboard
OPNsense guest plugin
Description
Even though OPNsense is based on FreeBSD, hostname settings are not managed via the /etc/rc.conf. To correctly configure hostname (and domainname) in OPNSense the /conf/config.xml has to be updated with the desired values. After that the Firewall has to be reloaded with the /usr/local/etc/rc.reload_all command. This ensures that the changes in the config file are applyed through the whole system.
Example
-
Vagrantfile:
Vagrant.configure("2") do |config| config.vm.box = "fbertagna/opnsense" config.vm.box_version = "22.1.2" config.vm.hostname = "opnsense.vagrant.test" end -
vagrant up -
Firewall is configured:

See #12817
Hi there, thanks for opening up a PR for adding support for OPNsense guests! This change set looks great. But as we move towards Vagrant 3.0 we are looking to externalize plugins that aren't critical to Vagrant's core functions. So, would you consider building this plugin as an external plugin? This should be really easy to do (you already did all the hard work of implementing the required capabilities) using the template repo for building guest plugins.
Thanks for the feedback. The guest plugin has been externalized and published to rubygems.org.
- repo: https://github.com/puzzle/vagrant-guest-opnsense
- gem: https://rubygems.org/gems/vagrant-guest-opnsense
I think with that done, this MR can be closed.
Tanks for your time.