OPNsense Forum

English Forums => Development and Code Review => Topic started by: Patrick M. Hausen on March 30, 2021, 10:53:02 PM

Title: Vagrant environment for OPNsense or plugin development
Post by: Patrick M. Hausen on March 30, 2021, 10:53:02 PM
After two evenings of work I present a VM environment for development work in the OPNsense context.

The project uses Hashicorp's Vagrant and Oracle's VirtualBox. When you checkout and start the project you will be greeted with an OPNsense VM with two interfaces (WAN and LAN) and passwordless login via SSH and passwordless sudo.

I have relaxed the security a bit (compared with a production system). Vagrant uses port-forwarding to connect via SSH from the WAN interface, so I enabled SSH on all interfaces and created a floating firewall rule permitting access. The "box" as Vagrant calls it is behind the VirtualBox builtin NAT, so no connection from the outside is possible if your development system (Mac, Windows, Linux, ...) is reasonably secured.

https://github.com/punktDe/vagrant-opnsense

Feedback is of course always welcome. I would specifically appreciate success (or failure) reports from people running platforms other than Mac OS as their desktop.


Kind regards,
Patrick
Title: Re: Vagrant environment for OPNsense or plugin development
Post by: Patrick M. Hausen on March 30, 2021, 11:09:37 PM
In case someone is interested - the base Vagrant box I use to convert into an OPNsense appliance is generated by this project:

https://github.com/punktDe/vagrant-freebsd-boxbuilder